yogi_berra 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/yogi_berra/catcher.rb +8 -3
- data/lib/yogi_berra/version.rb +1 -1
- metadata +15 -2
- data/Gemfile.lock +0 -34
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTNlOTBiMTA1YWQxZjM4YWNiYTVmMGEwMTk1MGEzNTJhYzkwM2NhYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzA1YzkwMmI4NGEzNzFkYWYxYjQxYmEwOTgyMDhmM2NjYWM0NTA0Yw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGU2MjBjMmNjY2VmZWUyMTkwNGU0M2NmMDc5YWU1NjU1NmZlNjdiZmYzYmE0
|
10
|
+
NTE3OTVlNDBlODZhM2U4YTAyOTQxNWExNDVlNWJiMjRmYjIyMDYyZWVlYjg4
|
11
|
+
Y2MxNTQ1OGJkMTE4YjEwZDljMGQ4YTY5MTY3YWY2NjhkZjkyYjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Yzg5MDdlZDNmMzc3NWI4YjY2MjIyZDEwMDU4MDMxZDNjNTgyOGNlNzJlOGQ3
|
14
|
+
OWIzMTA1NWZhMTBjYjZmM2FmMTFmNmM2NmRlYWZmYWU5NDFiNDI2OTEzZjBj
|
15
|
+
YjViYWQ3MzFjYzg0YjU5ZjZiNWIxNGY4NGI4ZGM4ZDM0NDU0ZTk=
|
data/lib/yogi_berra/catcher.rb
CHANGED
@@ -30,10 +30,14 @@ module YogiBerra
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
def db_client(host, port)
|
33
|
+
def db_client(host, port, replica_set = nil)
|
34
34
|
# :w => 0 set the default write concern to 0, this allows writes to be non-blocking
|
35
35
|
# by not waiting for a response from mongodb
|
36
|
-
|
36
|
+
if replica_set
|
37
|
+
@@mongo_client = Mongo::MongoReplicaSetClient.new(replica_set, :w => 0)
|
38
|
+
else
|
39
|
+
@@mongo_client = Mongo::MongoClient.new(host, port, :w => 0)
|
40
|
+
end
|
37
41
|
rescue
|
38
42
|
YogiBerra::Logger.log("Couldn't connect to the mongo database on host: #{host} port: #{port}.", :error)
|
39
43
|
nil
|
@@ -45,7 +49,8 @@ module YogiBerra
|
|
45
49
|
if @@settings
|
46
50
|
host = @@settings["host"]
|
47
51
|
port = @@settings["port"]
|
48
|
-
|
52
|
+
replica_set = @@settings["replica_set"]
|
53
|
+
client = db_client(host, port, replica_set)
|
49
54
|
if client
|
50
55
|
@@connection = client[@@settings["database"]]
|
51
56
|
else
|
data/lib/yogi_berra/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yogi_berra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Earl Krauss
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.8.3
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bson_ext
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.8.3
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.8.3
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: mongo
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,7 +100,6 @@ files:
|
|
86
100
|
- lib/yogi_berra/version.rb
|
87
101
|
- lib/yogi_berra.rb
|
88
102
|
- Gemfile
|
89
|
-
- Gemfile.lock
|
90
103
|
- LICENSE
|
91
104
|
- Rakefile
|
92
105
|
- README.md
|
data/Gemfile.lock
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
yogi_berra (0.0.6)
|
5
|
-
bson (= 1.8.3)
|
6
|
-
mongo (= 1.8.3)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
bson (1.8.3)
|
12
|
-
builder (3.2.2)
|
13
|
-
diff-lcs (1.2.4)
|
14
|
-
mongo (1.8.3)
|
15
|
-
bson (~> 1.8.3)
|
16
|
-
rake (10.0.4)
|
17
|
-
rspec (2.13.0)
|
18
|
-
rspec-core (~> 2.13.0)
|
19
|
-
rspec-expectations (~> 2.13.0)
|
20
|
-
rspec-mocks (~> 2.13.0)
|
21
|
-
rspec-core (2.13.1)
|
22
|
-
rspec-expectations (2.13.0)
|
23
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
24
|
-
rspec-mocks (2.13.1)
|
25
|
-
|
26
|
-
PLATFORMS
|
27
|
-
ruby
|
28
|
-
|
29
|
-
DEPENDENCIES
|
30
|
-
builder (~> 3.2.1)
|
31
|
-
mongo (~> 1.8.3)
|
32
|
-
rake (~> 10.0.4)
|
33
|
-
rspec (~> 2.13.0)
|
34
|
-
yogi_berra!
|