Merge pull request #697 from petergoldstein/feature/add_ruby_3_2_to_ci

Add Ruby 3.2 to the CI matrix
This commit is contained in:
Ernesto Tagwerker 2023-01-26 12:02:18 -05:00 committed by GitHub
commit 0ff5d014f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -9,6 +9,7 @@ jobs:
strategy:
matrix:
ruby-version:
- '3.2'
- '3.1'
- '3.0'
- '2.7'
@ -27,7 +28,7 @@ jobs:
- 6379:6379
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:

View file

@ -53,12 +53,11 @@ module DatabaseCleaner
def remote?(url)
return false unless url
parsed = URI.parse(url)
return false if parsed.scheme == 'sqlite3:'
host = parsed.host
return false unless host
return false if host.nil? || host.empty?
return false if LOCAL.include?(host)
return false if host.end_with? '.local'
true

View file

@ -98,7 +98,7 @@ module DatabaseCleaner
end
it "should pass all arguments to strategy initializer" do
expect(strategy_class).to receive(:new).with(:dollar, :amet, ipsum: "random").and_return(strategy)
expect(strategy_class).to receive(:new).with(:dollar, :amet, { ipsum: "random" }).and_return(strategy)
expect(strategy).to receive(:clean)
cleaner.clean_with :truncation, :dollar, :amet, ipsum: "random"
end
@ -145,12 +145,12 @@ module DatabaseCleaner
end
it "should proxy params with symbolised strategies in an array" do
expect(strategy_class).to receive(:new).with(param: "one")
expect(strategy_class).to receive(:new).with({ param: "one" })
cleaner.strategy = [:truncation, param: "one"]
end
it "should proxy params with symbolised strategies in a separate hash" do
expect(strategy_class).to receive(:new).with(param: "one")
expect(strategy_class).to receive(:new).with({ param: "one" })
cleaner.strategy = :truncation, { param: "one" }
end