yogi_berra 0.2.0 → 0.2.1
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 +1 -1
- data/lib/yogi_berra/version.rb +1 -1
- data/spec/yogi_berra_catcher_spec.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWZmNDI3OTk0NjlhODMzY2ZmZmIwZDVhOWMyY2M4MjNjZDQwNzUyNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTM2ZTk5NTNiMjZhY2Q0MDdhN2FhMGFmZWViYmJjYzAxNGVkMjFkMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzJkNzZhMDUyNWMzMGUyOGI3MzY3MTEyN2QzNWI0NmYzNmQ4NDJmMDI0YTU5
|
10
|
+
NWI2NzJkZmQxYWE2ZmVhOTZhYjE2NGJiMTgyNGUxYjhhYWY4YThkMDdmYjE3
|
11
|
+
ZTRlZjBiODA0ZDk2NWU0OWIzOTFkZjVhZmMzMDE1MWIxYWU0ZTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWViNzUzY2MzMDQ2NjUxOTVmOWJkNzg0OWZjNTExZGI4YTJiZWI3YjU0YzRl
|
14
|
+
MzJlMmY2ZTQ3MTNkM2I3MmZjYmQwZTc4OWI4YmJkYjk1YmYwZWExN2FkOWNh
|
15
|
+
YmQ0ZjIxZWM5OWFhNGI5NWJlNTkzZTU0MjU3NTU0ZjAxMTQ4ZDY=
|
data/lib/yogi_berra/catcher.rb
CHANGED
@@ -16,7 +16,7 @@ module YogiBerra
|
|
16
16
|
YogiBerra.settings = yaml_file["#{environment}"] if yaml_file
|
17
17
|
end
|
18
18
|
rescue
|
19
|
-
YogiBerra::Logger.log("No such file: #{
|
19
|
+
YogiBerra::Logger.log("No such file: #{YogiBerra.yogi_yml}", :error)
|
20
20
|
end
|
21
21
|
YogiBerra.settings
|
22
22
|
end
|
data/lib/yogi_berra/version.rb
CHANGED
@@ -6,6 +6,8 @@ describe YogiBerra::Catcher do
|
|
6
6
|
end
|
7
7
|
|
8
8
|
before(:each) do
|
9
|
+
YogiBerra.settings = nil
|
10
|
+
YogiBerra.yogi_yml = nil
|
9
11
|
YogiBerra::Logger.stub(:log)
|
10
12
|
end
|
11
13
|
|
@@ -24,6 +26,12 @@ describe YogiBerra::Catcher do
|
|
24
26
|
Object.send(:remove_const, :Rails)
|
25
27
|
end
|
26
28
|
|
29
|
+
it "should fail gracefully when the yaml file doesn't exist" do
|
30
|
+
YogiBerra::Logger.should_receive(:log).with("No such file: not_a_file.yml", :error)
|
31
|
+
lambda { YogiBerra::Catcher.load_db_settings("not_a_file.yml") }.should_not raise_error
|
32
|
+
YogiBerra.settings.should == nil
|
33
|
+
end
|
34
|
+
|
27
35
|
it "should try to grab a connection using the settings file" do
|
28
36
|
mock_mongo(:mongo_client_stub => true)
|
29
37
|
YogiBerra::Catcher.load_db_settings(@test_yaml)
|