dim 1.2.6 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/dim.rb +3 -1
- data/lib/version.rb +1 -1
- data/spec/dim_spec.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODMwNTEzMjE5MTNkYTFkMzA2MDkxZDQ3NDcxYWUyZTVhMjkzZGU3Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmNkYmZiYzZjYzU1OTU0ZDk3ZmQ5OTZmOTE4MGQzNGFlZjk3NzA2ZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzQ4ZmU3ZGY0NDFkZGU3YTI4MGJlNGQ2MDBjZDIxOGIxNzZmNDBjOWE3MmE0
|
10
|
+
MmJlNjZiNTRjNmI5ZGVmODQ2ZGQ0ZDBlZmJiNGM5ODViMGJjOGJjM2U2MmNl
|
11
|
+
YTJlYWYyOWY0ZGRjOTQ0Zjg3YThhNDhkYzZhODgwMDA3NTJmYWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTUzMWJhNmJlYzczNTAwNDQzZjhhMmI5MmJmMDI3MjAxMjEzODhmMmZiMjJm
|
14
|
+
MmQyNGI0ZTdiYWFlZDM4ZjI5YzJhMWQ5ZDkxODU1NTQzZmQ5OTc4Yzk5ZjM0
|
15
|
+
OTY5MTFlNjc5OTY0Y2MxZmYxYWUwYzg4MjEyNTA4MGY0MzY3M2E=
|
data/lib/dim.rb
CHANGED
@@ -74,7 +74,9 @@ module Dim
|
|
74
74
|
|
75
75
|
# Given a list of services, check to see if they are available, returning true or false.
|
76
76
|
def verify_dependencies(*names)
|
77
|
-
names.all?
|
77
|
+
names.all? do |name|
|
78
|
+
respond_to?(name) || service_block(name)
|
79
|
+
end
|
78
80
|
rescue Dim::MissingServiceError
|
79
81
|
false
|
80
82
|
end
|
data/lib/version.rb
CHANGED
data/spec/dim_spec.rb
CHANGED
@@ -209,7 +209,11 @@ describe Dim::Container do
|
|
209
209
|
|
210
210
|
Scenario "verifying dependencies" do
|
211
211
|
Given { container.register(:app) { :app } }
|
212
|
-
|
213
|
-
|
212
|
+
Given {
|
213
|
+
def container.custom_method
|
214
|
+
end
|
215
|
+
}
|
216
|
+
Then { container.verify_dependencies(:app,:custom_method).should == true }
|
217
|
+
Then { container.verify_dependencies(:app,:custom_method,:frobosh).should == false }
|
214
218
|
end
|
215
219
|
end
|