bipbip 0.6.25 → 0.6.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bipbip/plugin/mongodb.rb +14 -7
- data/lib/bipbip/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f389e0877d94c7ffb1b49183943a5dc444296920
|
4
|
+
data.tar.gz: 2a975b5eea3789df956c537dff08357990d5a8ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 226c0a4446549d17fcf2a91d1847e32ddfbd8621191dfb0971bb88ef2f75109f207f66b0bf140d5a55b567fff63d5095a3edd749516227786008e582cee56b45
|
7
|
+
data.tar.gz: f283e09edb3099e6ddb1a7709df8c57cf341f001e2d564253a785ee0d766cba63d2ea70860ac13fb93de5681b6f9166234623291b8eace71158c351f956b928b
|
@@ -84,12 +84,19 @@ module Bipbip
|
|
84
84
|
|
85
85
|
# @return [Mongo::Client]
|
86
86
|
def mongodb_client
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
87
|
+
if @mongodb_client.nil?
|
88
|
+
address = config['hostname'] + ':' + config['port'].to_s
|
89
|
+
options = {
|
90
|
+
socket_timeout: 2,
|
91
|
+
connect: :direct,
|
92
|
+
logger: Logger.new('/dev/null')
|
93
|
+
}
|
94
|
+
options[:user] = config['user'] if config.key?('user')
|
95
|
+
options[:password] = config['password'] if config.key?('password')
|
96
|
+
options[:database] = config['database'] if config.key?('database')
|
97
|
+
@mongodb_client = Mongo::Client.new([address], options)
|
98
|
+
end
|
99
|
+
@mongodb_client
|
93
100
|
end
|
94
101
|
|
95
102
|
# @return [Mongo::DB]
|
@@ -119,7 +126,7 @@ module Bipbip
|
|
119
126
|
database_list.map do |database|
|
120
127
|
results = database.command('dbstats' => 1)
|
121
128
|
results.count.zero? ? 0 : results.documents.first['indexSize']
|
122
|
-
end.reduce(:+)
|
129
|
+
end.reduce(0, :+)
|
123
130
|
end
|
124
131
|
|
125
132
|
# @return [Integer]
|
data/lib/bipbip/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bipbip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cargo Media
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-08-
|
13
|
+
date: 2016-08-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: copperegg-revealmetrics
|
@@ -130,28 +130,28 @@ dependencies:
|
|
130
130
|
requirements:
|
131
131
|
- - "~>"
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 2.
|
133
|
+
version: 2.2.7
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
138
|
- - "~>"
|
139
139
|
- !ruby/object:Gem::Version
|
140
|
-
version: 2.
|
140
|
+
version: 2.2.7
|
141
141
|
- !ruby/object:Gem::Dependency
|
142
142
|
name: bson
|
143
143
|
requirement: !ruby/object:Gem::Requirement
|
144
144
|
requirements:
|
145
145
|
- - "~>"
|
146
146
|
- !ruby/object:Gem::Version
|
147
|
-
version:
|
147
|
+
version: 4.0.0
|
148
148
|
type: :runtime
|
149
149
|
prerelease: false
|
150
150
|
version_requirements: !ruby/object:Gem::Requirement
|
151
151
|
requirements:
|
152
152
|
- - "~>"
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
version:
|
154
|
+
version: 4.0.0
|
155
155
|
- !ruby/object:Gem::Dependency
|
156
156
|
name: rb-inotify
|
157
157
|
requirement: !ruby/object:Gem::Requirement
|
@@ -328,7 +328,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
328
328
|
version: '0'
|
329
329
|
requirements: []
|
330
330
|
rubyforge_project:
|
331
|
-
rubygems_version: 2.
|
331
|
+
rubygems_version: 2.6.2
|
332
332
|
signing_key:
|
333
333
|
specification_version: 4
|
334
334
|
summary: Gather services data and store in CopperEgg
|