mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
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:
commit
0ff5d014f5
3 changed files with 6 additions and 6 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -9,6 +9,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ruby-version:
|
ruby-version:
|
||||||
|
- '3.2'
|
||||||
- '3.1'
|
- '3.1'
|
||||||
- '3.0'
|
- '3.0'
|
||||||
- '2.7'
|
- '2.7'
|
||||||
|
@ -27,7 +28,7 @@ jobs:
|
||||||
- 6379:6379
|
- 6379:6379
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Ruby ${{ matrix.ruby-version }}
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -53,12 +53,11 @@ module DatabaseCleaner
|
||||||
|
|
||||||
def remote?(url)
|
def remote?(url)
|
||||||
return false unless url
|
return false unless url
|
||||||
|
|
||||||
parsed = URI.parse(url)
|
parsed = URI.parse(url)
|
||||||
return false if parsed.scheme == 'sqlite3:'
|
return false if parsed.scheme == 'sqlite3:'
|
||||||
|
|
||||||
host = parsed.host
|
host = parsed.host
|
||||||
return false unless host
|
return false if host.nil? || host.empty?
|
||||||
return false if LOCAL.include?(host)
|
return false if LOCAL.include?(host)
|
||||||
return false if host.end_with? '.local'
|
return false if host.end_with? '.local'
|
||||||
true
|
true
|
||||||
|
|
|
@ -98,7 +98,7 @@ module DatabaseCleaner
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should pass all arguments to strategy initializer" do
|
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)
|
expect(strategy).to receive(:clean)
|
||||||
cleaner.clean_with :truncation, :dollar, :amet, ipsum: "random"
|
cleaner.clean_with :truncation, :dollar, :amet, ipsum: "random"
|
||||||
end
|
end
|
||||||
|
@ -145,12 +145,12 @@ module DatabaseCleaner
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should proxy params with symbolised strategies in an array" do
|
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"]
|
cleaner.strategy = [:truncation, param: "one"]
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should proxy params with symbolised strategies in a separate hash" do
|
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" }
|
cleaner.strategy = :truncation, { param: "one" }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue