toque 1.2.0 → 1.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: abe45ec2e232621d391e863a00de26f9687c2efe
4
- data.tar.gz: 20dcc17fcf3005f8f7ed944213ba5a2cb34abe9f
3
+ metadata.gz: f761384eb96137f039fca62a1392d589c551e24b
4
+ data.tar.gz: a1fdae68c2bac72044d822a0efa92ecf8b187529
5
5
  SHA512:
6
- metadata.gz: fec190cf7bea20de7c050792ff0f2897344e3d39b2818605ec28d16ee866cf88f321f586816e20c4f6758ba00437c235631fa5dba7dc6a07f6ced9d3362980e8
7
- data.tar.gz: 0ba3906f360398bccc02ddd76902a9881204e50cd4ab5c5dabf42a23480c244ecb14aafcff0c69518d0bb892a8ffe095cf6ebd1b7a5fc9c9863a369adabec6a0
6
+ metadata.gz: e8b70c8223223cc0e57d6eb28ce4b8258f7d31911212555c657fe25aa926ae3fc09571f5219baf669dadcc50be1021aa2d480161fd128161939f6465f1efc5f7
7
+ data.tar.gz: d183c37658c21a9271305fa9880618f97a550d03ecbde72d11234f5ecbb7a9edbfc6b46e8eb3d863370b000d2860dc611f9d7961270b3a347c4014ff84dc8aac
data/lib/toque/chef.rb CHANGED
@@ -123,11 +123,20 @@ module Toque
123
123
  end
124
124
 
125
125
  def convert(hash)
126
- hash.inject({}) do |h, e|
127
- key, value = *e
128
- h[key] = convert value if value.is_a?(Hash)
129
- h[key] = value.call if value.is_a?(Proc)
130
- h
126
+ hash.inject({}) do |attributes, element|
127
+ key, value = *element
128
+
129
+ begin
130
+ value = value.call if value.respond_to? :call
131
+ value = convert value if value.is_a?(Hash)
132
+ value = nil if value.class.to_s.include? 'Capistrano'
133
+ attributes[key] = value unless value.nil?
134
+ rescue ::Capistrano::CommandError => error
135
+ logger.debug "Could not get the value of #{key}: #{error.message}"
136
+ nil
137
+ end
138
+
139
+ attributes
131
140
  end
132
141
  end
133
142
  end
data/lib/toque/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Toque
2
2
  module VERSION
3
3
  MAJOR = 1
4
- MINOR = 2
4
+ MINOR = 3
5
5
  PATCH = 0
6
6
  STAGE = nil
7
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toque
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen