fixturize 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/fixturize.rb +9 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OThmZTgwNzhmOWFiMzZhMWE2YWFmOGRiODM4NDdkMmRmMzI5ZWVkMw==
4
+ N2I4NzE0YjQzNzgyMWUxYzI3MDZhNWM3OTE5NjMzMzBmNGZhZWY0Mg==
5
5
  data.tar.gz: !binary |-
6
- ZDhiMGU0NTJjZjIxZDAxYzFhNzE0YTliNzUyMzNkZGRhYjM0Zjk0Mg==
6
+ ZjUxMjAzZGE2N2Y2NTAzOGM0ZDQ3ZTg3N2IyYWYzMWM1ZmQwZDM5OQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NGEyYmZmNjQzYmM2MGFkNDQwNjAxNjNjNGU3YmQ1N2Q0YzcwY2ExZjFlNzAw
10
- MzE5NzhmYzc0NzNmMTAzMjRkN2UzYmNjNGZiYWExZjgxNTEwZDk1N2NhNTQw
11
- NzRjNDNkYjQ0MDQxZThhNjQ0OGI5NDU4MWNjMThmOTY3MWFkOGU=
9
+ NjJjNjQxOWIxOWJjMmEzODEzNjRmYTk3OGMxYzkzMzU3NGFkYTMyZTRjNGJh
10
+ NTc2ZTFmMGZjYmFiYjJiZjEzMDhmODAyNjAzOWQ5NjIzMTQyYjM1MWRkODE0
11
+ OWNmMzA1MGI2NTBiZmE0NzczN2MzZDY3NDhiN2YzNjE3ZjdmNjk=
12
12
  data.tar.gz: !binary |-
13
- N2EwOTU4NGVhYmQwNTExYTA4NjQ0MDM1ZDFjZDUyNDA2YjY5ZGYyZjZhM2Ri
14
- NzZiMmM4ODMxMDE4Y2JiZmUxNTBlMmU5MWQ3NDgxMWIxMTE1MGNiYjZmY2I5
15
- OTAxMDYyZTdhNjdjZGY2MGNiZTU1NjRlMTgzMTBmY2QzOGU0MDg=
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 == /fixturize_/
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
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-06 00:00:00.000000000 Z
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