minidoc 2.0.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a8cf89e249748f809266af352e66320d4fb388b5
4
- data.tar.gz: 249b016bad5f2c05294881593c41a46dce8f9277
2
+ SHA256:
3
+ metadata.gz: 003a6c6c6a986d6e5193a35c320500665de4ca191e7e95025cbfaabfb3cfe38b
4
+ data.tar.gz: f523648aa8f17fd5c338e7bf5306aeba83176c9ff93eba27b5c5f71e4b2a5d02
5
5
  SHA512:
6
- metadata.gz: d7336a4d0526a4242b15844f695707d7eab0b63349ebf909c0be771021a30057ea86f6f1c45c0eaa990f4a820eb60857fd140c746d190a4a90eae0a60545d56b
7
- data.tar.gz: a778137311b667764d318e86d1b82ba4b2c2046d29f95e5c120609dc37c751733e9aedde6640178212444af938be01f5fa5e99c98fe4f79ea3e4d7f1bcf7d828
6
+ metadata.gz: f7dbc5a167eb7154b9c6ac518c3b14bc06a932f9f392ad6f9f7ab9352f370ef9ebc5b0725ee033552dfe3235d11f15d8cc775ec9ac34f1056d0d8964df850518
7
+ data.tar.gz: 7a5d5e8021410d2c97849e7a8d68df67cd1fad709d8f1b9d6efa4068edb33c8c0953cde2d0d54a691693fcc9c4e357f5525149843411a9edbb12705a48c4d03d
@@ -2,25 +2,27 @@ class Minidoc
2
2
  module TestHelpers
3
3
  extend self
4
4
 
5
- def clear_database
6
- clear_collections
7
- clear_indexes
5
+ def clear_databases(connections)
6
+ connections.each { |connection| clear_database(connection) }
8
7
  end
9
8
 
10
- def clear_collections
11
- each_collection { |c| c.remove({}) }
9
+ def clear_database(connection = Minidoc.connection)
10
+ clear_collections(connection)
11
+ clear_indexes(connection)
12
12
  end
13
13
 
14
- def clear_indexes
15
- each_collection(&:drop_indexes)
14
+ def clear_collections(connection = Minidoc.connection)
15
+ each_collection(connection) { |c| c.remove({}) }
16
16
  end
17
17
 
18
- def each_collection(&block)
19
- [$mongo, $alt_mongo].each do |conn|
20
- conn.db.collections.
21
- reject { |c| c.name.include?("system") }.
22
- each(&block)
23
- end
18
+ def clear_indexes(connection = Minidoc.connection)
19
+ each_collection(connection, &:drop_indexes)
20
+ end
21
+
22
+ def each_collection(connection, &block)
23
+ connection.db.collections.
24
+ reject { |c| c.name.include?("system") }.
25
+ each(&block)
24
26
  end
25
27
  end
26
28
  end
@@ -1,3 +1,3 @@
1
1
  class Minidoc
2
- VERSION = "2.0.1".freeze
2
+ VERSION = "2.1.0".freeze
3
3
  end
@@ -39,6 +39,6 @@ RSpec.configure do |config|
39
39
  Kernel.srand config.seed
40
40
 
41
41
  config.before(:each) do
42
- Minidoc::TestHelpers.clear_database
42
+ Minidoc::TestHelpers.clear_databases([$mongo, $alt_mongo])
43
43
  end
44
44
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minidoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Helmkamp
@@ -9,10 +9,10 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-24 00:00:00.000000000 Z
12
+ date: 2019-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: activesupport
15
+ name: activemodel
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ">="
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: 3.0.0
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '5'
23
+ version: '6'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,9 +30,9 @@ dependencies:
30
30
  version: 3.0.0
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '5'
33
+ version: '6'
34
34
  - !ruby/object:Gem::Dependency
35
- name: activemodel
35
+ name: activesupport
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
@@ -40,7 +40,7 @@ dependencies:
40
40
  version: 3.0.0
41
41
  - - "<"
42
42
  - !ruby/object:Gem::Version
43
- version: '5'
43
+ version: '6'
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
@@ -50,27 +50,27 @@ dependencies:
50
50
  version: 3.0.0
51
51
  - - "<"
52
52
  - !ruby/object:Gem::Version
53
- version: '5'
53
+ version: '6'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: virtus
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - "~>"
59
- - !ruby/object:Gem::Version
60
- version: '1.0'
61
58
  - - ">="
62
59
  - !ruby/object:Gem::Version
63
60
  version: 1.0.0
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '1.0'
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - "~>"
69
- - !ruby/object:Gem::Version
70
- version: '1.0'
71
68
  - - ">="
72
69
  - !ruby/object:Gem::Version
73
70
  version: 1.0.0
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '1.0'
74
74
  - !ruby/object:Gem::Dependency
75
75
  name: mongo
76
76
  requirement: !ruby/object:Gem::Requirement
@@ -137,8 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  requirements: []
140
- rubyforge_project:
141
- rubygems_version: 2.5.1
140
+ rubygems_version: 3.0.3
142
141
  signing_key:
143
142
  specification_version: 4
144
143
  summary: Lightweight wrapper for MongoDB documents