diff --git a/Gemfile b/Gemfile --- a/Gemfile +++ b/Gemfile @@ -1,19 +1,20 @@ source 'https://rubygems.org' -gem 'rails', '~>3.2' +gem 'rails', '~>4.0.0' +gem 'activerecord-session_store' gem 'select2-rails' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' -gem 'mysql2' +gem 'mysql2', '~> 0.3.0' # Gems used only for assets and not required # in production environments by default. group :assets do - gem 'sass-rails', '~> 3.2.6' - gem 'coffee-rails', '~> 3.2.2' + gem 'sass-rails' + gem 'coffee-rails' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms => :ruby @@ -21,7 +22,7 @@ gem 'uglifier' end -gem 'prototype-rails' +# gem 'prototype-rails' # To use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' diff --git a/Gemfile.lock b/Gemfile.lock --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/sikachu/verification.git - revision: 76eaf51b13276ecae54bd9cd115832595d2ff56d + revision: e6fe084ce16b7b5a4b1cdfca5374d125fd034a0f specs: verification (1.0.3) actionpack (>= 3.0.0, < 5.0) @@ -9,38 +9,40 @@ GEM remote: https://rubygems.org/ specs: - ace-rails-ap (4.0.2) - actionmailer (3.2.22.5) - actionpack (= 3.2.22.5) - mail (~> 2.5.4) - actionpack (3.2.22.5) - activemodel (= 3.2.22.5) - activesupport (= 3.2.22.5) - builder (~> 3.0.0) + ace-rails-ap (4.1.1) + actionmailer (4.0.13) + actionpack (= 4.0.13) + mail (~> 2.5, >= 2.5.4) + actionpack (4.0.13) + activesupport (= 4.0.13) + builder (~> 3.1.0) erubis (~> 2.7.0) - journey (~> 1.0.4) - rack (~> 1.4.5) - rack-cache (~> 1.2) - rack-test (~> 0.6.1) - sprockets (~> 2.2.1) - activemodel (3.2.22.5) - activesupport (= 3.2.22.5) - builder (~> 3.0.0) - activerecord (3.2.22.5) - activemodel (= 3.2.22.5) - activesupport (= 3.2.22.5) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activeresource (3.2.22.5) - activemodel (= 3.2.22.5) - activesupport (= 3.2.22.5) - activesupport (3.2.22.5) - i18n (~> 0.6, >= 0.6.4) - multi_json (~> 1.0) - arel (3.0.3) - autoprefixer-rails (6.0.3) + rack (~> 1.5.2) + rack-test (~> 0.6.2) + activemodel (4.0.13) + activesupport (= 4.0.13) + builder (~> 3.1.0) + activerecord (4.0.13) + activemodel (= 4.0.13) + activerecord-deprecated_finders (~> 1.0.2) + activesupport (= 4.0.13) + arel (~> 4.0.0) + activerecord-deprecated_finders (1.0.4) + 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.0.13) + i18n (~> 0.6, >= 0.6.9) + minitest (~> 4.2) + multi_json (~> 1.3) + thread_safe (~> 0.1) + tzinfo (~> 0.3.37) + arel (4.0.2) + autoprefixer-rails (6.5.2) execjs - json best_in_place (3.0.3) actionpack (>= 3.2) railties (>= 3.2) @@ -48,35 +50,40 @@ sass (~> 3.2) bootstrap-switch-rails (3.3.3) bootstrap-toggle-rails (2.2.1.0) - builder (3.0.4) - coffee-rails (3.2.2) + builder (3.1.4) + coffee-rails (4.2.1) coffee-script (>= 2.2.0) - railties (~> 3.2.0) - coffee-script (2.3.0) + railties (>= 4.0.0, < 5.2.x) + coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.9.0) + coffee-script-source (1.10.0) + concurrent-ruby (1.0.2) diff-lcs (1.2.5) dynamic_form (1.1.4) erubis (2.7.0) - execjs (2.3.0) - haml (4.0.6) + execjs (2.7.0) + haml (4.0.7) tilt - haml-rails (0.4) - actionpack (>= 3.1, < 4.1) - activesupport (>= 3.1, < 4.1) - haml (>= 3.1, < 4.1) - railties (>= 3.1, < 4.1) - hike (1.2.3) + haml-rails (0.9.0) + actionpack (>= 4.0.1) + activesupport (>= 4.0.1) + haml (>= 4.0.6, < 5.0) + html2haml (>= 1.0.1) + railties (>= 4.0.1) + html2haml (2.0.0) + erubis (~> 2.7.0) + haml (~> 4.0.0) + nokogiri (~> 1.6.0) + ruby_parser (~> 3.5) i18n (0.7.0) in_place_editing (1.2.0) - journey (1.0.4) jquery-countdown-rails (2.0.2) - jquery-rails (3.1.2) + jquery-rails (3.1.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) - jquery-tablesorter (1.13.4) - railties (>= 3.1, < 5) + jquery-tablesorter (1.22.7) + railties (>= 3.2, < 6) jquery-timepicker-addon-rails (1.4.1) railties (>= 3.1) jquery-ui-rails (4.0.3) @@ -86,54 +93,47 @@ jquery-rails jquery-ui-rails (= 4.0.3) railties (>= 3.1.0) - json (1.8.3) - mail (2.5.4) - mime-types (~> 1.16) - treetop (~> 1.4.8) - mime-types (1.25.1) - momentjs-rails (2.11.1) + mail (2.6.4) + mime-types (>= 1.16, < 4) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_portile2 (2.1.0) + minitest (4.7.5) + momentjs-rails (2.15.1) railties (>= 3.1) multi_json (1.12.1) - mysql2 (0.3.20) - polyglot (0.3.5) - power_assert (0.2.2) - prototype-rails (3.2.1) - rails (~> 3.2) - rack (1.4.7) - rack-cache (1.6.1) - rack (>= 0.4) - rack-ssl (1.3.4) - rack + mysql2 (0.3.21) + nokogiri (1.6.8.1) + mini_portile2 (~> 2.1.0) + power_assert (0.3.1) + rack (1.5.5) rack-test (0.6.3) rack (>= 1.0) - rails (3.2.22.5) - actionmailer (= 3.2.22.5) - actionpack (= 3.2.22.5) - activerecord (= 3.2.22.5) - activeresource (= 3.2.22.5) - activesupport (= 3.2.22.5) - bundler (~> 1.0) - railties (= 3.2.22.5) - rails_bootstrap_sortable (2.0.0) - momentjs-rails (~> 2, >= 2.8.3) - railties (3.2.22.5) - actionpack (= 3.2.22.5) - activesupport (= 3.2.22.5) - rack-ssl (~> 1.3.2) + rails (4.0.13) + actionmailer (= 4.0.13) + actionpack (= 4.0.13) + activerecord (= 4.0.13) + activesupport (= 4.0.13) + bundler (>= 1.3.0, < 2.0) + railties (= 4.0.13) + sprockets-rails (~> 2.0) + rails_bootstrap_sortable (2.0.1) + momentjs-rails (>= 2.8.3) + railties (4.0.13) + actionpack (= 4.0.13) + activesupport (= 4.0.13) rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.14.6, < 2.0) - rake (11.2.2) - rdiscount (2.1.8) - rdoc (3.12.2) - json (~> 1.4) - rouge (1.8.0) + thor (>= 0.18.1, < 2.0) + rake (11.3.0) + rdiscount (2.2.0.1) + rouge (2.0.6) 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.3) + rspec-mocks (2.99.4) rspec-rails (2.99.0) actionpack (>= 3.0) activemodel (>= 3.0) @@ -143,42 +143,47 @@ rspec-core (~> 2.99.0) rspec-expectations (~> 2.99.0) rspec-mocks (~> 2.99.0) - sass (3.4.11) - sass-rails (3.2.6) - railties (~> 3.2.0) - sass (>= 3.1.10) - tilt (~> 1.3) - select2-rails (4.0.1) + ruby_parser (3.8.3) + sexp_processor (~> 4.1) + sass (3.4.22) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + select2-rails (4.0.3) thor (~> 0.14) - sprockets (2.2.3) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - test-unit (3.0.9) + sexp_processor (4.7.0) + 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) + test-unit (3.2.2) power_assert thor (0.19.1) - tilt (1.4.1) - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) - tzinfo (0.3.51) - uglifier (2.7.0) - execjs (>= 0.3.0) - json (>= 1.8.0) - will_paginate (3.0.7) + thread_safe (0.3.5) + tilt (2.0.5) + tzinfo (0.3.52) + uglifier (3.0.3) + execjs (>= 0.3.0, < 3) + will_paginate (3.0.12) PLATFORMS ruby DEPENDENCIES ace-rails-ap + activerecord-session_store autoprefixer-rails best_in_place (~> 3.0.1) bootstrap-sass (~> 3.2.0) bootstrap-switch-rails bootstrap-toggle-rails - coffee-rails (~> 3.2.2) + coffee-rails dynamic_form haml haml-rails @@ -190,14 +195,13 @@ jquery-ui-sass-rails mail momentjs-rails - mysql2 - prototype-rails - rails (~> 3.2) + mysql2 (~> 0.3.0) + rails (~> 4.0.0) rails_bootstrap_sortable rdiscount rouge rspec-rails (~> 2.99.0) - sass-rails (~> 3.2.6) + sass-rails select2-rails test-unit uglifier @@ -205,4 +209,4 @@ will_paginate (~> 3.0.7) BUNDLED WITH - 1.12.5 + 1.13.6 diff --git a/config/environments/development.rb b/config/environments/development.rb --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -6,8 +6,8 @@ # since you don't have to restart the web server when you make code changes. config.cache_classes = false - # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true + # Log error messages when you accidentally call methods on nil. //DEPRICATED + # config.whiny_nils = true // DEPRICATED # Show full error reports and disable caching config.consider_all_requests_local = true @@ -25,9 +25,9 @@ # Raise exception on mass assignment protection for Active Record models config.active_record.mass_assignment_sanitizer = :strict - # Log the query plan for queries taking more than this (works - # with SQLite, MySQL, and PostgreSQL) - config.active_record.auto_explain_threshold_in_seconds = 0.5 + # Log the query plan for queries taking more than this (works // DEPRICATED + # with SQLite, MySQL, and PostgreSQL) // DEPRICATED + # config.active_record.auto_explain_threshold_in_seconds = 0.5 // DEPRICATED # Do not compress assets config.assets.compress = false @@ -37,4 +37,6 @@ # Prevents assets from rendering twice config.serve_static_assets = 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 @@ -64,4 +64,6 @@ # Log the query plan for queries taking more than this (works # with SQLite, MySQL, and PostgreSQL) # config.active_record.auto_explain_threshold_in_seconds = 0.5 + + config.eager_load = true end diff --git a/config/environments/test.rb b/config/environments/test.rb --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -34,4 +34,6 @@ # Print deprecation notices to the stderr config.active_support.deprecation = :stderr + + config.eager_load = false end diff --git a/config/routes.rb b/config/routes.rb --- a/config/routes.rb +++ b/config/routes.rb @@ -44,9 +44,9 @@ end end - match 'tasks/view/:file.:ext' => 'tasks#view' - match 'tasks/download/:id/:file.:ext' => 'tasks#download' - match 'heartbeat/:id/edit' => 'heartbeat#edit' + get 'tasks/view/:file.:ext' => 'tasks#view' + get 'tasks/download/:id/:file.:ext' => 'tasks#download' + get 'heartbeat/:id/edit' => 'heartbeat#edit' #main get "main/list" @@ -63,11 +63,11 @@ get 'graders/list', to: 'graders#list', as: 'grader_list' - match 'heartbeat/:id/edit' => 'heartbeat#edit' + get 'heartbeat/:id/edit' => 'heartbeat#edit' # See how all your routes lay out with "rake routes" # This is a legacy wild controller route that's not recommended for RESTful applications. # Note: This route will make all actions in every controller accessible via GET requests. - match ':controller(/:action(/:id))(.:format)' + match ':controller(/:action(/:id))(.:format)', via: [:get, :post] end