image_builder 0.0.11 → 0.0.12

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: 690fa3f0bd68eada1510fc714e3455430d6be51a
4
- data.tar.gz: 434f6184986ea8d455a0038a7b87bed14e2e9946
3
+ metadata.gz: 54384166eb9245b2f29e4eeb8bd233508c7d3d29
4
+ data.tar.gz: 23a836e23757098ec4ea8f5e180d341c9b734880
5
5
  SHA512:
6
- metadata.gz: 5a593a50eadbf19c77e35f8702a80a4bcdba41965229f7404ee5e4fa43d999563b1fb5e987ff860d4e65be80c6399744cdfbe39cac8560b9dce02969b37b6650
7
- data.tar.gz: d003f07ea5bbede50d25bb509d82170e7be5add7675a15884811bab738e2be16e35f6d94769345ee59a21f62cf31d5bd4acf3d4a1c824e5438e23e2197b410c5
6
+ metadata.gz: 79cef5ceddae23ea677499d160cc752ce17268e44f696c22d6b059c2044dc73daf87399036886a5989a4db3bc69deef0694e263f7c66b5c70832b497933adf4e
7
+ data.tar.gz: a786b928fd016fa6c09499f55c1b58ae8d72c15432a7d62c0544cb0ca3ba6b9d6ff46e1786a451f811d45fb1f77d372fc6b16b0fb8aa8ba331508101b4cebf1b
data/.rubocop.yml CHANGED
@@ -14,3 +14,6 @@ Metrics/CyclomaticComplexity:
14
14
 
15
15
  Metrics/PerceivedComplexity:
16
16
  Max: 10
17
+
18
+ Metrics/ParameterLists:
19
+ Max: 7
data/bin/image_builder CHANGED
@@ -106,10 +106,10 @@ def create_builders(attrs, options)
106
106
  end
107
107
  # rubocop:enable Metrics/MethodLength
108
108
 
109
- def run_packer(builders, provisioners, postprocessors, path = nil, debug = false)
109
+ def run_packer(builders, provisioners, postprocessors, path = nil, debug = false, *args)
110
110
  ImageBuilder::Backends::Packer.packer_path(path) unless path.nil? || path.strip.empty?
111
111
  packer = ImageBuilder::Backends::Packer.new
112
- opts = ['-machine-readable']
112
+ opts = ['-machine-readable'] + args
113
113
  opts << '-debug' if debug
114
114
 
115
115
  builders.each do |b|
@@ -124,7 +124,7 @@ def run_packer(builders, provisioners, postprocessors, path = nil, debug = false
124
124
  packer.add_post_processor(p)
125
125
  end
126
126
 
127
- packer.build(opts)
127
+ packer.build(opts.flatten.compact)
128
128
  end
129
129
 
130
130
  def convert_tags(tag_opt)
@@ -179,7 +179,7 @@ Commander.configure do
179
179
  c.option '--[no-]vagrant-box', 'Create a Vagrant box defintion after the build completes'
180
180
  c.option '--chef-version VERSION', String, 'chef-client version to install. If not given, will use the latest version'
181
181
 
182
- c.action do |_args, options|
182
+ c.action do |args, options|
183
183
  options.default vagrant_box: false
184
184
  options.default tags: {}
185
185
 
@@ -244,7 +244,7 @@ Commander.configure do
244
244
  provisioners = [dir_prov, sec_prov, chef_client_prov, ss_file_prov, ss_shell_prov, cleanup_prov, sleep_prov].compact
245
245
 
246
246
  # run packer
247
- run_packer(builders, provisioners, [vagrant].compact, options.p_packer_path, options.debug)
247
+ run_packer(builders, provisioners, [vagrant].compact, options.p_packer_path, options.debug, args)
248
248
  end
249
249
  end
250
250
 
@@ -1,4 +1,4 @@
1
1
  # Generic top-level module comment
2
2
  module ImageBuilder
3
- VERSION = '0.0.11'
3
+ VERSION = '0.0.12'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Morris
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-10 00:00:00.000000000 Z
11
+ date: 2014-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler