fixturize 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/fixturize.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2I4NzE0YjQzNzgyMWUxYzI3MDZhNWM3OTE5NjMzMzBmNGZhZWY0Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjUxMjAzZGE2N2Y2NTAzOGM0ZDQ3ZTg3N2IyYWYzMWM1ZmQwZDM5OQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjJjNjQxOWIxOWJjMmEzODEzNjRmYTk3OGMxYzkzMzU3NGFkYTMyZTRjNGJh
|
10
|
+
NTc2ZTFmMGZjYmFiYjJiZjEzMDhmODAyNjAzOWQ5NjIzMTQyYjM1MWRkODE0
|
11
|
+
OWNmMzA1MGI2NTBiZmE0NzczN2MzZDY3NDhiN2YzNjE3ZjdmNjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWRlMmYxZmVhYzc0ZWM1YjU5NmU4ZmRiZTkxMDViNTNjNjEyZmJkZjRjYjYw
|
14
|
+
ZDYzNTcwZWQ5ZWI4ZTI4N2VmNTQzYTdiOGFjNzZkNmU2Yjc0NzQ4ZGQ3NDRj
|
15
|
+
ZmQyNmMzMzgxNjEwNGNkN2QwOTlmMGU0ZDlhYzc3Yjc2YjU3YzQ=
|
data/lib/fixturize.rb
CHANGED
@@ -49,7 +49,15 @@ class Fixturize
|
|
49
49
|
|
50
50
|
def clear_cache!
|
51
51
|
database.collections.each do |c|
|
52
|
-
if c.name
|
52
|
+
if c.name =~ /fixturize_/
|
53
|
+
c.drop
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def clear_old_versions!
|
59
|
+
database.collections.each do |c|
|
60
|
+
if c.name =~ /fixturize_/ && c.name != self.collection_name
|
53
61
|
c.drop
|
54
62
|
end
|
55
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fixturize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: fixturize your mongo(mapper) tests inline by caching blocks of created
|
14
14
|
objects
|