From 7011bc4762d864a99e0dd29570a70e1d7c7b9bbc Mon Sep 17 00:00:00 2001 From: Tyson Gach Date: Fri, 14 Jul 2017 11:01:45 -0400 Subject: [PATCH] Revert "Upgrade Rails to 5.1.1" This reverts commit 9c0b112623f38293905f084be3ea42562edb7000. --- Gemfile | 6 +- Gemfile.lock | 180 ++++++++---------- app/models/user.rb | 2 +- config/initializers/new_framework_defaults.rb | 4 + 4 files changed, 90 insertions(+), 102 deletions(-) diff --git a/Gemfile b/Gemfile index f98edcd37..1ed9e2e55 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" ruby "2.3.1" gem "active_model_serializers", "0.9.5" -gem "administrate", git: "https://github.com/thoughtbot/administrate" +gem "administrate", "0.7.0" gem "analytics-ruby", "~> 2.2.2", require: "segment/analytics" gem "attr_extras" gem "autoprefixer-rails" @@ -22,7 +22,7 @@ gem "paranoia", "~> 2.2" gem "pathspec" gem "pg" gem "puma" -gem "rails", "~> 5.1.1" +gem "rails", "5.0.0.1" gem "rails-assets-classnames", source: "https://rails-assets.org" gem "rails-assets-es5-shim", source: "https://rails-assets.org" gem "rails-assets-lodash", source: "https://rails-assets.org" @@ -50,7 +50,7 @@ group :development, :test do gem "byebug" gem "dotenv-rails" gem "foreman" - gem "rspec-rails" + gem "rspec-rails", ">= 3.4" end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 371b74769..a333a62f7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,67 +1,63 @@ -GIT - remote: https://github.com/thoughtbot/administrate - revision: 6c9d30cf58be2bb9d403ac47ba53f25228dcd6e4 - specs: - administrate (0.7.0) - actionpack (>= 4.2, < 5.2) - actionview (>= 4.2, < 5.2) - activerecord (>= 4.2, < 5.2) - autoprefixer-rails (>= 6.0) - datetime_picker_rails (~> 0.0.7) - jquery-rails (>= 4.0) - kaminari (>= 1.0) - momentjs-rails (~> 2.8) - sass-rails (~> 5.0) - selectize-rails (~> 0.6) - GEM remote: https://rubygems.org/ remote: https://rails-assets.org/ specs: - actioncable (5.1.1) - actionpack (= 5.1.1) - nio4r (~> 2.0) + actioncable (5.0.0.1) + actionpack (= 5.0.0.1) + nio4r (~> 1.2) websocket-driver (~> 0.6.1) - actionmailer (5.1.1) - actionpack (= 5.1.1) - actionview (= 5.1.1) - activejob (= 5.1.1) + actionmailer (5.0.0.1) + actionpack (= 5.0.0.1) + actionview (= 5.0.0.1) + activejob (= 5.0.0.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.1.1) - actionview (= 5.1.1) - activesupport (= 5.1.1) + actionpack (5.0.0.1) + actionview (= 5.0.0.1) + activesupport (= 5.0.0.1) rack (~> 2.0) rack-test (~> 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.1.1) - activesupport (= 5.1.1) + actionview (5.0.0.1) + activesupport (= 5.0.0.1) builder (~> 3.1) - erubi (~> 1.4) + erubis (~> 2.7.0) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) + rails-html-sanitizer (~> 1.0, >= 1.0.2) active_model_serializers (0.9.5) activemodel (>= 3.2) - activejob (5.1.1) - activesupport (= 5.1.1) + activejob (5.0.0.1) + activesupport (= 5.0.0.1) globalid (>= 0.3.6) - activemodel (5.1.1) - activesupport (= 5.1.1) - activerecord (5.1.1) - activemodel (= 5.1.1) - activesupport (= 5.1.1) - arel (~> 8.0) - activesupport (5.1.1) + activemodel (5.0.0.1) + activesupport (= 5.0.0.1) + activerecord (5.0.0.1) + activemodel (= 5.0.0.1) + activesupport (= 5.0.0.1) + arel (~> 7.0) + activesupport (5.0.0.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) addressable (2.5.1) public_suffix (~> 2.0, >= 2.0.2) + administrate (0.7.0) + actionpack (>= 4.2, < 5.1) + actionview (>= 4.2, < 5.1) + activerecord (>= 4.2, < 5.1) + autoprefixer-rails (~> 6.0) + datetime_picker_rails (~> 0.0.7) + jquery-rails (>= 4.0) + kaminari (>= 1.0) + momentjs-rails (~> 2.8) + normalize-rails (>= 3.0) + sass-rails (~> 5.0) + selectize-rails (~> 0.6) analytics-ruby (2.2.2) commander (~> 4.4) - arel (8.0.0) + arel (7.1.4) attr_extras (4.4.0) autoprefixer-rails (6.7.7.2) execjs @@ -103,20 +99,18 @@ GEM connection_pool (2.2.0) crack (0.4.3) safe_yaml (~> 1.0.0) - database_cleaner (1.6.1) + database_cleaner (1.3.0) datetime_picker_rails (0.0.7) momentjs-rails (>= 2.8.1) debugger-linecache (1.2.0) - diff-lcs (1.3) + diff-lcs (1.2.5) domain_name (0.5.20161129) unf (>= 0.0.5, < 1.0.0) - dotenv (2.2.1) - dotenv-rails (2.2.1) - dotenv (= 2.2.1) - railties (>= 3.2, < 5.2) + dotenv (2.0.1) + dotenv-rails (2.0.1) + dotenv (= 2.0.1) email_validator (1.6.0) activemodel - erubi (1.6.0) erubis (2.7.0) execjs (2.7.0) factory_girl (4.8.0) @@ -130,27 +124,20 @@ GEM thor (~> 0.19.1) globalid (0.4.0) activesupport (>= 4.2.0) - haml (5.0.1) - temple (>= 0.8.0) + haml (4.0.7) tilt - haml-rails (1.0.0) + haml-rails (0.5.3) actionpack (>= 4.0.1) activesupport (>= 4.0.1) - haml (>= 4.0.6, < 6.0) - html2haml (>= 1.0.1) + haml (>= 3.1, < 5.0) railties (>= 4.0.1) hashdiff (0.3.0) hashie (3.4.6) high_voltage (3.0.0) highline (1.7.8) - html2haml (2.2.0) - erubis (~> 2.7.0) - haml (>= 4.0, < 6) - nokogiri (>= 1.6.0) - ruby_parser (~> 3.5) http-cookie (1.0.3) domain_name (~> 0.5) - i18n (0.8.4) + i18n (0.8.1) inifile (3.0.0) jquery-rails (4.3.1) rails-dom-testing (>= 1, < 3) @@ -174,13 +161,13 @@ GEM addressable (~> 2.3) loofah (2.0.3) nokogiri (>= 1.5.9) - mail (2.6.6) + mail (2.6.5) mime-types (>= 1.16, < 4) method_source (0.8.2) mime-types (3.1) mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) - mini_portile2 (2.2.0) + mini_portile2 (2.1.0) minitest (5.10.2) momentjs-rails (2.17.1) railties (>= 3.1) @@ -193,9 +180,10 @@ GEM sass (>= 3.3) thor (~> 0.19) netrc (0.11.0) - nio4r (2.1.0) - nokogiri (1.8.0) - mini_portile2 (~> 2.2.0) + nio4r (1.2.1) + nokogiri (1.7.2) + mini_portile2 (~> 2.1.0) + normalize-rails (4.1.1) oauth2 (1.2.0) faraday (>= 0.8, < 0.10) jwt (~> 1.0) @@ -213,8 +201,8 @@ GEM omniauth-oauth2 (1.4.0) oauth2 (~> 1.0) omniauth (~> 1.2) - paranoia (2.3.1) - activerecord (>= 4.0, < 5.2) + paranoia (2.2.0) + activerecord (>= 4.0, < 5.1) pathspec (0.1.0) pg (0.19.0) public_suffix (2.0.5) @@ -225,17 +213,17 @@ GEM rack-test (0.6.3) rack (>= 1.0) rack-timeout (0.4.2) - rails (5.1.1) - actioncable (= 5.1.1) - actionmailer (= 5.1.1) - actionpack (= 5.1.1) - actionview (= 5.1.1) - activejob (= 5.1.1) - activemodel (= 5.1.1) - activerecord (= 5.1.1) - activesupport (= 5.1.1) + rails (5.0.0.1) + actioncable (= 5.0.0.1) + actionmailer (= 5.0.0.1) + actionpack (= 5.0.0.1) + actionview (= 5.0.0.1) + activejob (= 5.0.0.1) + activemodel (= 5.0.0.1) + activerecord (= 5.0.0.1) + activesupport (= 5.0.0.1) bundler (>= 1.3.0, < 2.0) - railties (= 5.1.1) + railties (= 5.0.0.1) sprockets-rails (>= 2.0.0) rails-assets-classnames (2.2.5) rails-assets-es5-shim (4.5.9) @@ -251,9 +239,9 @@ GEM rails_stdout_logging rails_serve_static_assets (0.0.4) rails_stdout_logging (0.0.3) - railties (5.1.1) - actionpack (= 5.1.1) - activesupport (= 5.1.1) + railties (5.0.0.1) + actionpack (= 5.0.0.1) + activesupport (= 5.0.0.1) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) @@ -288,25 +276,23 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rspec-core (3.6.0) - rspec-support (~> 3.6.0) - rspec-expectations (3.6.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.6.0) - rspec-mocks (3.6.0) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-rails (3.6.0) + rspec-support (~> 3.5.0) + rspec-rails (3.5.2) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.6.0) - rspec-expectations (~> 3.6.0) - rspec-mocks (~> 3.6.0) - rspec-support (~> 3.6.0) - rspec-support (3.6.0) - ruby_parser (3.9.0) - sexp_processor (~> 4.1) + 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) rufus-scheduler (3.3.1) tzinfo safe_yaml (1.0.4) @@ -323,7 +309,6 @@ GEM selectize-rails (0.12.4) sentry-raven (2.2.0) faraday (>= 0.7.6, < 1.0) - sexp_processor (4.9.0) shoulda-matchers (2.6.2) activesupport (>= 3.0.0) sinatra (2.0.0) @@ -340,7 +325,6 @@ GEM sprockets (>= 3.0.0) stripe (1.57.1) rest-client (>= 1.4, < 4.0) - temple (0.8.0) thor (0.19.1) thread_safe (0.3.6) tilt (2.0.7) @@ -369,7 +353,7 @@ PLATFORMS DEPENDENCIES active_model_serializers (= 0.9.5) - administrate! + administrate (= 0.7.0) analytics-ruby (~> 2.2.2) attr_extras autoprefixer-rails @@ -398,7 +382,7 @@ DEPENDENCIES pg puma rack-timeout - rails (~> 5.1.1) + rails (= 5.0.0.1) rails-assets-classnames! rails-assets-es5-shim! rails-assets-lodash! @@ -410,7 +394,7 @@ DEPENDENCIES resque-scheduler resque-sentry rest-client (>= 1.8.0) - rspec-rails + rspec-rails (>= 3.4) sass-rails sentry-raven (>= 0.12.2) shoulda-matchers @@ -424,4 +408,4 @@ RUBY VERSION ruby 2.3.1p112 BUNDLED WITH - 1.15.1 + 1.15.0 diff --git a/app/models/user.rb b/app/models/user.rb index cff12e45c..14c980f3f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -4,8 +4,8 @@ class User < ApplicationRecord has_many :memberships, dependent: :destroy has_many :repos, through: :memberships has_many :builds, through: :repos - has_many :subscriptions has_many :subscribed_repos, through: :subscriptions, source: :repo + has_many :subscriptions validates :username, presence: true diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb index e6c2555f6..f6133dda6 100644 --- a/config/initializers/new_framework_defaults.rb +++ b/config/initializers/new_framework_defaults.rb @@ -19,3 +19,7 @@ # Require `belongs_to` associations by default. Previous versions had false. Rails.application.config.active_record.belongs_to_required_by_default = false + +# Do not halt callback chains when a callback returns false. Previous versions +# had true. +ActiveSupport.halt_callback_chains_on_return_false = true