convection 2.2.8 → 2.2.9

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: 6ba2f42fdb7fb671c533b288722cc026c63dc4bc
4
- data.tar.gz: a9b28acd74ab17f87758ed6335c96abc25d9e00d
3
+ metadata.gz: 885a2657be20ba62b8093c5e9a1a40ba1e07d00a
4
+ data.tar.gz: ef6fa45e59e1f5c5cb638a25aee3d988d6e8df84
5
5
  SHA512:
6
- metadata.gz: 5c562ffe40cf33291e5f7f432f165159ecadde45b51c54d5360eaf7cd897fd177b2f673bb9d12e83f6754c40f34feeaa83620922b78be0b8d73e11d31628b46a
7
- data.tar.gz: e48170671159844192d07f493921a7304c66d36065a37b171ec9518e5f6e0c8a00d78c9179ce0f779d9cb052842bab43b4e3e753061a601690be4e8d914d170d
6
+ metadata.gz: bfb48a30b72cfd48182128f4844ffa1545135b197366777b517ed4c7273068324252427e268268c37c593b444cb50420c01b92fc7bcc07fc710c0d6c963ce708
7
+ data.tar.gz: 857133927e3ca14e847c663c93523073595514e03116c830a02b5cf24c6a821224569f26fe6a849233ee2104e5989053506acc45378d29bef90f6c177810c22c
data/bin/convection CHANGED
@@ -247,7 +247,7 @@ module Convection
247
247
  empty_directory options[:output_directory] if resource.respond_to?(:to_hcl_json) || resource.respond_to?(:additional_hcl_files)
248
248
  if resource.respond_to?(:to_hcl_json)
249
249
  destination = File.join(options[:output_directory], "#{resource.name.underscore}.tf.json")
250
- create_file destination, resource.to_hcl_json, force: options[:overwrite], skip: options[:skip_existing]
250
+ create_file destination, resource.to_hcl_json(module_path: options[:module_path]), force: options[:overwrite], skip: options[:skip_existing]
251
251
  elsif resource.respond_to?(:additional_hcl_files)
252
252
  say "# Skipping to HCL generation with #to_hcl_json. Will generate HCL using #additional_hcl_files instead.", :cyan
253
253
  else
@@ -255,8 +255,9 @@ module Convection
255
255
  end
256
256
 
257
257
  if resource.respond_to?(:additional_hcl_files)
258
- resource.additional_hcl_files.each do |file, content|
258
+ resource.additional_hcl_files(module_path: options[:module_path]).each do |file, content|
259
259
  destination = File.join(options[:output_directory], file.to_s)
260
+ empty_directory File.dirname(destination) if file.to_s.include?('/')
260
261
  create_file destination, content.to_json, force: options[:overwrite], skip: options[:skip_existing]
261
262
  end
262
263
  end
@@ -551,7 +551,9 @@ module Convection
551
551
  collection << event
552
552
  end
553
553
 
554
- break if pages.zero?
554
+ # rubocop:disable Style/NumericPredicate
555
+ break if pages == 0
556
+ # rubocop:enable Style/NumericPredicate
555
557
  end
556
558
 
557
559
  @last_event_seen = collection.first.event_id unless collection.empty?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: convection
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.8
4
+ version: 2.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Manero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-19 00:00:00.000000000 Z
11
+ date: 2017-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport