diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7c5f13d..2c242d1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "2.7" + ruby-version: "3.1" bundler-cache: true - run: bundle exec standardrb --format github @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: [2.7, head, jruby-head] + ruby-version: [3.1, head, jruby-head] continue-on-error: ${{ endsWith(matrix.ruby-version, 'head') || matrix.ruby-version == 'debug' }} steps: - uses: actions/checkout@v4 @@ -42,7 +42,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: [2.7, head, jruby-head] + ruby-version: [3.1, head, jruby-head] continue-on-error: ${{ endsWith(matrix.ruby-version, 'head') || matrix.ruby-version == 'debug' }} services: @@ -76,7 +76,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: [2.7, head, jruby-head] + ruby-version: [3.1, head, jruby-head] continue-on-error: ${{ endsWith(matrix.ruby-version, 'head') || matrix.ruby-version == 'debug' }} services: @@ -117,7 +117,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: [2.7, head, jruby-head] + ruby-version: [3.1, head, jruby-head] continue-on-error: ${{ endsWith(matrix.ruby-version, 'head') || matrix.ruby-version == 'debug' }} env: diff --git a/spectacles.gemspec b/spectacles.gemspec index 6c37532..d50e5d1 100644 --- a/spectacles.gemspec +++ b/spectacles.gemspec @@ -31,8 +31,8 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_dependency "activerecord", "~> 7.1.0" - spec.add_dependency "activesupport", "~> 7.1.0" + spec.add_dependency "activerecord", "~> 7.2.0" + spec.add_dependency "activesupport", "~> 7.2.0" spec.add_development_dependency "minitest", ">= 5.0" spec.add_development_dependency "rake" diff --git a/test/support/schema_statement_examples.rb b/test/support/schema_statement_examples.rb index 29b6cdc..788f22e 100644 --- a/test/support/schema_statement_examples.rb +++ b/test/support/schema_statement_examples.rb @@ -49,26 +49,26 @@ def self.execute(query) it "should return create_view in dump stream" do stream = StringIO.new - ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, stream) + ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection_pool, stream) _(stream.string).must_match(/create_view/) end if ActiveRecord::Base.connection.supports_materialized_views? it "should return create_materialized_view in dump stream" do stream = StringIO.new - ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, stream) + ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection_pool, stream) _(stream.string).must_match(/create_materialized_view/) end it "should return add_index in dump stream" do stream = StringIO.new - ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, stream) + ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection_pool, stream) _(stream.string).must_match(/add_index/) end it "should include options for create_materialized_view" do stream = StringIO.new - ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, stream) + ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection_pool, stream) _(stream.string).must_match(/create_materialized_view.*fillfactor: 50/) _(stream.string).must_match(/create_materialized_view.*data: false/) end @@ -76,7 +76,7 @@ def self.execute(query) it "should rebuild views in dump stream" do stream = StringIO.new - ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection, stream) + ActiveRecord::SchemaDumper.dump(ActiveRecord::Base.connection_pool, stream) if ActiveRecord::Base.connection.supports_materialized_views? ActiveRecord::Base.connection.materialized_views.each do |view|