database_cleaner-sequel 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ba0b85c908c1b8e2a4f9e5dc3929503e668b274bf0dbdc9f8325f04beba4617
4
- data.tar.gz: aa17280bb426baea132843cae876444c26f8a07d558e51a1914a5ac6eebc927b
3
+ metadata.gz: 7d5e1b976965361003dac738c45cd13b41b7ab2ff7c548b9a5a004f6cbc1589b
4
+ data.tar.gz: 4143a0a5dec83406b5c4fabde365be5b2de27de9f61e5b8d854b58ce48cc2f1c
5
5
  SHA512:
6
- metadata.gz: 19fa8eb6abc7692c7b794d95aa2ebf3e7a50ca46454d811dcab1e78a04a70b98823957a1625cd7ae872f054b487dcfab00d02e47c5db71b0fa076e088fe05d8c
7
- data.tar.gz: 6267fcee3c62ddfa27829885ac6422a24df7a53e1c608716638090d7eced6a6ed0ddc5731a89e01743599415c697d040e4d06d7cc4d71bd295a348b1485d9ccf
6
+ metadata.gz: fbc931ec41104f66d5b621be99a3442facbf6f97b3d5f159d169f7bf551074943987e7892c6377e56b789aade7167e2feb07472b7a66f79518ec8dd370272fb1
7
+ data.tar.gz: a20490aca31f92f62875e73eef268923ec2aa4f77320018ec074ba5ff9678756f9f190c776afb588e11ab42e3a0777ba2a92aa949bc5a9ba68ab13bbdaa0e559
data/README.md CHANGED
@@ -50,10 +50,10 @@ The truncation and deletion strategies may accept the following options:
50
50
 
51
51
  ```ruby
52
52
  # Only truncate the "users" table.
53
- DatabaseCleaner[:sequel].strategy = :truncation, { only: ["users"] }
53
+ DatabaseCleaner[:sequel].strategy = :truncation, only: ["users"]
54
54
 
55
55
  # Delete all tables except the "users" table.
56
- DatabaseCleaner[:sequel].strategy = :deletion, { except: ["users"] }
56
+ DatabaseCleaner[:sequel].strategy = :deletion, except: ["users"]
57
57
  ```
58
58
 
59
59
  * `:pre_count` - When set to `true`, this will check each table for existing rows before truncating or deleting it. This can speed up test suites when many of the tables are never populated. Defaults to `false`.
@@ -70,8 +70,8 @@ DatabaseCleaner[:sequel].db = Sequel.connect(uri)
70
70
  DatabaseCleaner[:sequel].db = :default
71
71
 
72
72
  # Multiple Sequel databases can be specified:
73
- DatabaseCleaner[:sequel, connection: :default]
74
- DatabaseCleaner[:sequel, connection: Sequel.connect(uri)]
73
+ DatabaseCleaner[:sequel, db: :default]
74
+ DatabaseCleaner[:sequel, db: Sequel.connect(uri)]
75
75
  ```
76
76
  ## COPYRIGHT
77
77
 
@@ -3,10 +3,10 @@ require 'database_cleaner/sequel/base'
3
3
  module DatabaseCleaner
4
4
  module Sequel
5
5
  class Truncation < Base
6
- def initialize only: [], except: [], pre_count: false
7
- @only = only
8
- @except = except
9
- @pre_count = pre_count
6
+ def initialize(opts)
7
+ @only = opts[:only] || []
8
+ @except = opts[:except] || []
9
+ @pre_count = opts[:pre_count] || false
10
10
  end
11
11
 
12
12
  def start
@@ -1,5 +1,5 @@
1
1
  module DatabaseCleaner
2
2
  module Sequel
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_cleaner-sequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernesto Tagwerker
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-01-31 00:00:00.000000000 Z
12
+ date: 2022-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: database_cleaner-core
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  - !ruby/object:Gem::Version
170
170
  version: '0'
171
171
  requirements: []
172
- rubygems_version: 3.0.3
172
+ rubygems_version: 3.0.3.1
173
173
  signing_key:
174
174
  specification_version: 4
175
175
  summary: Strategies for cleaning databases using Sequel. Can be used to ensure a clean