Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions spectacles.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 5 additions & 5 deletions test/support/schema_statement_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,34 +49,34 @@ 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
end

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|
Expand Down
Loading