Description:
upgrade to rails 5.2
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
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 | 1 | source 'https://rubygems.org' |
|
2 | + git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
|
2 | 3 | |
|
3 | 4 | #rails |
|
4 |
- gem 'rails', '~>5. |
|
|
5 | + gem 'rails', '~>5.2' | |
|
5 | 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 | 12 | # Bundle edge Rails instead: |
|
9 | 13 | # gem 'rails', :git => 'git://github.com/rails/rails.git' |
|
10 | 14 | |
|
11 | 15 | #---------------- database --------------------- |
|
12 | 16 | #the database |
|
13 | 17 | gem 'mysql2' |
|
14 | 18 | #for testing |
|
15 | 19 | gem 'sqlite3' |
|
16 | 20 | gem 'rails-controller-testing' |
|
17 | 21 | #for dumping database into yaml |
|
18 | 22 | gem 'yaml_db' |
|
19 | 23 | |
|
24 | + | |
|
25 | + #------------- assset pipeline ----------------- | |
|
20 | 26 | # Gems used only for assets and not required |
|
21 | 27 | # in production environments by default. |
|
22 | - gem 'sass-rails' | |
|
28 | + #sass-rails is depricated | |
|
29 | + #gem 'sass-rails' | |
|
30 | + gem 'sassc-rails' | |
|
23 | 31 | gem 'coffee-rails' |
|
24 | 32 | |
|
25 | 33 | # See https://github.com/sstephenson/execjs#readme for more supported runtimes |
|
26 | 34 | # gem 'therubyracer', :platforms => :ruby |
|
27 | 35 | |
|
28 | 36 | gem 'uglifier' |
|
29 | 37 | |
|
30 | 38 | gem 'haml' |
|
31 | 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 | - # gem 'unicorn' | |
|
41 | + # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks | |
|
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 | 47 | #in-place editor |
|
51 | 48 | gem 'best_in_place', '~> 3.0.1' |
|
52 | 49 | |
|
53 | 50 | # jquery addition |
|
54 | 51 | gem 'jquery-rails' |
|
55 | 52 | gem 'jquery-ui-rails' |
|
56 | 53 | gem 'jquery-timepicker-addon-rails' |
|
57 | 54 | gem 'jquery-tablesorter' |
|
58 | 55 | gem 'jquery-countdown-rails' |
|
59 | 56 | |
|
60 | 57 | #syntax highlighter |
|
61 | 58 | gem 'rouge' |
|
62 | 59 | |
|
63 | 60 | #bootstrap add-ons |
|
64 | 61 | gem 'bootstrap-sass', '~> 3.4.1' |
|
65 | - gem 'sassc-rails', '>= 2.1.0' | |
|
66 | 62 | gem 'bootstrap-switch-rails' |
|
67 | 63 | gem 'bootstrap-toggle-rails' |
|
68 | 64 | gem 'autoprefixer-rails' |
|
69 | 65 | gem 'momentjs-rails' |
|
70 | 66 | gem 'rails_bootstrap_sortable' |
|
71 | 67 | gem 'bootstrap-datepicker-rails' |
|
72 | 68 | gem 'bootstrap3-datetimepicker-rails' |
|
73 | 69 | gem 'jquery-datatables-rails' |
|
74 | 70 | |
|
75 | 71 | #----------- user interface ----------------- |
|
76 | 72 | #select 2 |
|
77 | 73 | gem 'select2-rails' |
|
78 | 74 | #ace editor |
|
79 | 75 | gem 'ace-rails-ap' |
|
80 | 76 | #paginator |
|
81 | 77 | gem 'will_paginate', '~> 3.0.7' |
|
82 | 78 | |
|
83 | 79 | gem 'mail' |
|
84 | 80 | gem 'rdiscount' |
|
85 | 81 | gem 'dynamic_form' |
|
86 | 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 | 86 | #---------------- testiing ----------------------- |
|
91 | 87 | gem 'minitest-reporters' |
|
92 | 88 | |
|
93 | 89 | #---------------- for console -------------------- |
|
94 | 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 | 1 | GEM |
|
10 | 2 | remote: https://rubygems.org/ |
|
11 | 3 | specs: |
|
12 | 4 | RubyInline (3.12.4) |
|
13 | 5 | ZenTest (~> 4.3) |
|
14 | 6 | ZenTest (4.11.2) |
|
15 | 7 | ace-rails-ap (4.2) |
|
16 |
- actioncable (5. |
|
|
17 |
- actionpack (= 5. |
|
|
18 |
- nio4r (> |
|
|
19 |
- websocket-driver ( |
|
|
20 |
- actionmailer (5. |
|
|
21 |
- actionpack (= 5. |
|
|
22 |
- actionview (= 5. |
|
|
23 |
- activejob (= 5. |
|
|
8 | + actioncable (5.2.3) | |
|
9 | + actionpack (= 5.2.3) | |
|
10 | + nio4r (~> 2.0) | |
|
11 | + websocket-driver (>= 0.6.1) | |
|
12 | + actionmailer (5.2.3) | |
|
13 | + actionpack (= 5.2.3) | |
|
14 | + actionview (= 5.2.3) | |
|
15 | + activejob (= 5.2.3) | |
|
24 | 16 | mail (~> 2.5, >= 2.5.4) |
|
25 | 17 | rails-dom-testing (~> 2.0) |
|
26 |
- actionpack (5. |
|
|
27 |
- actionview (= 5. |
|
|
28 |
- activesupport (= 5. |
|
|
18 | + actionpack (5.2.3) | |
|
19 | + actionview (= 5.2.3) | |
|
20 | + activesupport (= 5.2.3) | |
|
29 | 21 | rack (~> 2.0) |
|
30 |
- rack-test ( |
|
|
22 | + rack-test (>= 0.6.3) | |
|
31 | 23 | rails-dom-testing (~> 2.0) |
|
32 | 24 | rails-html-sanitizer (~> 1.0, >= 1.0.2) |
|
33 |
- actionview (5. |
|
|
34 |
- activesupport (= 5. |
|
|
25 | + actionview (5.2.3) | |
|
26 | + activesupport (= 5.2.3) | |
|
35 | 27 | builder (~> 3.1) |
|
36 |
- erubi |
|
|
28 | + erubi (~> 1.4) | |
|
37 | 29 | rails-dom-testing (~> 2.0) |
|
38 | 30 | rails-html-sanitizer (~> 1.0, >= 1.0.3) |
|
39 |
- activejob (5. |
|
|
40 |
- activesupport (= 5. |
|
|
31 | + activejob (5.2.3) | |
|
32 | + activesupport (= 5.2.3) | |
|
41 | 33 | globalid (>= 0.3.6) |
|
42 |
- activemodel (5. |
|
|
43 |
- activesupport (= 5. |
|
|
44 |
- activerecord (5. |
|
|
45 |
- activemodel (= 5. |
|
|
46 |
- activesupport (= 5. |
|
|
47 |
- arel ( |
|
|
34 | + activemodel (5.2.3) | |
|
35 | + activesupport (= 5.2.3) | |
|
36 | + activerecord (5.2.3) | |
|
37 | + activemodel (= 5.2.3) | |
|
38 | + activesupport (= 5.2.3) | |
|
39 | + arel (>= 9.0) | |
|
48 | 40 | activerecord-session_store (1.1.3) |
|
49 | 41 | actionpack (>= 4.0) |
|
50 | 42 | activerecord (>= 4.0) |
|
51 | 43 | multi_json (~> 1.11, >= 1.11.2) |
|
52 | 44 | rack (>= 1.5.2, < 3) |
|
53 | 45 | railties (>= 4.0) |
|
54 |
- actives |
|
|
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 | 51 | concurrent-ruby (~> 1.0, >= 1.0.2) |
|
56 | 52 | i18n (>= 0.7, < 2) |
|
57 | 53 | minitest (~> 5.1) |
|
58 | 54 | tzinfo (~> 1.1) |
|
55 | + addressable (2.6.0) | |
|
56 | + public_suffix (>= 2.0.2, < 4.0) | |
|
59 | 57 | ansi (1.5.0) |
|
60 |
- arel ( |
|
|
58 | + arel (9.0.0) | |
|
61 | 59 | autoprefixer-rails (9.5.1.1) |
|
62 | 60 | execjs |
|
63 | 61 | best_in_place (3.0.3) |
|
64 | 62 | actionpack (>= 3.2) |
|
65 | 63 | railties (>= 3.2) |
|
64 | + bindex (0.7.0) | |
|
65 | + bootsnap (1.4.4) | |
|
66 | + msgpack (~> 1.0) | |
|
66 | 67 | bootstrap-datepicker-rails (1.8.0.1) |
|
67 | 68 | railties (>= 3.0) |
|
68 | 69 | bootstrap-sass (3.4.1) |
|
69 | 70 | autoprefixer-rails (>= 5.2.1) |
|
70 | 71 | sassc (>= 2.0.0) |
|
71 | 72 | bootstrap-switch-rails (3.3.4) |
|
72 | 73 | bootstrap-toggle-rails (2.2.1.0) |
|
73 | 74 | bootstrap3-datetimepicker-rails (4.17.47) |
|
74 | 75 | momentjs-rails (>= 2.8.1) |
|
75 | 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 | 88 | coffee-rails (4.2.2) |
|
77 | 89 | coffee-script (>= 2.2.0) |
|
78 | 90 | railties (>= 4.0.0) |
|
79 | 91 | coffee-script (2.4.1) |
|
80 | 92 | coffee-script-source |
|
81 | 93 | execjs |
|
82 | 94 | coffee-script-source (1.12.2) |
|
83 | 95 | concurrent-ruby (1.1.5) |
|
84 | 96 | crass (1.0.4) |
|
85 | 97 | dynamic_form (1.1.4) |
|
98 | + erubi (1.8.0) | |
|
86 | 99 | erubis (2.7.0) |
|
87 | 100 | execjs (2.7.0) |
|
88 | 101 | ffi (1.11.1) |
|
89 | 102 | fuzzy-string-match (1.0.1) |
|
90 | 103 | RubyInline (>= 3.8.6) |
|
91 | 104 | globalid (0.4.2) |
|
92 | 105 | activesupport (>= 4.2.0) |
|
93 | 106 | haml (5.1.0) |
|
94 | 107 | temple (>= 0.8.0) |
|
95 | 108 | tilt |
|
96 | 109 | haml-rails (1.0.0) |
|
97 | 110 | actionpack (>= 4.0.1) |
|
98 | 111 | activesupport (>= 4.0.1) |
|
99 | 112 | haml (>= 4.0.6, < 6.0) |
|
100 | 113 | html2haml (>= 1.0.1) |
|
101 | 114 | railties (>= 4.0.1) |
|
102 | 115 | html2haml (2.2.0) |
|
103 | 116 | erubis (~> 2.7.0) |
|
104 | 117 | haml (>= 4.0, < 6) |
|
105 | 118 | nokogiri (>= 1.6.0) |
|
106 | 119 | ruby_parser (~> 3.5) |
|
107 | 120 | i18n (1.6.0) |
|
108 | 121 | concurrent-ruby (~> 1.0) |
|
109 | 122 | in_place_editing (1.2.0) |
|
123 | + jbuilder (2.9.1) | |
|
124 | + activesupport (>= 4.2.0) | |
|
110 | 125 | jquery-countdown-rails (2.0.2) |
|
111 | 126 | jquery-datatables-rails (3.4.0) |
|
112 | 127 | actionpack (>= 3.1) |
|
113 | 128 | jquery-rails |
|
114 | 129 | railties (>= 3.1) |
|
115 | 130 | sass-rails |
|
116 | 131 | jquery-rails (4.3.3) |
|
117 | 132 | rails-dom-testing (>= 1, < 3) |
|
118 | 133 | railties (>= 4.2.0) |
|
119 | 134 | thor (>= 0.14, < 2.0) |
|
120 | 135 | jquery-tablesorter (1.26.1) |
|
121 | 136 | railties (>= 3.2, < 6) |
|
122 | 137 | jquery-timepicker-addon-rails (1.4.1) |
|
123 | 138 | railties (>= 3.1) |
|
124 | 139 | jquery-ui-rails (6.0.1) |
|
125 | 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 | 145 | loofah (2.2.3) |
|
127 | 146 | crass (~> 1.0.2) |
|
128 | 147 | nokogiri (>= 1.5.9) |
|
129 | 148 | mail (2.7.1) |
|
130 | 149 | mini_mime (>= 0.1.1) |
|
150 | + marcel (0.3.3) | |
|
151 | + mimemagic (~> 0.3.2) | |
|
131 | 152 | method_source (0.9.2) |
|
153 | + mimemagic (0.3.3) | |
|
132 | 154 | mini_mime (1.0.1) |
|
133 | 155 | mini_portile2 (2.4.0) |
|
134 | 156 | minitest (5.11.3) |
|
135 | 157 | minitest-reporters (1.3.6) |
|
136 | 158 | ansi |
|
137 | 159 | builder |
|
138 | 160 | minitest (>= 5.0) |
|
139 | 161 | ruby-progressbar |
|
140 | 162 | momentjs-rails (2.20.1) |
|
141 | 163 | railties (>= 3.1) |
|
164 | + msgpack (1.3.0) | |
|
142 | 165 | multi_json (1.13.1) |
|
143 | 166 | mysql2 (0.5.2) |
|
144 | 167 | nio4r (2.3.1) |
|
145 | 168 | nokogiri (1.10.3) |
|
146 | 169 | mini_portile2 (~> 2.4.0) |
|
170 | + public_suffix (3.1.1) | |
|
171 | + puma (4.0.0) | |
|
172 | + nio4r (~> 2.0) | |
|
147 | 173 | rack (2.0.7) |
|
148 |
- rack-test ( |
|
|
149 | - rack (>= 1.0) | |
|
150 |
- rails (5. |
|
|
151 |
- actioncable (= 5. |
|
|
152 |
- actionmailer (= 5. |
|
|
153 |
- actionpack (= 5. |
|
|
154 |
- actionview (= 5. |
|
|
155 |
- activejob (= 5. |
|
|
156 |
- activemodel (= 5. |
|
|
157 |
- activerecord (= 5. |
|
|
158 |
- actives |
|
|
174 | + rack-test (1.1.0) | |
|
175 | + rack (>= 1.0, < 3) | |
|
176 | + rails (5.2.3) | |
|
177 | + actioncable (= 5.2.3) | |
|
178 | + actionmailer (= 5.2.3) | |
|
179 | + actionpack (= 5.2.3) | |
|
180 | + actionview (= 5.2.3) | |
|
181 | + activejob (= 5.2.3) | |
|
182 | + activemodel (= 5.2.3) | |
|
183 | + activerecord (= 5.2.3) | |
|
184 | + activestorage (= 5.2.3) | |
|
185 | + activesupport (= 5.2.3) | |
|
159 | 186 | bundler (>= 1.3.0) |
|
160 |
- railties (= 5. |
|
|
187 | + railties (= 5.2.3) | |
|
161 | 188 | sprockets-rails (>= 2.0.0) |
|
162 | 189 | rails-controller-testing (1.0.4) |
|
163 | 190 | actionpack (>= 5.0.1.x) |
|
164 | 191 | actionview (>= 5.0.1.x) |
|
165 | 192 | activesupport (>= 5.0.1.x) |
|
166 | 193 | rails-dom-testing (2.0.3) |
|
167 | 194 | activesupport (>= 4.2.0) |
|
168 | 195 | nokogiri (>= 1.6) |
|
169 | 196 | rails-html-sanitizer (1.0.4) |
|
170 | 197 | loofah (~> 2.2, >= 2.2.2) |
|
171 | 198 | rails_bootstrap_sortable (2.0.6) |
|
172 | 199 | momentjs-rails (>= 2.8.3) |
|
173 |
- railties (5. |
|
|
174 |
- actionpack (= 5. |
|
|
175 |
- activesupport (= 5. |
|
|
200 | + railties (5.2.3) | |
|
201 | + actionpack (= 5.2.3) | |
|
202 | + activesupport (= 5.2.3) | |
|
176 | 203 | method_source |
|
177 | 204 | rake (>= 0.8.7) |
|
178 |
- thor (>= 0.1 |
|
|
205 | + thor (>= 0.19.0, < 2.0) | |
|
179 | 206 | rake (12.3.2) |
|
180 | 207 | rb-fsevent (0.10.3) |
|
181 | 208 | rb-inotify (0.10.0) |
|
182 | 209 | ffi (~> 1.0) |
|
183 | 210 | rdiscount (2.2.0.1) |
|
211 | + regexp_parser (1.5.1) | |
|
184 | 212 | rouge (3.3.0) |
|
185 | 213 | ruby-progressbar (1.10.0) |
|
214 | + ruby_dep (1.5.0) | |
|
186 | 215 | ruby_parser (3.13.1) |
|
187 | 216 | sexp_processor (~> 4.9) |
|
217 | + rubyzip (1.2.3) | |
|
188 | 218 | sass (3.7.4) |
|
189 | 219 | sass-listen (~> 4.0.0) |
|
190 | 220 | sass-listen (4.0.0) |
|
191 | 221 | rb-fsevent (~> 0.9, >= 0.9.4) |
|
192 | 222 | rb-inotify (~> 0.9, >= 0.9.7) |
|
193 | 223 | sass-rails (5.0.7) |
|
194 | 224 | railties (>= 4.0.0, < 6) |
|
195 | 225 | sass (~> 3.1) |
|
196 | 226 | sprockets (>= 2.8, < 4.0) |
|
197 | 227 | sprockets-rails (>= 2.0, < 4.0) |
|
198 | 228 | tilt (>= 1.1, < 3) |
|
199 | 229 | sassc (2.0.1) |
|
200 | 230 | ffi (~> 1.9) |
|
201 | 231 | rake |
|
202 | 232 | sassc-rails (2.1.1) |
|
203 | 233 | railties (>= 4.0.0) |
|
204 | 234 | sassc (>= 2.0) |
|
205 | 235 | sprockets (> 3.0) |
|
206 | 236 | sprockets-rails |
|
207 | 237 | tilt |
|
208 | 238 | select2-rails (4.0.3) |
|
209 | 239 | thor (~> 0.14) |
|
240 | + selenium-webdriver (3.142.3) | |
|
241 | + childprocess (>= 0.5, < 2.0) | |
|
242 | + rubyzip (~> 1.2, >= 1.2.2) | |
|
210 | 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 | 248 | sprockets (3.7.2) |
|
212 | 249 | concurrent-ruby (~> 1.0) |
|
213 | 250 | rack (> 1, < 3) |
|
214 | 251 | sprockets-rails (3.2.1) |
|
215 | 252 | actionpack (>= 4.0) |
|
216 | 253 | activesupport (>= 4.0) |
|
217 | 254 | sprockets (>= 3.0.0) |
|
218 | 255 | sqlite3 (1.4.1) |
|
219 | 256 | temple (0.8.1) |
|
220 | 257 | thor (0.20.3) |
|
221 | 258 | thread_safe (0.3.6) |
|
222 | 259 | tilt (2.0.9) |
|
223 | 260 | tzinfo (1.2.5) |
|
224 | 261 | thread_safe (~> 0.1) |
|
225 | 262 | uglifier (4.1.20) |
|
226 | 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 | 271 | websocket-extensions (>= 0.1.0) |
|
229 | 272 | websocket-extensions (0.1.4) |
|
230 | 273 | will_paginate (3.0.12) |
|
274 | + xpath (3.2.0) | |
|
275 | + nokogiri (~> 1.8) | |
|
231 | 276 | yaml_db (0.7.0) |
|
232 | 277 | rails (>= 3.0) |
|
233 | 278 | rake (>= 0.8.7) |
|
234 | 279 | |
|
235 | 280 | PLATFORMS |
|
236 | 281 | ruby |
|
237 | 282 | |
|
238 | 283 | DEPENDENCIES |
|
239 | 284 | ace-rails-ap |
|
240 | 285 | activerecord-session_store |
|
241 | 286 | autoprefixer-rails |
|
242 | 287 | best_in_place (~> 3.0.1) |
|
288 | + bootsnap (>= 1.1.0) | |
|
243 | 289 | bootstrap-datepicker-rails |
|
244 | 290 | bootstrap-sass (~> 3.4.1) |
|
245 | 291 | bootstrap-switch-rails |
|
246 | 292 | bootstrap-toggle-rails |
|
247 | 293 | bootstrap3-datetimepicker-rails |
|
294 | + byebug | |
|
295 | + capybara (>= 2.15) | |
|
248 | 296 | coffee-rails |
|
249 | 297 | dynamic_form |
|
250 | 298 | fuzzy-string-match |
|
251 | 299 | haml |
|
252 | 300 | haml-rails |
|
253 | 301 | in_place_editing |
|
302 | + jbuilder (~> 2.5) | |
|
254 | 303 | jquery-countdown-rails |
|
255 | 304 | jquery-datatables-rails |
|
256 | 305 | jquery-rails |
|
257 | 306 | jquery-tablesorter |
|
258 | 307 | jquery-timepicker-addon-rails |
|
259 | 308 | jquery-ui-rails |
|
309 | + listen (>= 3.0.5, < 3.2) | |
|
260 | 310 | |
|
261 | 311 | minitest-reporters |
|
262 | 312 | momentjs-rails |
|
263 | 313 | mysql2 |
|
264 | - rails (~> 5.0) | |
|
314 | + puma | |
|
315 | + rails (~> 5.2) | |
|
265 | 316 | rails-controller-testing |
|
266 | 317 | rails_bootstrap_sortable |
|
267 | 318 | rdiscount |
|
268 | 319 | rouge |
|
269 | - sass-rails | |
|
270 | - sassc-rails (>= 2.1.0) | |
|
320 | + sassc-rails | |
|
271 | 321 | select2-rails |
|
322 | + selenium-webdriver | |
|
323 | + spring | |
|
324 | + spring-watcher-listen (~> 2.0.0) | |
|
272 | 325 | sqlite3 |
|
273 | 326 | uglifier |
|
274 | - verification! | |
|
327 | + web-console (>= 3.3.0) | |
|
328 | + webdriver | |
|
275 | 329 | will_paginate (~> 3.0.7) |
|
276 | 330 | yaml_db |
|
277 | 331 | |
|
278 | 332 | BUNDLED WITH |
|
279 | 333 | 1.17.2 |
@@ -1,3 +1,3 | |||
|
1 | 1 | #!/usr/bin/env ruby |
|
2 |
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../ |
|
|
2 | + ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) | |
|
3 | 3 | load Gem.bin_path('bundler', 'bundle') |
@@ -1,32 +1,34 | |||
|
1 | 1 | #!/usr/bin/env ruby |
|
2 | - require 'pathname' | |
|
3 | 2 | require 'fileutils' |
|
4 | 3 | include FileUtils |
|
5 | 4 | |
|
6 | 5 | # path to your application root. |
|
7 |
- APP_ROOT = |
|
|
6 | + APP_ROOT = File.expand_path('..', __dir__) | |
|
8 | 7 | |
|
9 | 8 | def system!(*args) |
|
10 | 9 | system(*args) || abort("\n== Command #{args} failed ==") |
|
11 | 10 | end |
|
12 | 11 | |
|
13 | 12 | chdir APP_ROOT do |
|
14 | 13 | # This script is a starting point to setup your application. |
|
15 | 14 | # Add necessary setup steps to this file. |
|
16 | 15 | |
|
17 | 16 | puts '== Installing dependencies ==' |
|
18 | 17 | system! 'gem install bundler --conservative' |
|
19 | 18 | system('bundle check') || system!('bundle install') |
|
20 | 19 | |
|
20 | + # Install JavaScript dependencies if using Yarn | |
|
21 | + # system('bin/yarn') | |
|
22 | + | |
|
21 | 23 | # puts "\n== Copying sample files ==" |
|
22 | 24 | # unless File.exist?('config/database.yml') |
|
23 | 25 | # cp 'config/database.yml.sample', 'config/database.yml' |
|
24 | 26 | # end |
|
25 | 27 | |
|
26 | 28 | puts "\n== Preparing database ==" |
|
27 | 29 | system! 'bin/rails db:setup' |
|
28 | 30 | |
|
29 | 31 | puts "\n== Removing old logs and tempfiles ==" |
|
30 | 32 | system! 'bin/rails log:clear tmp:clear' |
|
31 | 33 | |
|
32 | 34 | puts "\n== Restarting application server ==" |
@@ -1,29 +1,31 | |||
|
1 | 1 | #!/usr/bin/env ruby |
|
2 | - require 'pathname' | |
|
3 | 2 | require 'fileutils' |
|
4 | 3 | include FileUtils |
|
5 | 4 | |
|
6 | 5 | # path to your application root. |
|
7 |
- APP_ROOT = |
|
|
6 | + APP_ROOT = File.expand_path('..', __dir__) | |
|
8 | 7 | |
|
9 | 8 | def system!(*args) |
|
10 | 9 | system(*args) || abort("\n== Command #{args} failed ==") |
|
11 | 10 | end |
|
12 | 11 | |
|
13 | 12 | chdir APP_ROOT do |
|
14 | 13 | # This script is a way to update your development environment automatically. |
|
15 | 14 | # Add necessary update steps to this file. |
|
16 | 15 | |
|
17 | 16 | puts '== Installing dependencies ==' |
|
18 | 17 | system! 'gem install bundler --conservative' |
|
19 | 18 | system('bundle check') || system!('bundle install') |
|
20 | 19 | |
|
20 | + # Install JavaScript dependencies if using Yarn | |
|
21 | + # system('bin/yarn') | |
|
22 | + | |
|
21 | 23 | puts "\n== Updating database ==" |
|
22 | 24 | system! 'bin/rails db:migrate' |
|
23 | 25 | |
|
24 | 26 | puts "\n== Removing old logs and tempfiles ==" |
|
25 | 27 | system! 'bin/rails log:clear tmp:clear' |
|
26 | 28 | |
|
27 | 29 | puts "\n== Restarting application server ==" |
|
28 | 30 | system! 'bin/rails restart' |
|
29 | 31 | end |
@@ -1,3 +1,4 | |||
|
1 | 1 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) |
|
2 | 2 | |
|
3 | 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 | 1 | development: |
|
2 | 2 | adapter: async |
|
3 | 3 | |
|
4 | 4 | test: |
|
5 | 5 | adapter: async |
|
6 | 6 | |
|
7 | 7 | production: |
|
8 | 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 |
@@ -4,51 +4,58 | |||
|
4 | 4 | # In the development environment your application's code is reloaded on |
|
5 | 5 | # every request. This slows down response time but is perfect for development |
|
6 | 6 | # since you don't have to restart the web server when you make code changes. |
|
7 | 7 | config.cache_classes = false |
|
8 | 8 | |
|
9 | 9 | # Do not eager load code on boot. |
|
10 | 10 | config.eager_load = false |
|
11 | 11 | |
|
12 | 12 | # Show full error reports. |
|
13 | 13 | config.consider_all_requests_local = true |
|
14 | 14 | |
|
15 | 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 | 18 | config.action_controller.perform_caching = true |
|
18 | 19 | |
|
19 | 20 | config.cache_store = :memory_store |
|
20 | 21 | config.public_file_server.headers = { |
|
21 |
- 'Cache-Control' => |
|
|
22 | + 'Cache-Control' => "public, max-age=#{2.days.to_i}" | |
|
22 | 23 | } |
|
23 | 24 | else |
|
24 | 25 | config.action_controller.perform_caching = false |
|
25 | 26 | |
|
26 | 27 | config.cache_store = :null_store |
|
27 | 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 | 33 | # Don't care if the mailer can't send. |
|
30 | 34 | config.action_mailer.raise_delivery_errors = false |
|
31 | 35 | |
|
32 | 36 | config.action_mailer.perform_caching = false |
|
33 | 37 | |
|
34 | 38 | # Print deprecation notices to the Rails logger. |
|
35 | 39 | config.active_support.deprecation = :log |
|
36 | 40 | |
|
37 | 41 | # Raise an error on page load if there are pending migrations. |
|
38 | 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 | 47 | # Debug mode disables concatenation and preprocessing of assets. |
|
41 | 48 | # This option may cause significant delays in view rendering with a large |
|
42 | 49 | # number of complex assets. |
|
43 | 50 | config.assets.debug = true |
|
44 | 51 | |
|
45 | 52 | # Suppress logger output for asset requests. |
|
46 | 53 | config.assets.quiet = true |
|
47 | 54 | |
|
48 | 55 | # Raises error for missing translations |
|
49 | 56 | # config.action_view.raise_on_missing_translations = true |
|
50 | 57 | |
|
51 | 58 | # Use an evented file watcher to asynchronously detect changes in source code, |
|
52 | 59 | # routes, locales, etc. This feature depends on the listen gem. |
|
53 |
- |
|
|
60 | + config.file_watcher = ActiveSupport::EventedFileUpdateChecker | |
|
54 | 61 | end |
@@ -5,82 +5,90 | |||
|
5 | 5 | config.cache_classes = true |
|
6 | 6 | |
|
7 | 7 | # Eager load code on boot. This eager loads most of Rails and |
|
8 | 8 | # your application in memory, allowing both threaded web servers |
|
9 | 9 | # and those relying on copy on write to perform better. |
|
10 | 10 | # Rake tasks automatically ignore this option for performance. |
|
11 | 11 | config.eager_load = true |
|
12 | 12 | |
|
13 | 13 | # Full error reports are disabled and caching is turned on. |
|
14 | 14 | config.consider_all_requests_local = false |
|
15 | 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 | 21 | # Disable serving static files from the `/public` folder by default since |
|
18 | 22 | # Apache or NGINX already handles this. |
|
19 | 23 | config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? |
|
20 | 24 | |
|
21 | 25 | # Compress JavaScripts and CSS. |
|
22 | 26 | config.assets.js_compressor = :uglifier |
|
23 | 27 | # config.assets.css_compressor = :sass |
|
24 | 28 | |
|
25 | 29 | # Do not fallback to assets pipeline if a precompiled asset is missed. |
|
26 | 30 | config.assets.compile = false |
|
27 | 31 | |
|
28 | 32 | # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb |
|
29 | 33 | |
|
30 | 34 | # Enable serving of images, stylesheets, and JavaScripts from an asset server. |
|
31 | 35 | # config.action_controller.asset_host = 'http://assets.example.com' |
|
32 | 36 | |
|
33 | 37 | # Specifies the header that your server uses for sending files. |
|
34 | 38 | # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache |
|
35 | 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 | 44 | # Mount Action Cable outside main process or domain |
|
38 | 45 | # config.action_cable.mount_path = nil |
|
39 | 46 | # config.action_cable.url = 'wss://example.com/cable' |
|
40 | 47 | # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] |
|
41 | 48 | |
|
42 | 49 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. |
|
43 | 50 | # config.force_ssl = true |
|
44 | 51 | |
|
45 | 52 | # Use the lowest log level to ensure availability of diagnostic information |
|
46 | 53 | # when problems arise. |
|
47 | 54 | config.log_level = :debug |
|
48 | 55 | |
|
49 | 56 | # Prepend all log lines with the following tags. |
|
50 | 57 | config.log_tags = [ :request_id ] |
|
51 | 58 | |
|
52 | 59 | # Use a different cache store in production. |
|
53 | 60 | # config.cache_store = :mem_cache_store |
|
54 | 61 | |
|
55 | 62 | # Use a real queuing backend for Active Job (and separate queues per environment) |
|
56 | 63 | # config.active_job.queue_adapter = :resque |
|
57 | 64 | # config.active_job.queue_name_prefix = "cafe_grader_#{Rails.env}" |
|
65 | + | |
|
58 | 66 | config.action_mailer.perform_caching = false |
|
59 | 67 | |
|
60 | 68 | # Ignore bad email addresses and do not raise email delivery errors. |
|
61 | 69 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. |
|
62 | 70 | # config.action_mailer.raise_delivery_errors = false |
|
63 | 71 | |
|
64 | 72 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to |
|
65 | 73 | # the I18n.default_locale when a translation cannot be found). |
|
66 | 74 | config.i18n.fallbacks = true |
|
67 | 75 | |
|
68 | 76 | # Send deprecation notices to registered listeners. |
|
69 | 77 | config.active_support.deprecation = :notify |
|
70 | 78 | |
|
71 | 79 | # Use default logging formatter so that PID and timestamp are not suppressed. |
|
72 | 80 | config.log_formatter = ::Logger::Formatter.new |
|
73 | 81 | |
|
74 | 82 | # Use a different logger for distributed setups. |
|
75 | 83 | # require 'syslog/logger' |
|
76 | 84 | # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') |
|
77 | 85 | |
|
78 | 86 | if ENV["RAILS_LOG_TO_STDOUT"].present? |
|
79 | 87 | logger = ActiveSupport::Logger.new(STDOUT) |
|
80 | 88 | logger.formatter = config.log_formatter |
|
81 | - config.logger = ActiveSupport::TaggedLogging.new(logger) | |
|
89 | + config.logger = ActiveSupport::TaggedLogging.new(logger) | |
|
82 | 90 | end |
|
83 | 91 | |
|
84 | 92 | # Do not dump schema after migrations. |
|
85 | 93 | config.active_record.dump_schema_after_migration = false |
|
86 | 94 | end |
@@ -6,36 +6,40 | |||
|
6 | 6 | # your test database is "scratch space" for the test suite and is wiped |
|
7 | 7 | # and recreated between test runs. Don't rely on the data there! |
|
8 | 8 | config.cache_classes = true |
|
9 | 9 | |
|
10 | 10 | # Do not eager load code on boot. This avoids loading your whole application |
|
11 | 11 | # just for the purpose of running a single test. If you are using a tool that |
|
12 | 12 | # preloads Rails for running tests, you may have to set it to true. |
|
13 | 13 | config.eager_load = false |
|
14 | 14 | |
|
15 | 15 | # Configure public file server for tests with Cache-Control for performance. |
|
16 | 16 | config.public_file_server.enabled = true |
|
17 | 17 | config.public_file_server.headers = { |
|
18 |
- 'Cache-Control' => |
|
|
18 | + 'Cache-Control' => "public, max-age=#{1.hour.to_i}" | |
|
19 | 19 | } |
|
20 | 20 | |
|
21 | 21 | # Show full error reports and disable caching. |
|
22 | 22 | config.consider_all_requests_local = true |
|
23 | 23 | config.action_controller.perform_caching = false |
|
24 | 24 | |
|
25 | 25 | # Raise exceptions instead of rendering exception templates. |
|
26 | 26 | config.action_dispatch.show_exceptions = false |
|
27 | 27 | |
|
28 | 28 | # Disable request forgery protection in test environment. |
|
29 | 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 | 34 | config.action_mailer.perform_caching = false |
|
31 | 35 | |
|
32 | 36 | # Tell Action Mailer not to deliver emails to the real world. |
|
33 | 37 | # The :test delivery method accumulates sent emails in the |
|
34 | 38 | # ActionMailer::Base.deliveries array. |
|
35 | 39 | config.action_mailer.delivery_method = :test |
|
36 | 40 | |
|
37 | 41 | # Print deprecation notices to the stderr. |
|
38 | 42 | config.active_support.deprecation = :stderr |
|
39 | 43 | |
|
40 | 44 | # Raises error for missing translations |
|
41 | 45 | # config.action_view.raise_on_missing_translations = true |
@@ -1,18 +1,22 | |||
|
1 | 1 | # Be sure to restart your server when you modify this file. |
|
2 | 2 | |
|
3 | 3 | # Version of your assets, change this if you want to expire all your assets. |
|
4 | 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 | 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 | 11 | # Precompile additional assets. |
|
10 |
- # application.js, application.css, and all non-JS/CSS in app/assets |
|
|
11 | - # Rails.application.config.assets.precompile += %w( search.js ) | |
|
12 | + # application.js, application.css, and all non-JS/CSS in the app/assets | |
|
13 | + # folder are already added. | |
|
14 | + # Rails.application.config.assets.precompile += %w( admin.js admin.css ) | |
|
12 | 15 | Rails.application.config.assets.precompile += ['announcement_refresh.js','effects.js','site_update.js'] |
|
13 | 16 | Rails.application.config.assets.precompile += ['local_jquery.js','tablesorter-theme.cafe.css'] |
|
14 | 17 | %w( announcements submissions configurations contests contest_management graders heartbeat |
|
15 | 18 | login main messages problems report site sites sources tasks groups |
|
16 | 19 | test user_admin users tags testcases).each do |controller| |
|
17 | 20 | Rails.application.config.assets.precompile += ["#{controller}.js", "#{controller}.css"] |
|
18 | 21 | end |
|
22 | + |
@@ -1,5 +1,5 | |||
|
1 | 1 | # Be sure to restart your server when you modify this file. |
|
2 | 2 | |
|
3 | 3 | # Specify a serializer for the signed and encrypted cookie jars. |
|
4 | 4 | # Valid options are :json, :marshal, and :hybrid. |
|
5 |
- Rails.application.config.action_dispatch.cookies_serializer = : |
|
|
5 | + Rails.application.config.action_dispatch.cookies_serializer = :json |
@@ -1,47 +1,34 | |||
|
1 | 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 | 3 | # Any libraries that use thread pools should be configured to match |
|
4 | 4 | # the maximum value specified for Puma. Default is set to 5 threads for minimum |
|
5 |
- # and maximum |
|
|
5 | + # and maximum; this matches the default thread size of Active Record. | |
|
6 | 6 | # |
|
7 |
- threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } |
|
|
7 | + threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } | |
|
8 | 8 | threads threads_count, threads_count |
|
9 | 9 | |
|
10 |
- # Specifies the `port` that Puma will listen on to receive requests |
|
|
10 | + # Specifies the `port` that Puma will listen on to receive requests; default is 3000. | |
|
11 | 11 | # |
|
12 | 12 | port ENV.fetch("PORT") { 3000 } |
|
13 | 13 | |
|
14 | 14 | # Specifies the `environment` that Puma will run in. |
|
15 | 15 | # |
|
16 | 16 | environment ENV.fetch("RAILS_ENV") { "development" } |
|
17 | 17 | |
|
18 | 18 | # Specifies the number of `workers` to boot in clustered mode. |
|
19 | 19 | # Workers are forked webserver processes. If using threads and workers together |
|
20 | 20 | # the concurrency of the application would be max `threads` * `workers`. |
|
21 | 21 | # Workers do not work on JRuby or Windows (both of which do not support |
|
22 | 22 | # processes). |
|
23 | 23 | # |
|
24 | 24 | # workers ENV.fetch("WEB_CONCURRENCY") { 2 } |
|
25 | 25 | |
|
26 | 26 | # Use the `preload_app!` method when specifying a `workers` number. |
|
27 | 27 | # This directive tells Puma to first boot the application and load code |
|
28 | 28 | # before forking the application. This takes advantage of Copy On Write |
|
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. | |
|
29 | + # process behavior so workers use less memory. | |
|
32 | 30 | # |
|
33 | 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 | 33 | # Allow puma to be restarted by `rails restart` command. |
|
47 | 34 | plugin :tmp_restart |
@@ -1,13 +1,13 | |||
|
1 |
- |
|
|
1 | + Rails.application.routes.draw do | |
|
2 | 2 | resources :tags |
|
3 | 3 | get "sources/direct_edit" |
|
4 | 4 | |
|
5 | 5 | root :to => 'main#login' |
|
6 | 6 | |
|
7 | 7 | #logins |
|
8 | 8 | match 'login/login', to: 'login#login', via: [:get,:post] |
|
9 | 9 | |
|
10 | 10 | |
|
11 | 11 | resources :contests |
|
12 | 12 | |
|
13 | 13 | resources :sites |
You need to be logged in to leave comments.
Login now