kondate 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a431b57f1b6c036f09520ef851e7fd4b41a5329e
4
- data.tar.gz: cb3ccc508f8f9ab2d7ef47e34291d4997578c5f6
3
+ metadata.gz: d31589ca629f60bafbae2b69c18b2624727f61bf
4
+ data.tar.gz: bf1aab50985881df2d3992a52450f5c7b1bbd2c7
5
5
  SHA512:
6
- metadata.gz: f6cf11acfe6ac73c2d53271a1c669a128c567e2d6a679ea931ab29e8f79c4aae713a3c48c3fb11686de7fe96d0cf09d167246f5d9c5a935a0cbc547ff8395abd
7
- data.tar.gz: a1eeb1a1059e97cbc7150055c52414b70a9ffec2e70d957fb57eb3bc48a551957bf2ea7dc44afc1eeb580c535172525feb9c2eee8dfaa4d5a65e8a2781001b55
6
+ metadata.gz: ede72933e1fe30fa55497986daaaa849e8e0afc1c67ae78ebc267595b441fb02f129b874752303eac3d490f66cabc6ce9ee366f8294ac4968326ce1fda82adb8
7
+ data.tar.gz: 7c0ae9c00177ec96fb7fe967d56d90106163b29ede13caf2b8af9ece4726df90eac0a02f933ce662661afc097533a0c6571bd74f91399958edb5697db3573adb
@@ -1,3 +1,9 @@
1
+ # 0.4.3 (2016-12-02)
2
+
3
+ Fixes:
4
+
5
+ * Fixe nil error
6
+
1
7
  # 0.4.2 (2016-12-01)
2
8
 
3
9
  Enhancements:
@@ -134,7 +134,7 @@ module Kondate
134
134
  env = {}
135
135
  env['RUBYOPT'] = "-I #{Config.plugin_dir} -r bundler/setup -r ext/itamae/kondate"
136
136
  property_files.each do |role, property_file|
137
- next if property_file.nil?
137
+ next if property_file.empty?
138
138
  command = "bundle exec itamae ssh"
139
139
  command << " -h #{host}"
140
140
 
@@ -166,7 +166,7 @@ module Kondate
166
166
  env['TARGET_VAGRANT'] = '1' if @options[:vagrant]
167
167
  env['RUBYOPT'] = "-I #{Config.plugin_dir} -r bundler/setup -r ext/serverspec/kondate"
168
168
  property_files.each do |role, property_file|
169
- next if property_file.nil?
169
+ next if property_file.empty?
170
170
  spec_files = property_file.load['attributes'].keys.map {|recipe|
171
171
  secret_spec_file = File.join(Config.secret_middleware_recipes_serverspec_dir, "#{recipe}_spec.rb")
172
172
  spec_file = File.join(Config.middleware_recipes_serverspec_dir, "#{recipe}_spec.rb")
@@ -187,7 +187,7 @@ module Kondate
187
187
  end
188
188
 
189
189
  def proceed?(property_files)
190
- if property_files.values.compact.empty?
190
+ if property_files.values.compact.reject(&:empty?).empty?
191
191
  $stderr.puts "Nothing to run"
192
192
  false
193
193
  elsif @options[:confirm]
@@ -216,11 +216,11 @@ module Kondate
216
216
  end
217
217
  $stdout.print ", sources: #{property_file.source_files}"
218
218
 
219
- if property_file
219
+ if property_file.empty?
220
+ $stdout.puts " (no attribute, skipped)"
221
+ else
220
222
  $stdout.puts
221
223
  $stdout.puts property_file.read
222
- else
223
- $stdout.puts " (no attribute, skipped)"
224
224
  end
225
225
  end
226
226
  end
@@ -238,11 +238,7 @@ module Kondate
238
238
 
239
239
  property_files = {}
240
240
  roles.each do |role|
241
- if property_file = builder.install(role, @options[:recipe])
242
- property_files[role] = property_file
243
- else
244
- property_files[role] = nil
245
- end
241
+ property_files[role] = builder.install(role, @options[:recipe])
246
242
  end
247
243
 
248
244
  property_files
@@ -135,7 +135,7 @@ module Kondate
135
135
  end
136
136
 
137
137
  if property['attributes'].empty?
138
- nil
138
+ PropertyFile.new(nil, files)
139
139
  else
140
140
  fp = Tempfile.create("kondate_")
141
141
  YAML.dump(property.to_h, fp)
@@ -17,6 +17,10 @@ module Kondate
17
17
  YAML.load_file(path)
18
18
  end
19
19
 
20
+ def empty?
21
+ @path.nil?
22
+ end
23
+
20
24
  private
21
25
 
22
26
  def mask_secrets(str)
@@ -1,3 +1,3 @@
1
1
  module Kondate
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kondate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - sonots