From f0301b3c776a0c9406425ec863dc768cc2f01ffc Mon Sep 17 00:00:00 2001 From: AnD00 <19258109+AnD00@users.noreply.github.com> Date: Mon, 22 Mar 2021 14:29:01 +0900 Subject: [PATCH 01/37] Set default target rails version v6.0.0 --- Gemfile | 8 ++++---- activerecord-turntable.gemspec | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index edf1a3cc..bcc3d6be 100644 --- a/Gemfile +++ b/Gemfile @@ -2,8 +2,8 @@ source "https://rubygems.org" gemspec -gem "rails", "5.2.1" +gem "rails", "6.0.0" -gem "actionview", "5.2.1" -gem "activerecord", "5.2.1" -gem "activesupport", "5.2.1" +gem "actionview", "6.0.0" +gem "activerecord", "6.0.0" +gem "activesupport", "6.0.0" diff --git a/activerecord-turntable.gemspec b/activerecord-turntable.gemspec index def8b879..2c27e3f7 100644 --- a/activerecord-turntable.gemspec +++ b/activerecord-turntable.gemspec @@ -23,8 +23,8 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.required_ruby_version = ">= 2.2.2" - spec.add_runtime_dependency "activerecord", ">= 5.0", "< 6.0" - spec.add_runtime_dependency "activesupport", ">= 5.0", "< 6.0" + spec.add_runtime_dependency "activerecord", ">= 5.0", "< 7.0" + spec.add_runtime_dependency "activesupport", ">= 5.0", "< 7.0" spec.add_runtime_dependency "bsearch", "~> 1.5" spec.add_runtime_dependency "sql_tree", "= 0.2.0" From 65b2df1b2417a1aea6bdd5828f5462f17bcc90d7 Mon Sep 17 00:00:00 2001 From: AnD00 <19258109+AnD00@users.noreply.github.com> Date: Tue, 23 Mar 2021 11:45:45 +0900 Subject: [PATCH 02/37] Add target rails version 6.0.0 --- .travis.yml | 3 +++ gemfiles/rails6_0_0.gemfile | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 gemfiles/rails6_0_0.gemfile diff --git a/.travis.yml b/.travis.yml index c7bd4373..a9a01137 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ gemfile: - gemfiles/rails5_1_6.gemfile - gemfiles/rails5_2_0.gemfile - gemfiles/rails5_2_1.gemfile + - gemfiles/rails6_0_0.gemfile - gemfiles/rails_edge.gemfile env: @@ -66,6 +67,8 @@ matrix: gemfile: gemfiles/rails5_2_1.gemfile - rvm: 2.4.4 gemfile: gemfiles/rails5_2_1.gemfile + - rvm: 2.5.1 + gemfile: gemfiles/rails6_0_0.gemfile - rvm: 2.5.1 gemfile: gemfiles/rails_edge.gemfile - rvm: ruby-head diff --git a/gemfiles/rails6_0_0.gemfile b/gemfiles/rails6_0_0.gemfile new file mode 100644 index 00000000..741e6cce --- /dev/null +++ b/gemfiles/rails6_0_0.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "6.0.0" +gem "railties", "6.0.0" +gem "activerecord", "6.0.0" +gem "activesupport", "6.0.0" +gem "actionview", "6.0.0" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' From 9ca1b20764ad07aa1c91a2bfe26921d8461f9301 Mon Sep 17 00:00:00 2001 From: AnD00 <19258109+AnD00@users.noreply.github.com> Date: Tue, 23 Mar 2021 11:20:33 +0900 Subject: [PATCH 03/37] Add ar60_or_later? method to Util --- lib/active_record/turntable/util.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/active_record/turntable/util.rb b/lib/active_record/turntable/util.rb index f417f7ae..3137b6e8 100644 --- a/lib/active_record/turntable/util.rb +++ b/lib/active_record/turntable/util.rb @@ -35,6 +35,10 @@ def ar52_or_later? ar_version_equals_or_later?("5.2") end + def ar60_or_later? + ar_version_equals_or_later?("6.0") + end + module_function :ar_version_equals_or_later?, :ar_version_earlier_than?, :ar_version, @@ -42,6 +46,7 @@ def ar52_or_later? :ar51?, :earlier_than_ar51?, :ar51_or_later?, - :ar52_or_later? + :ar52_or_later?, + :ar60_or_later? end end From 27c0aac24f12e55237cc973efbdfe66c50f1da65 Mon Sep 17 00:00:00 2001 From: AnD00 <19258109+AnD00@users.noreply.github.com> Date: Mon, 22 Mar 2021 14:44:08 +0900 Subject: [PATCH 04/37] Follow AR::Transaction changes on 6.0.0 --- .../active_record_ext/transactions.rb | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/lib/active_record/turntable/active_record_ext/transactions.rb b/lib/active_record/turntable/active_record_ext/transactions.rb index d4d049e9..3ca64cda 100644 --- a/lib/active_record/turntable/active_record_ext/transactions.rb +++ b/lib/active_record/turntable/active_record_ext/transactions.rb @@ -12,7 +12,18 @@ def with_transaction_returning_status self.id = klass.next_sequence_value end self.class.connection.shards_transaction([self.turntable_shard]) do - add_to_transaction + if Util.ar60_or_later? + if has_transactional_callbacks? + add_to_transaction + else + sync_with_transaction_state if @transaction_state&.finalized? + @transaction_state = self.turntable_shard.connection.transaction_state + end + remember_transaction_record_state + else + add_to_transaction + end + begin status = yield rescue ActiveRecord::Rollback @@ -24,7 +35,7 @@ def with_transaction_returning_status end status ensure - if @transaction_state && @transaction_state.committed? + if !Util.ar60_or_later? && @transaction_state && @transaction_state.committed? clear_transaction_record_state end end @@ -32,13 +43,17 @@ def with_transaction_returning_status def add_to_transaction return super unless self.class.turntable_enabled? - if has_transactional_callbacks? + if Util.ar60_or_later? self.turntable_shard.connection.add_transaction_record(self) else - sync_with_transaction_state - set_transaction_state(self.turntable_shard.connection.transaction_state) + if has_transactional_callbacks? + self.turntable_shard.connection.add_transaction_record(self) + else + sync_with_transaction_state + set_transaction_state(self.turntable_shard.connection.transaction_state) + end + remember_transaction_record_state end - remember_transaction_record_state end end end From d52a1dd468c4e68a85c5e8344f7d66fed5f5b628 Mon Sep 17 00:00:00 2001 From: AnD00 <19258109+AnD00@users.noreply.github.com> Date: Tue, 23 Mar 2021 11:17:18 +0900 Subject: [PATCH 05/37] Follow AR::Persistence changes on 6.0.0 --- .../turntable/active_record_ext/persistence.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/active_record/turntable/active_record_ext/persistence.rb b/lib/active_record/turntable/active_record_ext/persistence.rb index 03813cfd..affece3a 100644 --- a/lib/active_record/turntable/active_record_ext/persistence.rb +++ b/lib/active_record/turntable/active_record_ext/persistence.rb @@ -87,8 +87,13 @@ def update_columns(attributes) raise ActiveRecord::ActiveRecordError, "cannot update a new record" if new_record? raise ActiveRecord::ActiveRecordError, "cannot update a destroyed record" if destroyed? + attributes = attributes.transform_keys do |key| + name = key.to_s + self.class.attribute_aliases[name] || name + end + attributes.each_key do |key| - verify_readonly_attribute(key.to_s) + verify_readonly_attribute(key) end constraints = { self.class.primary_key => id_in_database } From 1c2e4972f6182a43c99c861620942ffc3fd20352 Mon Sep 17 00:00:00 2001 From: AnD00 <19258109+AnD00@users.noreply.github.com> Date: Tue, 23 Mar 2021 11:18:43 +0900 Subject: [PATCH 06/37] Follow AR::LogSubscriber changes on 6.0.0 --- lib/active_record/turntable/active_record_ext/log_subscriber.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/active_record/turntable/active_record_ext/log_subscriber.rb b/lib/active_record/turntable/active_record_ext/log_subscriber.rb index a32637aa..45822dba 100644 --- a/lib/active_record/turntable/active_record_ext/log_subscriber.rb +++ b/lib/active_record/turntable/active_record_ext/log_subscriber.rb @@ -34,7 +34,7 @@ def sql(event) end name = colorize_payload_name(name, payload[:name]) - sql = color(sql, sql_color(sql), true) + sql = color(sql, sql_color(sql), true) if Util.ar60_or_later? && colorize_logging debug " #{name} #{sql}#{binds}" end From 92a3fb9b098a23d616ef16848724128a74c2d7f5 Mon Sep 17 00:00:00 2001 From: AnD00 <19258109+AnD00@users.noreply.github.com> Date: Tue, 23 Mar 2021 11:19:04 +0900 Subject: [PATCH 07/37] Follow AR::SchemaDumper changes on 6.0.0 --- .../turntable/active_record_ext/schema_dumper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/active_record/turntable/active_record_ext/schema_dumper.rb b/lib/active_record/turntable/active_record_ext/schema_dumper.rb index 531598b9..974fc529 100644 --- a/lib/active_record/turntable/active_record_ext/schema_dumper.rb +++ b/lib/active_record/turntable/active_record_ext/schema_dumper.rb @@ -13,6 +13,10 @@ def table(table, stream) end begin + if Util.ar60_or_later? + self.table_name = table + end + tbl = StringIO.new tbl.print " create_sequence_for #{remove_prefix_and_suffix(matchdata[1]).inspect}" @@ -38,6 +42,10 @@ def table(table, stream) stream.puts "# Could not dump table #{table.inspect} because of following #{e.class}" stream.puts "# #{e.message}" stream.puts + ensure + if Util.ar60_or_later? + self.table_name = nil + end end stream From 9c7aad21fd1ba73e32fbc776f7c86d0f5df11d45 Mon Sep 17 00:00:00 2001 From: AnD00 <19258109+AnD00@users.noreply.github.com> Date: Tue, 23 Mar 2021 11:22:14 +0900 Subject: [PATCH 08/37] Follow AR::AbstractAdapter changes on 6.0.0 --- .../active_record_ext/abstract_adapter.rb | 39 ++++++++++++++++--- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/lib/active_record/turntable/active_record_ext/abstract_adapter.rb b/lib/active_record/turntable/active_record_ext/abstract_adapter.rb index c5de0e13..5e6380ec 100644 --- a/lib/active_record/turntable/active_record_ext/abstract_adapter.rb +++ b/lib/active_record/turntable/active_record_ext/abstract_adapter.rb @@ -8,14 +8,19 @@ def self.prepended(klass) klass.class_eval { protected :log } end - def translate_exception_class(e, sql) + def translate_exception_class(e, sql, binds) begin message = "#{e.class.name}: #{e.message}: #{sql} : #{turntable_shard_name}" rescue Encoding::CompatibilityError message = "#{e.class.name}: #{e.message.force_encoding sql.encoding}: #{sql} : #{turntable_shard_name}" end - exception = translate_exception(e, message) + exception = + if Util.ar60_or_later? + translate_exception(e, message: message, sql: sql, binds: binds) + else + translate_exception(e, message) + end exception.set_backtrace e.backtrace exception end @@ -23,6 +28,28 @@ def translate_exception_class(e, sql) # @note override for append current shard name # rubocop:disable Style/HashSyntax, Style/MultilineMethodCallBraceLayout + module V6_0 + def log(sql, name = "SQL", binds = [], type_casted_binds = [], statement_name = nil) + @instrumenter.instrument( + "sql.active_record", + sql: sql, + name: name, + binds: binds, + type_casted_binds: type_casted_binds, + statement_name: statement_name, + connection: self, + turntable_shard_name: turntable_shard_name) do + begin + @lock.synchronize do + yield + end + rescue => e + raise translate_exception_class(e, sql, binds) + end + end + end + end + module V5_2 def log(sql, name = "SQL", binds = [], type_casted_binds = [], statement_name = nil) @instrumenter.instrument( @@ -39,7 +66,7 @@ def log(sql, name = "SQL", binds = [], type_casted_binds = [], statement_name = yield end rescue => e - raise translate_exception_class(e, sql) + raise translate_exception_class(e, sql, binds) end end end @@ -61,7 +88,7 @@ def log(sql, name = "SQL", binds = [], type_casted_binds = [], statement_name = end end rescue => e - raise translate_exception_class(e, sql) + raise translate_exception_class(e, sql, binds) end end @@ -77,7 +104,7 @@ def log(sql, name = "SQL", binds = [], type_casted_binds = [], statement_name = connection_id: object_id, turntable_shard_name: turntable_shard_name) { yield } rescue => e - raise translate_exception_class(e, sql) + raise translate_exception_class(e, sql, binds) end end @@ -92,7 +119,7 @@ def log(sql, name = "SQL", binds = [], statement_name = nil) :binds => binds, :turntable_shard_name => turntable_shard_name) { yield } rescue => e - raise translate_exception_class(e, sql) + raise translate_exception_class(e, sql, binds) end end # rubocop:enable Style/HashSyntax, Style/MultilineMethodCallBraceLayout From dd3eb8562670f3e9326ebe944d364b0e240eef6d Mon Sep 17 00:00:00 2001 From: AnD00 <19258109+AnD00@users.noreply.github.com> Date: Tue, 23 Mar 2021 11:23:45 +0900 Subject: [PATCH 09/37] Follow AR::QueryCache changes on 6.0.0 --- .../turntable/active_record_ext/query_cache.rb | 3 +++ .../active_record_ext/query_cache_spec.rb | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/active_record/turntable/active_record_ext/query_cache.rb b/lib/active_record/turntable/active_record_ext/query_cache.rb index 8bcecf25..01dd3aa3 100644 --- a/lib/active_record/turntable/active_record_ext/query_cache.rb +++ b/lib/active_record/turntable/active_record_ext/query_cache.rb @@ -10,6 +10,9 @@ class << klass module ClassMethods extend Compatibility + module V6_0 + end + module V5_2 end diff --git a/spec/active_record/turntable/active_record_ext/query_cache_spec.rb b/spec/active_record/turntable/active_record_ext/query_cache_spec.rb index 370d907c..ca484a82 100644 --- a/spec/active_record/turntable/active_record_ext/query_cache_spec.rb +++ b/spec/active_record/turntable/active_record_ext/query_cache_spec.rb @@ -5,7 +5,19 @@ def middleware(&app) executor = Class.new(ActiveSupport::Executor) ActiveRecord::QueryCache.install_executor_hooks executor - lambda { |env| executor.wrap { app.call(env) } } + lambda do |env| + if ActiveRecord::Turntable::Util.ar60_or_later? + original_handlers = ActiveRecord::Base.connection_handlers + ActiveRecord::Base.connection_handlers = { writing: ActiveRecord::Base.default_connection_handler, reading: ActiveRecord::ConnectionAdapters::ConnectionHandler.new } + end + executor.wrap do + app.call(env) + end + ensure + if ActiveRecord::Turntable::Util.ar60_or_later? + ActiveRecord::Base.connection_handlers = original_handlers + end + end end def disable_query_cache From cbf385b06d2138cab6fb5e9a2aaca723cff9fc3a Mon Sep 17 00:00:00 2001 From: hirocaster Date: Fri, 10 Feb 2023 12:49:43 +0900 Subject: [PATCH 10/37] Fix warnings for Ruby2.7, compatible under Ruby2.6. --- .../active_record_ext/persistence_spec.rb | 27 ++++++++++++++++--- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/spec/active_record/turntable/active_record_ext/persistence_spec.rb b/spec/active_record/turntable/active_record_ext/persistence_spec.rb index f8a2fb3f..280fef9c 100644 --- a/spec/active_record/turntable/active_record_ext/persistence_spec.rb +++ b/spec/active_record/turntable/active_record_ext/persistence_spec.rb @@ -23,7 +23,13 @@ let(:user) { create(:user, :created_yesterday) } context "When updating" do - subject { user.update_attributes!(nickname: new_nickname) } + subject { + if ActiveRecord::Turntable::Util.ar60_or_later? + user.update!(nickname: new_nickname) + else + user.update_attributes!(nickname: new_nickname) + end + } let(:new_nickname) { Faker::Name.unique.name } @@ -73,7 +79,13 @@ let!(:user_item) { user.user_items.first } context "When updating" do - subject { user_item.update_attributes!(num: 2) } + subject { + if ActiveRecord::Turntable::Util.ar60_or_later? + user_item.update!(num: 2) + else + user_item.update_attributes!(num: 2) + end + } it { expect { subject }.not_to raise_error } @@ -123,9 +135,16 @@ context "When the model is not sharded" do let(:item) { create(:item) } + let(:item_update_name) { + if ActiveRecord::Turntable::Util.ar60_or_later? + item.update(name: "hoge") + else + item.update_attributes(name: "hoge") + end + } - it { expect { item.update_attributes(name: "hoge") }.not_to raise_error } - it { expect { item.update_attributes(name: "hoge") }.to query_like(/WHERE `items`\.`id` = #{item.id}[^\s]*$/) } + it { expect { item_update_name }.not_to raise_error } + it { expect { item_update_name }.to query_like(/WHERE `items`\.`id` = #{item.id}[^\s]*$/) } it { expect { item.destroy! }.not_to raise_error } it { expect { item.destroy! }.to query_like(/WHERE `items`\.`id` = #{item.id}[^\s]*$/) } From bf6ffb266d31d0c70727c6b70d69434fc99e6f2b Mon Sep 17 00:00:00 2001 From: hirocaster Date: Fri, 21 Apr 2023 20:23:25 +0900 Subject: [PATCH 11/37] Update Rails version 6.0.4 --- Gemfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index bcc3d6be..adc92ac4 100644 --- a/Gemfile +++ b/Gemfile @@ -2,8 +2,8 @@ source "https://rubygems.org" gemspec -gem "rails", "6.0.0" +gem "rails", "6.0.4" -gem "actionview", "6.0.0" -gem "activerecord", "6.0.0" -gem "activesupport", "6.0.0" +gem "actionview", "6.0.4" +gem "activerecord", "6.0.4" +gem "activesupport", "6.0.4" From d5f511812446198dc355b061c4f375ed198af1ee Mon Sep 17 00:00:00 2001 From: hirocaster Date: Fri, 21 Apr 2023 20:27:06 +0900 Subject: [PATCH 12/37] Support Rails 6.0.4 --- lib/active_record/turntable/active_record_ext/fixtures.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/active_record/turntable/active_record_ext/fixtures.rb b/lib/active_record/turntable/active_record_ext/fixtures.rb index 608d84e1..18986fa7 100644 --- a/lib/active_record/turntable/active_record_ext/fixtures.rb +++ b/lib/active_record/turntable/active_record_ext/fixtures.rb @@ -86,6 +86,13 @@ def setup_fixtures(config = ActiveRecord::Base) # Load fixtures once and begin transaction. if run_in_transaction? + + # # Support AciveRecrd version 6.0.4 + # # https://github.com/rails/rails/blame/v6.0.4/activerecord/lib/active_record/test_fixtures.rb#L115 + if ActiveRecord::Turntable::Util.ar_version_equals_or_later?("6.0.4") + @saved_pool_configs = Hash.new { |hash, key| hash[key] = {} } + end + if @@already_loaded_fixtures[self.class] @loaded_fixtures = @@already_loaded_fixtures[self.class] else From 160f7b9980a81ef8a6b7d3b79eef693cbdf9bd2b Mon Sep 17 00:00:00 2001 From: hirocaster Date: Fri, 21 Apr 2023 20:31:51 +0900 Subject: [PATCH 13/37] Add Rails 6.0.4 gemfile --- gemfiles/rails6_0_4.gemfile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gemfiles/rails6_0_4.gemfile diff --git a/gemfiles/rails6_0_4.gemfile b/gemfiles/rails6_0_4.gemfile new file mode 100644 index 00000000..9f8dc11b --- /dev/null +++ b/gemfiles/rails6_0_4.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "6.0.4" +gem "railties", "6.0.4" +gem "activerecord", "6.0.4" +gem "activesupport", "6.0.4" +gem "actionview", "6.0.4" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' From 3b9bb50aff238b1d01253943abb913b96106c8a9 Mon Sep 17 00:00:00 2001 From: hirocaster Date: Fri, 21 Apr 2023 20:32:16 +0900 Subject: [PATCH 14/37] Update Rails 6.0.6.1 --- Gemfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index adc92ac4..3f655e3e 100644 --- a/Gemfile +++ b/Gemfile @@ -2,8 +2,8 @@ source "https://rubygems.org" gemspec -gem "rails", "6.0.4" +gem "rails", "6.0.6.1" -gem "actionview", "6.0.4" -gem "activerecord", "6.0.4" -gem "activesupport", "6.0.4" +gem "actionview", "6.0.6.1" +gem "activerecord", "6.0.6.1" +gem "activesupport", "6.0.6.1" From e4efb75bde8b345ba19b6e4c46063de32ecfe8f8 Mon Sep 17 00:00:00 2001 From: hirocaster Date: Thu, 8 Jun 2023 18:14:46 +0900 Subject: [PATCH 15/37] Fix deprecated method, will be removed from Rails 6.1 - DEPRECATION WARNING: update_attributes is deprecated and will be removed from Rails 6.1 --- .../active_record_ext/locking_optimistic_spec.rb | 6 +++++- .../active_record/turntable/connection_proxy_spec.rb | 12 ++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/spec/active_record/turntable/active_record_ext/locking_optimistic_spec.rb b/spec/active_record/turntable/active_record_ext/locking_optimistic_spec.rb index 9ae30875..793de993 100644 --- a/spec/active_record/turntable/active_record_ext/locking_optimistic_spec.rb +++ b/spec/active_record/turntable/active_record_ext/locking_optimistic_spec.rb @@ -11,7 +11,11 @@ let(:user_profile) { user.user_profile } describe "optimistic locking" do - subject { user_profile.update_attributes(birthday: Date.current) } + if ActiveRecord::Turntable::Util.ar60_or_later? + subject { user_profile.update(birthday: Date.current) } + else + subject { user_profile.update_attributes(birthday: Date.current) } + end it { expect { subject }.to change(user_profile, :lock_version).by(1) } end diff --git a/spec/active_record/turntable/connection_proxy_spec.rb b/spec/active_record/turntable/connection_proxy_spec.rb index 5d6f6639..ef626673 100644 --- a/spec/active_record/turntable/connection_proxy_spec.rb +++ b/spec/active_record/turntable/connection_proxy_spec.rb @@ -68,7 +68,11 @@ end context "When updating user in shard1" do - subject { @user_in_shard1.update_attributes!(nickname: new_nickname) } + if ActiveRecord::Turntable::Util.ar60_or_later? + subject { @user_in_shard1.update!(nickname: new_nickname) } + else + subject { @user_in_shard1.update_attributes!(nickname: new_nickname) } + end let(:new_nickname) { Faker::Name.unique.name } @@ -76,7 +80,11 @@ end context "When updating user in shard2" do - subject { @user_in_shard2.update_attributes!(nickname: new_nickname) } + if ActiveRecord::Turntable::Util.ar60_or_later? + subject { @user_in_shard2.update!(nickname: new_nickname) } + else + subject { @user_in_shard2.update_attributes!(nickname: new_nickname) } + end let(:new_nickname) { Faker::Name.unique.name } From 00111861cdcc69ebebee1083d474d48d976841df Mon Sep 17 00:00:00 2001 From: akariiijima Date: Tue, 27 Jun 2023 18:28:02 +0900 Subject: [PATCH 16/37] Fix: ensure syntax for ruby 2.4 --- .../active_record_ext/query_cache_spec.rb | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/spec/active_record/turntable/active_record_ext/query_cache_spec.rb b/spec/active_record/turntable/active_record_ext/query_cache_spec.rb index ca484a82..399ef704 100644 --- a/spec/active_record/turntable/active_record_ext/query_cache_spec.rb +++ b/spec/active_record/turntable/active_record_ext/query_cache_spec.rb @@ -6,16 +6,18 @@ def middleware(&app) executor = Class.new(ActiveSupport::Executor) ActiveRecord::QueryCache.install_executor_hooks executor lambda do |env| - if ActiveRecord::Turntable::Util.ar60_or_later? - original_handlers = ActiveRecord::Base.connection_handlers - ActiveRecord::Base.connection_handlers = { writing: ActiveRecord::Base.default_connection_handler, reading: ActiveRecord::ConnectionAdapters::ConnectionHandler.new } - end - executor.wrap do - app.call(env) - end - ensure - if ActiveRecord::Turntable::Util.ar60_or_later? - ActiveRecord::Base.connection_handlers = original_handlers + begin + if ActiveRecord::Turntable::Util.ar60_or_later? + original_handlers = ActiveRecord::Base.connection_handlers + ActiveRecord::Base.connection_handlers = { writing: ActiveRecord::Base.default_connection_handler, reading: ActiveRecord::ConnectionAdapters::ConnectionHandler.new } + end + executor.wrap do + app.call(env) + end + ensure + if ActiveRecord::Turntable::Util.ar60_or_later? + ActiveRecord::Base.connection_handlers = original_handlers + end end end end From 1814a670a71799aff6c3cd90feb6a2a77fe87e89 Mon Sep 17 00:00:00 2001 From: akariiijima Date: Tue, 27 Jun 2023 17:48:10 +0900 Subject: [PATCH 17/37] Add rails 6.0.1, 6.0.2, 6.0.3, 6.0.5, 6.0.6 gemfiles --- gemfiles/rails6_0_1.gemfile | 10 ++++++++++ gemfiles/rails6_0_2.gemfile | 10 ++++++++++ gemfiles/rails6_0_3.gemfile | 10 ++++++++++ gemfiles/rails6_0_5.gemfile | 10 ++++++++++ gemfiles/rails6_0_6.gemfile | 10 ++++++++++ 5 files changed, 50 insertions(+) create mode 100644 gemfiles/rails6_0_1.gemfile create mode 100644 gemfiles/rails6_0_2.gemfile create mode 100644 gemfiles/rails6_0_3.gemfile create mode 100644 gemfiles/rails6_0_5.gemfile create mode 100644 gemfiles/rails6_0_6.gemfile diff --git a/gemfiles/rails6_0_1.gemfile b/gemfiles/rails6_0_1.gemfile new file mode 100644 index 00000000..f521024c --- /dev/null +++ b/gemfiles/rails6_0_1.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "6.0.1" +gem "railties", "6.0.1" +gem "activerecord", "6.0.1" +gem "activesupport", "6.0.1" +gem "actionview", "6.0.1" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' diff --git a/gemfiles/rails6_0_2.gemfile b/gemfiles/rails6_0_2.gemfile new file mode 100644 index 00000000..ede605ba --- /dev/null +++ b/gemfiles/rails6_0_2.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "6.0.2" +gem "railties", "6.0.2" +gem "activerecord", "6.0.2" +gem "activesupport", "6.0.2" +gem "actionview", "6.0.2" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' diff --git a/gemfiles/rails6_0_3.gemfile b/gemfiles/rails6_0_3.gemfile new file mode 100644 index 00000000..b8c770b4 --- /dev/null +++ b/gemfiles/rails6_0_3.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "6.0.3" +gem "railties", "6.0.3" +gem "activerecord", "6.0.3" +gem "activesupport", "6.0.3" +gem "actionview", "6.0.3" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' diff --git a/gemfiles/rails6_0_5.gemfile b/gemfiles/rails6_0_5.gemfile new file mode 100644 index 00000000..db427a79 --- /dev/null +++ b/gemfiles/rails6_0_5.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "6.0.5" +gem "railties", "6.0.5" +gem "activerecord", "6.0.5" +gem "activesupport", "6.0.5" +gem "actionview", "6.0.5" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' diff --git a/gemfiles/rails6_0_6.gemfile b/gemfiles/rails6_0_6.gemfile new file mode 100644 index 00000000..83451a5f --- /dev/null +++ b/gemfiles/rails6_0_6.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "6.0.6" +gem "railties", "6.0.6" +gem "activerecord", "6.0.6" +gem "activesupport", "6.0.6" +gem "actionview", "6.0.6" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' From a7e1bbaedc43464dfa4071a072c194397727d1fe Mon Sep 17 00:00:00 2001 From: akariiijima Date: Wed, 23 Aug 2023 17:32:06 +0900 Subject: [PATCH 18/37] Delete gem minitest because minitest is a testing library built into rails by default --- gemfiles/rails5_0_0.gemfile | 2 -- gemfiles/rails5_0_1.gemfile | 1 - gemfiles/rails5_0_2.gemfile | 1 - gemfiles/rails5_0_3.gemfile | 1 - gemfiles/rails5_0_4.gemfile | 1 - gemfiles/rails5_0_5.gemfile | 1 - gemfiles/rails5_0_6.gemfile | 1 - gemfiles/rails5_0_7.gemfile | 1 - gemfiles/rails5_1_0.gemfile | 1 - gemfiles/rails5_1_1.gemfile | 1 - gemfiles/rails5_1_2.gemfile | 1 - gemfiles/rails5_1_3.gemfile | 1 - gemfiles/rails5_1_4.gemfile | 1 - gemfiles/rails5_1_5.gemfile | 1 - gemfiles/rails5_1_6.gemfile | 1 - 15 files changed, 16 deletions(-) diff --git a/gemfiles/rails5_0_0.gemfile b/gemfiles/rails5_0_0.gemfile index e64eb756..918ce07b 100644 --- a/gemfiles/rails5_0_0.gemfile +++ b/gemfiles/rails5_0_0.gemfile @@ -5,6 +5,4 @@ gem "activesupport", "5.0.0" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" - gemspec :path => '../' diff --git a/gemfiles/rails5_0_1.gemfile b/gemfiles/rails5_0_1.gemfile index 780a7948..3d7961ee 100644 --- a/gemfiles/rails5_0_1.gemfile +++ b/gemfiles/rails5_0_1.gemfile @@ -5,7 +5,6 @@ gem "activesupport", "5.0.1" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_0_2.gemfile b/gemfiles/rails5_0_2.gemfile index 7d023ac7..387f5e62 100644 --- a/gemfiles/rails5_0_2.gemfile +++ b/gemfiles/rails5_0_2.gemfile @@ -5,7 +5,6 @@ gem "activesupport", "5.0.2" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_0_3.gemfile b/gemfiles/rails5_0_3.gemfile index c0173596..bec4752d 100644 --- a/gemfiles/rails5_0_3.gemfile +++ b/gemfiles/rails5_0_3.gemfile @@ -5,7 +5,6 @@ gem "activesupport", "5.0.3" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_0_4.gemfile b/gemfiles/rails5_0_4.gemfile index 6d5cd9a0..2abf7cf8 100644 --- a/gemfiles/rails5_0_4.gemfile +++ b/gemfiles/rails5_0_4.gemfile @@ -5,7 +5,6 @@ gem "activesupport", "5.0.4" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_0_5.gemfile b/gemfiles/rails5_0_5.gemfile index 6b4012eb..5869a22d 100644 --- a/gemfiles/rails5_0_5.gemfile +++ b/gemfiles/rails5_0_5.gemfile @@ -5,7 +5,6 @@ gem "activesupport", "5.0.5" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_0_6.gemfile b/gemfiles/rails5_0_6.gemfile index f74abf35..3c0f4412 100644 --- a/gemfiles/rails5_0_6.gemfile +++ b/gemfiles/rails5_0_6.gemfile @@ -5,7 +5,6 @@ gem "activesupport", "5.0.6" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_0_7.gemfile b/gemfiles/rails5_0_7.gemfile index f21b39c2..35060911 100644 --- a/gemfiles/rails5_0_7.gemfile +++ b/gemfiles/rails5_0_7.gemfile @@ -3,7 +3,6 @@ source "https://rubygems.org" gem "activerecord", "5.0.7" gem "activesupport", "5.0.7" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_1_0.gemfile b/gemfiles/rails5_1_0.gemfile index c03f6437..b4d20124 100644 --- a/gemfiles/rails5_1_0.gemfile +++ b/gemfiles/rails5_1_0.gemfile @@ -6,7 +6,6 @@ gem "actionview", "5.1.0" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_1_1.gemfile b/gemfiles/rails5_1_1.gemfile index 1f7b9bdd..dca858db 100644 --- a/gemfiles/rails5_1_1.gemfile +++ b/gemfiles/rails5_1_1.gemfile @@ -6,7 +6,6 @@ gem "actionview", "5.1.1" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_1_2.gemfile b/gemfiles/rails5_1_2.gemfile index 9528fb51..912c24fa 100644 --- a/gemfiles/rails5_1_2.gemfile +++ b/gemfiles/rails5_1_2.gemfile @@ -6,7 +6,6 @@ gem "actionview", "5.1.2" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_1_3.gemfile b/gemfiles/rails5_1_3.gemfile index 0fc52132..5b706548 100644 --- a/gemfiles/rails5_1_3.gemfile +++ b/gemfiles/rails5_1_3.gemfile @@ -6,7 +6,6 @@ gem "actionview", "5.1.3" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_1_4.gemfile b/gemfiles/rails5_1_4.gemfile index fc8ad279..6be67e90 100644 --- a/gemfiles/rails5_1_4.gemfile +++ b/gemfiles/rails5_1_4.gemfile @@ -6,7 +6,6 @@ gem "actionview", "5.1.4" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_1_5.gemfile b/gemfiles/rails5_1_5.gemfile index 21e5ece1..00bd3fe6 100644 --- a/gemfiles/rails5_1_5.gemfile +++ b/gemfiles/rails5_1_5.gemfile @@ -6,7 +6,6 @@ gem "actionview", "5.1.5" gem "mysql2", "~> 0.4.4" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' diff --git a/gemfiles/rails5_1_6.gemfile b/gemfiles/rails5_1_6.gemfile index 3b95d5f3..d685f02b 100644 --- a/gemfiles/rails5_1_6.gemfile +++ b/gemfiles/rails5_1_6.gemfile @@ -4,7 +4,6 @@ gem "activerecord", "5.1.6" gem "activesupport", "5.1.6" gem "actionview", "5.1.6" -gem "minitest", "< 5.3.4" gem "mocha", "~> 0.14", require: false gemspec :path => '../' From 97226a4be4634e108ea5b5df31d68441636e4c51 Mon Sep 17 00:00:00 2001 From: akariiijima Date: Wed, 23 Aug 2023 17:35:06 +0900 Subject: [PATCH 19/37] Delete gem mocha because of not being used now --- gemfiles/rails5_0_1.gemfile | 2 -- gemfiles/rails5_0_2.gemfile | 2 -- gemfiles/rails5_0_3.gemfile | 2 -- gemfiles/rails5_0_4.gemfile | 2 -- gemfiles/rails5_0_5.gemfile | 2 -- gemfiles/rails5_0_6.gemfile | 2 -- gemfiles/rails5_0_7.gemfile | 2 -- gemfiles/rails5_1_0.gemfile | 2 -- gemfiles/rails5_1_1.gemfile | 2 -- gemfiles/rails5_1_2.gemfile | 2 -- gemfiles/rails5_1_3.gemfile | 2 -- gemfiles/rails5_1_4.gemfile | 2 -- gemfiles/rails5_1_5.gemfile | 2 -- gemfiles/rails5_1_6.gemfile | 2 -- 14 files changed, 28 deletions(-) diff --git a/gemfiles/rails5_0_1.gemfile b/gemfiles/rails5_0_1.gemfile index 3d7961ee..97408c2c 100644 --- a/gemfiles/rails5_0_1.gemfile +++ b/gemfiles/rails5_0_1.gemfile @@ -5,6 +5,4 @@ gem "activesupport", "5.0.1" gem "mysql2", "~> 0.4.4" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_0_2.gemfile b/gemfiles/rails5_0_2.gemfile index 387f5e62..80506a30 100644 --- a/gemfiles/rails5_0_2.gemfile +++ b/gemfiles/rails5_0_2.gemfile @@ -5,6 +5,4 @@ gem "activesupport", "5.0.2" gem "mysql2", "~> 0.4.4" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_0_3.gemfile b/gemfiles/rails5_0_3.gemfile index bec4752d..49025e48 100644 --- a/gemfiles/rails5_0_3.gemfile +++ b/gemfiles/rails5_0_3.gemfile @@ -5,6 +5,4 @@ gem "activesupport", "5.0.3" gem "mysql2", "~> 0.4.4" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_0_4.gemfile b/gemfiles/rails5_0_4.gemfile index 2abf7cf8..4fe00c35 100644 --- a/gemfiles/rails5_0_4.gemfile +++ b/gemfiles/rails5_0_4.gemfile @@ -5,6 +5,4 @@ gem "activesupport", "5.0.4" gem "mysql2", "~> 0.4.4" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_0_5.gemfile b/gemfiles/rails5_0_5.gemfile index 5869a22d..03c4a3d6 100644 --- a/gemfiles/rails5_0_5.gemfile +++ b/gemfiles/rails5_0_5.gemfile @@ -5,6 +5,4 @@ gem "activesupport", "5.0.5" gem "mysql2", "~> 0.4.4" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_0_6.gemfile b/gemfiles/rails5_0_6.gemfile index 3c0f4412..ebc2ae2a 100644 --- a/gemfiles/rails5_0_6.gemfile +++ b/gemfiles/rails5_0_6.gemfile @@ -5,6 +5,4 @@ gem "activesupport", "5.0.6" gem "mysql2", "~> 0.4.4" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_0_7.gemfile b/gemfiles/rails5_0_7.gemfile index 35060911..19a08022 100644 --- a/gemfiles/rails5_0_7.gemfile +++ b/gemfiles/rails5_0_7.gemfile @@ -3,6 +3,4 @@ source "https://rubygems.org" gem "activerecord", "5.0.7" gem "activesupport", "5.0.7" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_1_0.gemfile b/gemfiles/rails5_1_0.gemfile index b4d20124..ede66389 100644 --- a/gemfiles/rails5_1_0.gemfile +++ b/gemfiles/rails5_1_0.gemfile @@ -6,6 +6,4 @@ gem "actionview", "5.1.0" gem "mysql2", "~> 0.4.4" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_1_1.gemfile b/gemfiles/rails5_1_1.gemfile index dca858db..91b8d3aa 100644 --- a/gemfiles/rails5_1_1.gemfile +++ b/gemfiles/rails5_1_1.gemfile @@ -6,6 +6,4 @@ gem "actionview", "5.1.1" gem "mysql2", "~> 0.4.4" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_1_2.gemfile b/gemfiles/rails5_1_2.gemfile index 912c24fa..4773810d 100644 --- a/gemfiles/rails5_1_2.gemfile +++ b/gemfiles/rails5_1_2.gemfile @@ -6,6 +6,4 @@ gem "actionview", "5.1.2" gem "mysql2", "~> 0.4.4" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_1_3.gemfile b/gemfiles/rails5_1_3.gemfile index 5b706548..136c57d2 100644 --- a/gemfiles/rails5_1_3.gemfile +++ b/gemfiles/rails5_1_3.gemfile @@ -6,6 +6,4 @@ gem "actionview", "5.1.3" gem "mysql2", "~> 0.4.4" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_1_4.gemfile b/gemfiles/rails5_1_4.gemfile index 6be67e90..97b16dda 100644 --- a/gemfiles/rails5_1_4.gemfile +++ b/gemfiles/rails5_1_4.gemfile @@ -6,6 +6,4 @@ gem "actionview", "5.1.4" gem "mysql2", "~> 0.4.4" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_1_5.gemfile b/gemfiles/rails5_1_5.gemfile index 00bd3fe6..442ce636 100644 --- a/gemfiles/rails5_1_5.gemfile +++ b/gemfiles/rails5_1_5.gemfile @@ -6,6 +6,4 @@ gem "actionview", "5.1.5" gem "mysql2", "~> 0.4.4" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' diff --git a/gemfiles/rails5_1_6.gemfile b/gemfiles/rails5_1_6.gemfile index d685f02b..83d4b3c8 100644 --- a/gemfiles/rails5_1_6.gemfile +++ b/gemfiles/rails5_1_6.gemfile @@ -4,6 +4,4 @@ gem "activerecord", "5.1.6" gem "activesupport", "5.1.6" gem "actionview", "5.1.6" -gem "mocha", "~> 0.14", require: false - gemspec :path => '../' From 79b2a12c72c0dbbabbcc5eefaeb26c6cedf24d9c Mon Sep 17 00:00:00 2001 From: akariiijima Date: Wed, 23 Aug 2023 17:54:47 +0900 Subject: [PATCH 20/37] Add gem mysql ~> 0.4.4 to rails 5.0.7 --- gemfiles/rails5_0_7.gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/gemfiles/rails5_0_7.gemfile b/gemfiles/rails5_0_7.gemfile index 19a08022..f9fbbedd 100644 --- a/gemfiles/rails5_0_7.gemfile +++ b/gemfiles/rails5_0_7.gemfile @@ -2,5 +2,6 @@ source "https://rubygems.org" gem "activerecord", "5.0.7" gem "activesupport", "5.0.7" +gem "mysql2", "~> 0.4.4" gemspec :path => '../' From 1ebf5ab8eb9a537e40c392272bd6e4fdb3308092 Mon Sep 17 00:00:00 2001 From: akariiijima Date: Wed, 23 Aug 2023 17:58:56 +0900 Subject: [PATCH 21/37] Add gem mysql ~> 0.5.2 to rails 5.1.6 (mysql 0.5.X is supported for more than rails 5.1.6) --- gemfiles/rails5_1_6.gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/gemfiles/rails5_1_6.gemfile b/gemfiles/rails5_1_6.gemfile index 83d4b3c8..e75e1683 100644 --- a/gemfiles/rails5_1_6.gemfile +++ b/gemfiles/rails5_1_6.gemfile @@ -3,5 +3,6 @@ source "https://rubygems.org" gem "activerecord", "5.1.6" gem "activesupport", "5.1.6" gem "actionview", "5.1.6" +gem "mysql2", "~> 0.5.2" gemspec :path => '../' From f4052d4e08691f730faef9813c815fc6dd90c826 Mon Sep 17 00:00:00 2001 From: akariiijima Date: Wed, 23 Aug 2023 18:04:17 +0900 Subject: [PATCH 22/37] Add rails 5.1.7, 5.2.2, 5.2.3, 5.2.4, 5.2.5, 5.2.6, 5.2.7, 5.2.8 gemfiles --- gemfiles/rails5_1_7.gemfile | 10 ++++++++++ gemfiles/rails5_2_2.gemfile | 10 ++++++++++ gemfiles/rails5_2_3.gemfile | 10 ++++++++++ gemfiles/rails5_2_4.gemfile | 10 ++++++++++ gemfiles/rails5_2_5.gemfile | 10 ++++++++++ gemfiles/rails5_2_6.gemfile | 10 ++++++++++ gemfiles/rails5_2_7.gemfile | 10 ++++++++++ gemfiles/rails5_2_8.gemfile | 10 ++++++++++ 8 files changed, 80 insertions(+) create mode 100644 gemfiles/rails5_1_7.gemfile create mode 100644 gemfiles/rails5_2_2.gemfile create mode 100644 gemfiles/rails5_2_3.gemfile create mode 100644 gemfiles/rails5_2_4.gemfile create mode 100644 gemfiles/rails5_2_5.gemfile create mode 100644 gemfiles/rails5_2_6.gemfile create mode 100644 gemfiles/rails5_2_7.gemfile create mode 100644 gemfiles/rails5_2_8.gemfile diff --git a/gemfiles/rails5_1_7.gemfile b/gemfiles/rails5_1_7.gemfile new file mode 100644 index 00000000..f13adc1b --- /dev/null +++ b/gemfiles/rails5_1_7.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "5.1.7" +gem "railties", "5.1.7" +gem "activerecord", "5.1.7" +gem "activesupport", "5.1.7" +gem "actionview", "5.1.7" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' \ No newline at end of file diff --git a/gemfiles/rails5_2_2.gemfile b/gemfiles/rails5_2_2.gemfile new file mode 100644 index 00000000..06d49114 --- /dev/null +++ b/gemfiles/rails5_2_2.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "5.2.2" +gem "railties", "5.2.2" +gem "activerecord", "5.2.2" +gem "activesupport", "5.2.2" +gem "actionview", "5.2.2" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' diff --git a/gemfiles/rails5_2_3.gemfile b/gemfiles/rails5_2_3.gemfile new file mode 100644 index 00000000..d70c2911 --- /dev/null +++ b/gemfiles/rails5_2_3.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "5.2.3" +gem "railties", "5.2.3" +gem "activerecord", "5.2.3" +gem "activesupport", "5.2.3" +gem "actionview", "5.2.3" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' diff --git a/gemfiles/rails5_2_4.gemfile b/gemfiles/rails5_2_4.gemfile new file mode 100644 index 00000000..cffddd41 --- /dev/null +++ b/gemfiles/rails5_2_4.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "5.2.4" +gem "railties", "5.2.4" +gem "activerecord", "5.2.4" +gem "activesupport", "5.2.4" +gem "actionview", "5.2.4" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' diff --git a/gemfiles/rails5_2_5.gemfile b/gemfiles/rails5_2_5.gemfile new file mode 100644 index 00000000..ebae151e --- /dev/null +++ b/gemfiles/rails5_2_5.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "5.2.5" +gem "railties", "5.2.5" +gem "activerecord", "5.2.5" +gem "activesupport", "5.2.5" +gem "actionview", "5.2.5" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' diff --git a/gemfiles/rails5_2_6.gemfile b/gemfiles/rails5_2_6.gemfile new file mode 100644 index 00000000..607ac97e --- /dev/null +++ b/gemfiles/rails5_2_6.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "5.2.6" +gem "railties", "5.2.6" +gem "activerecord", "5.2.6" +gem "activesupport", "5.2.6" +gem "actionview", "5.2.6" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' diff --git a/gemfiles/rails5_2_7.gemfile b/gemfiles/rails5_2_7.gemfile new file mode 100644 index 00000000..07deccb8 --- /dev/null +++ b/gemfiles/rails5_2_7.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "5.2.7" +gem "railties", "5.2.7" +gem "activerecord", "5.2.7" +gem "activesupport", "5.2.7" +gem "actionview", "5.2.7" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' diff --git a/gemfiles/rails5_2_8.gemfile b/gemfiles/rails5_2_8.gemfile new file mode 100644 index 00000000..f2274c81 --- /dev/null +++ b/gemfiles/rails5_2_8.gemfile @@ -0,0 +1,10 @@ +source "https://rubygems.org" + +gem "rails", "5.2.8" +gem "railties", "5.2.8" +gem "activerecord", "5.2.8" +gem "activesupport", "5.2.8" +gem "actionview", "5.2.8" +gem "mysql2", "~> 0.5.2" + +gemspec :path => '../' From 04d0cf9582baa51800706adb94f48c70a776f0d6 Mon Sep 17 00:00:00 2001 From: akariiijima Date: Wed, 23 Aug 2023 18:14:25 +0900 Subject: [PATCH 23/37] Add gem rails because rails is needed in spec railties and actionview gems have been added to gemfiles not having them. This is because they are dependencies of rails. --- gemfiles/rails5_0_0.gemfile | 4 +++- gemfiles/rails5_0_1.gemfile | 4 +++- gemfiles/rails5_0_2.gemfile | 4 +++- gemfiles/rails5_0_3.gemfile | 4 +++- gemfiles/rails5_0_4.gemfile | 4 +++- gemfiles/rails5_0_5.gemfile | 4 +++- gemfiles/rails5_0_6.gemfile | 4 +++- gemfiles/rails5_0_7.gemfile | 3 +++ gemfiles/rails5_1_0.gemfile | 3 ++- gemfiles/rails5_1_1.gemfile | 3 ++- gemfiles/rails5_1_2.gemfile | 3 ++- gemfiles/rails5_1_3.gemfile | 3 ++- gemfiles/rails5_1_4.gemfile | 3 ++- gemfiles/rails5_1_5.gemfile | 3 ++- gemfiles/rails5_1_6.gemfile | 2 ++ 15 files changed, 38 insertions(+), 13 deletions(-) diff --git a/gemfiles/rails5_0_0.gemfile b/gemfiles/rails5_0_0.gemfile index 918ce07b..7991b298 100644 --- a/gemfiles/rails5_0_0.gemfile +++ b/gemfiles/rails5_0_0.gemfile @@ -1,8 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.0.0" +gem "railties", "5.0.0" gem "activerecord", "5.0.0" gem "activesupport", "5.0.0" - +gem "actionview", "5.0.0" gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_0_1.gemfile b/gemfiles/rails5_0_1.gemfile index 97408c2c..b5ec18bb 100644 --- a/gemfiles/rails5_0_1.gemfile +++ b/gemfiles/rails5_0_1.gemfile @@ -1,8 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.0.1" +gem "railties", "5.0.1" gem "activerecord", "5.0.1" gem "activesupport", "5.0.1" - +gem "actionview", "5.0.1" gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_0_2.gemfile b/gemfiles/rails5_0_2.gemfile index 80506a30..bb3eeb94 100644 --- a/gemfiles/rails5_0_2.gemfile +++ b/gemfiles/rails5_0_2.gemfile @@ -1,8 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.0.2" +gem "railties", "5.0.2" gem "activerecord", "5.0.2" gem "activesupport", "5.0.2" - +gem "actionview", "5.0.2" gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_0_3.gemfile b/gemfiles/rails5_0_3.gemfile index 49025e48..7f97df8f 100644 --- a/gemfiles/rails5_0_3.gemfile +++ b/gemfiles/rails5_0_3.gemfile @@ -1,8 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.0.3" +gem "railties", "5.0.3" gem "activerecord", "5.0.3" gem "activesupport", "5.0.3" - +gem "actionview", "5.0.3" gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_0_4.gemfile b/gemfiles/rails5_0_4.gemfile index 4fe00c35..75f44201 100644 --- a/gemfiles/rails5_0_4.gemfile +++ b/gemfiles/rails5_0_4.gemfile @@ -1,8 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.0.4" +gem "railties", "5.0.4" gem "activerecord", "5.0.4" gem "activesupport", "5.0.4" - +gem "actionview", "5.0.4" gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_0_5.gemfile b/gemfiles/rails5_0_5.gemfile index 03c4a3d6..6bf6e259 100644 --- a/gemfiles/rails5_0_5.gemfile +++ b/gemfiles/rails5_0_5.gemfile @@ -1,8 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.0.5" +gem "railties", "5.0.5" gem "activerecord", "5.0.5" gem "activesupport", "5.0.5" - +gem "actionview", "5.0.5" gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_0_6.gemfile b/gemfiles/rails5_0_6.gemfile index ebc2ae2a..56031752 100644 --- a/gemfiles/rails5_0_6.gemfile +++ b/gemfiles/rails5_0_6.gemfile @@ -1,8 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.0.6" +gem "railties", "5.0.6" gem "activerecord", "5.0.6" gem "activesupport", "5.0.6" - +gem "actionview", "5.0.6" gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_0_7.gemfile b/gemfiles/rails5_0_7.gemfile index f9fbbedd..3500c69a 100644 --- a/gemfiles/rails5_0_7.gemfile +++ b/gemfiles/rails5_0_7.gemfile @@ -1,7 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.0.7" +gem "railties", "5.0.7" gem "activerecord", "5.0.7" gem "activesupport", "5.0.7" +gem "actionview", "5.0.7" gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_1_0.gemfile b/gemfiles/rails5_1_0.gemfile index ede66389..d828ac2e 100644 --- a/gemfiles/rails5_1_0.gemfile +++ b/gemfiles/rails5_1_0.gemfile @@ -1,9 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.1.0" +gem "railties", "5.1.0" gem "activerecord", "5.1.0" gem "activesupport", "5.1.0" gem "actionview", "5.1.0" - gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_1_1.gemfile b/gemfiles/rails5_1_1.gemfile index 91b8d3aa..62021f38 100644 --- a/gemfiles/rails5_1_1.gemfile +++ b/gemfiles/rails5_1_1.gemfile @@ -1,9 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.1.1" +gem "railties", "5.1.1" gem "activerecord", "5.1.1" gem "activesupport", "5.1.1" gem "actionview", "5.1.1" - gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_1_2.gemfile b/gemfiles/rails5_1_2.gemfile index 4773810d..95d7afb9 100644 --- a/gemfiles/rails5_1_2.gemfile +++ b/gemfiles/rails5_1_2.gemfile @@ -1,9 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.1.2" +gem "railties", "5.1.2" gem "activerecord", "5.1.2" gem "activesupport", "5.1.2" gem "actionview", "5.1.2" - gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_1_3.gemfile b/gemfiles/rails5_1_3.gemfile index 136c57d2..bfe76bfa 100644 --- a/gemfiles/rails5_1_3.gemfile +++ b/gemfiles/rails5_1_3.gemfile @@ -1,9 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.1.3" +gem "railties", "5.1.3" gem "activerecord", "5.1.3" gem "activesupport", "5.1.3" gem "actionview", "5.1.3" - gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_1_4.gemfile b/gemfiles/rails5_1_4.gemfile index 97b16dda..c8012ce6 100644 --- a/gemfiles/rails5_1_4.gemfile +++ b/gemfiles/rails5_1_4.gemfile @@ -1,9 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.1.4" +gem "railties", "5.1.4" gem "activerecord", "5.1.4" gem "activesupport", "5.1.4" gem "actionview", "5.1.4" - gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_1_5.gemfile b/gemfiles/rails5_1_5.gemfile index 442ce636..2b1f91e0 100644 --- a/gemfiles/rails5_1_5.gemfile +++ b/gemfiles/rails5_1_5.gemfile @@ -1,9 +1,10 @@ source "https://rubygems.org" +gem "rails", "5.1.5" +gem "railties", "5.1.5" gem "activerecord", "5.1.5" gem "activesupport", "5.1.5" gem "actionview", "5.1.5" - gem "mysql2", "~> 0.4.4" gemspec :path => '../' diff --git a/gemfiles/rails5_1_6.gemfile b/gemfiles/rails5_1_6.gemfile index e75e1683..1b719eb5 100644 --- a/gemfiles/rails5_1_6.gemfile +++ b/gemfiles/rails5_1_6.gemfile @@ -1,5 +1,7 @@ source "https://rubygems.org" +gem "rails", "5.1.6" +gem "railties", "5.1.6" gem "activerecord", "5.1.6" gem "activesupport", "5.1.6" gem "actionview", "5.1.6" From a3c2cddbcebff1f56e0f5cd94632a1ca1907053b Mon Sep 17 00:00:00 2001 From: akariiijima Date: Tue, 27 Jun 2023 18:23:39 +0900 Subject: [PATCH 24/37] Pin gem nokogiri/loofah version if ruby < 2.5 bundle install will install a native gem without any additional action : https://github.com/sparklemotion/nokogiri loofah should be pin version 2.20.2 : https://github.com/flavorjones/loofah/issues/266, https://github.com/getsentry/sentry-ruby/pull/2041 --- gemfiles/rails5_0_0.gemfile | 3 +++ gemfiles/rails5_0_1.gemfile | 3 +++ gemfiles/rails5_0_2.gemfile | 3 +++ gemfiles/rails5_0_3.gemfile | 3 +++ gemfiles/rails5_0_4.gemfile | 3 +++ gemfiles/rails5_0_5.gemfile | 3 +++ gemfiles/rails5_0_6.gemfile | 3 +++ gemfiles/rails5_0_7.gemfile | 3 +++ gemfiles/rails5_1_0.gemfile | 3 +++ gemfiles/rails5_1_1.gemfile | 3 +++ gemfiles/rails5_1_2.gemfile | 3 +++ gemfiles/rails5_1_3.gemfile | 3 +++ gemfiles/rails5_1_4.gemfile | 3 +++ gemfiles/rails5_1_5.gemfile | 3 +++ gemfiles/rails5_1_6.gemfile | 3 +++ gemfiles/rails5_1_7.gemfile | 3 +++ gemfiles/rails5_2_0.gemfile | 3 +++ gemfiles/rails5_2_1.gemfile | 3 +++ gemfiles/rails5_2_2.gemfile | 3 +++ gemfiles/rails5_2_3.gemfile | 3 +++ gemfiles/rails5_2_4.gemfile | 3 +++ gemfiles/rails5_2_5.gemfile | 3 +++ gemfiles/rails5_2_6.gemfile | 3 +++ gemfiles/rails5_2_7.gemfile | 3 +++ gemfiles/rails5_2_8.gemfile | 3 +++ 25 files changed, 75 insertions(+) diff --git a/gemfiles/rails5_0_0.gemfile b/gemfiles/rails5_0_0.gemfile index 7991b298..5cb33da4 100644 --- a/gemfiles/rails5_0_0.gemfile +++ b/gemfiles/rails5_0_0.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.0.0" gem "actionview", "5.0.0" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_0_1.gemfile b/gemfiles/rails5_0_1.gemfile index b5ec18bb..11728b71 100644 --- a/gemfiles/rails5_0_1.gemfile +++ b/gemfiles/rails5_0_1.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.0.1" gem "actionview", "5.0.1" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_0_2.gemfile b/gemfiles/rails5_0_2.gemfile index bb3eeb94..94aecc0d 100644 --- a/gemfiles/rails5_0_2.gemfile +++ b/gemfiles/rails5_0_2.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.0.2" gem "actionview", "5.0.2" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_0_3.gemfile b/gemfiles/rails5_0_3.gemfile index 7f97df8f..45e37e60 100644 --- a/gemfiles/rails5_0_3.gemfile +++ b/gemfiles/rails5_0_3.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.0.3" gem "actionview", "5.0.3" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_0_4.gemfile b/gemfiles/rails5_0_4.gemfile index 75f44201..f0204367 100644 --- a/gemfiles/rails5_0_4.gemfile +++ b/gemfiles/rails5_0_4.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.0.4" gem "actionview", "5.0.4" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_0_5.gemfile b/gemfiles/rails5_0_5.gemfile index 6bf6e259..848a3425 100644 --- a/gemfiles/rails5_0_5.gemfile +++ b/gemfiles/rails5_0_5.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.0.5" gem "actionview", "5.0.5" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_0_6.gemfile b/gemfiles/rails5_0_6.gemfile index 56031752..6ad44787 100644 --- a/gemfiles/rails5_0_6.gemfile +++ b/gemfiles/rails5_0_6.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.0.6" gem "actionview", "5.0.6" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_0_7.gemfile b/gemfiles/rails5_0_7.gemfile index 3500c69a..570929e0 100644 --- a/gemfiles/rails5_0_7.gemfile +++ b/gemfiles/rails5_0_7.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.0.7" gem "actionview", "5.0.7" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_1_0.gemfile b/gemfiles/rails5_1_0.gemfile index d828ac2e..caf94ad0 100644 --- a/gemfiles/rails5_1_0.gemfile +++ b/gemfiles/rails5_1_0.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.1.0" gem "actionview", "5.1.0" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_1_1.gemfile b/gemfiles/rails5_1_1.gemfile index 62021f38..2be0d212 100644 --- a/gemfiles/rails5_1_1.gemfile +++ b/gemfiles/rails5_1_1.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.1.1" gem "actionview", "5.1.1" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_1_2.gemfile b/gemfiles/rails5_1_2.gemfile index 95d7afb9..54ce19a5 100644 --- a/gemfiles/rails5_1_2.gemfile +++ b/gemfiles/rails5_1_2.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.1.2" gem "actionview", "5.1.2" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_1_3.gemfile b/gemfiles/rails5_1_3.gemfile index bfe76bfa..92910963 100644 --- a/gemfiles/rails5_1_3.gemfile +++ b/gemfiles/rails5_1_3.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.1.3" gem "actionview", "5.1.3" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_1_4.gemfile b/gemfiles/rails5_1_4.gemfile index c8012ce6..ccc86bc2 100644 --- a/gemfiles/rails5_1_4.gemfile +++ b/gemfiles/rails5_1_4.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.1.4" gem "actionview", "5.1.4" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_1_5.gemfile b/gemfiles/rails5_1_5.gemfile index 2b1f91e0..024c119e 100644 --- a/gemfiles/rails5_1_5.gemfile +++ b/gemfiles/rails5_1_5.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.1.5" gem "actionview", "5.1.5" gem "mysql2", "~> 0.4.4" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_1_6.gemfile b/gemfiles/rails5_1_6.gemfile index 1b719eb5..5208a691 100644 --- a/gemfiles/rails5_1_6.gemfile +++ b/gemfiles/rails5_1_6.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.1.6" gem "actionview", "5.1.6" gem "mysql2", "~> 0.5.2" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_1_7.gemfile b/gemfiles/rails5_1_7.gemfile index f13adc1b..077d79e9 100644 --- a/gemfiles/rails5_1_7.gemfile +++ b/gemfiles/rails5_1_7.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.1.7" gem "actionview", "5.1.7" gem "mysql2", "~> 0.5.2" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' \ No newline at end of file diff --git a/gemfiles/rails5_2_0.gemfile b/gemfiles/rails5_2_0.gemfile index e786d362..4a831707 100644 --- a/gemfiles/rails5_2_0.gemfile +++ b/gemfiles/rails5_2_0.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.2.0" gem "actionview", "5.2.0" gem "mysql2", "~> 0.5.2" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_2_1.gemfile b/gemfiles/rails5_2_1.gemfile index aa08879c..36a6a5b6 100644 --- a/gemfiles/rails5_2_1.gemfile +++ b/gemfiles/rails5_2_1.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.2.1" gem "actionview", "5.2.1" gem "mysql2", "~> 0.5.2" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_2_2.gemfile b/gemfiles/rails5_2_2.gemfile index 06d49114..caa9c920 100644 --- a/gemfiles/rails5_2_2.gemfile +++ b/gemfiles/rails5_2_2.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.2.2" gem "actionview", "5.2.2" gem "mysql2", "~> 0.5.2" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_2_3.gemfile b/gemfiles/rails5_2_3.gemfile index d70c2911..dac9cb7a 100644 --- a/gemfiles/rails5_2_3.gemfile +++ b/gemfiles/rails5_2_3.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.2.3" gem "actionview", "5.2.3" gem "mysql2", "~> 0.5.2" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_2_4.gemfile b/gemfiles/rails5_2_4.gemfile index cffddd41..2fa6c272 100644 --- a/gemfiles/rails5_2_4.gemfile +++ b/gemfiles/rails5_2_4.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.2.4" gem "actionview", "5.2.4" gem "mysql2", "~> 0.5.2" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_2_5.gemfile b/gemfiles/rails5_2_5.gemfile index ebae151e..ac67bb16 100644 --- a/gemfiles/rails5_2_5.gemfile +++ b/gemfiles/rails5_2_5.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.2.5" gem "actionview", "5.2.5" gem "mysql2", "~> 0.5.2" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_2_6.gemfile b/gemfiles/rails5_2_6.gemfile index 607ac97e..61ea7ed9 100644 --- a/gemfiles/rails5_2_6.gemfile +++ b/gemfiles/rails5_2_6.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.2.6" gem "actionview", "5.2.6" gem "mysql2", "~> 0.5.2" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_2_7.gemfile b/gemfiles/rails5_2_7.gemfile index 07deccb8..9d106913 100644 --- a/gemfiles/rails5_2_7.gemfile +++ b/gemfiles/rails5_2_7.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.2.7" gem "actionview", "5.2.7" gem "mysql2", "~> 0.5.2" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' diff --git a/gemfiles/rails5_2_8.gemfile b/gemfiles/rails5_2_8.gemfile index f2274c81..539f608c 100644 --- a/gemfiles/rails5_2_8.gemfile +++ b/gemfiles/rails5_2_8.gemfile @@ -7,4 +7,7 @@ gem "activesupport", "5.2.8" gem "actionview", "5.2.8" gem "mysql2", "~> 0.5.2" +gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 +gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 + gemspec :path => '../' From 3e9c3b15ad575abf02e4bf433aa193195ddf9f0d Mon Sep 17 00:00:00 2001 From: akariiijima Date: Tue, 27 Jun 2023 18:25:52 +0900 Subject: [PATCH 25/37] Add gem dalli because dalli is needed in spec Pin gem dalli version 2 if ruby < 2.5 : https://github.com/petergoldstein/dalli/issues/758 --- gemfiles/rails5_0_0.gemfile | 1 + gemfiles/rails5_0_1.gemfile | 1 + gemfiles/rails5_0_2.gemfile | 1 + gemfiles/rails5_0_3.gemfile | 1 + gemfiles/rails5_0_4.gemfile | 1 + gemfiles/rails5_0_5.gemfile | 1 + gemfiles/rails5_0_6.gemfile | 1 + gemfiles/rails5_0_7.gemfile | 1 + gemfiles/rails5_1_0.gemfile | 1 + gemfiles/rails5_1_1.gemfile | 1 + gemfiles/rails5_1_2.gemfile | 1 + gemfiles/rails5_1_3.gemfile | 1 + gemfiles/rails5_1_4.gemfile | 1 + gemfiles/rails5_1_5.gemfile | 1 + gemfiles/rails5_1_6.gemfile | 1 + gemfiles/rails5_1_7.gemfile | 1 + gemfiles/rails5_2_0.gemfile | 1 + gemfiles/rails5_2_1.gemfile | 1 + gemfiles/rails5_2_2.gemfile | 1 + gemfiles/rails5_2_3.gemfile | 1 + gemfiles/rails5_2_4.gemfile | 1 + gemfiles/rails5_2_5.gemfile | 1 + gemfiles/rails5_2_6.gemfile | 1 + gemfiles/rails5_2_7.gemfile | 1 + gemfiles/rails5_2_8.gemfile | 1 + 25 files changed, 25 insertions(+) diff --git a/gemfiles/rails5_0_0.gemfile b/gemfiles/rails5_0_0.gemfile index 5cb33da4..0012fa6f 100644 --- a/gemfiles/rails5_0_0.gemfile +++ b/gemfiles/rails5_0_0.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_0_1.gemfile b/gemfiles/rails5_0_1.gemfile index 11728b71..c0f5d7af 100644 --- a/gemfiles/rails5_0_1.gemfile +++ b/gemfiles/rails5_0_1.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_0_2.gemfile b/gemfiles/rails5_0_2.gemfile index 94aecc0d..e9a24164 100644 --- a/gemfiles/rails5_0_2.gemfile +++ b/gemfiles/rails5_0_2.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_0_3.gemfile b/gemfiles/rails5_0_3.gemfile index 45e37e60..bef73186 100644 --- a/gemfiles/rails5_0_3.gemfile +++ b/gemfiles/rails5_0_3.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_0_4.gemfile b/gemfiles/rails5_0_4.gemfile index f0204367..2fb96bb0 100644 --- a/gemfiles/rails5_0_4.gemfile +++ b/gemfiles/rails5_0_4.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_0_5.gemfile b/gemfiles/rails5_0_5.gemfile index 848a3425..4d6b87c7 100644 --- a/gemfiles/rails5_0_5.gemfile +++ b/gemfiles/rails5_0_5.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_0_6.gemfile b/gemfiles/rails5_0_6.gemfile index 6ad44787..afc171c5 100644 --- a/gemfiles/rails5_0_6.gemfile +++ b/gemfiles/rails5_0_6.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_0_7.gemfile b/gemfiles/rails5_0_7.gemfile index 570929e0..dfa736f2 100644 --- a/gemfiles/rails5_0_7.gemfile +++ b/gemfiles/rails5_0_7.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_1_0.gemfile b/gemfiles/rails5_1_0.gemfile index caf94ad0..cc6502f1 100644 --- a/gemfiles/rails5_1_0.gemfile +++ b/gemfiles/rails5_1_0.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_1_1.gemfile b/gemfiles/rails5_1_1.gemfile index 2be0d212..66f5e3fa 100644 --- a/gemfiles/rails5_1_1.gemfile +++ b/gemfiles/rails5_1_1.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_1_2.gemfile b/gemfiles/rails5_1_2.gemfile index 54ce19a5..4b0db053 100644 --- a/gemfiles/rails5_1_2.gemfile +++ b/gemfiles/rails5_1_2.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_1_3.gemfile b/gemfiles/rails5_1_3.gemfile index 92910963..31e56c31 100644 --- a/gemfiles/rails5_1_3.gemfile +++ b/gemfiles/rails5_1_3.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_1_4.gemfile b/gemfiles/rails5_1_4.gemfile index ccc86bc2..f2e0e12a 100644 --- a/gemfiles/rails5_1_4.gemfile +++ b/gemfiles/rails5_1_4.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_1_5.gemfile b/gemfiles/rails5_1_5.gemfile index 024c119e..00b9894b 100644 --- a/gemfiles/rails5_1_5.gemfile +++ b/gemfiles/rails5_1_5.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.4.4" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_1_6.gemfile b/gemfiles/rails5_1_6.gemfile index 5208a691..75291519 100644 --- a/gemfiles/rails5_1_6.gemfile +++ b/gemfiles/rails5_1_6.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.5.2" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_1_7.gemfile b/gemfiles/rails5_1_7.gemfile index 077d79e9..dd03b9b3 100644 --- a/gemfiles/rails5_1_7.gemfile +++ b/gemfiles/rails5_1_7.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.5.2" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' \ No newline at end of file diff --git a/gemfiles/rails5_2_0.gemfile b/gemfiles/rails5_2_0.gemfile index 4a831707..dbb7b8df 100644 --- a/gemfiles/rails5_2_0.gemfile +++ b/gemfiles/rails5_2_0.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.5.2" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_2_1.gemfile b/gemfiles/rails5_2_1.gemfile index 36a6a5b6..9d4b5e02 100644 --- a/gemfiles/rails5_2_1.gemfile +++ b/gemfiles/rails5_2_1.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.5.2" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_2_2.gemfile b/gemfiles/rails5_2_2.gemfile index caa9c920..c0a0d571 100644 --- a/gemfiles/rails5_2_2.gemfile +++ b/gemfiles/rails5_2_2.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.5.2" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_2_3.gemfile b/gemfiles/rails5_2_3.gemfile index dac9cb7a..75420fc5 100644 --- a/gemfiles/rails5_2_3.gemfile +++ b/gemfiles/rails5_2_3.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.5.2" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_2_4.gemfile b/gemfiles/rails5_2_4.gemfile index 2fa6c272..2b4f00a2 100644 --- a/gemfiles/rails5_2_4.gemfile +++ b/gemfiles/rails5_2_4.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.5.2" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_2_5.gemfile b/gemfiles/rails5_2_5.gemfile index ac67bb16..5ef148e9 100644 --- a/gemfiles/rails5_2_5.gemfile +++ b/gemfiles/rails5_2_5.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.5.2" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_2_6.gemfile b/gemfiles/rails5_2_6.gemfile index 61ea7ed9..8bb748ef 100644 --- a/gemfiles/rails5_2_6.gemfile +++ b/gemfiles/rails5_2_6.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.5.2" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_2_7.gemfile b/gemfiles/rails5_2_7.gemfile index 9d106913..cc489b87 100644 --- a/gemfiles/rails5_2_7.gemfile +++ b/gemfiles/rails5_2_7.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.5.2" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' diff --git a/gemfiles/rails5_2_8.gemfile b/gemfiles/rails5_2_8.gemfile index 539f608c..4c6bda53 100644 --- a/gemfiles/rails5_2_8.gemfile +++ b/gemfiles/rails5_2_8.gemfile @@ -9,5 +9,6 @@ gem "mysql2", "~> 0.5.2" gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5 gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5 +gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5 gemspec :path => '../' From 692ed74af1b94e099fa217b65c8d70993c5ac796 Mon Sep 17 00:00:00 2001 From: akariiijima Date: Tue, 27 Jun 2023 18:27:10 +0900 Subject: [PATCH 26/37] Add workflows for ruby 2.4 - 2.7 in GithubActions --- .github/workflows/test_ruby_2_4.yml | 32 +++++++++++++++++++++++++++++ .github/workflows/test_ruby_2_5.yml | 32 +++++++++++++++++++++++++++++ .github/workflows/test_ruby_2_6.yml | 32 +++++++++++++++++++++++++++++ .github/workflows/test_ruby_2_7.yml | 32 +++++++++++++++++++++++++++++ 4 files changed, 128 insertions(+) create mode 100644 .github/workflows/test_ruby_2_4.yml create mode 100644 .github/workflows/test_ruby_2_5.yml create mode 100644 .github/workflows/test_ruby_2_6.yml create mode 100644 .github/workflows/test_ruby_2_7.yml diff --git a/.github/workflows/test_ruby_2_4.yml b/.github/workflows/test_ruby_2_4.yml new file mode 100644 index 00000000..b4fe88e5 --- /dev/null +++ b/.github/workflows/test_ruby_2_4.yml @@ -0,0 +1,32 @@ +name: Exec Rspec +run-name: Matrix building for ruby 2.4 โœ–๏ธ ใ€rails 5.0 - 6.0ใ€‘ ๐Ÿš€ +on: [push] + +jobs: + ruby_2_4: + strategy: + fail-fast: false + matrix: + arversion: ['5_0_0', '5_0_1', '5_0_2', '5_0_3', '5_0_4', '5_0_5', '5_0_6', '5_0_7', + '5_1_0', '5_1_1', '5_1_2', '5_1_3', '5_1_4', '5_1_5', '5_1_6', '5_1_7', + '5_2_0', '5_2_1', '5_2_2', '5_2_3', '5_2_4', '5_2_5', '5_2_6', '5_2_7', '5_2_8', + '6_0_0', '6_0_1', '6_0_2', '6_0_3', '6_0_4', '6_0_5', '6_0_6'] + runs-on: ubuntu-22.04 + env: + BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails${{ matrix.arversion }}.gemfile + MYSQL_PWD: root + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.4' + bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1' || 'latest' }} + bundler-cache: true + - name: Start mysql + run: sudo systemctl start mysql.service + - name: Reset DB + run: bundle exec rake turntable:db:reset + - name: Run RSpec + run: bundle exec rake spec diff --git a/.github/workflows/test_ruby_2_5.yml b/.github/workflows/test_ruby_2_5.yml new file mode 100644 index 00000000..2b896307 --- /dev/null +++ b/.github/workflows/test_ruby_2_5.yml @@ -0,0 +1,32 @@ +name: Exec Rspec +run-name: Matrix building for ruby 2.5 โœ–๏ธ ใ€rails 5.0 - 6.0ใ€‘ ๐Ÿš€ +on: [push] + +jobs: + ruby_2_5: + strategy: + fail-fast: false + matrix: + arversion: ['5_0_0', '5_0_1', '5_0_2', '5_0_3', '5_0_4', '5_0_5', '5_0_6', '5_0_7', + '5_1_0', '5_1_1', '5_1_2', '5_1_3', '5_1_4', '5_1_5', '5_1_6', '5_1_7', + '5_2_0', '5_2_1', '5_2_2', '5_2_3', '5_2_4', '5_2_5', '5_2_6', '5_2_7', '5_2_8', + '6_0_0', '6_0_1', '6_0_2', '6_0_3', '6_0_4', '6_0_5', '6_0_6'] + runs-on: ubuntu-22.04 + env: + BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails${{ matrix.arversion }}.gemfile + MYSQL_PWD: root + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.5' + bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1' || 'latest' }} + bundler-cache: true + - name: Start mysql + run: sudo systemctl start mysql.service + - name: Reset DB + run: bundle exec rake turntable:db:reset + - name: Run RSpec + run: bundle exec rake spec diff --git a/.github/workflows/test_ruby_2_6.yml b/.github/workflows/test_ruby_2_6.yml new file mode 100644 index 00000000..5550cc74 --- /dev/null +++ b/.github/workflows/test_ruby_2_6.yml @@ -0,0 +1,32 @@ +name: Exec Rspec +run-name: Matrix building for ruby 2.6 โœ–๏ธ ใ€rails 5.0 - 6.0ใ€‘ ๐Ÿš€ +on: [push] + +jobs: + ruby_2_6: + strategy: + fail-fast: false + matrix: + arversion: ['5_0_0', '5_0_1', '5_0_2', '5_0_3', '5_0_4', '5_0_5', '5_0_6', '5_0_7', + '5_1_0', '5_1_1', '5_1_2', '5_1_3', '5_1_4', '5_1_5', '5_1_6', '5_1_7', + '5_2_0', '5_2_1', '5_2_2', '5_2_3', '5_2_4', '5_2_5', '5_2_6', '5_2_7', '5_2_8', + '6_0_0', '6_0_1', '6_0_2', '6_0_3', '6_0_4', '6_0_5', '6_0_6'] + runs-on: ubuntu-22.04 + env: + BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails${{ matrix.arversion }}.gemfile + MYSQL_PWD: root + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.6' + bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1' || 'latest' }} + bundler-cache: true + - name: Start mysql + run: sudo systemctl start mysql.service + - name: Reset DB + run: bundle exec rake turntable:db:reset + - name: Run RSpec + run: bundle exec rake spec diff --git a/.github/workflows/test_ruby_2_7.yml b/.github/workflows/test_ruby_2_7.yml new file mode 100644 index 00000000..4f2df236 --- /dev/null +++ b/.github/workflows/test_ruby_2_7.yml @@ -0,0 +1,32 @@ +name: Exec Rspec +run-name: Matrix building for ruby 2.7 โœ–๏ธ ใ€rails 5.0 - 6.0ใ€‘ ๐Ÿš€ +on: [push] + +jobs: + ruby_2_7: + strategy: + fail-fast: false + matrix: + arversion: ['5_0_0', '5_0_1', '5_0_2', '5_0_3', '5_0_4', '5_0_5', '5_0_6', '5_0_7', + '5_1_0', '5_1_1', '5_1_2', '5_1_3', '5_1_4', '5_1_5', '5_1_6', '5_1_7', + '5_2_0', '5_2_1', '5_2_2', '5_2_3', '5_2_4', '5_2_5', '5_2_6', '5_2_7', '5_2_8', + '6_0_0', '6_0_1', '6_0_2', '6_0_3', '6_0_4', '6_0_5', '6_0_6'] + runs-on: ubuntu-22.04 + env: + BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails${{ matrix.arversion }}.gemfile + MYSQL_PWD: root + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.7' + bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1' || 'latest' }} + bundler-cache: true + - name: Start mysql + run: sudo systemctl start mysql.service + - name: Reset DB + run: bundle exec rake turntable:db:reset + - name: Run RSpec + run: RUBYOPT='-W:deprecated' bundle exec rake spec From 1af32dc3bc01c87a93884b690afb25367f722396 Mon Sep 17 00:00:00 2001 From: akariiijima Date: Wed, 23 Aug 2023 18:36:47 +0900 Subject: [PATCH 27/37] Goodbye travisCI because of not being maintained, and use GithubActions instead --- .travis.yml | 78 ----------------------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a9a01137..00000000 --- a/.travis.yml +++ /dev/null @@ -1,78 +0,0 @@ -language: ruby -sudo: false - -cache: - bundler: true - -rvm: - - 2.2.10 - - 2.3.7 - - 2.4.4 - - 2.5.1 - - ruby-head - -gemfile: - - gemfiles/rails5_0_0.gemfile - - gemfiles/rails5_0_1.gemfile - - gemfiles/rails5_0_2.gemfile - - gemfiles/rails5_0_3.gemfile - - gemfiles/rails5_0_4.gemfile - - gemfiles/rails5_0_5.gemfile - - gemfiles/rails5_0_6.gemfile - - gemfiles/rails5_0_7.gemfile - - gemfiles/rails5_1_0.gemfile - - gemfiles/rails5_1_1.gemfile - - gemfiles/rails5_1_2.gemfile - - gemfiles/rails5_1_3.gemfile - - gemfiles/rails5_1_4.gemfile - - gemfiles/rails5_1_5.gemfile - - gemfiles/rails5_1_6.gemfile - - gemfiles/rails5_2_0.gemfile - - gemfiles/rails5_2_1.gemfile - - gemfiles/rails6_0_0.gemfile - - gemfiles/rails_edge.gemfile - -env: - - SETUP_TASK=turntable:db:reset BUILD_TASK=spec - - SETUP_TASK=turntable:db:reset BUILD_TASK=spec SPEC_OPTS="--tag with_katsubushi" - - SETUP_TASK=turntable:activerecord:setup BUILD_TASK=turntable:activerecord:test - -services: - - docker - -before_install: - - docker run -d --name turntable-katsubushi -p 11212:11212 katsubushi/katsubushi:latest -worker-id 1 - -before_script: - - bundle exec rake $SETUP_TASK - -script: - - bundle exec rake $BUILD_TASK - -matrix: - exclude: - - rvm: ruby-head - - gemfile: gemfiles/rails_edge.gemfile - - rvm: 2.2.10 - - rvm: 2.3.7 - - rvm: 2.4.4 - include: - - rvm: 2.2.10 - gemfile: gemfiles/rails5_0_7.gemfile - - rvm: 2.2.10 - gemfile: gemfiles/rails5_1_6.gemfile - - rvm: 2.2.10 - gemfile: gemfiles/rails5_2_1.gemfile - - rvm: 2.3.7 - gemfile: gemfiles/rails5_2_1.gemfile - - rvm: 2.4.4 - gemfile: gemfiles/rails5_2_1.gemfile - - rvm: 2.5.1 - gemfile: gemfiles/rails6_0_0.gemfile - - rvm: 2.5.1 - gemfile: gemfiles/rails_edge.gemfile - - rvm: ruby-head - gemfile: gemfiles/rails_edge.gemfile - allow_failures: - - rvm: ruby-head - - gemfile: gemfiles/rails_edge.gemfile From c15915b2c537faf5757233b88cea91cb6ceffa61 Mon Sep 17 00:00:00 2001 From: hirocaster Date: Thu, 31 Aug 2023 12:09:36 +0900 Subject: [PATCH 28/37] Not support Ruby 2.4 in Rails6 --- .github/workflows/test_ruby_2_4.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_ruby_2_4.yml b/.github/workflows/test_ruby_2_4.yml index b4fe88e5..f7a458c4 100644 --- a/.github/workflows/test_ruby_2_4.yml +++ b/.github/workflows/test_ruby_2_4.yml @@ -1,5 +1,5 @@ name: Exec Rspec -run-name: Matrix building for ruby 2.4 โœ–๏ธ ใ€rails 5.0 - 6.0ใ€‘ ๐Ÿš€ +run-name: Matrix building for ruby 2.4 โœ–๏ธ rails 5.0 ๐Ÿš€ on: [push] jobs: @@ -9,8 +9,7 @@ jobs: matrix: arversion: ['5_0_0', '5_0_1', '5_0_2', '5_0_3', '5_0_4', '5_0_5', '5_0_6', '5_0_7', '5_1_0', '5_1_1', '5_1_2', '5_1_3', '5_1_4', '5_1_5', '5_1_6', '5_1_7', - '5_2_0', '5_2_1', '5_2_2', '5_2_3', '5_2_4', '5_2_5', '5_2_6', '5_2_7', '5_2_8', - '6_0_0', '6_0_1', '6_0_2', '6_0_3', '6_0_4', '6_0_5', '6_0_6'] + '5_2_0', '5_2_1', '5_2_2', '5_2_3', '5_2_4', '5_2_5', '5_2_6', '5_2_7', '5_2_8'] runs-on: ubuntu-22.04 env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails${{ matrix.arversion }}.gemfile From 3349dc3eb42fa74a1e69101ad37f3d5692c73912 Mon Sep 17 00:00:00 2001 From: Genki Sugawara Date: Fri, 15 Mar 2024 12:41:55 +0900 Subject: [PATCH 29/37] Add compose.yaml for test DB --- compose.yaml | 7 +++++++ spec/config/database.yml | 4 ++-- spec/spec_helper.rb | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 compose.yaml diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 00000000..5ed15409 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,7 @@ +services: + mysql: + image: "mysql:8.0" + ports: + - "13306:3306" + environment: + MYSQL_ALLOW_EMPTY_PASSWORD: "yes" diff --git a/spec/config/database.yml b/spec/config/database.yml index 142768a6..fb7254a0 100644 --- a/spec/config/database.yml +++ b/spec/config/database.yml @@ -2,8 +2,8 @@ default: &default adapter: mysql2 username: root password: - host: localhost - port: 3306 + host: <%= ENV['TEST_MYSQL_HOST'] || 'localhost' %> + port: <%= ENV['TEST_MYSQL_PORT'] || 3306 %> encoding: utf8 database: turntable_test diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 618f2f9d..05d10e5a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -35,7 +35,9 @@ # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. -ActiveRecord::Base.configurations = YAML.load_file(File.join(File.dirname(__FILE__), "config/database.yml")) +database_yaml = File.read(File.join(File.dirname(__FILE__), "config/database.yml")) +database_yaml = ERB.new(database_yaml).result +ActiveRecord::Base.configurations = YAML.load(database_yaml) ActiveRecord::Base.establish_connection(:test) Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } From 0143d48b256dbb2067eff014b2d6fb2322b10ded Mon Sep 17 00:00:00 2001 From: Genki Sugawara Date: Fri, 15 Mar 2024 12:57:13 +0900 Subject: [PATCH 30/37] Add Appraisals --- Appraisals | 62 ++++++++++++++++++++++++++++++++++ activerecord-turntable.gemspec | 1 + gemfiles/rails6_0_0.gemfile | 8 +++-- gemfiles/rails6_0_1.gemfile | 8 +++-- gemfiles/rails6_0_2.gemfile | 8 +++-- gemfiles/rails6_0_3.gemfile | 8 +++-- gemfiles/rails6_0_4.gemfile | 8 +++-- gemfiles/rails6_0_5.gemfile | 8 +++-- gemfiles/rails6_0_6.gemfile | 8 +++-- 9 files changed, 98 insertions(+), 21 deletions(-) create mode 100644 Appraisals diff --git a/Appraisals b/Appraisals new file mode 100644 index 00000000..d84c8323 --- /dev/null +++ b/Appraisals @@ -0,0 +1,62 @@ +appraise "rails6_0_0" do + gem "rails", "6.0.0" + gem "railties", "6.0.0" + gem "activerecord", "6.0.0" + gem "activesupport", "6.0.0" + gem "actionview", "6.0.0" + gem "mysql2", "~> 0.5.2" +end + +appraise "rails6_0_1" do + gem "rails", "6.0.1" + gem "railties", "6.0.1" + gem "activerecord", "6.0.1" + gem "activesupport", "6.0.1" + gem "actionview", "6.0.1" + gem "mysql2", "~> 0.5.2" +end + +appraise "rails6_0_2" do + gem "rails", "6.0.2" + gem "railties", "6.0.2" + gem "activerecord", "6.0.2" + gem "activesupport", "6.0.2" + gem "actionview", "6.0.2" + gem "mysql2", "~> 0.5.2" +end + +appraise "rails6_0_3" do + gem "rails", "6.0.3" + gem "railties", "6.0.3" + gem "activerecord", "6.0.3" + gem "activesupport", "6.0.3" + gem "actionview", "6.0.3" + gem "mysql2", "~> 0.5.2" +end + +appraise "rails6_0_4" do + gem "rails", "6.0.4" + gem "railties", "6.0.4" + gem "activerecord", "6.0.4" + gem "activesupport", "6.0.4" + gem "actionview", "6.0.4" + gem "mysql2", "~> 0.5.2" +end + +appraise "rails6_0_5" do + gem "rails", "6.0.5" + gem "railties", "6.0.5" + gem "activerecord", "6.0.5" + gem "activesupport", "6.0.5" + gem "actionview", "6.0.5" + gem "mysql2", "~> 0.5.2" +end + +appraise "rails6_0_6" do + gem "rails", "6.0.6" + gem "railties", "6.0.6" + gem "activerecord", "6.0.6" + gem "activesupport", "6.0.6" + gem "actionview", "6.0.6" + gem "mysql2", "~> 0.5.2" +end diff --git a/activerecord-turntable.gemspec b/activerecord-turntable.gemspec index 2c27e3f7..06d99a91 100644 --- a/activerecord-turntable.gemspec +++ b/activerecord-turntable.gemspec @@ -61,4 +61,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency "minitest" spec.add_development_dependency "mocha" spec.add_development_dependency "sqlite3", "~> 1.3.6" + spec.add_development_dependency "appraisal", "~> 2.5.0" end diff --git a/gemfiles/rails6_0_0.gemfile b/gemfiles/rails6_0_0.gemfile index 741e6cce..74ed8045 100644 --- a/gemfiles/rails6_0_0.gemfile +++ b/gemfiles/rails6_0_0.gemfile @@ -1,10 +1,12 @@ +# This file was generated by Appraisal + source "https://rubygems.org" gem "rails", "6.0.0" -gem "railties", "6.0.0" +gem "actionview", "6.0.0" gem "activerecord", "6.0.0" gem "activesupport", "6.0.0" -gem "actionview", "6.0.0" +gem "railties", "6.0.0" gem "mysql2", "~> 0.5.2" -gemspec :path => '../' +gemspec path: "../" diff --git a/gemfiles/rails6_0_1.gemfile b/gemfiles/rails6_0_1.gemfile index f521024c..2b3072fe 100644 --- a/gemfiles/rails6_0_1.gemfile +++ b/gemfiles/rails6_0_1.gemfile @@ -1,10 +1,12 @@ +# This file was generated by Appraisal + source "https://rubygems.org" gem "rails", "6.0.1" -gem "railties", "6.0.1" +gem "actionview", "6.0.1" gem "activerecord", "6.0.1" gem "activesupport", "6.0.1" -gem "actionview", "6.0.1" +gem "railties", "6.0.1" gem "mysql2", "~> 0.5.2" -gemspec :path => '../' +gemspec path: "../" diff --git a/gemfiles/rails6_0_2.gemfile b/gemfiles/rails6_0_2.gemfile index ede605ba..03f35902 100644 --- a/gemfiles/rails6_0_2.gemfile +++ b/gemfiles/rails6_0_2.gemfile @@ -1,10 +1,12 @@ +# This file was generated by Appraisal + source "https://rubygems.org" gem "rails", "6.0.2" -gem "railties", "6.0.2" +gem "actionview", "6.0.2" gem "activerecord", "6.0.2" gem "activesupport", "6.0.2" -gem "actionview", "6.0.2" +gem "railties", "6.0.2" gem "mysql2", "~> 0.5.2" -gemspec :path => '../' +gemspec path: "../" diff --git a/gemfiles/rails6_0_3.gemfile b/gemfiles/rails6_0_3.gemfile index b8c770b4..6d8e067f 100644 --- a/gemfiles/rails6_0_3.gemfile +++ b/gemfiles/rails6_0_3.gemfile @@ -1,10 +1,12 @@ +# This file was generated by Appraisal + source "https://rubygems.org" gem "rails", "6.0.3" -gem "railties", "6.0.3" +gem "actionview", "6.0.3" gem "activerecord", "6.0.3" gem "activesupport", "6.0.3" -gem "actionview", "6.0.3" +gem "railties", "6.0.3" gem "mysql2", "~> 0.5.2" -gemspec :path => '../' +gemspec path: "../" diff --git a/gemfiles/rails6_0_4.gemfile b/gemfiles/rails6_0_4.gemfile index 9f8dc11b..56ef7a90 100644 --- a/gemfiles/rails6_0_4.gemfile +++ b/gemfiles/rails6_0_4.gemfile @@ -1,10 +1,12 @@ +# This file was generated by Appraisal + source "https://rubygems.org" gem "rails", "6.0.4" -gem "railties", "6.0.4" +gem "actionview", "6.0.4" gem "activerecord", "6.0.4" gem "activesupport", "6.0.4" -gem "actionview", "6.0.4" +gem "railties", "6.0.4" gem "mysql2", "~> 0.5.2" -gemspec :path => '../' +gemspec path: "../" diff --git a/gemfiles/rails6_0_5.gemfile b/gemfiles/rails6_0_5.gemfile index db427a79..c4d78a17 100644 --- a/gemfiles/rails6_0_5.gemfile +++ b/gemfiles/rails6_0_5.gemfile @@ -1,10 +1,12 @@ +# This file was generated by Appraisal + source "https://rubygems.org" gem "rails", "6.0.5" -gem "railties", "6.0.5" +gem "actionview", "6.0.5" gem "activerecord", "6.0.5" gem "activesupport", "6.0.5" -gem "actionview", "6.0.5" +gem "railties", "6.0.5" gem "mysql2", "~> 0.5.2" -gemspec :path => '../' +gemspec path: "../" diff --git a/gemfiles/rails6_0_6.gemfile b/gemfiles/rails6_0_6.gemfile index 83451a5f..f4ae1f04 100644 --- a/gemfiles/rails6_0_6.gemfile +++ b/gemfiles/rails6_0_6.gemfile @@ -1,10 +1,12 @@ +# This file was generated by Appraisal + source "https://rubygems.org" gem "rails", "6.0.6" -gem "railties", "6.0.6" +gem "actionview", "6.0.6" gem "activerecord", "6.0.6" gem "activesupport", "6.0.6" -gem "actionview", "6.0.6" +gem "railties", "6.0.6" gem "mysql2", "~> 0.5.2" -gemspec :path => '../' +gemspec path: "../" From 775cf329e4f2750cd08cb31fea07af0aa4ffeb86 Mon Sep 17 00:00:00 2001 From: Genki Sugawara Date: Fri, 15 Mar 2024 13:31:14 +0900 Subject: [PATCH 31/37] Update README: Add test section --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 62cb7932..86df9dde 100644 --- a/README.md +++ b/README.md @@ -700,6 +700,18 @@ raise_on_not_specified_shard_query true raise_on_not_specified_shard_update true ``` +## Run tests locally + +```sh +docker compose up -d +# rbenv shell 2.7.8 +bundle install +bundle exec appraisal install +export TEST_MYSQL_HOST=127.0.0.1 +export TEST_MYSQL_PORT=13306 +bundle exec appraisal rails6_0_6 rake spec +``` + ## Thanks ConnectionProxy, Distributed Migration implementation is inspired by Octopus and DataFabric. From 6663c68f681e49e8aa71012ff852f996d4a0b881 Mon Sep 17 00:00:00 2001 From: Genki Sugawara Date: Fri, 15 Mar 2024 13:42:14 +0900 Subject: [PATCH 32/37] Fix factory_bot version. cf. https://github.com/thoughtbot/factory_bot/issues/1614 --- activerecord-turntable.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord-turntable.gemspec b/activerecord-turntable.gemspec index 06d99a91..a2c75c60 100644 --- a/activerecord-turntable.gemspec +++ b/activerecord-turntable.gemspec @@ -33,7 +33,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency "barrage" spec.add_development_dependency "coveralls" spec.add_development_dependency "dalli", ">= 2.7" - spec.add_development_dependency "factory_bot" + spec.add_development_dependency "factory_bot", "6.4.4" spec.add_development_dependency "faker" spec.add_development_dependency "guard-rspec" spec.add_development_dependency "guard-rubocop" From 4b5eaef0d8f340474dbb09c93a7de3be93115337 Mon Sep 17 00:00:00 2001 From: Genki Sugawara Date: Fri, 15 Mar 2024 13:44:37 +0900 Subject: [PATCH 33/37] Fix bundler version for CI --- .github/workflows/test_ruby_2_4.yml | 2 +- .github/workflows/test_ruby_2_5.yml | 2 +- .github/workflows/test_ruby_2_6.yml | 2 +- .github/workflows/test_ruby_2_7.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_ruby_2_4.yml b/.github/workflows/test_ruby_2_4.yml index f7a458c4..d07c7480 100644 --- a/.github/workflows/test_ruby_2_4.yml +++ b/.github/workflows/test_ruby_2_4.yml @@ -21,7 +21,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '2.4' - bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1' || 'latest' }} + # bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1.17.3' || 'latest' }} bundler-cache: true - name: Start mysql run: sudo systemctl start mysql.service diff --git a/.github/workflows/test_ruby_2_5.yml b/.github/workflows/test_ruby_2_5.yml index 2b896307..91584196 100644 --- a/.github/workflows/test_ruby_2_5.yml +++ b/.github/workflows/test_ruby_2_5.yml @@ -22,7 +22,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '2.5' - bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1' || 'latest' }} + bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1.17.3' || 'latest' }} bundler-cache: true - name: Start mysql run: sudo systemctl start mysql.service diff --git a/.github/workflows/test_ruby_2_6.yml b/.github/workflows/test_ruby_2_6.yml index 5550cc74..a3f2c2ed 100644 --- a/.github/workflows/test_ruby_2_6.yml +++ b/.github/workflows/test_ruby_2_6.yml @@ -22,7 +22,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '2.6' - bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1' || 'latest' }} + bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1.17.3' || 'latest' }} bundler-cache: true - name: Start mysql run: sudo systemctl start mysql.service diff --git a/.github/workflows/test_ruby_2_7.yml b/.github/workflows/test_ruby_2_7.yml index 4f2df236..cba4367e 100644 --- a/.github/workflows/test_ruby_2_7.yml +++ b/.github/workflows/test_ruby_2_7.yml @@ -22,7 +22,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '2.7' - bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1' || 'latest' }} + bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1.17.3' || 'latest' }} bundler-cache: true - name: Start mysql run: sudo systemctl start mysql.service From e23e1d9300d3292528def42cf90c32339f8911fd Mon Sep 17 00:00:00 2001 From: Genki Sugawara Date: Fri, 15 Mar 2024 14:13:10 +0900 Subject: [PATCH 34/37] Fix factory_bot version --- activerecord-turntable.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord-turntable.gemspec b/activerecord-turntable.gemspec index a2c75c60..48033cd8 100644 --- a/activerecord-turntable.gemspec +++ b/activerecord-turntable.gemspec @@ -33,7 +33,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency "barrage" spec.add_development_dependency "coveralls" spec.add_development_dependency "dalli", ">= 2.7" - spec.add_development_dependency "factory_bot", "6.4.4" + spec.add_development_dependency "factory_bot", "<= 6.4.4" spec.add_development_dependency "faker" spec.add_development_dependency "guard-rspec" spec.add_development_dependency "guard-rubocop" From 7e9e4624109d04c328e30a95c88f636bcf643add Mon Sep 17 00:00:00 2001 From: Genki Sugawara Date: Fri, 15 Mar 2024 14:19:17 +0900 Subject: [PATCH 35/37] Fix ruby 2.4 CI: Add bundler param to setup-ruby --- .github/workflows/test_ruby_2_4.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_ruby_2_4.yml b/.github/workflows/test_ruby_2_4.yml index d07c7480..7762ccc3 100644 --- a/.github/workflows/test_ruby_2_4.yml +++ b/.github/workflows/test_ruby_2_4.yml @@ -21,7 +21,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: '2.4' - # bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1.17.3' || 'latest' }} + bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1.17.3' || 'latest' }} bundler-cache: true - name: Start mysql run: sudo systemctl start mysql.service From 5ea07519c21db92a34efc52d8348325c803e59b3 Mon Sep 17 00:00:00 2001 From: Genki Sugawara Date: Mon, 1 Apr 2024 12:41:54 +0900 Subject: [PATCH 36/37] Update README.md: Add NOTE to run appraisal --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 86df9dde..e475f22e 100644 --- a/README.md +++ b/README.md @@ -712,6 +712,9 @@ export TEST_MYSQL_PORT=13306 bundle exec appraisal rails6_0_6 rake spec ``` +> [!note] +> Ruby 2.3 or higher is required to run appraisal. + ## Thanks ConnectionProxy, Distributed Migration implementation is inspired by Octopus and DataFabric. From 7a5d3c52e08dd8de0e2c4dfabaac014920ebe1f9 Mon Sep 17 00:00:00 2001 From: Genki Sugawara Date: Tue, 2 Apr 2024 13:07:13 +0900 Subject: [PATCH 37/37] Fix annotation for appraisal --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e475f22e..2bfae1d4 100644 --- a/README.md +++ b/README.md @@ -713,7 +713,7 @@ bundle exec appraisal rails6_0_6 rake spec ``` > [!note] -> Ruby 2.3 or higher is required to run appraisal. +> Appraisal does not work on Ruby 2.2 or lower. ## Thanks