database_cleaner 1.7.0 → 1.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTE.markdown +1 -2
- data/Gemfile.lock +130 -91
- data/History.rdoc +45 -1
- data/README.markdown +74 -226
- data/Rakefile +12 -8
- data/adapters/database_cleaner-active_record/lib/database_cleaner-active_record.rb +1 -0
- data/adapters/database_cleaner-active_record/lib/database_cleaner/active_record.rb +6 -0
- data/{lib → adapters/database_cleaner-active_record/lib}/database_cleaner/active_record/base.rb +13 -4
- data/{lib → adapters/database_cleaner-active_record/lib}/database_cleaner/active_record/deletion.rb +19 -19
- data/{lib → adapters/database_cleaner-active_record/lib}/database_cleaner/active_record/transaction.rb +0 -0
- data/{lib → adapters/database_cleaner-active_record/lib}/database_cleaner/active_record/truncation.rb +25 -20
- data/adapters/database_cleaner-active_record/lib/database_cleaner/active_record/version.rb +5 -0
- data/adapters/database_cleaner-couch_potato/lib/database_cleaner-couch_potato.rb +1 -0
- data/adapters/database_cleaner-couch_potato/lib/database_cleaner/couch_potato.rb +11 -0
- data/{lib → adapters/database_cleaner-couch_potato/lib}/database_cleaner/couch_potato/base.rb +0 -0
- data/{lib → adapters/database_cleaner-couch_potato/lib}/database_cleaner/couch_potato/truncation.rb +0 -0
- data/adapters/database_cleaner-couch_potato/lib/database_cleaner/couch_potato/version.rb +5 -0
- data/adapters/database_cleaner-data_mapper/lib/database_cleaner-data_mapper.rb +1 -0
- data/adapters/database_cleaner-data_mapper/lib/database_cleaner/data_mapper.rb +4 -0
- data/{lib → adapters/database_cleaner-data_mapper/lib}/database_cleaner/data_mapper/base.rb +4 -0
- data/{lib → adapters/database_cleaner-data_mapper/lib}/database_cleaner/data_mapper/transaction.rb +0 -0
- data/{lib → adapters/database_cleaner-data_mapper/lib}/database_cleaner/data_mapper/truncation.rb +4 -3
- data/adapters/database_cleaner-data_mapper/lib/database_cleaner/data_mapper/version.rb +5 -0
- data/adapters/database_cleaner-mongo/lib/database_cleaner-mongo.rb +1 -0
- data/adapters/database_cleaner-mongo/lib/database_cleaner/mongo.rb +10 -0
- data/{lib → adapters/database_cleaner-mongo/lib}/database_cleaner/mongo/base.rb +0 -0
- data/{lib → adapters/database_cleaner-mongo/lib}/database_cleaner/mongo/truncation.rb +2 -0
- data/{lib → adapters/database_cleaner-mongo/lib}/database_cleaner/mongo/truncation_mixin.rb +0 -0
- data/adapters/database_cleaner-mongo/lib/database_cleaner/mongo/version.rb +5 -0
- data/adapters/database_cleaner-mongo_mapper/lib/database_cleaner-mongo_mapper.rb +1 -0
- data/adapters/database_cleaner-mongo_mapper/lib/database_cleaner/mongo_mapper.rb +4 -0
- data/{lib → adapters/database_cleaner-mongo_mapper/lib}/database_cleaner/mongo_mapper/base.rb +4 -0
- data/adapters/database_cleaner-mongo_mapper/lib/database_cleaner/mongo_mapper/truncation.rb +35 -0
- data/adapters/database_cleaner-mongo_mapper/lib/database_cleaner/mongo_mapper/version.rb +5 -0
- data/adapters/database_cleaner-mongoid/lib/database_cleaner-mongoid.rb +1 -0
- data/adapters/database_cleaner-mongoid/lib/database_cleaner/mongoid.rb +10 -0
- data/{lib → adapters/database_cleaner-mongoid/lib}/database_cleaner/mongoid/base.rb +0 -0
- data/adapters/database_cleaner-mongoid/lib/database_cleaner/mongoid/mongo1_truncation_mixin.rb +26 -0
- data/{lib/database_cleaner/mongo2/truncation_mixin.rb → adapters/database_cleaner-mongoid/lib/database_cleaner/mongoid/mongo2_truncation_mixin.rb} +3 -4
- data/adapters/database_cleaner-mongoid/lib/database_cleaner/mongoid/mongoid_truncation_mixin.rb +65 -0
- data/{lib → adapters/database_cleaner-mongoid/lib}/database_cleaner/mongoid/truncation.rb +6 -6
- data/adapters/database_cleaner-mongoid/lib/database_cleaner/mongoid/version.rb +5 -0
- data/adapters/database_cleaner-moped/lib/database_cleaner-moped.rb +1 -0
- data/adapters/database_cleaner-moped/lib/database_cleaner/moped.rb +10 -0
- data/{lib → adapters/database_cleaner-moped/lib}/database_cleaner/moped/base.rb +1 -1
- data/{lib → adapters/database_cleaner-moped/lib}/database_cleaner/moped/truncation.rb +0 -0
- data/{lib → adapters/database_cleaner-moped/lib}/database_cleaner/moped/truncation_base.rb +4 -0
- data/adapters/database_cleaner-moped/lib/database_cleaner/moped/version.rb +5 -0
- data/adapters/database_cleaner-neo4j/lib/database_cleaner-neo4j.rb +1 -0
- data/adapters/database_cleaner-neo4j/lib/database_cleaner/neo4j.rb +6 -0
- data/{lib → adapters/database_cleaner-neo4j/lib}/database_cleaner/neo4j/base.rb +4 -0
- data/{lib → adapters/database_cleaner-neo4j/lib}/database_cleaner/neo4j/deletion.rb +0 -0
- data/{lib → adapters/database_cleaner-neo4j/lib}/database_cleaner/neo4j/transaction.rb +0 -0
- data/{lib → adapters/database_cleaner-neo4j/lib}/database_cleaner/neo4j/truncation.rb +0 -0
- data/adapters/database_cleaner-neo4j/lib/database_cleaner/neo4j/version.rb +5 -0
- data/adapters/database_cleaner-ohm/lib/database_cleaner-ohm.rb +1 -0
- data/adapters/database_cleaner-ohm/lib/database_cleaner/ohm.rb +12 -0
- data/adapters/database_cleaner-ohm/lib/database_cleaner/ohm/truncation.rb +24 -0
- data/adapters/database_cleaner-ohm/lib/database_cleaner/ohm/version.rb +5 -0
- data/adapters/database_cleaner-redis/lib/database_cleaner-redis.rb +1 -0
- data/adapters/database_cleaner-redis/lib/database_cleaner/redis.rb +4 -0
- data/{lib → adapters/database_cleaner-redis/lib}/database_cleaner/redis/base.rb +4 -0
- data/{lib → adapters/database_cleaner-redis/lib}/database_cleaner/redis/truncation.rb +0 -0
- data/adapters/database_cleaner-redis/lib/database_cleaner/redis/version.rb +5 -0
- data/adapters/database_cleaner-sequel/lib/database_cleaner-sequel.rb +1 -0
- data/adapters/database_cleaner-sequel/lib/database_cleaner/sequel.rb +6 -0
- data/{lib → adapters/database_cleaner-sequel/lib}/database_cleaner/sequel/base.rb +4 -0
- data/{lib → adapters/database_cleaner-sequel/lib}/database_cleaner/sequel/deletion.rb +0 -0
- data/{lib → adapters/database_cleaner-sequel/lib}/database_cleaner/sequel/transaction.rb +0 -0
- data/{lib → adapters/database_cleaner-sequel/lib}/database_cleaner/sequel/truncation.rb +16 -15
- data/adapters/database_cleaner-sequel/lib/database_cleaner/sequel/version.rb +5 -0
- data/lib/database_cleaner.rb +36 -1
- data/lib/database_cleaner/base.rb +92 -105
- data/lib/database_cleaner/configuration.rb +87 -83
- data/lib/database_cleaner/deprecation.rb +26 -0
- data/lib/database_cleaner/null_strategy.rb +6 -6
- data/lib/database_cleaner/orm_autodetector.rb +41 -0
- data/lib/database_cleaner/safeguard.rb +38 -3
- data/lib/database_cleaner/spec.rb +2 -0
- data/lib/database_cleaner/spec/database_helper.rb +82 -0
- data/lib/database_cleaner/spec/shared_examples.rb +15 -0
- data/lib/database_cleaner/version.rb +3 -0
- metadata +111 -44
- data/VERSION.yml +0 -4
- data/lib/database_cleaner/mongo2/base.rb +0 -16
- data/lib/database_cleaner/mongo_mapper/truncation.rb +0 -19
- data/lib/database_cleaner/ohm/truncation.rb +0 -15
@@ -0,0 +1,26 @@
|
|
1
|
+
module DatabaseCleaner
|
2
|
+
def deprecate message
|
3
|
+
method = caller.first[/\d+:in `(.*)'$/, 1].to_sym
|
4
|
+
@@deprecator ||= Deprecator.new
|
5
|
+
@@deprecator.deprecate method, message
|
6
|
+
end
|
7
|
+
module_function :deprecate
|
8
|
+
|
9
|
+
def called_externally?(file, caller)
|
10
|
+
file != caller.first[/^(.+\.rb):\d+/, 1]
|
11
|
+
end
|
12
|
+
module_function :called_externally?
|
13
|
+
|
14
|
+
class Deprecator
|
15
|
+
def initialize
|
16
|
+
@methods_already_warned = {}
|
17
|
+
end
|
18
|
+
|
19
|
+
def deprecate method, message
|
20
|
+
return if @methods_already_warned.key?(method)
|
21
|
+
$stderr.puts message
|
22
|
+
@methods_already_warned[method] = true
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
@@ -1,18 +1,18 @@
|
|
1
1
|
module DatabaseCleaner
|
2
2
|
class NullStrategy
|
3
|
-
def
|
3
|
+
def start
|
4
4
|
# no-op
|
5
5
|
end
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
def db=(connection)
|
8
|
+
# no-op
|
9
|
+
end
|
10
10
|
|
11
|
-
def
|
11
|
+
def clean
|
12
12
|
# no-op
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
15
|
+
def cleaning(&block)
|
16
16
|
# no-op
|
17
17
|
yield
|
18
18
|
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module DatabaseCleaner
|
2
|
+
class ORMAutodetector
|
3
|
+
ORMS = {
|
4
|
+
active_record: "ActiveRecord",
|
5
|
+
data_mapper: "DataMapper",
|
6
|
+
mongo_mapper: "MongoMapper",
|
7
|
+
mongoid: "Mongoid",
|
8
|
+
mongo: "Mongo",
|
9
|
+
couch_potato: "CouchPotato",
|
10
|
+
sequel: "Sequel",
|
11
|
+
moped: "Moped",
|
12
|
+
ohm: "Ohm",
|
13
|
+
redis: "Redis",
|
14
|
+
neo4j: "Neo4j",
|
15
|
+
}
|
16
|
+
|
17
|
+
def orm
|
18
|
+
@autodetected = true
|
19
|
+
autodetected_orm or raise no_orm_detected_error
|
20
|
+
ORMS.key(autodetected_orm.to_s)
|
21
|
+
end
|
22
|
+
|
23
|
+
def autodetected?
|
24
|
+
!!@autodetected
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def autodetected_orm
|
30
|
+
ORMS.values.find do |orm|
|
31
|
+
Kernel.const_get(orm) rescue next
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def no_orm_detected_error
|
36
|
+
orm_list = ORMS.values.join(", ").sub(ORMS.values.last, "or #{ORMS.values.last}")
|
37
|
+
NoORMDetected.new("No known ORM was detected! Is #{orm_list} loaded?")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
private_constant :ORMAutodetector
|
41
|
+
end
|
@@ -12,8 +12,32 @@ module DatabaseCleaner
|
|
12
12
|
super("ENV['#{env}'] is set to production. Please refer to https://github.com/DatabaseCleaner/database_cleaner#safeguards")
|
13
13
|
end
|
14
14
|
end
|
15
|
+
|
16
|
+
class NotWhitelistedUrl < Error
|
17
|
+
def initialize
|
18
|
+
super("ENV['DATABASE_URL'] is set to a URL that is not on the whitelist. Please refer to https://github.com/DatabaseCleaner/database_cleaner#safeguards")
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
class WhitelistedUrl
|
24
|
+
def run
|
25
|
+
return if skip?
|
26
|
+
raise Error::NotWhitelistedUrl if database_url_not_whitelisted?
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def database_url_not_whitelisted?
|
32
|
+
!DatabaseCleaner.url_whitelist.include?(ENV['DATABASE_URL'])
|
33
|
+
end
|
34
|
+
|
35
|
+
def skip?
|
36
|
+
!DatabaseCleaner.url_whitelist
|
37
|
+
end
|
15
38
|
end
|
16
39
|
|
40
|
+
|
17
41
|
class RemoteDatabaseUrl
|
18
42
|
LOCAL = %w(localhost 127.0.0.1)
|
19
43
|
|
@@ -28,12 +52,22 @@ module DatabaseCleaner
|
|
28
52
|
end
|
29
53
|
|
30
54
|
def remote?(url)
|
31
|
-
|
55
|
+
return false unless url
|
56
|
+
|
57
|
+
parsed = URI.parse(url)
|
58
|
+
return false if parsed.scheme == 'sqlite3:'
|
59
|
+
|
60
|
+
host = parsed.host
|
61
|
+
return false unless host
|
62
|
+
return false if LOCAL.include?(host)
|
63
|
+
return false if host.end_with? '.local'
|
64
|
+
true
|
32
65
|
end
|
33
66
|
|
34
67
|
def skip?
|
35
68
|
ENV['DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL'] ||
|
36
|
-
DatabaseCleaner.allow_remote_database_url
|
69
|
+
DatabaseCleaner.allow_remote_database_url ||
|
70
|
+
DatabaseCleaner.url_whitelist
|
37
71
|
end
|
38
72
|
end
|
39
73
|
|
@@ -62,7 +96,8 @@ module DatabaseCleaner
|
|
62
96
|
|
63
97
|
CHECKS = [
|
64
98
|
RemoteDatabaseUrl,
|
65
|
-
Production
|
99
|
+
Production,
|
100
|
+
WhitelistedUrl
|
66
101
|
]
|
67
102
|
|
68
103
|
def run
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
module DatabaseCleaner
|
4
|
+
module Spec
|
5
|
+
class DatabaseHelper < Struct.new(:db)
|
6
|
+
def self.with_all_dbs &block
|
7
|
+
%w[mysql mysql2 sqlite3 postgres].map(&:to_sym).each do |db|
|
8
|
+
yield new(db)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def setup
|
13
|
+
create_db
|
14
|
+
establish_connection
|
15
|
+
load_schema
|
16
|
+
end
|
17
|
+
|
18
|
+
attr_reader :connection
|
19
|
+
|
20
|
+
def teardown
|
21
|
+
drop_db
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def establish_connection(config = default_config)
|
27
|
+
raise NotImplementedError
|
28
|
+
end
|
29
|
+
|
30
|
+
def create_db
|
31
|
+
if db == :sqlite3
|
32
|
+
# NO-OP
|
33
|
+
elsif db == :postgres
|
34
|
+
establish_connection default_config.merge('database' => 'postgres')
|
35
|
+
connection.execute "CREATE DATABASE #{default_config['database']}" rescue nil
|
36
|
+
else
|
37
|
+
establish_connection default_config.merge("database" => nil)
|
38
|
+
connection.execute "CREATE DATABASE IF NOT EXISTS #{default_config['database']}"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def load_schema
|
43
|
+
connection.execute <<-SQL
|
44
|
+
CREATE TABLE IF NOT EXISTS users (
|
45
|
+
id SERIAL PRIMARY KEY,
|
46
|
+
name INTEGER
|
47
|
+
);
|
48
|
+
SQL
|
49
|
+
|
50
|
+
connection.execute <<-SQL
|
51
|
+
CREATE TABLE IF NOT EXISTS agents (
|
52
|
+
name INTEGER
|
53
|
+
);
|
54
|
+
SQL
|
55
|
+
end
|
56
|
+
|
57
|
+
def drop_db
|
58
|
+
if db == :sqlite3
|
59
|
+
begin
|
60
|
+
File.unlink(db_config['sqlite3']['database'])
|
61
|
+
rescue Errno::ENOENT
|
62
|
+
end
|
63
|
+
elsif db == :postgres
|
64
|
+
# FIXME
|
65
|
+
connection.execute "DROP TABLE IF EXISTS users"
|
66
|
+
connection.execute "DROP TABLE IF EXISTS agents"
|
67
|
+
else
|
68
|
+
connection.execute "DROP DATABASE IF EXISTS #{default_config['database']}"
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def db_config
|
73
|
+
config_path = 'spec/support/config.yml'
|
74
|
+
@db_config ||= YAML.load(IO.read(config_path))
|
75
|
+
end
|
76
|
+
|
77
|
+
def default_config
|
78
|
+
db_config[db.to_s]
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
RSpec.shared_examples_for "a generic strategy" do
|
2
|
+
it { is_expected.to respond_to(:db) }
|
3
|
+
end
|
4
|
+
|
5
|
+
RSpec.shared_examples_for "a generic truncation strategy" do
|
6
|
+
it { is_expected.to respond_to(:start) }
|
7
|
+
it { is_expected.to respond_to(:clean) }
|
8
|
+
it { is_expected.to respond_to(:cleaning) }
|
9
|
+
end
|
10
|
+
|
11
|
+
RSpec.shared_examples_for "a generic transaction strategy" do
|
12
|
+
it { is_expected.to respond_to(:start) }
|
13
|
+
it { is_expected.to respond_to(:clean) }
|
14
|
+
it { is_expected.to respond_to(:cleaning) }
|
15
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: database_cleaner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Mabey
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-05-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -179,6 +179,20 @@ dependencies:
|
|
179
179
|
- - ">="
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
|
+
- !ruby/object:Gem::Dependency
|
183
|
+
name: mongo
|
184
|
+
requirement: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - "~>"
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: 1.12.0
|
189
|
+
type: :development
|
190
|
+
prerelease: false
|
191
|
+
version_requirements: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - "~>"
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: 1.12.0
|
182
196
|
- !ruby/object:Gem::Dependency
|
183
197
|
name: moped
|
184
198
|
requirement: !ruby/object:Gem::Requirement
|
@@ -264,19 +278,33 @@ dependencies:
|
|
264
278
|
- !ruby/object:Gem::Version
|
265
279
|
version: '0'
|
266
280
|
- !ruby/object:Gem::Dependency
|
267
|
-
name:
|
281
|
+
name: listen
|
268
282
|
requirement: !ruby/object:Gem::Requirement
|
269
283
|
requirements:
|
270
284
|
- - "~>"
|
271
285
|
- !ruby/object:Gem::Version
|
272
|
-
version:
|
286
|
+
version: 3.0.0
|
273
287
|
type: :development
|
274
288
|
prerelease: false
|
275
289
|
version_requirements: !ruby/object:Gem::Requirement
|
276
290
|
requirements:
|
277
291
|
- - "~>"
|
278
292
|
- !ruby/object:Gem::Version
|
279
|
-
version:
|
293
|
+
version: 3.0.0
|
294
|
+
- !ruby/object:Gem::Dependency
|
295
|
+
name: rspec
|
296
|
+
requirement: !ruby/object:Gem::Requirement
|
297
|
+
requirements:
|
298
|
+
- - ">="
|
299
|
+
- !ruby/object:Gem::Version
|
300
|
+
version: '0'
|
301
|
+
type: :development
|
302
|
+
prerelease: false
|
303
|
+
version_requirements: !ruby/object:Gem::Requirement
|
304
|
+
requirements:
|
305
|
+
- - ">="
|
306
|
+
- !ruby/object:Gem::Version
|
307
|
+
version: '0'
|
280
308
|
- !ruby/object:Gem::Dependency
|
281
309
|
name: cucumber
|
282
310
|
requirement: !ruby/object:Gem::Requirement
|
@@ -375,9 +403,10 @@ dependencies:
|
|
375
403
|
- - ">="
|
376
404
|
- !ruby/object:Gem::Version
|
377
405
|
version: '0'
|
378
|
-
description: Strategies for cleaning databases. Can be used to ensure a clean
|
406
|
+
description: Strategies for cleaning databases. Can be used to ensure a clean slate
|
379
407
|
for testing.
|
380
|
-
email:
|
408
|
+
email:
|
409
|
+
- ernesto@ombulabs.com
|
381
410
|
executables: []
|
382
411
|
extensions: []
|
383
412
|
extra_rdoc_files:
|
@@ -392,50 +421,89 @@ files:
|
|
392
421
|
- README.markdown
|
393
422
|
- Rakefile
|
394
423
|
- TODO
|
395
|
-
-
|
424
|
+
- adapters/database_cleaner-active_record/lib/database_cleaner-active_record.rb
|
425
|
+
- adapters/database_cleaner-active_record/lib/database_cleaner/active_record.rb
|
426
|
+
- adapters/database_cleaner-active_record/lib/database_cleaner/active_record/base.rb
|
427
|
+
- adapters/database_cleaner-active_record/lib/database_cleaner/active_record/deletion.rb
|
428
|
+
- adapters/database_cleaner-active_record/lib/database_cleaner/active_record/transaction.rb
|
429
|
+
- adapters/database_cleaner-active_record/lib/database_cleaner/active_record/truncation.rb
|
430
|
+
- adapters/database_cleaner-active_record/lib/database_cleaner/active_record/version.rb
|
431
|
+
- adapters/database_cleaner-couch_potato/lib/database_cleaner-couch_potato.rb
|
432
|
+
- adapters/database_cleaner-couch_potato/lib/database_cleaner/couch_potato.rb
|
433
|
+
- adapters/database_cleaner-couch_potato/lib/database_cleaner/couch_potato/base.rb
|
434
|
+
- adapters/database_cleaner-couch_potato/lib/database_cleaner/couch_potato/truncation.rb
|
435
|
+
- adapters/database_cleaner-couch_potato/lib/database_cleaner/couch_potato/version.rb
|
436
|
+
- adapters/database_cleaner-data_mapper/lib/database_cleaner-data_mapper.rb
|
437
|
+
- adapters/database_cleaner-data_mapper/lib/database_cleaner/data_mapper.rb
|
438
|
+
- adapters/database_cleaner-data_mapper/lib/database_cleaner/data_mapper/base.rb
|
439
|
+
- adapters/database_cleaner-data_mapper/lib/database_cleaner/data_mapper/transaction.rb
|
440
|
+
- adapters/database_cleaner-data_mapper/lib/database_cleaner/data_mapper/truncation.rb
|
441
|
+
- adapters/database_cleaner-data_mapper/lib/database_cleaner/data_mapper/version.rb
|
442
|
+
- adapters/database_cleaner-mongo/lib/database_cleaner-mongo.rb
|
443
|
+
- adapters/database_cleaner-mongo/lib/database_cleaner/mongo.rb
|
444
|
+
- adapters/database_cleaner-mongo/lib/database_cleaner/mongo/base.rb
|
445
|
+
- adapters/database_cleaner-mongo/lib/database_cleaner/mongo/truncation.rb
|
446
|
+
- adapters/database_cleaner-mongo/lib/database_cleaner/mongo/truncation_mixin.rb
|
447
|
+
- adapters/database_cleaner-mongo/lib/database_cleaner/mongo/version.rb
|
448
|
+
- adapters/database_cleaner-mongo_mapper/lib/database_cleaner-mongo_mapper.rb
|
449
|
+
- adapters/database_cleaner-mongo_mapper/lib/database_cleaner/mongo_mapper.rb
|
450
|
+
- adapters/database_cleaner-mongo_mapper/lib/database_cleaner/mongo_mapper/base.rb
|
451
|
+
- adapters/database_cleaner-mongo_mapper/lib/database_cleaner/mongo_mapper/truncation.rb
|
452
|
+
- adapters/database_cleaner-mongo_mapper/lib/database_cleaner/mongo_mapper/version.rb
|
453
|
+
- adapters/database_cleaner-mongoid/lib/database_cleaner-mongoid.rb
|
454
|
+
- adapters/database_cleaner-mongoid/lib/database_cleaner/mongoid.rb
|
455
|
+
- adapters/database_cleaner-mongoid/lib/database_cleaner/mongoid/base.rb
|
456
|
+
- adapters/database_cleaner-mongoid/lib/database_cleaner/mongoid/mongo1_truncation_mixin.rb
|
457
|
+
- adapters/database_cleaner-mongoid/lib/database_cleaner/mongoid/mongo2_truncation_mixin.rb
|
458
|
+
- adapters/database_cleaner-mongoid/lib/database_cleaner/mongoid/mongoid_truncation_mixin.rb
|
459
|
+
- adapters/database_cleaner-mongoid/lib/database_cleaner/mongoid/truncation.rb
|
460
|
+
- adapters/database_cleaner-mongoid/lib/database_cleaner/mongoid/version.rb
|
461
|
+
- adapters/database_cleaner-moped/lib/database_cleaner-moped.rb
|
462
|
+
- adapters/database_cleaner-moped/lib/database_cleaner/moped.rb
|
463
|
+
- adapters/database_cleaner-moped/lib/database_cleaner/moped/base.rb
|
464
|
+
- adapters/database_cleaner-moped/lib/database_cleaner/moped/truncation.rb
|
465
|
+
- adapters/database_cleaner-moped/lib/database_cleaner/moped/truncation_base.rb
|
466
|
+
- adapters/database_cleaner-moped/lib/database_cleaner/moped/version.rb
|
467
|
+
- adapters/database_cleaner-neo4j/lib/database_cleaner-neo4j.rb
|
468
|
+
- adapters/database_cleaner-neo4j/lib/database_cleaner/neo4j.rb
|
469
|
+
- adapters/database_cleaner-neo4j/lib/database_cleaner/neo4j/base.rb
|
470
|
+
- adapters/database_cleaner-neo4j/lib/database_cleaner/neo4j/deletion.rb
|
471
|
+
- adapters/database_cleaner-neo4j/lib/database_cleaner/neo4j/transaction.rb
|
472
|
+
- adapters/database_cleaner-neo4j/lib/database_cleaner/neo4j/truncation.rb
|
473
|
+
- adapters/database_cleaner-neo4j/lib/database_cleaner/neo4j/version.rb
|
474
|
+
- adapters/database_cleaner-ohm/lib/database_cleaner-ohm.rb
|
475
|
+
- adapters/database_cleaner-ohm/lib/database_cleaner/ohm.rb
|
476
|
+
- adapters/database_cleaner-ohm/lib/database_cleaner/ohm/truncation.rb
|
477
|
+
- adapters/database_cleaner-ohm/lib/database_cleaner/ohm/version.rb
|
478
|
+
- adapters/database_cleaner-redis/lib/database_cleaner-redis.rb
|
479
|
+
- adapters/database_cleaner-redis/lib/database_cleaner/redis.rb
|
480
|
+
- adapters/database_cleaner-redis/lib/database_cleaner/redis/base.rb
|
481
|
+
- adapters/database_cleaner-redis/lib/database_cleaner/redis/truncation.rb
|
482
|
+
- adapters/database_cleaner-redis/lib/database_cleaner/redis/version.rb
|
483
|
+
- adapters/database_cleaner-sequel/lib/database_cleaner-sequel.rb
|
484
|
+
- adapters/database_cleaner-sequel/lib/database_cleaner/sequel.rb
|
485
|
+
- adapters/database_cleaner-sequel/lib/database_cleaner/sequel/base.rb
|
486
|
+
- adapters/database_cleaner-sequel/lib/database_cleaner/sequel/deletion.rb
|
487
|
+
- adapters/database_cleaner-sequel/lib/database_cleaner/sequel/transaction.rb
|
488
|
+
- adapters/database_cleaner-sequel/lib/database_cleaner/sequel/truncation.rb
|
489
|
+
- adapters/database_cleaner-sequel/lib/database_cleaner/sequel/version.rb
|
396
490
|
- cucumber.yml
|
397
491
|
- lib/database_cleaner.rb
|
398
|
-
- lib/database_cleaner/active_record/base.rb
|
399
|
-
- lib/database_cleaner/active_record/deletion.rb
|
400
|
-
- lib/database_cleaner/active_record/transaction.rb
|
401
|
-
- lib/database_cleaner/active_record/truncation.rb
|
402
492
|
- lib/database_cleaner/base.rb
|
403
493
|
- lib/database_cleaner/configuration.rb
|
404
|
-
- lib/database_cleaner/couch_potato/base.rb
|
405
|
-
- lib/database_cleaner/couch_potato/truncation.rb
|
406
494
|
- lib/database_cleaner/cucumber.rb
|
407
|
-
- lib/database_cleaner/
|
408
|
-
- lib/database_cleaner/data_mapper/transaction.rb
|
409
|
-
- lib/database_cleaner/data_mapper/truncation.rb
|
495
|
+
- lib/database_cleaner/deprecation.rb
|
410
496
|
- lib/database_cleaner/generic/base.rb
|
411
497
|
- lib/database_cleaner/generic/transaction.rb
|
412
498
|
- lib/database_cleaner/generic/truncation.rb
|
413
|
-
- lib/database_cleaner/mongo/base.rb
|
414
|
-
- lib/database_cleaner/mongo/truncation.rb
|
415
|
-
- lib/database_cleaner/mongo/truncation_mixin.rb
|
416
|
-
- lib/database_cleaner/mongo2/base.rb
|
417
|
-
- lib/database_cleaner/mongo2/truncation_mixin.rb
|
418
|
-
- lib/database_cleaner/mongo_mapper/base.rb
|
419
|
-
- lib/database_cleaner/mongo_mapper/truncation.rb
|
420
|
-
- lib/database_cleaner/mongoid/base.rb
|
421
|
-
- lib/database_cleaner/mongoid/truncation.rb
|
422
|
-
- lib/database_cleaner/moped/base.rb
|
423
|
-
- lib/database_cleaner/moped/truncation.rb
|
424
|
-
- lib/database_cleaner/moped/truncation_base.rb
|
425
|
-
- lib/database_cleaner/neo4j/base.rb
|
426
|
-
- lib/database_cleaner/neo4j/deletion.rb
|
427
|
-
- lib/database_cleaner/neo4j/transaction.rb
|
428
|
-
- lib/database_cleaner/neo4j/truncation.rb
|
429
499
|
- lib/database_cleaner/null_strategy.rb
|
430
|
-
- lib/database_cleaner/
|
431
|
-
- lib/database_cleaner/redis/base.rb
|
432
|
-
- lib/database_cleaner/redis/truncation.rb
|
500
|
+
- lib/database_cleaner/orm_autodetector.rb
|
433
501
|
- lib/database_cleaner/safeguard.rb
|
434
|
-
- lib/database_cleaner/
|
435
|
-
- lib/database_cleaner/
|
436
|
-
- lib/database_cleaner/
|
437
|
-
- lib/database_cleaner/
|
438
|
-
homepage:
|
502
|
+
- lib/database_cleaner/spec.rb
|
503
|
+
- lib/database_cleaner/spec/database_helper.rb
|
504
|
+
- lib/database_cleaner/spec/shared_examples.rb
|
505
|
+
- lib/database_cleaner/version.rb
|
506
|
+
homepage: https://github.com/DatabaseCleaner/database_cleaner
|
439
507
|
licenses:
|
440
508
|
- MIT
|
441
509
|
metadata: {}
|
@@ -454,10 +522,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
454
522
|
- !ruby/object:Gem::Version
|
455
523
|
version: '0'
|
456
524
|
requirements: []
|
457
|
-
|
458
|
-
rubygems_version: 2.7.3
|
525
|
+
rubygems_version: 3.0.8
|
459
526
|
signing_key:
|
460
527
|
specification_version: 4
|
461
|
-
summary: Strategies for cleaning databases.
|
528
|
+
summary: Strategies for cleaning databases. Can be used to ensure a clean slate for
|
462
529
|
testing.
|
463
530
|
test_files: []
|