database_cleaner-core 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 +4 -4
- data/History.rdoc +5 -0
- data/README.markdown +0 -5
- data/lib/database_cleaner/cleaner.rb +0 -2
- data/lib/database_cleaner/cleaners.rb +5 -0
- data/lib/database_cleaner/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18c8581390417b7c13ced7c7c1eb2523c59781da7af79895123f8dce59fd3300
|
4
|
+
data.tar.gz: c49e269f3076f76844de409a8eb3204f56c2d6642827ed94df4b870a05e1ffc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb77117488c70781ac3a2a15006d3230de50ac3b99ca76050fc9b3e198774d64f084d9bf5346ebfb2a9ecb9ae3ca97951a7b7b23029b6fc46c6b136bb7e4018f
|
7
|
+
data.tar.gz: 9458f5f9bf76bd766e294a2cee7c53779ea03782913215a3a89d4aade7c604d454437717bef53a52c2fc32a36f805e5c03cfa9c4bd981204b0d06a0ee206d33c
|
data/History.rdoc
CHANGED
data/README.markdown
CHANGED
@@ -1,8 +1,3 @@
|
|
1
|
-
**If you're viewing this at https://github.com/DatabaseCleaner/database_cleaner,
|
2
|
-
you're reading the documentation for the `master` branch.
|
3
|
-
[View documentation for the latest release
|
4
|
-
(1.8.5).](https://github.com/DatabaseCleaner/database_cleaner/blob/v1.8.5/README.markdown)**
|
5
|
-
|
6
1
|
# Database Cleaner
|
7
2
|
|
8
3
|
[![Build Status](https://travis-ci.org/DatabaseCleaner/database_cleaner.svg?branch=master)](https://travis-ci.org/DatabaseCleaner/database_cleaner)
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'database_cleaner/null_strategy'
|
2
|
-
require 'database_cleaner/safeguard'
|
3
2
|
require 'database_cleaner/strategy'
|
4
3
|
require 'forwardable'
|
5
4
|
|
@@ -28,7 +27,6 @@ module DatabaseCleaner
|
|
28
27
|
def initialize(orm, db: nil)
|
29
28
|
@orm = orm
|
30
29
|
self.db = db
|
31
|
-
Safeguard.new.run
|
32
30
|
end
|
33
31
|
|
34
32
|
attr_reader :orm
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'database_cleaner/cleaner'
|
2
|
+
require 'database_cleaner/safeguard'
|
2
3
|
|
3
4
|
module DatabaseCleaner
|
4
5
|
class Cleaners < Hash
|
@@ -18,20 +19,24 @@ module DatabaseCleaner
|
|
18
19
|
end
|
19
20
|
|
20
21
|
def start
|
22
|
+
Safeguard.new.run
|
21
23
|
values.each { |cleaner| cleaner.start }
|
22
24
|
end
|
23
25
|
|
24
26
|
def clean
|
27
|
+
Safeguard.new.run
|
25
28
|
values.each { |cleaner| cleaner.clean }
|
26
29
|
end
|
27
30
|
|
28
31
|
def cleaning(&inner_block)
|
32
|
+
Safeguard.new.run
|
29
33
|
values.inject(inner_block) do |curr_block, cleaner|
|
30
34
|
proc { cleaner.cleaning(&curr_block) }
|
31
35
|
end.call
|
32
36
|
end
|
33
37
|
|
34
38
|
def clean_with(*args)
|
39
|
+
Safeguard.new.run
|
35
40
|
values.each { |cleaner| cleaner.clean_with(*args) }
|
36
41
|
end
|
37
42
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: database_cleaner-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Mabey
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
|
-
rubygems_version: 3.0.
|
211
|
+
rubygems_version: 3.0.3
|
212
212
|
signing_key:
|
213
213
|
specification_version: 4
|
214
214
|
summary: Strategies for cleaning databases. Can be used to ensure a clean slate for
|