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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODM5ZDVmNzNjOGE3Yzc1MjBhMWIwNjQ3MGIxYzU3ZDUxMjIwZWVjZA==
4
+ ODMwNTEzMjE5MTNkYTFkMzA2MDkxZDQ3NDcxYWUyZTVhMjkzZGU3Yg==
5
5
  data.tar.gz: !binary |-
6
- ZWEwMDRhNWZlNzQ3Y2ZjZDMxOTA5NzM2MDVjY2QwODZmNzAxZmExMg==
6
+ NmNkYmZiYzZjYzU1OTU0ZDk3ZmQ5OTZmOTE4MGQzNGFlZjk3NzA2ZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- N2E5ODE4MGFhNjM4OTlhYzFkMWFmZDVkZjA1MjBiNmNmMmE5OWMwNTEzZDBi
10
- NzYyZmNjMTBhNTk4NGM1NjYzNjdjZDJkYWY0ZTY3NGEzOTNhOTFhN2NiMmYz
11
- ZWIzY2Q5ODZlNWVmOGY3MWQ4NmMxZTJmN2EzMzU2NDEwMTFlZGQ=
9
+ MzQ4ZmU3ZGY0NDFkZGU3YTI4MGJlNGQ2MDBjZDIxOGIxNzZmNDBjOWE3MmE0
10
+ MmJlNjZiNTRjNmI5ZGVmODQ2ZGQ0ZDBlZmJiNGM5ODViMGJjOGJjM2U2MmNl
11
+ YTJlYWYyOWY0ZGRjOTQ0Zjg3YThhNDhkYzZhODgwMDA3NTJmYWY=
12
12
  data.tar.gz: !binary |-
13
- ZDJlOTc4ZTFiYTk1ZTA4NThjNjRiMzUyN2UxYzY5MmY0MDc1MDVjMzJmNzU1
14
- YjI2ZjczOTI1ZTk4OGU3ZWU3MzIyZDMyNzkyMzQwNjI2OWQxY2Y3ODA1ZjFi
15
- NDM3YzkzZGQyMTRmYzgyNTRjNjI4OWZkYjU4Y2UyMjhiNTlkNWE=
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? { |name| service_block(name) }
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
@@ -1,3 +1,3 @@
1
1
  module Dim
2
- VERSION = "1.2.6"
2
+ VERSION = "1.2.7"
3
3
  end
@@ -209,7 +209,11 @@ describe Dim::Container do
209
209
 
210
210
  Scenario "verifying dependencies" do
211
211
  Given { container.register(:app) { :app } }
212
- Then { container.verify_dependencies(:app).should == true }
213
- Then { container.verify_dependencies(:app,:frobosh).should == false }
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dim
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich