From 48db99389e9b16f099f10a92fc80b71d36a57215 Mon Sep 17 00:00:00 2001 From: raluka Date: Thu, 5 Nov 2015 16:07:14 +0100 Subject: [PATCH 1/2] upgraded rails to 4.2 and dependencies. except rubocop --- Gemfile | 10 +- Gemfile.lock | 499 ++++++++++-------- bin/bundle | 3 + bin/rails | 6 +- bin/rake | 4 + bin/setup | 29 + config/application.rb | 3 + config/environments/production.rb | 7 +- config/environments/test.rb | 6 +- config/initializers/assets.rb | 11 + config/initializers/cookies_serializer.rb | 3 + .../initializers/filter_parameter_logging.rb | 4 + config/initializers/wrap_parameters.rb | 12 +- db/schema.rb | 100 ++-- spec/spec_helper.rb | 1 + spec/support/save_feature_failures.rb | 2 +- 16 files changed, 407 insertions(+), 293 deletions(-) create mode 100755 bin/bundle create mode 100755 bin/rake create mode 100755 bin/setup create mode 100644 config/initializers/assets.rb create mode 100644 config/initializers/cookies_serializer.rb create mode 100644 config/initializers/filter_parameter_logging.rb diff --git a/Gemfile b/Gemfile index 9ce2873c..b7015217 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,11 @@ source 'https://rubygems.org' # as web framework -gem 'rails', '~> 4.1' +gem 'rails', '~> 4.2', '>= 4.2.4' + +# A set of Rails responders to dry up your application +# required for respond_with and the class-level respond_to methods in rails 4.2 +gem 'responders', '~> 2.0' # as the database for Active Record gem 'mysql2' @@ -129,7 +133,7 @@ group :development do gem 'guard-rspec', '~> 4.2.8' gem 'spring-commands-rspec' # Get HoundCi comments locally - gem 'rubocop' + gem 'rubocop', '0.24.1' # Silence rack assests messages gem 'quiet_assets' # Use sqlite3 as the database in development @@ -150,7 +154,7 @@ group :test do gem 'poltergeist' gem 'phantomjs', :require => 'phantomjs/poltergeist' # Set of rails validations matchers to describe models - gem 'shoulda-matchers', require: false + gem 'shoulda' # Extracted from RSpec 3 stub_model and mock_model gem 'rspec-activemodel-mocks' gem 'timecop' diff --git a/Gemfile.lock b/Gemfile.lock index 63921579..c97afdcd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,71 +1,83 @@ GIT remote: git://github.com/stefanpenner/country_select.git - revision: 585e9538a01ae9878e92f12a98261a09842ed015 + revision: 2023cc8f0c07a6c98a3f1b03cccb065ca26b050d specs: - country_select (2.1.0) - countries (~> 0.9, >= 0.9.3) + country_select (2.4.0) + countries (~> 1.1.0) + sort_alphabetical (~> 1.0) GEM remote: https://rubygems.org/ specs: - actionmailer (4.1.14) - actionpack (= 4.1.14) - actionview (= 4.1.14) + actionmailer (4.2.4) + actionpack (= 4.2.4) + actionview (= 4.2.4) + activejob (= 4.2.4) mail (~> 2.5, >= 2.5.4) - actionpack (4.1.14) - actionview (= 4.1.14) - activesupport (= 4.1.14) - rack (~> 1.5.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.4) + actionview (= 4.2.4) + activesupport (= 4.2.4) + rack (~> 1.6) rack-test (~> 0.6.2) - actionview (4.1.14) - activesupport (= 4.1.14) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (4.2.4) + activesupport (= 4.2.4) builder (~> 3.1) erubis (~> 2.7.0) - active_model_serializers (0.8.1) - activemodel (>= 3.0) - activemodel (4.1.14) - activesupport (= 4.1.14) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + active_model_serializers (0.9.3) + activemodel (>= 3.2) + activejob (4.2.4) + activesupport (= 4.2.4) + globalid (>= 0.3.0) + activemodel (4.2.4) + activesupport (= 4.2.4) builder (~> 3.1) - activerecord (4.1.14) - activemodel (= 4.1.14) - activesupport (= 4.1.14) - arel (~> 5.0.0) - activesupport (4.1.14) - i18n (~> 0.6, >= 0.6.9) + activerecord (4.2.4) + activemodel (= 4.2.4) + activesupport (= 4.2.4) + arel (~> 6.0) + activesupport (4.2.4) + 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) - activeuuid (0.5.0) + activeuuid (0.6.1) activerecord (>= 3.1) uuidtools - acts_as_commentable_with_threading (1.2.0) + acts_as_commentable_with_threading (2.0.0) + activerecord (>= 4.0) + activesupport (>= 4.0) + awesome_nested_set (>= 3.0) + acts_as_list (0.7.2) activerecord (>= 3.0) - activesupport (>= 3.0) - awesome_nested_set (>= 2.0) - acts_as_list (0.4.0) - activerecord (>= 3.0) - addressable (2.3.6) - ahoy_matey (1.0.0) + addressable (2.3.8) + ahoy_matey (1.2.1) addressable browser (>= 0.4.0) + errbase geocoder - referer-parser + rails + referer-parser (>= 0.3.0) request_store user_agent_parser uuidtools - arel (5.0.1.20140414130214) - ast (2.0.0) - autoprefixer-rails (5.1.9) + arel (6.0.3) + ast (2.1.0) + autoprefixer-rails (6.0.3) execjs json - awesome_nested_set (3.0.0.rc.5) + awesome_nested_set (3.0.2) activerecord (>= 4.0.0, < 5) axlsx (2.0.1) htmlentities (~> 4.3.1) nokogiri (>= 1.4.1) rubyzip (~> 1.0.0) - axlsx_rails (0.2.0) + axlsx_rails (0.4.0) axlsx (>= 2.0.1) rails (>= 3.1) bcrypt (3.1.10) @@ -75,24 +87,17 @@ GEM bootstrap-switch-rails (3.0.2) bootstrap3-datetimepicker-rails (3.0.3) momentjs-rails (>= 2.8.1) - browser (0.6.0) + browser (1.0.1) builder (3.2.2) - byebug (3.1.2) - columnize (~> 0.8) - debugger-linecache (~> 1.2) - cancancan (1.8.4) - capybara (2.2.1) + byebug (7.0.0) + cancancan (1.13.1) + capybara (2.5.0) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - celluloid (0.15.2) - timers (~> 1.1.0) - celluloid-io (0.15.0) - celluloid (>= 0.15.0) - nio4r (>= 0.5.0) - chart-js-rails (0.0.6) + chart-js-rails (0.0.9) railties (> 3.1) chronic (0.10.2) climate_control (0.0.3) @@ -102,33 +107,32 @@ GEM climate_control (>= 0.0.3, < 1.0) cocoon (1.2.6) coderay (1.1.0) - coffee-rails (4.0.1) + coffee-rails (4.1.0) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.0) - coffee-script (2.2.0) + coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.7.0) - columnize (0.8.9) - countries (0.9.3) + coffee-script-source (1.9.1.1) + countries (1.1.0) currencies (~> 0.4.2) - coveralls (0.7.0) - multi_json (~> 1.3) - rest-client - simplecov (>= 0.7) - term-ansicolor - thor + i18n_data (~> 0.7.0) + coveralls (0.8.3) + json (~> 1.8) + rest-client (>= 1.6.8, < 2) + simplecov (~> 0.10.0) + term-ansicolor (~> 1.3) + thor (~> 0.19.1) currencies (0.4.2) - d3_rails (3.4.6) + d3_rails (3.5.6) railties (>= 3.1.0) - daemons (1.1.9) - database_cleaner (1.3.0) - debugger-linecache (1.2.0) - delayed_job (4.0.2) - activesupport (>= 3.0, < 4.2) - delayed_job_active_record (4.0.1) - activerecord (>= 3.0, < 4.2) - delayed_job (>= 3.0, < 4.1) + daemons (1.2.3) + database_cleaner (1.5.1) + delayed_job (4.1.1) + activesupport (>= 3.0, < 5.0) + delayed_job_active_record (4.1.0) + activerecord (>= 3.0, < 5) + delayed_job (>= 3.0, < 5) devise (3.5.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) @@ -139,130 +143,152 @@ GEM devise_ichain_authenticatable (0.3.1) devise (>= 2.2) diff-lcs (1.2.5) - docile (1.1.3) + docile (1.1.5) + domain_name (0.5.25) + unf (>= 0.0.5, < 1.0.0) + errbase (0.0.3) erubis (2.7.0) - execjs (2.5.2) - factory_girl (4.4.0) + execjs (2.6.0) + factory_girl (4.5.0) activesupport (>= 3.0.0) - factory_girl_rails (4.4.1) - factory_girl (~> 4.4.0) + factory_girl_rails (4.5.0) + factory_girl (~> 4.5.0) railties (>= 3.0.0) - faraday (0.9.0) + faraday (0.9.2) multipart-post (>= 1.2, < 3) - ffi (1.9.3) - font-awesome-rails (4.1.0.0) + ffi (1.9.10) + font-awesome-rails (4.4.0.0) railties (>= 3.2, < 5.0) - formatador (0.2.4) - formtastic (2.3.0.rc3) + formatador (0.2.5) + formtastic (2.3.1) actionpack (>= 3.0) formtastic-bootstrap (3.0.0) formtastic (>= 2.2) - geocoder (1.2.2) + geocoder (1.2.12) + globalid (0.3.6) + activesupport (>= 4.1.0) gravtastic (3.2.6) - guard (2.6.0) + guard (2.13.0) formatador (>= 0.2.4) - listen (~> 2.7) + listen (>= 2.7, <= 4.0) lumberjack (~> 1.0) + nenv (~> 0.1) + notiffany (~> 0.0) pry (>= 0.9.12) + shellany (~> 0.0) thor (>= 0.18.1) - guard-rspec (4.2.8) + guard-rspec (4.2.10) guard (~> 2.1) rspec (>= 2.14, < 4.0) - haml (4.0.5) + haml (4.0.7) tilt - haml-rails (0.5.3) + haml-rails (0.9.0) actionpack (>= 4.0.1) activesupport (>= 4.0.1) - haml (>= 3.1, < 5.0) + haml (>= 4.0.6, < 5.0) + html2haml (>= 1.0.1) railties (>= 4.0.1) - hashie (2.1.1) - hike (1.2.3) + hashie (3.4.3) hoptoad_notifier (2.4.11) activesupport builder - htmlentities (4.3.1) - i18n (0.6.11) - inversion (0.12.3) - loggability (~> 0.4) + html2haml (2.0.0) + erubis (~> 2.7.0) + haml (~> 4.0.0) + nokogiri (~> 1.6.0) + ruby_parser (~> 3.5) + htmlentities (4.3.4) + http-cookie (1.0.2) + domain_name (~> 0.5) + i18n (0.7.0) + i18n_data (0.7.0) + inversion (0.18.0) + loggability (~> 0.11) jquery-datatables-rails (2.2.3) jquery-rails sass-rails - jquery-rails (3.1.4) - railties (>= 3.0, < 5.0) + jquery-rails (4.0.5) + rails-dom-testing (~> 1.0) + railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (1.8.3) - jwt (1.0.0) - launchy (2.4.2) + jwt (1.5.2) + launchy (2.4.3) addressable (~> 2.3) leaflet-rails (0.7.4) - letter_opener (1.2.0) + letter_opener (1.4.1) launchy (~> 2.2) - listen (2.7.2) - celluloid (>= 0.15.2) - celluloid-io (>= 0.15.0) + listen (3.0.4) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) loggability (0.11.0) - lumberjack (1.0.5) + loofah (2.0.3) + nokogiri (>= 1.5.9) + lumberjack (1.0.9) mail (2.6.3) mime-types (>= 1.16, < 3) method_source (0.8.2) mime-types (2.99) mimemagic (0.3.0) - mina (0.3.0) - open4 + mina (0.3.7) + open4 (~> 1.3.4) rake - mini_portile (0.6.0) + mini_portile (0.6.2) minitest (5.8.3) - momentjs-rails (2.8.1) + momentjs-rails (2.10.6) railties (>= 3.1) - monetize (0.3.0) - money (~> 6.1.0.beta1) - money (6.1.1) - i18n (~> 0.6.4) - money-rails (0.12.0) + monetize (1.1.0) + money (~> 6.5.0) + money (6.5.1) + i18n (>= 0.6.4, <= 0.7.0) + money-rails (1.4.1) activesupport (>= 3.0) - monetize (~> 0.3.0) - money (~> 6.1.1) + monetize (~> 1.1.0) + money (~> 6.5.0) railties (>= 3.0) multi_json (1.11.2) multi_xml (0.5.5) multipart-post (2.0.0) - mysql2 (0.3.16) - netrc (0.10.3) - nio4r (1.1.0) - nokogiri (1.6.2.1) - mini_portile (= 0.6.0) - oauth2 (0.9.4) + mysql2 (0.4.1) + nenv (0.2.0) + netrc (0.11.0) + nokogiri (1.6.6.2) + mini_portile (~> 0.6.0) + notiffany (0.0.8) + nenv (~> 0.1) + shellany (~> 0.0) + oauth2 (1.0.0) faraday (>= 0.8, < 0.10) jwt (~> 1.0) multi_json (~> 1.3) multi_xml (~> 0.5) rack (~> 1.2) - omniauth (1.2.1) - hashie (>= 1.2, < 3) + omniauth (1.2.2) + hashie (>= 1.2, < 4) rack (~> 1.0) - omniauth-facebook (1.6.0) - omniauth-oauth2 (~> 1.1) + omniauth-facebook (3.0.0) + omniauth-oauth2 (~> 1.2) omniauth-github (1.1.2) omniauth (~> 1.0) omniauth-oauth2 (~> 1.1) - omniauth-google-oauth2 (0.2.4) - omniauth (~> 1.0) - omniauth-oauth2 (~> 1.1) - omniauth-oauth2 (1.1.2) - faraday (>= 0.8, < 0.10) + omniauth-google-oauth2 (0.2.9) + addressable (~> 2.3) + jwt (~> 1.0) multi_json (~> 1.3) - oauth2 (~> 0.9.3) + omniauth (>= 1.1.1) + omniauth-oauth2 (~> 1.3.1) + omniauth-oauth2 (1.3.1) + oauth2 (~> 1.0) omniauth (~> 1.2) omniauth-openid (1.0.1) omniauth (~> 1.0) rack-openid (~> 1.3.1) - open4 (1.3.3) + open4 (1.3.4) orm_adapter (0.5.0) - paper_trail (3.0.1) - activerecord (>= 3.0, < 5.0) - activesupport (>= 3.0, < 5.0) + paper_trail (4.0.0) + activerecord (>= 3.0, < 6.0) + activesupport (>= 3.0, < 6.0) + request_store (~> 1.1) paperclip (4.3.2) activemodel (>= 3.2.0) activesupport (>= 3.2.0) @@ -271,99 +297,110 @@ GEM mimemagic (= 0.3.0) parser (2.2.0.pre.3) ast (>= 1.1, < 3.0) - slop (~> 3.4, >= 3.4.5) - pdf-core (0.2.5) - phantomjs (1.9.7.1) + pdf-core (0.6.0) + phantomjs (1.9.8.0) piwik_analytics (1.0.2) actionpack activesupport rails (>= 3.0.0) - poltergeist (1.5.1) + poltergeist (1.7.0) capybara (~> 2.1) cliver (~> 0.3.1) multi_json (~> 1.0) websocket-driver (>= 0.2.0) powerpack (0.0.9) - prawn (1.0.0) - pdf-core (~> 0.2.2) - ttfunk (~> 1.1.1) + prawn (2.0.2) + pdf-core (~> 0.6.0) + ttfunk (~> 1.4.0) prawn_rails (0.0.11) prawn (>= 0.11.1) railties (>= 3.0.0) - pry (0.9.12.6) - coderay (~> 1.0) - method_source (~> 0.8) + protected_attributes (1.1.3) + activemodel (>= 4.0.1, < 5.0) + pry (0.10.3) + coderay (~> 1.1.0) + method_source (~> 0.8.1) slop (~> 3.4) - quiet_assets (1.0.2) + quiet_assets (1.1.0) railties (>= 3.1, < 5.0) - rack (1.5.5) + rack (1.6.4) rack-openid (1.3.1) rack (>= 1.1.0) ruby-openid (>= 2.1.8) rack-test (0.6.3) rack (>= 1.0) - rails (4.1.14) - actionmailer (= 4.1.14) - actionpack (= 4.1.14) - actionview (= 4.1.14) - activemodel (= 4.1.14) - activerecord (= 4.1.14) - activesupport (= 4.1.14) + rails (4.2.4) + actionmailer (= 4.2.4) + actionpack (= 4.2.4) + actionview (= 4.2.4) + activejob (= 4.2.4) + activemodel (= 4.2.4) + activerecord (= 4.2.4) + activesupport (= 4.2.4) bundler (>= 1.3.0, < 2.0) - railties (= 4.1.14) - sprockets-rails (~> 2.0) + railties (= 4.2.4) + 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.2) + loofah (~> 2.0) rails-observers (0.1.2) activemodel (~> 4.0) - railties (4.1.14) - actionpack (= 4.1.14) - activesupport (= 4.1.14) + railties (4.2.4) + actionpack (= 4.2.4) + activesupport (= 4.2.4) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rainbow (2.0.0) rake (10.5.0) - rb-fsevent (0.9.4) - rb-inotify (0.9.4) + rb-fsevent (0.9.6) + rb-inotify (0.9.5) ffi (>= 0.5.0) - rdoc (4.1.1) - json (~> 1.4) + rdoc (4.2.0) rdoc-generator-fivefish (0.1.0) inversion (~> 0.12) loggability (~> 0.6) rdoc (~> 4.0) yajl-ruby (~> 1.1) - redcarpet (3.2.3) - referer-parser (0.2.1) - request_store (1.0.6) - responders (1.1.2) - railties (>= 3.2, < 4.2) - rest-client (1.7.3) + redcarpet (3.3.3) + referer-parser (0.3.0) + request_store (1.2.0) + responders (2.1.0) + railties (>= 4.2.0, < 5) + rest-client (1.8.0) + http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) - rolify (3.4.0) - rspec (3.0.0) - rspec-core (~> 3.0.0) - rspec-expectations (~> 3.0.0) - rspec-mocks (~> 3.0.0) - rspec-activemodel-mocks (1.0.1) + rolify (4.1.1) + rspec (3.3.0) + rspec-core (~> 3.3.0) + rspec-expectations (~> 3.3.0) + rspec-mocks (~> 3.3.0) + rspec-activemodel-mocks (1.0.2) activemodel (>= 3.0) activesupport (>= 3.0) rspec-mocks (>= 2.99, < 4.0) - rspec-core (3.0.2) - rspec-support (~> 3.0.0) - rspec-expectations (3.0.2) + rspec-core (3.3.2) + rspec-support (~> 3.3.0) + rspec-expectations (3.3.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.0.0) - rspec-mocks (3.0.2) - rspec-support (~> 3.0.0) - rspec-rails (3.0.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.0.0) - rspec-expectations (~> 3.0.0) - rspec-mocks (~> 3.0.0) - rspec-support (~> 3.0.0) - rspec-support (3.0.2) + rspec-support (~> 3.3.0) + rspec-mocks (3.3.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.3.0) + rspec-rails (3.3.3) + actionpack (>= 3.0, < 4.3) + activesupport (>= 3.0, < 4.3) + railties (>= 3.0, < 4.3) + rspec-core (~> 3.3.0) + rspec-expectations (~> 3.3.0) + rspec-mocks (~> 3.3.0) + rspec-support (~> 3.3.0) + rspec-support (3.3.0) rubocop (0.24.1) json (>= 1.7.7, < 2) parser (>= 2.2.0.pre.3, < 3.0) @@ -371,64 +408,77 @@ GEM rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.4) ruby-oembed (0.8.14) - ruby-openid (2.5.0) - ruby-progressbar (1.5.1) + ruby-openid (2.7.0) + ruby-progressbar (1.7.5) + ruby_parser (3.7.2) + sexp_processor (~> 4.1) rubyzip (1.0.0) - sass (3.2.19) - sass-rails (4.0.4) + sass (3.4.19) + sass-rails (5.0.4) railties (>= 4.0.0, < 5.0) - sass (~> 3.2.2) - sprockets (~> 2.8, < 2.12) - sprockets-rails (~> 2.0) - shoulda-matchers (2.6.1) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) + sexp_processor (4.6.0) + shellany (0.0.1) + shoulda (3.5.0) + shoulda-context (~> 1.0, >= 1.0.1) + shoulda-matchers (>= 1.4.1, < 3.0) + shoulda-context (1.2.1) + shoulda-matchers (2.8.0) activesupport (>= 3.0.0) - simplecov (0.8.2) + simplecov (0.10.0) docile (~> 1.1.0) - multi_json - simplecov-html (~> 0.8.0) - simplecov-html (0.8.0) + json (~> 1.8) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) slop (3.6.0) - spring (1.1.2) - spring-commands-rspec (1.0.2) + sort_alphabetical (1.0.2) + unicode_utils (>= 1.2.2) + spring (1.4.0) + spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (2.11.3) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) + sprockets (3.4.0) + rack (> 1, < 3) sprockets-rails (2.3.3) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) - sqlite3 (1.3.9) - term-ansicolor (1.3.0) + sqlite3 (1.3.11) + term-ansicolor (1.3.2) tins (~> 1.0) thor (0.19.1) thread_safe (0.3.5) - tilt (1.4.1) - timecop (0.7.1) timers (1.1.0) - tins (1.1.0) - transitions (0.1.12) - ttfunk (1.1.1) - turbolinks (2.2.2) + tilt (2.0.1) + timecop (0.8.0) + tins (1.6.0) + transitions (0.2.1) + ttfunk (1.4.0) + turbolinks (2.5.3) coffee-rails tzinfo (1.2.2) thread_safe (~> 0.1) - uglifier (2.5.0) + uglifier (2.7.2) execjs (>= 0.3.0) json (>= 1.8.0) - user_agent_parser (2.1.5) - uuidtools (2.1.4) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.1) + unicode_utils (1.4.0) + user_agent_parser (2.3.0) + uuidtools (2.1.5) warden (1.2.4) rack (>= 1.0) - websocket-driver (0.3.3) - whenever (0.9.2) - activesupport (>= 2.3.4) + websocket-driver (0.6.2) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + whenever (0.9.4) chronic (>= 0.6.3) xpath (2.0.0) nokogiri (~> 1.3) - yajl-ruby (1.2.0) + yajl-ruby (1.2.1) PLATFORMS ruby @@ -486,17 +536,18 @@ DEPENDENCIES poltergeist prawn_rails quiet_assets - rails (~> 4.1) + rails (~> 4.2, >= 4.2.4) rails-observers rdoc-generator-fivefish redcarpet + responders (~> 2.0) rolify rspec-activemodel-mocks rspec-rails - rubocop + rubocop (= 0.24.1) ruby-oembed sass-rails (>= 4.0.2) - shoulda-matchers + shoulda spring-commands-rspec sqlite3 timecop diff --git a/bin/bundle b/bin/bundle new file mode 100755 index 00000000..66e9889e --- /dev/null +++ b/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/bin/rails b/bin/rails index f8da2cff..5191e692 100755 --- a/bin/rails +++ b/bin/rails @@ -1,6 +1,4 @@ #!/usr/bin/env ruby -# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. - -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) +APP_PATH = File.expand_path('../../config/application', __FILE__) +require_relative '../config/boot' require 'rails/commands' diff --git a/bin/rake b/bin/rake new file mode 100755 index 00000000..17240489 --- /dev/null +++ b/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/bin/setup b/bin/setup new file mode 100755 index 00000000..eb347f96 --- /dev/null +++ b/bin/setup @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'pathname' + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +Dir.chdir APP_ROOT do + # This script is a starting point to setup your application. + # Add necessary setup steps to this file: + + puts '== Installing dependencies ==' + system 'gem install bundler --conservative' + system 'bundle check || bundle install' + + # puts "\n== Copying sample files ==" + # unless File.exist?("config/database.yml") + # system "cp config/database.yml.sample config/database.yml" + # end + + puts "\n== Preparing database ==" + system 'bin/rake db:setup' + + puts "\n== Removing old logs and tempfiles ==" + system 'rm -f log/*' + system 'rm -rf tmp/cache' + + puts "\n== Restarting application server ==" + system 'touch tmp/restart.txt' +end diff --git a/config/application.rb b/config/application.rb index 91ac6591..2df105a2 100644 --- a/config/application.rb +++ b/config/application.rb @@ -37,6 +37,9 @@ module Osem # Configure the default encoding used in templates for Ruby 1.9. config.encoding = 'utf-8' + # Do not swallow errors in after_commit/after_rollback callbacks. + config.active_record.raise_in_transactional_callbacks = true + # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] diff --git a/config/environments/production.rb b/config/environments/production.rb index 69c7f9de..4b165793 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -15,7 +15,7 @@ Osem::Application.configure do config.eager_load = 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 @@ -35,8 +35,9 @@ Osem::Application.configure do # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true - # See everything in the log (default is :info) - # config.log_level = :debug + # See everything in the log. Set to `:info` to match the current default, or set to `:debug` to opt-into + # the future default. + config.log_level = :info # Prepend all log lines with the following tags # config.log_tags = [ :subdomain, :uuid ] diff --git a/config/environments/test.rb b/config/environments/test.rb index bac307fa..20432f90 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -8,7 +8,7 @@ Osem::Application.configure do 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' # Do not eager load code on boot. @@ -35,6 +35,9 @@ Osem::Application.configure do # Print deprecation notices to the stderr config.active_support.deprecation = :stderr + # Randomize/sort the order test cases are executed. + config.active_support.test_order = :sorted # or `:random` + # Set the detault url for action mailer config.action_mailer.default_url_options = { host: 'localhost:3000' } @@ -47,5 +50,4 @@ Osem::Application.configure do t = Time.local(2014, 05, 01, 00, 01, 00) Timecop.travel(t) end - end diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb new file mode 100644 index 00000000..01ef3e66 --- /dev/null +++ b/config/initializers/assets.rb @@ -0,0 +1,11 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = '1.0' + +# Add additional assets to the asset load path +# Rails.application.config.assets.paths << Emoji.images_path + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. +# Rails.application.config.assets.precompile += %w( search.js ) diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb new file mode 100644 index 00000000..ac5f8b66 --- /dev/null +++ b/config/initializers/cookies_serializer.rb @@ -0,0 +1,3 @@ +# Be sure to restart your server when you modify this file. + +Rails.application.config.action_dispatch.cookies_serializer = :marshal diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb new file mode 100644 index 00000000..4a994e1e --- /dev/null +++ b/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index 999df201..33725e95 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -1,14 +1,14 @@ # Be sure to restart your server when you modify this file. -# + # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] + wrap_parameters format: [:json] if respond_to?(:wrap_parameters) end -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/db/schema.rb b/db/schema.rb index cd241c4e..a14df378 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -14,8 +14,8 @@ ActiveRecord::Schema.define(version: 20151005161518) do - create_table "ahoy_events", force: true do |t| - t.uuid "visit_id" + create_table "ahoy_events", force: :cascade do |t| + t.uuid "visit_id", limit: 16 t.integer "user_id" t.string "name" t.text "properties" @@ -26,13 +26,13 @@ ActiveRecord::Schema.define(version: 20151005161518) do add_index "ahoy_events", ["user_id"], name: "index_ahoy_events_on_user_id" add_index "ahoy_events", ["visit_id"], name: "index_ahoy_events_on_visit_id" - create_table "answers", force: true do |t| + create_table "answers", force: :cascade do |t| t.string "title" t.datetime "created_at" t.datetime "updated_at" end - create_table "call_for_papers", force: true do |t| + create_table "call_for_papers", force: :cascade do |t| t.date "start_date", null: false t.date "end_date", null: false t.integer "conference_id" @@ -43,7 +43,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.boolean "schedule_public" end - create_table "campaigns", force: true do |t| + create_table "campaigns", force: :cascade do |t| t.integer "conference_id" t.string "name" t.string "utm_source" @@ -55,7 +55,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.datetime "updated_at" end - create_table "comments", force: true do |t| + create_table "comments", force: :cascade do |t| t.string "title", limit: 50, default: "" t.text "body" t.integer "commentable_id" @@ -73,7 +73,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do add_index "comments", ["commentable_type"], name: "index_comments_on_commentable_type" add_index "comments", ["user_id"], name: "index_comments_on_user_id" - create_table "commercials", force: true do |t| + create_table "commercials", force: :cascade do |t| t.string "commercial_id" t.string "commercial_type" t.integer "commercialable_id" @@ -83,7 +83,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.string "url" end - create_table "conferences", force: true do |t| + create_table "conferences", force: :cascade do |t| t.string "guid", null: false t.string "title", null: false t.string "short_title", null: false @@ -108,12 +108,12 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.text "description" end - create_table "conferences_questions", id: false, force: true do |t| + create_table "conferences_questions", id: false, force: :cascade do |t| t.integer "conference_id" t.integer "question_id" end - create_table "contacts", force: true do |t| + create_table "contacts", force: :cascade do |t| t.string "social_tag" t.string "email" t.string "facebook" @@ -126,7 +126,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.string "sponsor_email" end - create_table "delayed_jobs", force: true do |t| + create_table "delayed_jobs", force: :cascade do |t| t.integer "priority", default: 0, null: false t.integer "attempts", default: 0, null: false t.text "handler", null: false @@ -142,14 +142,14 @@ ActiveRecord::Schema.define(version: 20151005161518) do add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority" - create_table "dietary_choices", force: true do |t| + create_table "dietary_choices", force: :cascade do |t| t.integer "conference_id" t.string "title", null: false t.datetime "created_at" t.datetime "updated_at" end - create_table "difficulty_levels", force: true do |t| + create_table "difficulty_levels", force: :cascade do |t| t.integer "conference_id" t.string "title" t.text "description" @@ -158,7 +158,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.datetime "updated_at" end - create_table "email_settings", force: true do |t| + create_table "email_settings", force: :cascade do |t| t.integer "conference_id" t.boolean "send_on_registration", default: false t.boolean "send_on_accepted", default: false @@ -191,7 +191,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.text "call_for_papers_dates_updated_body" end - create_table "event_types", force: true do |t| + create_table "event_types", force: :cascade do |t| t.integer "conference_id" t.string "title", null: false t.integer "length", default: 30 @@ -201,7 +201,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.string "description" end - create_table "event_users", force: true do |t| + create_table "event_users", force: :cascade do |t| t.integer "user_id" t.integer "event_id" t.string "event_role", default: "participant", null: false @@ -210,7 +210,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.datetime "updated_at" end - create_table "events", force: true do |t| + create_table "events", force: :cascade do |t| t.string "guid", null: false t.integer "conference_id" t.integer "event_type_id" @@ -239,12 +239,12 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.boolean "is_highlight", default: false end - create_table "events_registrations", id: false, force: true do |t| + create_table "events_registrations", id: false, force: :cascade do |t| t.integer "registration_id" t.integer "event_id" end - create_table "lodgings", force: true do |t| + create_table "lodgings", force: :cascade do |t| t.string "name" t.text "description" t.string "photo_file_name" @@ -257,7 +257,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.integer "conference_id" end - create_table "openids", force: true do |t| + create_table "openids", force: :cascade do |t| t.string "provider" t.string "email" t.string "uid" @@ -266,7 +266,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.datetime "updated_at" end - create_table "photos", force: true do |t| + create_table "photos", force: :cascade do |t| t.text "description" t.string "picture_file_name" t.string "picture_content_type" @@ -277,25 +277,25 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.datetime "updated_at" end - create_table "qanswers", force: true do |t| + create_table "qanswers", force: :cascade do |t| t.integer "question_id" t.integer "answer_id" t.datetime "created_at" t.datetime "updated_at" end - create_table "qanswers_registrations", id: false, force: true do |t| + create_table "qanswers_registrations", id: false, force: :cascade do |t| t.integer "registration_id", null: false t.integer "qanswer_id", null: false end - create_table "question_types", force: true do |t| + create_table "question_types", force: :cascade do |t| t.string "title" t.datetime "created_at" t.datetime "updated_at" end - create_table "questions", force: true do |t| + create_table "questions", force: :cascade do |t| t.string "title" t.integer "question_type_id" t.integer "conference_id" @@ -304,7 +304,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.datetime "updated_at" end - create_table "registration_periods", force: true do |t| + create_table "registration_periods", force: :cascade do |t| t.integer "conference_id" t.date "start_date" t.date "end_date" @@ -312,7 +312,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.datetime "updated_at" end - create_table "registrations", force: true do |t| + create_table "registrations", force: :cascade do |t| t.integer "conference_id" t.datetime "arrival" t.datetime "departure" @@ -327,17 +327,17 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.integer "week" end - create_table "registrations_social_events", id: false, force: true do |t| + create_table "registrations_social_events", id: false, force: :cascade do |t| t.integer "registration_id" t.integer "social_event_id" end - create_table "registrations_vchoices", id: false, force: true do |t| + create_table "registrations_vchoices", id: false, force: :cascade do |t| t.integer "registration_id" t.integer "vchoice_id" end - create_table "roles", force: true do |t| + create_table "roles", force: :cascade do |t| t.string "name" t.datetime "created_at" t.datetime "updated_at" @@ -349,28 +349,28 @@ ActiveRecord::Schema.define(version: 20151005161518) do add_index "roles", ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id" add_index "roles", ["name"], name: "index_roles_on_name" - create_table "roles_users", id: false, force: true do |t| + create_table "roles_users", id: false, force: :cascade do |t| t.integer "role_id" t.integer "user_id" end add_index "roles_users", ["user_id", "role_id"], name: "index_roles_users_on_user_id_and_role_id" - create_table "rooms", force: true do |t| + create_table "rooms", force: :cascade do |t| t.string "guid", null: false t.integer "conference_id" t.string "name", null: false t.integer "size" end - create_table "social_events", force: true do |t| + create_table "social_events", force: :cascade do |t| t.integer "conference_id" t.string "title" t.text "description" t.date "date" end - create_table "splashpages", force: true do |t| + create_table "splashpages", force: :cascade do |t| t.integer "conference_id" t.boolean "public" t.boolean "include_tracks" @@ -386,7 +386,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.boolean "include_cfp", default: false end - create_table "sponsors", force: true do |t| + create_table "sponsors", force: :cascade do |t| t.string "name" t.text "description" t.string "website_url" @@ -400,7 +400,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.datetime "updated_at" end - create_table "sponsorship_levels", force: true do |t| + create_table "sponsorship_levels", force: :cascade do |t| t.string "title" t.integer "conference_id" t.datetime "created_at" @@ -408,14 +408,14 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.integer "position" end - create_table "subscriptions", force: true do |t| + create_table "subscriptions", force: :cascade do |t| t.integer "user_id" t.integer "conference_id" t.datetime "created_at" t.datetime "updated_at" end - create_table "targets", force: true do |t| + create_table "targets", force: :cascade do |t| t.integer "conference_id" t.integer "campaign_id" t.date "due_date" @@ -425,7 +425,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.datetime "updated_at" end - create_table "ticket_purchases", force: true do |t| + create_table "ticket_purchases", force: :cascade do |t| t.integer "ticket_id" t.integer "conference_id" t.boolean "paid", default: false @@ -434,7 +434,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.integer "user_id" end - create_table "tickets", force: true do |t| + create_table "tickets", force: :cascade do |t| t.integer "conference_id" t.string "title", null: false t.text "description" @@ -442,7 +442,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.string "price_currency", default: "USD", null: false end - create_table "tracks", force: true do |t| + create_table "tracks", force: :cascade do |t| t.string "guid", null: false t.integer "conference_id" t.string "name", null: false @@ -452,7 +452,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.datetime "updated_at" end - create_table "users", force: true do |t| + create_table "users", force: :cascade do |t| t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" @@ -492,12 +492,12 @@ ActiveRecord::Schema.define(version: 20151005161518) do add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true add_index "users", ["username"], name: "index_users_on_username", unique: true - create_table "vchoices", force: true do |t| + create_table "vchoices", force: :cascade do |t| t.integer "vday_id" t.integer "vposition_id" end - create_table "vdays", force: true do |t| + create_table "vdays", force: :cascade do |t| t.integer "conference_id" t.date "day" t.text "description" @@ -505,7 +505,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.datetime "updated_at" end - create_table "venues", force: true do |t| + create_table "venues", force: :cascade do |t| t.string "guid" t.string "name" t.string "website" @@ -525,7 +525,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.integer "conference_id" end - create_table "versions", force: true do |t| + create_table "versions", force: :cascade do |t| t.string "item_type", null: false t.integer "item_id", null: false t.string "event", null: false @@ -537,8 +537,8 @@ ActiveRecord::Schema.define(version: 20151005161518) do add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id" - create_table "visits", force: true do |t| - t.uuid "visitor_id" + create_table "visits", force: :cascade do |t| + t.uuid "visitor_id", limit: 16 t.string "ip" t.text "user_agent" t.text "referrer" @@ -562,7 +562,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do add_index "visits", ["user_id"], name: "index_visits_on_user_id" - create_table "votes", force: true do |t| + create_table "votes", force: :cascade do |t| t.integer "event_id" t.integer "rating" t.datetime "created_at" @@ -570,7 +570,7 @@ ActiveRecord::Schema.define(version: 20151005161518) do t.integer "user_id" end - create_table "vpositions", force: true do |t| + create_table "vpositions", force: :cascade do |t| t.integer "conference_id" t.string "title", null: false t.text "description" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 77e1ad17..e92cf495 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -79,6 +79,7 @@ RSpec.configure do |config| config.include Flash, type: :feature config.include Sidebar, type: :view config.include Devise::TestHelpers, type: :view + config.include Capybara::DSL # As we start from scratch in April 2014, let's forbid the old :should syntax config.expect_with :rspec do |c| diff --git a/spec/support/save_feature_failures.rb b/spec/support/save_feature_failures.rb index 4cfb68d4..313a5207 100644 --- a/spec/support/save_feature_failures.rb +++ b/spec/support/save_feature_failures.rb @@ -3,7 +3,7 @@ RSpec.configure do |config| config.after(:each, type: :feature) do ename = RSpec.current_example.full_description - ename = ename.gsub ' ', '_' + ename = ename.tr ' ', '_' ename.downcase! ename = ename + '.html' if RSpec.current_example.exception.present? From 04a437bdb03f7787f86e94f2543cdad953eb1470 Mon Sep 17 00:00:00 2001 From: raluka Date: Fri, 22 Jan 2016 16:24:53 +0100 Subject: [PATCH 2/2] Rebased from upstream --- Gemfile.lock | 3 --- 1 file changed, 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c97afdcd..db14f318 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -315,8 +315,6 @@ GEM prawn_rails (0.0.11) prawn (>= 0.11.1) railties (>= 3.0.0) - protected_attributes (1.1.3) - activemodel (>= 4.0.1, < 5.0) pry (0.10.3) coderay (~> 1.1.0) method_source (~> 0.8.1) @@ -450,7 +448,6 @@ GEM tins (~> 1.0) thor (0.19.1) thread_safe (0.3.5) - timers (1.1.0) tilt (2.0.1) timecop (0.8.0) tins (1.6.0)