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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c214fa8211b3521ed029da86e49dcaceb2cf5f3
4
- data.tar.gz: fa940fdb99439a7c6a7a1085c3af8187a38310db
3
+ metadata.gz: f389e0877d94c7ffb1b49183943a5dc444296920
4
+ data.tar.gz: 2a975b5eea3789df956c537dff08357990d5a8ec
5
5
  SHA512:
6
- metadata.gz: c7465ea4c04c1c33ed64fef7358cfa676bc2161e15d9356da3275d5b8a2622d9a0902c1843d6a6766a6f94ce9fcbe1ad7544f1e67b5a379af5aaff6193d3a4b4
7
- data.tar.gz: dd0dfe7e2468d091da1be72560bb72835cae0adf7a066b1e5ef9b8535bf7c3414b4b10485551e1a88b5f8628c6f03695eac9524289813d87c0338afe7af8a3f5
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
- options = {
88
- socket_timeout: 2,
89
- connect: :direct
90
- }.merge(config)
91
- options = Hash[options.map { |(k, v)| [k.to_sym, v] }]
92
- @mongodb_client ||= Mongo::Client.new([options[:hostname] + ':' + options[:port].to_s], options)
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]
@@ -1,3 +1,3 @@
1
1
  module Bipbip
2
- VERSION = '0.6.25'
2
+ VERSION = '0.6.26'
3
3
  end
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.25
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-23 00:00:00.000000000 Z
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.0.5
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.0.5
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: 3.0.3
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: 3.0.3
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.5.0
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