database_cleaner 1.8.2 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/History.rdoc +5 -0
- data/adapters/database_cleaner-ohm/lib/database_cleaner/ohm/version.rb +1 -1
- data/lib/database_cleaner/base.rb +11 -3
- data/lib/database_cleaner/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2014e2b6a88fc052138027fe636b0832e1e82ed0da858fdfc6b4c57e25b4c640
|
|
4
|
+
data.tar.gz: 27a439c3e5fe70c98c49bd79be9c534ec35695a6f36ab5eba6fd272fc0a30e39
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 68441f1d78a2dec098872b0d0cf37823c853ff6b2377229b5e81396ff31b4927f48c567b4ab163dd583d6b455050c312d555c87b0ff870c9e5494c9ac06146cb
|
|
7
|
+
data.tar.gz: 0ddef43b158cc15263307bbf5bae0c92363fa6e882b5f7cc1ccb5cf7831d092c4da8549cd21c8bfca0be955299105b4023e333cc68c5c3180206ff3b79e6aea0
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
database_cleaner (1.8.
|
|
4
|
+
database_cleaner (1.8.3)
|
|
5
5
|
|
|
6
6
|
PATH
|
|
7
7
|
remote: adapters
|
|
@@ -32,7 +32,7 @@ PATH
|
|
|
32
32
|
database_cleaner-neo4j (1.8.0)
|
|
33
33
|
database_cleaner (~> 1.8.0)
|
|
34
34
|
neo4j-core
|
|
35
|
-
database_cleaner-ohm (1.8.
|
|
35
|
+
database_cleaner-ohm (1.8.1)
|
|
36
36
|
database_cleaner (~> 1.8.0)
|
|
37
37
|
database_cleaner-redis (~> 1.8.0)
|
|
38
38
|
ohm
|
data/History.rdoc
CHANGED
|
@@ -116,15 +116,23 @@ module DatabaseCleaner
|
|
|
116
116
|
|
|
117
117
|
def orm_module
|
|
118
118
|
return unless [:active_record, :data_mapper, :mongo, :mongoid, :mongo_mapper, :moped, :couch_potato, :sequel, :ohm, :redis, :neo4j].include?(orm)
|
|
119
|
+
load_adapter(orm) if !adapter_loaded?(orm)
|
|
120
|
+
orm_module_name = ORMAutodetector::ORMS[orm]
|
|
121
|
+
DatabaseCleaner.const_get(orm_module_name, false)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def adapter_loaded? orm
|
|
125
|
+
$LOADED_FEATURES.grep(%r{/lib/database_cleaner/#{orm}\.rb$}).any?
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def load_adapter orm
|
|
119
129
|
$LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/../../adapters/database_cleaner-#{orm}/lib")
|
|
120
130
|
require "database_cleaner/#{orm}"
|
|
121
|
-
orm_module_name = ORMAutodetector::ORMS[orm]
|
|
122
|
-
DatabaseCleaner.const_get(orm_module_name)
|
|
123
131
|
end
|
|
124
132
|
|
|
125
133
|
def orm_strategy(strategy)
|
|
126
134
|
strategy_module_name = strategy.to_s.capitalize
|
|
127
|
-
orm_module.const_get(strategy_module_name)
|
|
135
|
+
orm_module.const_get(strategy_module_name, false)
|
|
128
136
|
rescue NameError
|
|
129
137
|
if orm != :active_record
|
|
130
138
|
DatabaseCleaner.deprecate <<-TEXT
|
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.8.
|
|
4
|
+
version: 1.8.3
|
|
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: 2020-02-
|
|
12
|
+
date: 2020-02-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rake
|