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 +5 -5
- data/lib/minidoc/test_helpers.rb +15 -13
- data/lib/minidoc/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +15 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 003a6c6c6a986d6e5193a35c320500665de4ca191e7e95025cbfaabfb3cfe38b
|
4
|
+
data.tar.gz: f523648aa8f17fd5c338e7bf5306aeba83176c9ff93eba27b5c5f71e4b2a5d02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7dbc5a167eb7154b9c6ac518c3b14bc06a932f9f392ad6f9f7ab9352f370ef9ebc5b0725ee033552dfe3235d11f15d8cc775ec9ac34f1056d0d8964df850518
|
7
|
+
data.tar.gz: 7a5d5e8021410d2c97849e7a8d68df67cd1fad709d8f1b9d6efa4068edb33c8c0953cde2d0d54a691693fcc9c4e357f5525149843411a9edbb12705a48c4d03d
|
data/lib/minidoc/test_helpers.rb
CHANGED
@@ -2,25 +2,27 @@ class Minidoc
|
|
2
2
|
module TestHelpers
|
3
3
|
extend self
|
4
4
|
|
5
|
-
def
|
6
|
-
|
7
|
-
clear_indexes
|
5
|
+
def clear_databases(connections)
|
6
|
+
connections.each { |connection| clear_database(connection) }
|
8
7
|
end
|
9
8
|
|
10
|
-
def
|
11
|
-
|
9
|
+
def clear_database(connection = Minidoc.connection)
|
10
|
+
clear_collections(connection)
|
11
|
+
clear_indexes(connection)
|
12
12
|
end
|
13
13
|
|
14
|
-
def
|
15
|
-
each_collection(
|
14
|
+
def clear_collections(connection = Minidoc.connection)
|
15
|
+
each_collection(connection) { |c| c.remove({}) }
|
16
16
|
end
|
17
17
|
|
18
|
-
def
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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
|
data/lib/minidoc/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
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
|
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:
|
12
|
+
date: 2019-05-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
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: '
|
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: '
|
33
|
+
version: '6'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
|
-
name:
|
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: '
|
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: '
|
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
|
-
|
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
|