Commit 25669951 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Bump Rails version to 5.1.7

Removes unneeded patches
parent 624a1cda
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'rails', '5.1.6.1' gem 'rails', '5.1.7'
# Improves copy-on-write performance for MRI # Improves copy-on-write performance for MRI
gem 'nakayoshi_fork', '~> 0.0.4' gem 'nakayoshi_fork', '~> 0.0.4'
......
...@@ -4,41 +4,41 @@ GEM ...@@ -4,41 +4,41 @@ GEM
RedCloth (4.3.2) RedCloth (4.3.2)
abstract_type (0.0.7) abstract_type (0.0.7)
ace-rails-ap (4.1.2) ace-rails-ap (4.1.2)
actioncable (5.1.6.1) actioncable (5.1.7)
actionpack (= 5.1.6.1) actionpack (= 5.1.7)
nio4r (~> 2.0) nio4r (~> 2.0)
websocket-driver (~> 0.6.1) websocket-driver (~> 0.6.1)
actionmailer (5.1.6.1) actionmailer (5.1.7)
actionpack (= 5.1.6.1) actionpack (= 5.1.7)
actionview (= 5.1.6.1) actionview (= 5.1.7)
activejob (= 5.1.6.1) activejob (= 5.1.7)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
actionpack (5.1.6.1) actionpack (5.1.7)
actionview (= 5.1.6.1) actionview (= 5.1.7)
activesupport (= 5.1.6.1) activesupport (= 5.1.7)
rack (~> 2.0) rack (~> 2.0)
rack-test (>= 0.6.3) rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.1.6.1) actionview (5.1.7)
activesupport (= 5.1.6.1) activesupport (= 5.1.7)
builder (~> 3.1) builder (~> 3.1)
erubi (~> 1.4) erubi (~> 1.4)
rails-dom-testing (~> 2.0) rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3) rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.6.1) activejob (5.1.7)
activesupport (= 5.1.6.1) activesupport (= 5.1.7)
globalid (>= 0.3.6) globalid (>= 0.3.6)
activemodel (5.1.6.1) activemodel (5.1.7)
activesupport (= 5.1.6.1) activesupport (= 5.1.7)
activerecord (5.1.6.1) activerecord (5.1.7)
activemodel (= 5.1.6.1) activemodel (= 5.1.7)
activesupport (= 5.1.6.1) activesupport (= 5.1.7)
arel (~> 8.0) arel (~> 8.0)
activerecord_sane_schema_dumper (1.0) activerecord_sane_schema_dumper (1.0)
rails (>= 5, < 6) rails (>= 5, < 6)
activesupport (5.1.6.1) activesupport (5.1.7)
concurrent-ruby (~> 1.0, >= 1.0.2) concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2) i18n (>= 0.7, < 2)
minitest (~> 5.1) minitest (~> 5.1)
...@@ -185,7 +185,7 @@ GEM ...@@ -185,7 +185,7 @@ GEM
mail (~> 2.7) mail (~> 2.7)
encryptor (3.0.0) encryptor (3.0.0)
equalizer (0.0.11) equalizer (0.0.11)
erubi (1.7.1) erubi (1.8.0)
escape_utils (1.2.1) escape_utils (1.2.1)
et-orbi (1.1.7) et-orbi (1.1.7)
tzinfo tzinfo
...@@ -659,17 +659,17 @@ GEM ...@@ -659,17 +659,17 @@ GEM
rack rack
rack-test (1.1.0) rack-test (1.1.0)
rack (>= 1.0, < 3) rack (>= 1.0, < 3)
rails (5.1.6.1) rails (5.1.7)
actioncable (= 5.1.6.1) actioncable (= 5.1.7)
actionmailer (= 5.1.6.1) actionmailer (= 5.1.7)
actionpack (= 5.1.6.1) actionpack (= 5.1.7)
actionview (= 5.1.6.1) actionview (= 5.1.7)
activejob (= 5.1.6.1) activejob (= 5.1.7)
activemodel (= 5.1.6.1) activemodel (= 5.1.7)
activerecord (= 5.1.6.1) activerecord (= 5.1.7)
activesupport (= 5.1.6.1) activesupport (= 5.1.7)
bundler (>= 1.3.0) bundler (>= 1.3.0)
railties (= 5.1.6.1) railties (= 5.1.7)
sprockets-rails (>= 2.0.0) sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2) rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1) actionpack (~> 5.x, >= 5.0.1)
...@@ -683,9 +683,9 @@ GEM ...@@ -683,9 +683,9 @@ GEM
rails-i18n (5.1.1) rails-i18n (5.1.1)
i18n (>= 0.7, < 2) i18n (>= 0.7, < 2)
railties (>= 5.0, < 6) railties (>= 5.0, < 6)
railties (5.0.7.2) railties (5.1.7)
actionpack (= 5.0.7.2) actionpack (= 5.1.7)
activesupport (= 5.0.7.2) activesupport (= 5.1.7)
method_source method_source
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
...@@ -1141,7 +1141,7 @@ DEPENDENCIES ...@@ -1141,7 +1141,7 @@ DEPENDENCIES
rack-cors (~> 1.0.0) rack-cors (~> 1.0.0)
rack-oauth2 (~> 1.9.3) rack-oauth2 (~> 1.9.3)
rack-proxy (~> 0.6.0) rack-proxy (~> 0.6.0)
rails (= 5.1.6.1) rails (= 5.1.7)
rails-controller-testing rails-controller-testing
rails-i18n (~> 5.1) rails-i18n (~> 5.1)
rainbow (~> 3.0) rainbow (~> 3.0)
......
# Remove once https://github.com/rails/rails/pull/32498
# is released on a 5.1.x rails version.
# Commit on 5-1-stable branch: https://github.com/rails/rails/commit/6ef736625eddf6700f2e67f7849c79c92381abee
module ActiveRecord
class AttributeMutationTracker
def changes
attr_names.each_with_object({}.with_indifferent_access) do |attr_name, result|
change = change_to_attribute(attr_name)
if change
result.merge!(attr_name => change)
end
end
end
end
end
# rubocop:disable Gitlab/ModuleWithInstanceVariables
# Remove once https://github.com/rails/rails/issues/32867
# is released on a 5.1.x rails version.
# Commit on 5-1-stable branch: https://github.com/rails/rails/commit/44f0df3f3980ba3aeca956839e1948b246ff34fe
module ActiveRecord
module AttributeMethods
module Dirty
def attributes_in_database
mutations_from_database.changed_values
end
end
end
module Persistence
def becomes(klass)
became = klass.new
became.instance_variable_set("@attributes", @attributes)
became.instance_variable_set("@mutation_tracker", @mutation_tracker ||= nil)
became.instance_variable_set("@mutations_from_database", @mutations_from_database ||= nil)
became.instance_variable_set("@changed_attributes", attributes_changed_by_setter)
became.instance_variable_set("@new_record", new_record?)
became.instance_variable_set("@destroyed", destroyed?)
became.errors.copy!(errors)
became
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment