From d578a7a680062d37db5e81de61f7337206a3e9e9 Mon Sep 17 00:00:00 2001 From: Rustam Safin Date: Fri, 8 Nov 2024 20:19:42 +0400 Subject: [PATCH 1/5] Rails 8 --- activerecord-postgis-adapter.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord-postgis-adapter.gemspec b/activerecord-postgis-adapter.gemspec index c256c562..53cf6952 100644 --- a/activerecord-postgis-adapter.gemspec +++ b/activerecord-postgis-adapter.gemspec @@ -18,9 +18,9 @@ Gem::Specification.new do |spec| spec.platform = Gem::Platform::RUBY # ruby-lang.org/en/downloads/branches - spec.required_ruby_version = ">= 3.1.0" + spec.required_ruby_version = ">= 3.2.0" - spec.add_dependency "activerecord", "~> 7.2.0" + spec.add_dependency "activerecord", "~> 8.0.0" spec.add_dependency "rgeo-activerecord", "~> 8.0.0" spec.add_development_dependency "rake", "~> 13.0" From 97bf3f6fdaa06383a4b2076172366efedc2f97f2 Mon Sep 17 00:00:00 2001 From: Rustam Safin Date: Mon, 11 Nov 2024 23:46:52 +0400 Subject: [PATCH 2/5] Fixed test --- test/database.yml | 3 --- .../ConnectionAdapters/RegistrationIsolatedTest.rb | 1 + test/excludes/CounterCacheTest.rb | 4 ++-- test/excludes/SchemaDumperTest.rb | 3 +++ 4 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 test/excludes/ActiveRecord/ConnectionAdapters/RegistrationIsolatedTest.rb diff --git a/test/database.yml b/test/database.yml index b7980531..cda9c85b 100644 --- a/test/database.yml +++ b/test/database.yml @@ -7,7 +7,6 @@ connections: username: <%= ENV["PGUSER"] || "postgres" %> password: <%= ENV["PGPASSWORD"] || "" %> setup: default - schema_search_path: public arunit2: host: <%= ENV["PGHOST"] || "127.0.0.1" %> port: <%= ENV["PGPORT"] || "5432" %> @@ -15,7 +14,6 @@ connections: username: <%= ENV["PGUSER"] || "postgres" %> password: <%= ENV["PGPASSWORD"] || "" %> setup: default - schema_search_path: public arunit_without_prepared_statements: min_messages: warning prepared_statements: false @@ -25,4 +23,3 @@ connections: username: <%= ENV["PGUSER"] || "postgres" %> password: <%= ENV["PGPASSWORD"] || "" %> setup: default - schema_search_path: public diff --git a/test/excludes/ActiveRecord/ConnectionAdapters/RegistrationIsolatedTest.rb b/test/excludes/ActiveRecord/ConnectionAdapters/RegistrationIsolatedTest.rb new file mode 100644 index 00000000..88e23318 --- /dev/null +++ b/test/excludes/ActiveRecord/ConnectionAdapters/RegistrationIsolatedTest.rb @@ -0,0 +1 @@ +exclude "test_#resolve_raises_if_the_adapter_is_using_the_pre_7.2_adapter_registration_API", TRIAGE_MSG diff --git a/test/excludes/CounterCacheTest.rb b/test/excludes/CounterCacheTest.rb index 6082c131..b8407c20 100644 --- a/test/excludes/CounterCacheTest.rb +++ b/test/excludes/CounterCacheTest.rb @@ -30,7 +30,7 @@ exclude "test_decrement_counter", TRIAGE_MSG exclude "test_reset_counters_with_touch:_true", TRIAGE_MSG exclude "test_reset_the_right_counter_if_two_have_the_same_foreign_key", TRIAGE_MSG -exclude "test_inactive_conter_cache", TRIAGE_MSG +exclude "test_inactive_counter_cache", TRIAGE_MSG exclude "test_update_counters_of_multiple_records", TRIAGE_MSG exclude "test_counters_are_updated_both_in_memory_and_in_the_database_on_create", TRIAGE_MSG exclude "test_update_counter_with_initial_null_value", TRIAGE_MSG @@ -47,7 +47,7 @@ exclude "test_reset_counters_with_touch:_:written_on", TRIAGE_MSG exclude "test_reset_counters_for_cpk_model", TRIAGE_MSG exclude "test_reset_the_right_counter_if_two_have_the_same_class_name", TRIAGE_MSG -exclude "test_active_conter_cache", TRIAGE_MSG +exclude "test_active_counter_cache", TRIAGE_MSG exclude "test_increment_counters_with_touch:_:written_on", TRIAGE_MSG exclude "test_update_multiple_counters_with_touch:_:written_on", TRIAGE_MSG exclude "test_counter_cache_column?", TRIAGE_MSG diff --git a/test/excludes/SchemaDumperTest.rb b/test/excludes/SchemaDumperTest.rb index fc09d7ab..28c51345 100644 --- a/test/excludes/SchemaDumperTest.rb +++ b/test/excludes/SchemaDumperTest.rb @@ -1,2 +1,5 @@ exclude "test_schema_dump_with_timestamptz_datetime_format", TRIAGE_MSG exclude "test_schema_dump_when_changing_datetime_type_for_an_existing_app", TRIAGE_MSG +if ActiveRecord::Base.lease_connection.pool.server_version(ActiveRecord::Base.lease_connection) < 15_00_00 + exclude "test_schema_dumps_unique_constraints", TRIAGE_MSG +end From d16dac81a093d07cffdfe799eb1c6baf04a78c8a Mon Sep 17 00:00:00 2001 From: Tee Parham Date: Fri, 13 Dec 2024 10:23:35 -0700 Subject: [PATCH 3/5] Update .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c39dc6ab..41742579 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,6 @@ Gemfile.lock /travis/*.lock /test/database_local.yml .idea -debug.log +debug.log* /test/db/* +/test/storage/ From 24bb5c01650d3acbaa8c07d1daf93cc1c6aca723 Mon Sep 17 00:00:00 2001 From: Tee Parham Date: Fri, 13 Dec 2024 10:28:49 -0700 Subject: [PATCH 4/5] Remove ruby 3.1 from CI test matrix --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b9c5e80d..9311050a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,7 +44,7 @@ jobs: fail-fast: false matrix: # https://ruby-lang.org/en/downloads/branches - ruby: ["3.3", "3.2", "3.1"] + ruby: ["3.3", "3.2"] # https://www.postgresql.org/support/versioning/ pg: [12-master, 13-master, 14-master, 15-master, 16-master] steps: From 038c0bfb98fafff6314f145f8d26f453f76791eb Mon Sep 17 00:00:00 2001 From: Rafael Santos Date: Mon, 30 Dec 2024 21:14:04 +1300 Subject: [PATCH 5/5] skip false failure schema dump is working fine. postgis just adds another foreign key entry in the dump within the boundary active records spec uses in the regex to test their case but the actual test would still be valid. added entry: ``` add_foreign_key "layer", "topology", name: "layer_topology_id_fkey" ``` --- test/excludes/SchemaDumperTest.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/excludes/SchemaDumperTest.rb b/test/excludes/SchemaDumperTest.rb index 28c51345..175a01b4 100644 --- a/test/excludes/SchemaDumperTest.rb +++ b/test/excludes/SchemaDumperTest.rb @@ -3,3 +3,4 @@ if ActiveRecord::Base.lease_connection.pool.server_version(ActiveRecord::Base.lease_connection) < 15_00_00 exclude "test_schema_dumps_unique_constraints", TRIAGE_MSG end +exclude "test_foreign_keys_are_dumped_at_the_bottom_to_circumvent_dependency_issues", TRIAGE_MSG