database_cleaner-sequel 2.0.0.beta → 2.0.2

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: e24b91d918b8069ebdd520d9c18819dd4510bf86be4e4c57f5fdc5b4db0139ab
4
- data.tar.gz: 24f698fd0cbc73c3fddcd880ff19113ef9fbc18e8bfe55239ed1dd5e2dc6fefb
3
+ metadata.gz: 640dc9a9fc652d82f4c1e14837648cac2bd9346ddfd6bd12a87a2f67e1008f87
4
+ data.tar.gz: b3938c9b01e1b8975d92d39bde27d9fc4c6af2649020a1335f50648636a510d2
5
5
  SHA512:
6
- metadata.gz: 59e1da73beffd21c0cb434a9ff1652843163e93c49c243ae74557ee719724c3ace97efdd89d8745b0bb98101e9215550841cdf107bb6e6e419f84ed504267ee4
7
- data.tar.gz: 446c42ee8814a6ad9bbb72cfb1ef712af626d33adf3a76e4d05ada473615663f09ac00d74fb5cf5ea06cbc31be83d0dd295fae23948ca68fa4cca9fcf7aff3d0
6
+ metadata.gz: 5070f411181f2d1085342f7288193b3e04c600858da0bd0895c5368aa41447c6ed818d5dad9888a7bd3363c7e70be7bcf8bc01835a377582eaf261058f0cd03e
7
+ data.tar.gz: b5844519977037d3e685df0ebc1b0888eede7a3a54e5ab6c78c3cf9aabce1b9d538d8dab46273b3db766c5eca0efacb2ace654a0b1d64751704769e5b6a7193d
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
 
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "database_cleaner-core", "~>2.0.0.beta2"
21
+ spec.add_dependency "database_cleaner-core", "~>2.0.0"
22
22
  spec.add_dependency "sequel"
23
23
 
24
24
  spec.add_development_dependency "bundler"
@@ -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.beta"
3
+ VERSION = "2.0.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: database_cleaner-sequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernesto Tagwerker
8
8
  - Micah Geisel
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-05-30 00:00:00.000000000 Z
12
+ date: 2022-03-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: database_cleaner-core
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: 2.0.0.beta2
20
+ version: 2.0.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: 2.0.0.beta2
27
+ version: 2.0.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: sequel
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -154,7 +154,7 @@ homepage: https://github.com/DatabaseCleaner/database_cleaner-sequel
154
154
  licenses:
155
155
  - MIT
156
156
  metadata: {}
157
- post_install_message:
157
+ post_install_message:
158
158
  rdoc_options: []
159
159
  require_paths:
160
160
  - lib
@@ -165,12 +165,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  requirements:
168
- - - ">"
168
+ - - ">="
169
169
  - !ruby/object:Gem::Version
170
- version: 1.3.1
170
+ version: '0'
171
171
  requirements: []
172
- rubygems_version: 3.0.3
173
- signing_key:
172
+ rubygems_version: 3.1.3
173
+ signing_key:
174
174
  specification_version: 4
175
175
  summary: Strategies for cleaning databases using Sequel. Can be used to ensure a clean
176
176
  state for testing.