# HG changeset patch # User Nattee Niparnan # Date 2016-12-07 16:00:34 # Node ID 2101ac88fe70bb1380f12f2ee6032b7e84e1f70c # Parent 35d86016ce8699ccb83e550843eefe9e21a2c83d upgrade to rails 4.2 diff --git a/Gemfile b/Gemfile --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -gem 'rails', '~>4.1.0' +gem 'rails', '~>4.2.0' gem 'activerecord-session_store' gem 'select2-rails' @@ -8,7 +8,7 @@ # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' -gem 'mysql2', '~> 0.3.0' +gem 'mysql2' # Gems used only for assets and not required # in production environments by default. @@ -77,5 +77,5 @@ gem 'verification', :git => 'https://github.com/sikachu/verification.git' group :test, :development do - gem 'rspec-rails', '~> 2.99.0' + gem 'rspec-rails' end diff --git a/Gemfile.lock b/Gemfile.lock --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,39 +10,48 @@ remote: https://rubygems.org/ specs: ace-rails-ap (4.1.1) - actionmailer (4.1.16) - actionpack (= 4.1.16) - actionview (= 4.1.16) + actionmailer (4.2.7.1) + actionpack (= 4.2.7.1) + actionview (= 4.2.7.1) + activejob (= 4.2.7.1) mail (~> 2.5, >= 2.5.4) - actionpack (4.1.16) - actionview (= 4.1.16) - activesupport (= 4.1.16) - rack (~> 1.5.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.7.1) + actionview (= 4.2.7.1) + activesupport (= 4.2.7.1) + rack (~> 1.6) rack-test (~> 0.6.2) - actionview (4.1.16) - activesupport (= 4.1.16) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (4.2.7.1) + activesupport (= 4.2.7.1) builder (~> 3.1) erubis (~> 2.7.0) - activemodel (4.1.16) - activesupport (= 4.1.16) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (4.2.7.1) + activesupport (= 4.2.7.1) + globalid (>= 0.3.0) + activemodel (4.2.7.1) + activesupport (= 4.2.7.1) builder (~> 3.1) - activerecord (4.1.16) - activemodel (= 4.1.16) - activesupport (= 4.1.16) - arel (~> 5.0.0) + activerecord (4.2.7.1) + activemodel (= 4.2.7.1) + activesupport (= 4.2.7.1) + arel (~> 6.0) activerecord-session_store (1.0.0) actionpack (>= 4.0, < 5.1) activerecord (>= 4.0, < 5.1) multi_json (~> 1.11, >= 1.11.2) rack (>= 1.5.2, < 3) railties (>= 4.0, < 5.1) - activesupport (4.1.16) - i18n (~> 0.6, >= 0.6.9) + activesupport (4.2.7.1) + i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) - thread_safe (~> 0.1) + thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - arel (5.0.1.20140414130214) + arel (6.0.3) autoprefixer-rails (6.5.3.1) execjs best_in_place (3.0.3) @@ -65,6 +74,8 @@ dynamic_form (1.1.4) erubis (2.7.0) execjs (2.7.0) + globalid (0.3.7) + activesupport (>= 4.1.0) haml (4.0.7) tilt haml-rails (0.9.0) @@ -81,8 +92,9 @@ i18n (0.7.0) in_place_editing (1.2.0) jquery-countdown-rails (2.0.2) - jquery-rails (3.1.4) - railties (>= 3.0, < 5.0) + jquery-rails (4.2.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) thor (>= 0.14, < 2.0) jquery-tablesorter (1.23.1) railties (>= 3.2, < 6) @@ -96,6 +108,8 @@ jquery-ui-rails (= 4.0.3) railties (>= 3.1.0) json (1.8.3) + loofah (2.0.3) + nokogiri (>= 1.5.9) mail (2.6.4) mime-types (>= 1.16, < 4) mime-types (3.1) @@ -106,48 +120,59 @@ momentjs-rails (2.15.1) railties (>= 3.1) multi_json (1.12.1) - mysql2 (0.3.21) + mysql2 (0.4.5) nokogiri (1.6.8.1) mini_portile2 (~> 2.1.0) power_assert (0.4.1) - rack (1.5.5) + rack (1.6.5) rack-test (0.6.3) rack (>= 1.0) - rails (4.1.16) - actionmailer (= 4.1.16) - actionpack (= 4.1.16) - actionview (= 4.1.16) - activemodel (= 4.1.16) - activerecord (= 4.1.16) - activesupport (= 4.1.16) + rails (4.2.7.1) + actionmailer (= 4.2.7.1) + actionpack (= 4.2.7.1) + actionview (= 4.2.7.1) + activejob (= 4.2.7.1) + activemodel (= 4.2.7.1) + activerecord (= 4.2.7.1) + activesupport (= 4.2.7.1) bundler (>= 1.3.0, < 2.0) - railties (= 4.1.16) - sprockets-rails (~> 2.0) + railties (= 4.2.7.1) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.7) + activesupport (>= 4.2.0.beta, < 5.0) + nokogiri (~> 1.6.0) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) rails_bootstrap_sortable (2.0.1) momentjs-rails (>= 2.8.3) - railties (4.1.16) - actionpack (= 4.1.16) - activesupport (= 4.1.16) + railties (4.2.7.1) + actionpack (= 4.2.7.1) + activesupport (= 4.2.7.1) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (12.0.0) rdiscount (2.2.0.1) rouge (2.0.7) - rspec-collection_matchers (1.1.2) - rspec-expectations (>= 2.99.0.beta1) - rspec-core (2.99.2) - rspec-expectations (2.99.2) - diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.99.4) - rspec-rails (2.99.0) + rspec-core (3.5.4) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-rails (3.5.2) actionpack (>= 3.0) - activemodel (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-collection_matchers - rspec-core (~> 2.99.0) - rspec-expectations (~> 2.99.0) - rspec-mocks (~> 2.99.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) + rspec-support (3.5.0) ruby_parser (3.8.3) sexp_processor (~> 4.1) sass (3.4.22) @@ -163,10 +188,10 @@ sprockets (3.7.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (2.3.3) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (>= 2.8, < 4.0) + sprockets-rails (3.2.0) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) test-unit (3.2.3) power_assert thor (0.19.4) @@ -201,12 +226,12 @@ jquery-ui-sass-rails mail momentjs-rails - mysql2 (~> 0.3.0) - rails (~> 4.1.0) + mysql2 + rails (~> 4.2.0) rails_bootstrap_sortable rdiscount rouge - rspec-rails (~> 2.99.0) + rspec-rails sass-rails select2-rails test-unit diff --git a/config/environments/development.rb b/config/environments/development.rb --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -36,7 +36,7 @@ config.assets.debug = true # Prevents assets from rendering twice - config.serve_static_assets = true + config.serve_static_files = true config.eager_load = false end diff --git a/config/environments/production.rb b/config/environments/production.rb --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -9,7 +9,7 @@ config.action_controller.perform_caching = true # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false + config.serve_static_files = false # Compress JavaScripts and CSS config.assets.compress = true diff --git a/config/environments/test.rb b/config/environments/test.rb --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -8,7 +8,7 @@ config.cache_classes = true # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true + config.serve_static_files = true config.static_cache_control = "public, max-age=3600" # Log error messages when you accidentally call methods on nil diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -3,4 +3,3 @@ # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone -Mime::Type.register 'application/pdf', :pdf diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb deleted file mode 100644 --- a/config/initializers/secret_token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -CafeGrader::Application.config.secret_token = '7f85485d3d652fc6336dfe3cd98917d9bd7a323b32096bf7635d26b98ccd0480816cc2d12b5c10805cecf7d8fb322104e2bda71eb60dd871c5c537e56a063038' diff --git a/config/secrets.yml b/config/secrets.yml new file mode 100644 --- /dev/null +++ b/config/secrets.yml @@ -0,0 +1,8 @@ +development: + secret_key_base: '444f426d08add8e2d7cbd76e2057e521e06091231eb4d5472af6ba5654ea1124ce6a636f549be6827ce09561c314181226ad840d44e4677e1077942ee0dc82bd' + +test: + secret_key_base: 'd52f411b06a79cc9f56d92e10d27e670cf0f0c3357e7caf9018ec23091b5c452ea9266c03a5c9e37b72c358702d4d460e957f90dcc553c9fc73a98adb520e781' + +production: + secret_key_base: '7f85485d3d652fc6336dfe3cd98917d9bd7a323b32096bf7635d26b98ccd0480816cc2d12b5c10805cecf7d8fb322104e2bda71eb60dd871c5c537e56a063038'