Description:
upgrade to rails 5.2
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r750:d729ef9d227c - - 18 files changed: 306 inserted, 107 deleted

@@ -0,0 +1,11
1 + #!/usr/bin/env ruby
2 + APP_ROOT = File.expand_path('..', __dir__)
3 + Dir.chdir(APP_ROOT) do
4 + begin
5 + exec "yarnpkg", *ARGV
6 + rescue Errno::ENOENT
7 + $stderr.puts "Yarn executable was not detected in the system."
8 + $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9 + exit 1
10 + end
11 + end
@@ -0,0 +1,25
1 + # Be sure to restart your server when you modify this file.
2 +
3 + # Define an application-wide content security policy
4 + # For further information see the following documentation
5 + # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6 +
7 + # Rails.application.config.content_security_policy do |policy|
8 + # policy.default_src :self, :https
9 + # policy.font_src :self, :https, :data
10 + # policy.img_src :self, :https, :data
11 + # policy.object_src :none
12 + # policy.script_src :self, :https
13 + # policy.style_src :self, :https
14 +
15 + # # Specify URI for violation reports
16 + # # policy.report_uri "/csp-violation-report-endpoint"
17 + # end
18 +
19 + # If you are using UJS then enable automatic nonce generation
20 + # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
21 +
22 + # Report CSP violations to a specified URI
23 + # For further information see the following documentation:
24 + # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
25 + # Rails.application.config.content_security_policy_report_only = true
@@ -0,0 +1,38
1 + # Be sure to restart your server when you modify this file.
2 + #
3 + # This file contains migration options to ease your Rails 5.2 upgrade.
4 + #
5 + # Once upgraded flip defaults one by one to migrate to the new default.
6 + #
7 + # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8 +
9 + # Make Active Record use stable #cache_key alongside new #cache_version method.
10 + # This is needed for recyclable cache keys.
11 + # Rails.application.config.active_record.cache_versioning = true
12 +
13 + # Use AES-256-GCM authenticated encryption for encrypted cookies.
14 + # Also, embed cookie expiry in signed or encrypted cookies for increased security.
15 + #
16 + # This option is not backwards compatible with earlier Rails versions.
17 + # It's best enabled when your entire app is migrated and stable on 5.2.
18 + #
19 + # Existing cookies will be converted on read then written with the new scheme.
20 + # Rails.application.config.action_dispatch.use_authenticated_cookie_encryption = true
21 +
22 + # Use AES-256-GCM authenticated encryption as default cipher for encrypting messages
23 + # instead of AES-256-CBC, when use_authenticated_message_encryption is set to true.
24 + # Rails.application.config.active_support.use_authenticated_message_encryption = true
25 +
26 + # Add default protection from forgery to ActionController::Base instead of in
27 + # ApplicationController.
28 + # Rails.application.config.action_controller.default_protect_from_forgery = true
29 +
30 + # Store boolean values are in sqlite3 databases as 1 and 0 instead of 't' and
31 + # 'f' after migrating old data.
32 + # Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
33 +
34 + # Use SHA-1 instead of MD5 to generate non-sensitive digests, such as the ETag header.
35 + # Rails.application.config.active_support.use_sha1_digests = true
36 +
37 + # Make `form_with` generate id attributes for any generated HTML tags.
38 + # Rails.application.config.action_view.form_with_generates_ids = true
@@ -0,0 +1,34
1 + test:
2 + service: Disk
3 + root: <%= Rails.root.join("tmp/storage") %>
4 +
5 + local:
6 + service: Disk
7 + root: <%= Rails.root.join("storage") %>
8 +
9 + # Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10 + # amazon:
11 + # service: S3
12 + # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13 + # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14 + # region: us-east-1
15 + # bucket: your_own_bucket
16 +
17 + # Remember not to checkin your GCS keyfile to a repository
18 + # google:
19 + # service: GCS
20 + # project: your_project
21 + # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22 + # bucket: your_own_bucket
23 +
24 + # Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25 + # microsoft:
26 + # service: AzureStorage
27 + # storage_account_name: your_account_name
28 + # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29 + # container: your_container_name
30 +
31 + # mirror:
32 + # service: Mirror
33 + # primary: local
34 + # mirrors: [ amazon, google, microsoft ]
@@ -1,94 +1,115
1 source 'https://rubygems.org'
1 source 'https://rubygems.org'
2 + git_source(:github) { |repo| "https://github.com/#{repo}.git" }
2
3
3 #rails
4 #rails
4 - gem 'rails', '~>5.0'
5 + gem 'rails', '~>5.2'
5 gem 'activerecord-session_store'
6 gem 'activerecord-session_store'
7 + gem 'puma'
6
8
9 + # Reduces boot times through caching; required in config/boot.rb
10 + gem 'bootsnap', '>= 1.1.0', require: false
7
11
8 # Bundle edge Rails instead:
12 # Bundle edge Rails instead:
9 # gem 'rails', :git => 'git://github.com/rails/rails.git'
13 # gem 'rails', :git => 'git://github.com/rails/rails.git'
10
14
11 #---------------- database ---------------------
15 #---------------- database ---------------------
12 #the database
16 #the database
13 gem 'mysql2'
17 gem 'mysql2'
14 #for testing
18 #for testing
15 gem 'sqlite3'
19 gem 'sqlite3'
16 gem 'rails-controller-testing'
20 gem 'rails-controller-testing'
17 #for dumping database into yaml
21 #for dumping database into yaml
18 gem 'yaml_db'
22 gem 'yaml_db'
19
23
24 +
25 + #------------- assset pipeline -----------------
20 # Gems used only for assets and not required
26 # Gems used only for assets and not required
21 # in production environments by default.
27 # in production environments by default.
22 - gem 'sass-rails'
28 + #sass-rails is depricated
29 + #gem 'sass-rails'
30 + gem 'sassc-rails'
23 gem 'coffee-rails'
31 gem 'coffee-rails'
24
32
25 # See https://github.com/sstephenson/execjs#readme for more supported runtimes
33 # See https://github.com/sstephenson/execjs#readme for more supported runtimes
26 # gem 'therubyracer', :platforms => :ruby
34 # gem 'therubyracer', :platforms => :ruby
27
35
28 gem 'uglifier'
36 gem 'uglifier'
29
37
30 gem 'haml'
38 gem 'haml'
31 gem 'haml-rails'
39 gem 'haml-rails'
32 - # gem 'prototype-rails'
33 -
34 - # To use ActiveModel has_secure_password
35 - # gem 'bcrypt-ruby', '~> 3.0.0'
36 -
37 - # To use Jbuilder templates for JSON
38 - # gem 'jbuilder'
39
40
40 - # Use unicorn as the app server
41 + # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
41 - # gem 'unicorn'
42 + #gem 'turbolinks', '~> 5'
43 + # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
44 + gem 'jbuilder', '~> 2.5'
42
45
43 - # Deploy with Capistrano
44 - # gem 'capistrano'
45 -
46 - # To use debugger
47 - # gem 'debugger'
48 - #
49
46
50 #in-place editor
47 #in-place editor
51 gem 'best_in_place', '~> 3.0.1'
48 gem 'best_in_place', '~> 3.0.1'
52
49
53 # jquery addition
50 # jquery addition
54 gem 'jquery-rails'
51 gem 'jquery-rails'
55 gem 'jquery-ui-rails'
52 gem 'jquery-ui-rails'
56 gem 'jquery-timepicker-addon-rails'
53 gem 'jquery-timepicker-addon-rails'
57 gem 'jquery-tablesorter'
54 gem 'jquery-tablesorter'
58 gem 'jquery-countdown-rails'
55 gem 'jquery-countdown-rails'
59
56
60 #syntax highlighter
57 #syntax highlighter
61 gem 'rouge'
58 gem 'rouge'
62
59
63 #bootstrap add-ons
60 #bootstrap add-ons
64 gem 'bootstrap-sass', '~> 3.4.1'
61 gem 'bootstrap-sass', '~> 3.4.1'
65 - gem 'sassc-rails', '>= 2.1.0'
66 gem 'bootstrap-switch-rails'
62 gem 'bootstrap-switch-rails'
67 gem 'bootstrap-toggle-rails'
63 gem 'bootstrap-toggle-rails'
68 gem 'autoprefixer-rails'
64 gem 'autoprefixer-rails'
69 gem 'momentjs-rails'
65 gem 'momentjs-rails'
70 gem 'rails_bootstrap_sortable'
66 gem 'rails_bootstrap_sortable'
71 gem 'bootstrap-datepicker-rails'
67 gem 'bootstrap-datepicker-rails'
72 gem 'bootstrap3-datetimepicker-rails'
68 gem 'bootstrap3-datetimepicker-rails'
73 gem 'jquery-datatables-rails'
69 gem 'jquery-datatables-rails'
74
70
75 #----------- user interface -----------------
71 #----------- user interface -----------------
76 #select 2
72 #select 2
77 gem 'select2-rails'
73 gem 'select2-rails'
78 #ace editor
74 #ace editor
79 gem 'ace-rails-ap'
75 gem 'ace-rails-ap'
80 #paginator
76 #paginator
81 gem 'will_paginate', '~> 3.0.7'
77 gem 'will_paginate', '~> 3.0.7'
82
78
83 gem 'mail'
79 gem 'mail'
84 gem 'rdiscount'
80 gem 'rdiscount'
85 gem 'dynamic_form'
81 gem 'dynamic_form'
86 gem 'in_place_editing'
82 gem 'in_place_editing'
87 - gem 'verification', :git => 'https://github.com/sikachu/verification.git'
83 + #gem 'verification', :git => 'https://github.com/sikachu/verification.git'
88
84
89
85
90 #---------------- testiing -----------------------
86 #---------------- testiing -----------------------
91 gem 'minitest-reporters'
87 gem 'minitest-reporters'
92
88
93 #---------------- for console --------------------
89 #---------------- for console --------------------
94 gem 'fuzzy-string-match'
90 gem 'fuzzy-string-match'
91 +
92 +
93 + group :development, :test do
94 + # Call 'byebug' anywhere in the code to stop execution and get a debugger console
95 + gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
96 + end
97 +
98 + group :development do
99 + # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
100 + gem 'web-console', '>= 3.3.0'
101 + gem 'listen', '>= 3.0.5', '< 3.2'
102 + # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
103 + gem 'spring'
104 + gem 'spring-watcher-listen', '~> 2.0.0'
105 + end
106 +
107 + group :test do
108 + # Adds support for Capybara system testing and selenium driver
109 + gem 'capybara', '>= 2.15'
110 + gem 'selenium-webdriver'
111 + # Easy installation and use of chromedriver to run system tests with Chrome
112 + #gem 'chromedriver-helper'
113 + gem 'webdriver'
114 + end
115 +
@@ -1,279 +1,333
1 - GIT
2 - remote: https://github.com/sikachu/verification.git
3 - revision: ff31697b940d7b0e2ec65f08764215c96104e76d
4 - specs:
5 - verification (1.0.3)
6 - actionpack (>= 3.0.0, < 5.1)
7 - activesupport (>= 3.0.0, < 5.1)
8 -
9 GEM
1 GEM
10 remote: https://rubygems.org/
2 remote: https://rubygems.org/
11 specs:
3 specs:
12 RubyInline (3.12.4)
4 RubyInline (3.12.4)
13 ZenTest (~> 4.3)
5 ZenTest (~> 4.3)
14 ZenTest (4.11.2)
6 ZenTest (4.11.2)
15 ace-rails-ap (4.2)
7 ace-rails-ap (4.2)
16 - actioncable (5.0.7.2)
8 + actioncable (5.2.3)
17 - actionpack (= 5.0.7.2)
9 + actionpack (= 5.2.3)
18 - nio4r (>= 1.2, < 3.0)
10 + nio4r (~> 2.0)
19 - websocket-driver (~> 0.6.1)
11 + websocket-driver (>= 0.6.1)
20 - actionmailer (5.0.7.2)
12 + actionmailer (5.2.3)
21 - actionpack (= 5.0.7.2)
13 + actionpack (= 5.2.3)
22 - actionview (= 5.0.7.2)
14 + actionview (= 5.2.3)
23 - activejob (= 5.0.7.2)
15 + activejob (= 5.2.3)
24 mail (~> 2.5, >= 2.5.4)
16 mail (~> 2.5, >= 2.5.4)
25 rails-dom-testing (~> 2.0)
17 rails-dom-testing (~> 2.0)
26 - actionpack (5.0.7.2)
18 + actionpack (5.2.3)
27 - actionview (= 5.0.7.2)
19 + actionview (= 5.2.3)
28 - activesupport (= 5.0.7.2)
20 + activesupport (= 5.2.3)
29 rack (~> 2.0)
21 rack (~> 2.0)
30 - rack-test (~> 0.6.3)
22 + rack-test (>= 0.6.3)
31 rails-dom-testing (~> 2.0)
23 rails-dom-testing (~> 2.0)
32 rails-html-sanitizer (~> 1.0, >= 1.0.2)
24 rails-html-sanitizer (~> 1.0, >= 1.0.2)
33 - actionview (5.0.7.2)
25 + actionview (5.2.3)
34 - activesupport (= 5.0.7.2)
26 + activesupport (= 5.2.3)
35 builder (~> 3.1)
27 builder (~> 3.1)
36 - erubis (~> 2.7.0)
28 + erubi (~> 1.4)
37 rails-dom-testing (~> 2.0)
29 rails-dom-testing (~> 2.0)
38 rails-html-sanitizer (~> 1.0, >= 1.0.3)
30 rails-html-sanitizer (~> 1.0, >= 1.0.3)
39 - activejob (5.0.7.2)
31 + activejob (5.2.3)
40 - activesupport (= 5.0.7.2)
32 + activesupport (= 5.2.3)
41 globalid (>= 0.3.6)
33 globalid (>= 0.3.6)
42 - activemodel (5.0.7.2)
34 + activemodel (5.2.3)
43 - activesupport (= 5.0.7.2)
35 + activesupport (= 5.2.3)
44 - activerecord (5.0.7.2)
36 + activerecord (5.2.3)
45 - activemodel (= 5.0.7.2)
37 + activemodel (= 5.2.3)
46 - activesupport (= 5.0.7.2)
38 + activesupport (= 5.2.3)
47 - arel (~> 7.0)
39 + arel (>= 9.0)
48 activerecord-session_store (1.1.3)
40 activerecord-session_store (1.1.3)
49 actionpack (>= 4.0)
41 actionpack (>= 4.0)
50 activerecord (>= 4.0)
42 activerecord (>= 4.0)
51 multi_json (~> 1.11, >= 1.11.2)
43 multi_json (~> 1.11, >= 1.11.2)
52 rack (>= 1.5.2, < 3)
44 rack (>= 1.5.2, < 3)
53 railties (>= 4.0)
45 railties (>= 4.0)
54 - activesupport (5.0.7.2)
46 + activestorage (5.2.3)
47 + actionpack (= 5.2.3)
48 + activerecord (= 5.2.3)
49 + marcel (~> 0.3.1)
50 + activesupport (5.2.3)
55 concurrent-ruby (~> 1.0, >= 1.0.2)
51 concurrent-ruby (~> 1.0, >= 1.0.2)
56 i18n (>= 0.7, < 2)
52 i18n (>= 0.7, < 2)
57 minitest (~> 5.1)
53 minitest (~> 5.1)
58 tzinfo (~> 1.1)
54 tzinfo (~> 1.1)
55 + addressable (2.6.0)
56 + public_suffix (>= 2.0.2, < 4.0)
59 ansi (1.5.0)
57 ansi (1.5.0)
60 - arel (7.1.4)
58 + arel (9.0.0)
61 autoprefixer-rails (9.5.1.1)
59 autoprefixer-rails (9.5.1.1)
62 execjs
60 execjs
63 best_in_place (3.0.3)
61 best_in_place (3.0.3)
64 actionpack (>= 3.2)
62 actionpack (>= 3.2)
65 railties (>= 3.2)
63 railties (>= 3.2)
64 + bindex (0.7.0)
65 + bootsnap (1.4.4)
66 + msgpack (~> 1.0)
66 bootstrap-datepicker-rails (1.8.0.1)
67 bootstrap-datepicker-rails (1.8.0.1)
67 railties (>= 3.0)
68 railties (>= 3.0)
68 bootstrap-sass (3.4.1)
69 bootstrap-sass (3.4.1)
69 autoprefixer-rails (>= 5.2.1)
70 autoprefixer-rails (>= 5.2.1)
70 sassc (>= 2.0.0)
71 sassc (>= 2.0.0)
71 bootstrap-switch-rails (3.3.4)
72 bootstrap-switch-rails (3.3.4)
72 bootstrap-toggle-rails (2.2.1.0)
73 bootstrap-toggle-rails (2.2.1.0)
73 bootstrap3-datetimepicker-rails (4.17.47)
74 bootstrap3-datetimepicker-rails (4.17.47)
74 momentjs-rails (>= 2.8.1)
75 momentjs-rails (>= 2.8.1)
75 builder (3.2.3)
76 builder (3.2.3)
77 + byebug (11.0.1)
78 + capybara (3.25.0)
79 + addressable
80 + mini_mime (>= 0.1.3)
81 + nokogiri (~> 1.8)
82 + rack (>= 1.6.0)
83 + rack-test (>= 0.6.3)
84 + regexp_parser (~> 1.5)
85 + xpath (~> 3.2)
86 + childprocess (1.0.1)
87 + rake (< 13.0)
76 coffee-rails (4.2.2)
88 coffee-rails (4.2.2)
77 coffee-script (>= 2.2.0)
89 coffee-script (>= 2.2.0)
78 railties (>= 4.0.0)
90 railties (>= 4.0.0)
79 coffee-script (2.4.1)
91 coffee-script (2.4.1)
80 coffee-script-source
92 coffee-script-source
81 execjs
93 execjs
82 coffee-script-source (1.12.2)
94 coffee-script-source (1.12.2)
83 concurrent-ruby (1.1.5)
95 concurrent-ruby (1.1.5)
84 crass (1.0.4)
96 crass (1.0.4)
85 dynamic_form (1.1.4)
97 dynamic_form (1.1.4)
98 + erubi (1.8.0)
86 erubis (2.7.0)
99 erubis (2.7.0)
87 execjs (2.7.0)
100 execjs (2.7.0)
88 ffi (1.11.1)
101 ffi (1.11.1)
89 fuzzy-string-match (1.0.1)
102 fuzzy-string-match (1.0.1)
90 RubyInline (>= 3.8.6)
103 RubyInline (>= 3.8.6)
91 globalid (0.4.2)
104 globalid (0.4.2)
92 activesupport (>= 4.2.0)
105 activesupport (>= 4.2.0)
93 haml (5.1.0)
106 haml (5.1.0)
94 temple (>= 0.8.0)
107 temple (>= 0.8.0)
95 tilt
108 tilt
96 haml-rails (1.0.0)
109 haml-rails (1.0.0)
97 actionpack (>= 4.0.1)
110 actionpack (>= 4.0.1)
98 activesupport (>= 4.0.1)
111 activesupport (>= 4.0.1)
99 haml (>= 4.0.6, < 6.0)
112 haml (>= 4.0.6, < 6.0)
100 html2haml (>= 1.0.1)
113 html2haml (>= 1.0.1)
101 railties (>= 4.0.1)
114 railties (>= 4.0.1)
102 html2haml (2.2.0)
115 html2haml (2.2.0)
103 erubis (~> 2.7.0)
116 erubis (~> 2.7.0)
104 haml (>= 4.0, < 6)
117 haml (>= 4.0, < 6)
105 nokogiri (>= 1.6.0)
118 nokogiri (>= 1.6.0)
106 ruby_parser (~> 3.5)
119 ruby_parser (~> 3.5)
107 i18n (1.6.0)
120 i18n (1.6.0)
108 concurrent-ruby (~> 1.0)
121 concurrent-ruby (~> 1.0)
109 in_place_editing (1.2.0)
122 in_place_editing (1.2.0)
123 + jbuilder (2.9.1)
124 + activesupport (>= 4.2.0)
110 jquery-countdown-rails (2.0.2)
125 jquery-countdown-rails (2.0.2)
111 jquery-datatables-rails (3.4.0)
126 jquery-datatables-rails (3.4.0)
112 actionpack (>= 3.1)
127 actionpack (>= 3.1)
113 jquery-rails
128 jquery-rails
114 railties (>= 3.1)
129 railties (>= 3.1)
115 sass-rails
130 sass-rails
116 jquery-rails (4.3.3)
131 jquery-rails (4.3.3)
117 rails-dom-testing (>= 1, < 3)
132 rails-dom-testing (>= 1, < 3)
118 railties (>= 4.2.0)
133 railties (>= 4.2.0)
119 thor (>= 0.14, < 2.0)
134 thor (>= 0.14, < 2.0)
120 jquery-tablesorter (1.26.1)
135 jquery-tablesorter (1.26.1)
121 railties (>= 3.2, < 6)
136 railties (>= 3.2, < 6)
122 jquery-timepicker-addon-rails (1.4.1)
137 jquery-timepicker-addon-rails (1.4.1)
123 railties (>= 3.1)
138 railties (>= 3.1)
124 jquery-ui-rails (6.0.1)
139 jquery-ui-rails (6.0.1)
125 railties (>= 3.2.16)
140 railties (>= 3.2.16)
141 + listen (3.1.5)
142 + rb-fsevent (~> 0.9, >= 0.9.4)
143 + rb-inotify (~> 0.9, >= 0.9.7)
144 + ruby_dep (~> 1.2)
126 loofah (2.2.3)
145 loofah (2.2.3)
127 crass (~> 1.0.2)
146 crass (~> 1.0.2)
128 nokogiri (>= 1.5.9)
147 nokogiri (>= 1.5.9)
129 mail (2.7.1)
148 mail (2.7.1)
130 mini_mime (>= 0.1.1)
149 mini_mime (>= 0.1.1)
150 + marcel (0.3.3)
151 + mimemagic (~> 0.3.2)
131 method_source (0.9.2)
152 method_source (0.9.2)
153 + mimemagic (0.3.3)
132 mini_mime (1.0.1)
154 mini_mime (1.0.1)
133 mini_portile2 (2.4.0)
155 mini_portile2 (2.4.0)
134 minitest (5.11.3)
156 minitest (5.11.3)
135 minitest-reporters (1.3.6)
157 minitest-reporters (1.3.6)
136 ansi
158 ansi
137 builder
159 builder
138 minitest (>= 5.0)
160 minitest (>= 5.0)
139 ruby-progressbar
161 ruby-progressbar
140 momentjs-rails (2.20.1)
162 momentjs-rails (2.20.1)
141 railties (>= 3.1)
163 railties (>= 3.1)
164 + msgpack (1.3.0)
142 multi_json (1.13.1)
165 multi_json (1.13.1)
143 mysql2 (0.5.2)
166 mysql2 (0.5.2)
144 nio4r (2.3.1)
167 nio4r (2.3.1)
145 nokogiri (1.10.3)
168 nokogiri (1.10.3)
146 mini_portile2 (~> 2.4.0)
169 mini_portile2 (~> 2.4.0)
170 + public_suffix (3.1.1)
171 + puma (4.0.0)
172 + nio4r (~> 2.0)
147 rack (2.0.7)
173 rack (2.0.7)
148 - rack-test (0.6.3)
174 + rack-test (1.1.0)
149 - rack (>= 1.0)
175 + rack (>= 1.0, < 3)
150 - rails (5.0.7.2)
176 + rails (5.2.3)
151 - actioncable (= 5.0.7.2)
177 + actioncable (= 5.2.3)
152 - actionmailer (= 5.0.7.2)
178 + actionmailer (= 5.2.3)
153 - actionpack (= 5.0.7.2)
179 + actionpack (= 5.2.3)
154 - actionview (= 5.0.7.2)
180 + actionview (= 5.2.3)
155 - activejob (= 5.0.7.2)
181 + activejob (= 5.2.3)
156 - activemodel (= 5.0.7.2)
182 + activemodel (= 5.2.3)
157 - activerecord (= 5.0.7.2)
183 + activerecord (= 5.2.3)
158 - activesupport (= 5.0.7.2)
184 + activestorage (= 5.2.3)
185 + activesupport (= 5.2.3)
159 bundler (>= 1.3.0)
186 bundler (>= 1.3.0)
160 - railties (= 5.0.7.2)
187 + railties (= 5.2.3)
161 sprockets-rails (>= 2.0.0)
188 sprockets-rails (>= 2.0.0)
162 rails-controller-testing (1.0.4)
189 rails-controller-testing (1.0.4)
163 actionpack (>= 5.0.1.x)
190 actionpack (>= 5.0.1.x)
164 actionview (>= 5.0.1.x)
191 actionview (>= 5.0.1.x)
165 activesupport (>= 5.0.1.x)
192 activesupport (>= 5.0.1.x)
166 rails-dom-testing (2.0.3)
193 rails-dom-testing (2.0.3)
167 activesupport (>= 4.2.0)
194 activesupport (>= 4.2.0)
168 nokogiri (>= 1.6)
195 nokogiri (>= 1.6)
169 rails-html-sanitizer (1.0.4)
196 rails-html-sanitizer (1.0.4)
170 loofah (~> 2.2, >= 2.2.2)
197 loofah (~> 2.2, >= 2.2.2)
171 rails_bootstrap_sortable (2.0.6)
198 rails_bootstrap_sortable (2.0.6)
172 momentjs-rails (>= 2.8.3)
199 momentjs-rails (>= 2.8.3)
173 - railties (5.0.7.2)
200 + railties (5.2.3)
174 - actionpack (= 5.0.7.2)
201 + actionpack (= 5.2.3)
175 - activesupport (= 5.0.7.2)
202 + activesupport (= 5.2.3)
176 method_source
203 method_source
177 rake (>= 0.8.7)
204 rake (>= 0.8.7)
178 - thor (>= 0.18.1, < 2.0)
205 + thor (>= 0.19.0, < 2.0)
179 rake (12.3.2)
206 rake (12.3.2)
180 rb-fsevent (0.10.3)
207 rb-fsevent (0.10.3)
181 rb-inotify (0.10.0)
208 rb-inotify (0.10.0)
182 ffi (~> 1.0)
209 ffi (~> 1.0)
183 rdiscount (2.2.0.1)
210 rdiscount (2.2.0.1)
211 + regexp_parser (1.5.1)
184 rouge (3.3.0)
212 rouge (3.3.0)
185 ruby-progressbar (1.10.0)
213 ruby-progressbar (1.10.0)
214 + ruby_dep (1.5.0)
186 ruby_parser (3.13.1)
215 ruby_parser (3.13.1)
187 sexp_processor (~> 4.9)
216 sexp_processor (~> 4.9)
217 + rubyzip (1.2.3)
188 sass (3.7.4)
218 sass (3.7.4)
189 sass-listen (~> 4.0.0)
219 sass-listen (~> 4.0.0)
190 sass-listen (4.0.0)
220 sass-listen (4.0.0)
191 rb-fsevent (~> 0.9, >= 0.9.4)
221 rb-fsevent (~> 0.9, >= 0.9.4)
192 rb-inotify (~> 0.9, >= 0.9.7)
222 rb-inotify (~> 0.9, >= 0.9.7)
193 sass-rails (5.0.7)
223 sass-rails (5.0.7)
194 railties (>= 4.0.0, < 6)
224 railties (>= 4.0.0, < 6)
195 sass (~> 3.1)
225 sass (~> 3.1)
196 sprockets (>= 2.8, < 4.0)
226 sprockets (>= 2.8, < 4.0)
197 sprockets-rails (>= 2.0, < 4.0)
227 sprockets-rails (>= 2.0, < 4.0)
198 tilt (>= 1.1, < 3)
228 tilt (>= 1.1, < 3)
199 sassc (2.0.1)
229 sassc (2.0.1)
200 ffi (~> 1.9)
230 ffi (~> 1.9)
201 rake
231 rake
202 sassc-rails (2.1.1)
232 sassc-rails (2.1.1)
203 railties (>= 4.0.0)
233 railties (>= 4.0.0)
204 sassc (>= 2.0)
234 sassc (>= 2.0)
205 sprockets (> 3.0)
235 sprockets (> 3.0)
206 sprockets-rails
236 sprockets-rails
207 tilt
237 tilt
208 select2-rails (4.0.3)
238 select2-rails (4.0.3)
209 thor (~> 0.14)
239 thor (~> 0.14)
240 + selenium-webdriver (3.142.3)
241 + childprocess (>= 0.5, < 2.0)
242 + rubyzip (~> 1.2, >= 1.2.2)
210 sexp_processor (4.12.0)
243 sexp_processor (4.12.0)
244 + spring (2.1.0)
245 + spring-watcher-listen (2.0.1)
246 + listen (>= 2.7, < 4.0)
247 + spring (>= 1.2, < 3.0)
211 sprockets (3.7.2)
248 sprockets (3.7.2)
212 concurrent-ruby (~> 1.0)
249 concurrent-ruby (~> 1.0)
213 rack (> 1, < 3)
250 rack (> 1, < 3)
214 sprockets-rails (3.2.1)
251 sprockets-rails (3.2.1)
215 actionpack (>= 4.0)
252 actionpack (>= 4.0)
216 activesupport (>= 4.0)
253 activesupport (>= 4.0)
217 sprockets (>= 3.0.0)
254 sprockets (>= 3.0.0)
218 sqlite3 (1.4.1)
255 sqlite3 (1.4.1)
219 temple (0.8.1)
256 temple (0.8.1)
220 thor (0.20.3)
257 thor (0.20.3)
221 thread_safe (0.3.6)
258 thread_safe (0.3.6)
222 tilt (2.0.9)
259 tilt (2.0.9)
223 tzinfo (1.2.5)
260 tzinfo (1.2.5)
224 thread_safe (~> 0.1)
261 thread_safe (~> 0.1)
225 uglifier (4.1.20)
262 uglifier (4.1.20)
226 execjs (>= 0.3.0, < 3)
263 execjs (>= 0.3.0, < 3)
227 - websocket-driver (0.6.5)
264 + web-console (3.7.0)
265 + actionview (>= 5.0)
266 + activemodel (>= 5.0)
267 + bindex (>= 0.4.0)
268 + railties (>= 5.0)
269 + webdriver (0.1.0)
270 + websocket-driver (0.7.1)
228 websocket-extensions (>= 0.1.0)
271 websocket-extensions (>= 0.1.0)
229 websocket-extensions (0.1.4)
272 websocket-extensions (0.1.4)
230 will_paginate (3.0.12)
273 will_paginate (3.0.12)
274 + xpath (3.2.0)
275 + nokogiri (~> 1.8)
231 yaml_db (0.7.0)
276 yaml_db (0.7.0)
232 rails (>= 3.0)
277 rails (>= 3.0)
233 rake (>= 0.8.7)
278 rake (>= 0.8.7)
234
279
235 PLATFORMS
280 PLATFORMS
236 ruby
281 ruby
237
282
238 DEPENDENCIES
283 DEPENDENCIES
239 ace-rails-ap
284 ace-rails-ap
240 activerecord-session_store
285 activerecord-session_store
241 autoprefixer-rails
286 autoprefixer-rails
242 best_in_place (~> 3.0.1)
287 best_in_place (~> 3.0.1)
288 + bootsnap (>= 1.1.0)
243 bootstrap-datepicker-rails
289 bootstrap-datepicker-rails
244 bootstrap-sass (~> 3.4.1)
290 bootstrap-sass (~> 3.4.1)
245 bootstrap-switch-rails
291 bootstrap-switch-rails
246 bootstrap-toggle-rails
292 bootstrap-toggle-rails
247 bootstrap3-datetimepicker-rails
293 bootstrap3-datetimepicker-rails
294 + byebug
295 + capybara (>= 2.15)
248 coffee-rails
296 coffee-rails
249 dynamic_form
297 dynamic_form
250 fuzzy-string-match
298 fuzzy-string-match
251 haml
299 haml
252 haml-rails
300 haml-rails
253 in_place_editing
301 in_place_editing
302 + jbuilder (~> 2.5)
254 jquery-countdown-rails
303 jquery-countdown-rails
255 jquery-datatables-rails
304 jquery-datatables-rails
256 jquery-rails
305 jquery-rails
257 jquery-tablesorter
306 jquery-tablesorter
258 jquery-timepicker-addon-rails
307 jquery-timepicker-addon-rails
259 jquery-ui-rails
308 jquery-ui-rails
309 + listen (>= 3.0.5, < 3.2)
260 mail
310 mail
261 minitest-reporters
311 minitest-reporters
262 momentjs-rails
312 momentjs-rails
263 mysql2
313 mysql2
264 - rails (~> 5.0)
314 + puma
315 + rails (~> 5.2)
265 rails-controller-testing
316 rails-controller-testing
266 rails_bootstrap_sortable
317 rails_bootstrap_sortable
267 rdiscount
318 rdiscount
268 rouge
319 rouge
269 - sass-rails
320 + sassc-rails
270 - sassc-rails (>= 2.1.0)
271 select2-rails
321 select2-rails
322 + selenium-webdriver
323 + spring
324 + spring-watcher-listen (~> 2.0.0)
272 sqlite3
325 sqlite3
273 uglifier
326 uglifier
274 - verification!
327 + web-console (>= 3.3.0)
328 + webdriver
275 will_paginate (~> 3.0.7)
329 will_paginate (~> 3.0.7)
276 yaml_db
330 yaml_db
277
331
278 BUNDLED WITH
332 BUNDLED WITH
279 1.17.2
333 1.17.2
@@ -1,3 +1,3
1 #!/usr/bin/env ruby
1 #!/usr/bin/env ruby
2 - ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2 + ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
3 load Gem.bin_path('bundler', 'bundle')
3 load Gem.bin_path('bundler', 'bundle')
@@ -1,34 +1,36
1 #!/usr/bin/env ruby
1 #!/usr/bin/env ruby
2 - require 'pathname'
3 require 'fileutils'
2 require 'fileutils'
4 include FileUtils
3 include FileUtils
5
4
6 # path to your application root.
5 # path to your application root.
7 - APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6 + APP_ROOT = File.expand_path('..', __dir__)
8
7
9 def system!(*args)
8 def system!(*args)
10 system(*args) || abort("\n== Command #{args} failed ==")
9 system(*args) || abort("\n== Command #{args} failed ==")
11 end
10 end
12
11
13 chdir APP_ROOT do
12 chdir APP_ROOT do
14 # This script is a starting point to setup your application.
13 # This script is a starting point to setup your application.
15 # Add necessary setup steps to this file.
14 # Add necessary setup steps to this file.
16
15
17 puts '== Installing dependencies =='
16 puts '== Installing dependencies =='
18 system! 'gem install bundler --conservative'
17 system! 'gem install bundler --conservative'
19 system('bundle check') || system!('bundle install')
18 system('bundle check') || system!('bundle install')
20
19
20 + # Install JavaScript dependencies if using Yarn
21 + # system('bin/yarn')
22 +
21 # puts "\n== Copying sample files =="
23 # puts "\n== Copying sample files =="
22 # unless File.exist?('config/database.yml')
24 # unless File.exist?('config/database.yml')
23 # cp 'config/database.yml.sample', 'config/database.yml'
25 # cp 'config/database.yml.sample', 'config/database.yml'
24 # end
26 # end
25
27
26 puts "\n== Preparing database =="
28 puts "\n== Preparing database =="
27 system! 'bin/rails db:setup'
29 system! 'bin/rails db:setup'
28
30
29 puts "\n== Removing old logs and tempfiles =="
31 puts "\n== Removing old logs and tempfiles =="
30 system! 'bin/rails log:clear tmp:clear'
32 system! 'bin/rails log:clear tmp:clear'
31
33
32 puts "\n== Restarting application server =="
34 puts "\n== Restarting application server =="
33 system! 'bin/rails restart'
35 system! 'bin/rails restart'
34 end
36 end
@@ -1,29 +1,31
1 #!/usr/bin/env ruby
1 #!/usr/bin/env ruby
2 - require 'pathname'
3 require 'fileutils'
2 require 'fileutils'
4 include FileUtils
3 include FileUtils
5
4
6 # path to your application root.
5 # path to your application root.
7 - APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6 + APP_ROOT = File.expand_path('..', __dir__)
8
7
9 def system!(*args)
8 def system!(*args)
10 system(*args) || abort("\n== Command #{args} failed ==")
9 system(*args) || abort("\n== Command #{args} failed ==")
11 end
10 end
12
11
13 chdir APP_ROOT do
12 chdir APP_ROOT do
14 # This script is a way to update your development environment automatically.
13 # This script is a way to update your development environment automatically.
15 # Add necessary update steps to this file.
14 # Add necessary update steps to this file.
16
15
17 puts '== Installing dependencies =='
16 puts '== Installing dependencies =='
18 system! 'gem install bundler --conservative'
17 system! 'gem install bundler --conservative'
19 system('bundle check') || system!('bundle install')
18 system('bundle check') || system!('bundle install')
20
19
20 + # Install JavaScript dependencies if using Yarn
21 + # system('bin/yarn')
22 +
21 puts "\n== Updating database =="
23 puts "\n== Updating database =="
22 system! 'bin/rails db:migrate'
24 system! 'bin/rails db:migrate'
23
25
24 puts "\n== Removing old logs and tempfiles =="
26 puts "\n== Removing old logs and tempfiles =="
25 system! 'bin/rails log:clear tmp:clear'
27 system! 'bin/rails log:clear tmp:clear'
26
28
27 puts "\n== Restarting application server =="
29 puts "\n== Restarting application server =="
28 system! 'bin/rails restart'
30 system! 'bin/rails restart'
29 end
31 end
@@ -1,3 +1,4
1 ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
1 ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
2
3 require 'bundler/setup' # Set up gems listed in the Gemfile.
3 require 'bundler/setup' # Set up gems listed in the Gemfile.
4 + require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
@@ -1,9 +1,10
1 development:
1 development:
2 adapter: async
2 adapter: async
3
3
4 test:
4 test:
5 adapter: async
5 adapter: async
6
6
7 production:
7 production:
8 adapter: redis
8 adapter: redis
9 - url: redis://localhost:6379/1
9 + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10 + channel_prefix: cafe_grader_production
@@ -1,54 +1,61
1 Rails.application.configure do
1 Rails.application.configure do
2 # Settings specified here will take precedence over those in config/application.rb.
2 # Settings specified here will take precedence over those in config/application.rb.
3
3
4 # In the development environment your application's code is reloaded on
4 # In the development environment your application's code is reloaded on
5 # every request. This slows down response time but is perfect for development
5 # every request. This slows down response time but is perfect for development
6 # since you don't have to restart the web server when you make code changes.
6 # since you don't have to restart the web server when you make code changes.
7 config.cache_classes = false
7 config.cache_classes = false
8
8
9 # Do not eager load code on boot.
9 # Do not eager load code on boot.
10 config.eager_load = false
10 config.eager_load = false
11
11
12 # Show full error reports.
12 # Show full error reports.
13 config.consider_all_requests_local = true
13 config.consider_all_requests_local = true
14
14
15 # Enable/disable caching. By default caching is disabled.
15 # Enable/disable caching. By default caching is disabled.
16 - if Rails.root.join('tmp/caching-dev.txt').exist?
16 + # Run rails dev:cache to toggle caching.
17 + if Rails.root.join('tmp', 'caching-dev.txt').exist?
17 config.action_controller.perform_caching = true
18 config.action_controller.perform_caching = true
18
19
19 config.cache_store = :memory_store
20 config.cache_store = :memory_store
20 config.public_file_server.headers = {
21 config.public_file_server.headers = {
21 - 'Cache-Control' => 'public, max-age=172800'
22 + 'Cache-Control' => "public, max-age=#{2.days.to_i}"
22 }
23 }
23 else
24 else
24 config.action_controller.perform_caching = false
25 config.action_controller.perform_caching = false
25
26
26 config.cache_store = :null_store
27 config.cache_store = :null_store
27 end
28 end
28
29
30 + # Store uploaded files on the local file system (see config/storage.yml for options)
31 + config.active_storage.service = :local
32 +
29 # Don't care if the mailer can't send.
33 # Don't care if the mailer can't send.
30 config.action_mailer.raise_delivery_errors = false
34 config.action_mailer.raise_delivery_errors = false
31
35
32 config.action_mailer.perform_caching = false
36 config.action_mailer.perform_caching = false
33
37
34 # Print deprecation notices to the Rails logger.
38 # Print deprecation notices to the Rails logger.
35 config.active_support.deprecation = :log
39 config.active_support.deprecation = :log
36
40
37 # Raise an error on page load if there are pending migrations.
41 # Raise an error on page load if there are pending migrations.
38 config.active_record.migration_error = :page_load
42 config.active_record.migration_error = :page_load
39
43
44 + # Highlight code that triggered database queries in logs.
45 + config.active_record.verbose_query_logs = true
46 +
40 # Debug mode disables concatenation and preprocessing of assets.
47 # Debug mode disables concatenation and preprocessing of assets.
41 # This option may cause significant delays in view rendering with a large
48 # This option may cause significant delays in view rendering with a large
42 # number of complex assets.
49 # number of complex assets.
43 config.assets.debug = true
50 config.assets.debug = true
44
51
45 # Suppress logger output for asset requests.
52 # Suppress logger output for asset requests.
46 config.assets.quiet = true
53 config.assets.quiet = true
47
54
48 # Raises error for missing translations
55 # Raises error for missing translations
49 # config.action_view.raise_on_missing_translations = true
56 # config.action_view.raise_on_missing_translations = true
50
57
51 # Use an evented file watcher to asynchronously detect changes in source code,
58 # Use an evented file watcher to asynchronously detect changes in source code,
52 # routes, locales, etc. This feature depends on the listen gem.
59 # routes, locales, etc. This feature depends on the listen gem.
53 - # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
60 + config.file_watcher = ActiveSupport::EventedFileUpdateChecker
54 end
61 end
@@ -1,86 +1,94
1 Rails.application.configure do
1 Rails.application.configure do
2 # Settings specified here will take precedence over those in config/application.rb.
2 # Settings specified here will take precedence over those in config/application.rb.
3
3
4 # Code is not reloaded between requests.
4 # Code is not reloaded between requests.
5 config.cache_classes = true
5 config.cache_classes = true
6
6
7 # Eager load code on boot. This eager loads most of Rails and
7 # Eager load code on boot. This eager loads most of Rails and
8 # your application in memory, allowing both threaded web servers
8 # your application in memory, allowing both threaded web servers
9 # and those relying on copy on write to perform better.
9 # and those relying on copy on write to perform better.
10 # Rake tasks automatically ignore this option for performance.
10 # Rake tasks automatically ignore this option for performance.
11 config.eager_load = true
11 config.eager_load = true
12
12
13 # Full error reports are disabled and caching is turned on.
13 # Full error reports are disabled and caching is turned on.
14 config.consider_all_requests_local = false
14 config.consider_all_requests_local = false
15 config.action_controller.perform_caching = true
15 config.action_controller.perform_caching = true
16
16
17 + # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
18 + # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
19 + # config.require_master_key = true
20 +
17 # Disable serving static files from the `/public` folder by default since
21 # Disable serving static files from the `/public` folder by default since
18 # Apache or NGINX already handles this.
22 # Apache or NGINX already handles this.
19 config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
23 config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
20
24
21 # Compress JavaScripts and CSS.
25 # Compress JavaScripts and CSS.
22 config.assets.js_compressor = :uglifier
26 config.assets.js_compressor = :uglifier
23 # config.assets.css_compressor = :sass
27 # config.assets.css_compressor = :sass
24
28
25 # Do not fallback to assets pipeline if a precompiled asset is missed.
29 # Do not fallback to assets pipeline if a precompiled asset is missed.
26 config.assets.compile = false
30 config.assets.compile = false
27
31
28 # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
32 # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
29
33
30 # Enable serving of images, stylesheets, and JavaScripts from an asset server.
34 # Enable serving of images, stylesheets, and JavaScripts from an asset server.
31 # config.action_controller.asset_host = 'http://assets.example.com'
35 # config.action_controller.asset_host = 'http://assets.example.com'
32
36
33 # Specifies the header that your server uses for sending files.
37 # Specifies the header that your server uses for sending files.
34 # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
38 # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
35 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
39 # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
36
40
41 + # Store uploaded files on the local file system (see config/storage.yml for options)
42 + config.active_storage.service = :local
43 +
37 # Mount Action Cable outside main process or domain
44 # Mount Action Cable outside main process or domain
38 # config.action_cable.mount_path = nil
45 # config.action_cable.mount_path = nil
39 # config.action_cable.url = 'wss://example.com/cable'
46 # config.action_cable.url = 'wss://example.com/cable'
40 # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
47 # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
41
48
42 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
49 # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
43 # config.force_ssl = true
50 # config.force_ssl = true
44
51
45 # Use the lowest log level to ensure availability of diagnostic information
52 # Use the lowest log level to ensure availability of diagnostic information
46 # when problems arise.
53 # when problems arise.
47 config.log_level = :debug
54 config.log_level = :debug
48
55
49 # Prepend all log lines with the following tags.
56 # Prepend all log lines with the following tags.
50 config.log_tags = [ :request_id ]
57 config.log_tags = [ :request_id ]
51
58
52 # Use a different cache store in production.
59 # Use a different cache store in production.
53 # config.cache_store = :mem_cache_store
60 # config.cache_store = :mem_cache_store
54
61
55 # Use a real queuing backend for Active Job (and separate queues per environment)
62 # Use a real queuing backend for Active Job (and separate queues per environment)
56 # config.active_job.queue_adapter = :resque
63 # config.active_job.queue_adapter = :resque
57 # config.active_job.queue_name_prefix = "cafe_grader_#{Rails.env}"
64 # config.active_job.queue_name_prefix = "cafe_grader_#{Rails.env}"
65 +
58 config.action_mailer.perform_caching = false
66 config.action_mailer.perform_caching = false
59
67
60 # Ignore bad email addresses and do not raise email delivery errors.
68 # Ignore bad email addresses and do not raise email delivery errors.
61 # Set this to true and configure the email server for immediate delivery to raise delivery errors.
69 # Set this to true and configure the email server for immediate delivery to raise delivery errors.
62 # config.action_mailer.raise_delivery_errors = false
70 # config.action_mailer.raise_delivery_errors = false
63
71
64 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
72 # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
65 # the I18n.default_locale when a translation cannot be found).
73 # the I18n.default_locale when a translation cannot be found).
66 config.i18n.fallbacks = true
74 config.i18n.fallbacks = true
67
75
68 # Send deprecation notices to registered listeners.
76 # Send deprecation notices to registered listeners.
69 config.active_support.deprecation = :notify
77 config.active_support.deprecation = :notify
70
78
71 # Use default logging formatter so that PID and timestamp are not suppressed.
79 # Use default logging formatter so that PID and timestamp are not suppressed.
72 config.log_formatter = ::Logger::Formatter.new
80 config.log_formatter = ::Logger::Formatter.new
73
81
74 # Use a different logger for distributed setups.
82 # Use a different logger for distributed setups.
75 # require 'syslog/logger'
83 # require 'syslog/logger'
76 # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
84 # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
77
85
78 if ENV["RAILS_LOG_TO_STDOUT"].present?
86 if ENV["RAILS_LOG_TO_STDOUT"].present?
79 logger = ActiveSupport::Logger.new(STDOUT)
87 logger = ActiveSupport::Logger.new(STDOUT)
80 logger.formatter = config.log_formatter
88 logger.formatter = config.log_formatter
81 - config.logger = ActiveSupport::TaggedLogging.new(logger)
89 + config.logger = ActiveSupport::TaggedLogging.new(logger)
82 end
90 end
83
91
84 # Do not dump schema after migrations.
92 # Do not dump schema after migrations.
85 config.active_record.dump_schema_after_migration = false
93 config.active_record.dump_schema_after_migration = false
86 end
94 end
@@ -1,42 +1,46
1 Rails.application.configure do
1 Rails.application.configure do
2 # Settings specified here will take precedence over those in config/application.rb.
2 # Settings specified here will take precedence over those in config/application.rb.
3
3
4 # The test environment is used exclusively to run your application's
4 # The test environment is used exclusively to run your application's
5 # test suite. You never need to work with it otherwise. Remember that
5 # test suite. You never need to work with it otherwise. Remember that
6 # your test database is "scratch space" for the test suite and is wiped
6 # your test database is "scratch space" for the test suite and is wiped
7 # and recreated between test runs. Don't rely on the data there!
7 # and recreated between test runs. Don't rely on the data there!
8 config.cache_classes = true
8 config.cache_classes = true
9
9
10 # Do not eager load code on boot. This avoids loading your whole application
10 # Do not eager load code on boot. This avoids loading your whole application
11 # just for the purpose of running a single test. If you are using a tool that
11 # just for the purpose of running a single test. If you are using a tool that
12 # preloads Rails for running tests, you may have to set it to true.
12 # preloads Rails for running tests, you may have to set it to true.
13 config.eager_load = false
13 config.eager_load = false
14
14
15 # Configure public file server for tests with Cache-Control for performance.
15 # Configure public file server for tests with Cache-Control for performance.
16 config.public_file_server.enabled = true
16 config.public_file_server.enabled = true
17 config.public_file_server.headers = {
17 config.public_file_server.headers = {
18 - 'Cache-Control' => 'public, max-age=3600'
18 + 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
19 }
19 }
20
20
21 # Show full error reports and disable caching.
21 # Show full error reports and disable caching.
22 config.consider_all_requests_local = true
22 config.consider_all_requests_local = true
23 config.action_controller.perform_caching = false
23 config.action_controller.perform_caching = false
24
24
25 # Raise exceptions instead of rendering exception templates.
25 # Raise exceptions instead of rendering exception templates.
26 config.action_dispatch.show_exceptions = false
26 config.action_dispatch.show_exceptions = false
27
27
28 # Disable request forgery protection in test environment.
28 # Disable request forgery protection in test environment.
29 config.action_controller.allow_forgery_protection = false
29 config.action_controller.allow_forgery_protection = false
30 +
31 + # Store uploaded files on the local file system in a temporary directory
32 + config.active_storage.service = :test
33 +
30 config.action_mailer.perform_caching = false
34 config.action_mailer.perform_caching = false
31
35
32 # Tell Action Mailer not to deliver emails to the real world.
36 # Tell Action Mailer not to deliver emails to the real world.
33 # The :test delivery method accumulates sent emails in the
37 # The :test delivery method accumulates sent emails in the
34 # ActionMailer::Base.deliveries array.
38 # ActionMailer::Base.deliveries array.
35 config.action_mailer.delivery_method = :test
39 config.action_mailer.delivery_method = :test
36
40
37 # Print deprecation notices to the stderr.
41 # Print deprecation notices to the stderr.
38 config.active_support.deprecation = :stderr
42 config.active_support.deprecation = :stderr
39
43
40 # Raises error for missing translations
44 # Raises error for missing translations
41 # config.action_view.raise_on_missing_translations = true
45 # config.action_view.raise_on_missing_translations = true
42 end
46 end
@@ -1,18 +1,22
1 # Be sure to restart your server when you modify this file.
1 # Be sure to restart your server when you modify this file.
2
2
3 # Version of your assets, change this if you want to expire all your assets.
3 # Version of your assets, change this if you want to expire all your assets.
4 Rails.application.config.assets.version = '1.0'
4 Rails.application.config.assets.version = '1.0'
5
5
6 - # Add additional assets to the asset load path
6 + # Add additional assets to the asset load path.
7 # Rails.application.config.assets.paths << Emoji.images_path
7 # Rails.application.config.assets.paths << Emoji.images_path
8 + # Add Yarn node_modules folder to the asset load path.
9 + Rails.application.config.assets.paths << Rails.root.join('node_modules')
8
10
9 # Precompile additional assets.
11 # Precompile additional assets.
10 - # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
12 + # application.js, application.css, and all non-JS/CSS in the app/assets
11 - # Rails.application.config.assets.precompile += %w( search.js )
13 + # folder are already added.
14 + # Rails.application.config.assets.precompile += %w( admin.js admin.css )
12 Rails.application.config.assets.precompile += ['announcement_refresh.js','effects.js','site_update.js']
15 Rails.application.config.assets.precompile += ['announcement_refresh.js','effects.js','site_update.js']
13 Rails.application.config.assets.precompile += ['local_jquery.js','tablesorter-theme.cafe.css']
16 Rails.application.config.assets.precompile += ['local_jquery.js','tablesorter-theme.cafe.css']
14 %w( announcements submissions configurations contests contest_management graders heartbeat
17 %w( announcements submissions configurations contests contest_management graders heartbeat
15 login main messages problems report site sites sources tasks groups
18 login main messages problems report site sites sources tasks groups
16 test user_admin users tags testcases).each do |controller|
19 test user_admin users tags testcases).each do |controller|
17 Rails.application.config.assets.precompile += ["#{controller}.js", "#{controller}.css"]
20 Rails.application.config.assets.precompile += ["#{controller}.js", "#{controller}.css"]
18 end
21 end
22 +
@@ -1,5 +1,5
1 # Be sure to restart your server when you modify this file.
1 # Be sure to restart your server when you modify this file.
2
2
3 # Specify a serializer for the signed and encrypted cookie jars.
3 # Specify a serializer for the signed and encrypted cookie jars.
4 # Valid options are :json, :marshal, and :hybrid.
4 # Valid options are :json, :marshal, and :hybrid.
5 - Rails.application.config.action_dispatch.cookies_serializer = :marshal
5 + Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -1,47 +1,34
1 # Puma can serve each request in a thread from an internal thread pool.
1 # Puma can serve each request in a thread from an internal thread pool.
2 - # The `threads` method setting takes two numbers a minimum and maximum.
2 + # The `threads` method setting takes two numbers: a minimum and maximum.
3 # Any libraries that use thread pools should be configured to match
3 # Any libraries that use thread pools should be configured to match
4 # the maximum value specified for Puma. Default is set to 5 threads for minimum
4 # the maximum value specified for Puma. Default is set to 5 threads for minimum
5 - # and maximum, this matches the default thread size of Active Record.
5 + # and maximum; this matches the default thread size of Active Record.
6 #
6 #
7 - threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
7 + threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
8 threads threads_count, threads_count
8 threads threads_count, threads_count
9
9
10 - # Specifies the `port` that Puma will listen on to receive requests, default is 3000.
10 + # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
11 #
11 #
12 port ENV.fetch("PORT") { 3000 }
12 port ENV.fetch("PORT") { 3000 }
13
13
14 # Specifies the `environment` that Puma will run in.
14 # Specifies the `environment` that Puma will run in.
15 #
15 #
16 environment ENV.fetch("RAILS_ENV") { "development" }
16 environment ENV.fetch("RAILS_ENV") { "development" }
17
17
18 # Specifies the number of `workers` to boot in clustered mode.
18 # Specifies the number of `workers` to boot in clustered mode.
19 # Workers are forked webserver processes. If using threads and workers together
19 # Workers are forked webserver processes. If using threads and workers together
20 # the concurrency of the application would be max `threads` * `workers`.
20 # the concurrency of the application would be max `threads` * `workers`.
21 # Workers do not work on JRuby or Windows (both of which do not support
21 # Workers do not work on JRuby or Windows (both of which do not support
22 # processes).
22 # processes).
23 #
23 #
24 # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
24 # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
25
25
26 # Use the `preload_app!` method when specifying a `workers` number.
26 # Use the `preload_app!` method when specifying a `workers` number.
27 # This directive tells Puma to first boot the application and load code
27 # This directive tells Puma to first boot the application and load code
28 # before forking the application. This takes advantage of Copy On Write
28 # before forking the application. This takes advantage of Copy On Write
29 - # process behavior so workers use less memory. If you use this option
29 + # process behavior so workers use less memory.
30 - # you need to make sure to reconnect any threads in the `on_worker_boot`
31 - # block.
32 #
30 #
33 # preload_app!
31 # preload_app!
34
32
35 - # The code in the `on_worker_boot` will be called if you are using
36 - # clustered mode by specifying a number of `workers`. After each worker
37 - # process is booted this block will be run, if you are using `preload_app!`
38 - # option you will want to use this block to reconnect to any threads
39 - # or connections that may have been created at application boot, Ruby
40 - # cannot share connections between processes.
41 - #
42 - # on_worker_boot do
43 - # ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
44 - # end
45 -
46 # Allow puma to be restarted by `rails restart` command.
33 # Allow puma to be restarted by `rails restart` command.
47 plugin :tmp_restart
34 plugin :tmp_restart
@@ -1,25 +1,25
1 - CafeGrader::Application.routes.draw do
1 + Rails.application.routes.draw do
2 resources :tags
2 resources :tags
3 get "sources/direct_edit"
3 get "sources/direct_edit"
4
4
5 root :to => 'main#login'
5 root :to => 'main#login'
6
6
7 #logins
7 #logins
8 match 'login/login', to: 'login#login', via: [:get,:post]
8 match 'login/login', to: 'login#login', via: [:get,:post]
9
9
10
10
11 resources :contests
11 resources :contests
12
12
13 resources :sites
13 resources :sites
14
14
15 resources :test
15 resources :test
16
16
17 resources :messages do
17 resources :messages do
18 collection do
18 collection do
19 get 'console'
19 get 'console'
20 end
20 end
21 end
21 end
22
22
23 resources :announcements do
23 resources :announcements do
24 member do
24 member do
25 get 'toggle','toggle_front'
25 get 'toggle','toggle_front'
You need to be logged in to leave comments. Login now