image_builder 0.0.5 → 0.0.6

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: 4e219c5e6fded5f9f988a28e5a69a9c6b67139fd
4
- data.tar.gz: 8f12394a623b672697e1445c4349edaf4556d11c
3
+ metadata.gz: 4dad5330712e1e493380c06ce30c27c631bc8668
4
+ data.tar.gz: 7cc941b95547d231ae5d0f01ded310a8efa65eda
5
5
  SHA512:
6
- metadata.gz: 807bcad0836f8bcc844588d3d665458ce7ab4188bb37a7211368ca19868969fcfd996ca0879795fd4bf8d227a4b5c544f38a385cf5010b7a9900ee7fbf6b2c82
7
- data.tar.gz: 6641a0f7a77b869d0fff15e990478e9a2293760ff74207b759f2c6ff55be139e243efb18feb67f3e8c919ba394bcaf553ae70ec7bd2018dd89b1941b59674e72
6
+ metadata.gz: 5a456a9d62cf45f077491b14500c7fc02989b6dc64c59ea89b84a73e39ed4c02366086f29cbee57b21a09d243ef3df7d902ea6f3599eb01d44c5414a42bd6060
7
+ data.tar.gz: 1f078bc505be1671a1f324d8ce094bbddeadce32dd179bda7b8effb0f5ccac09946144c95b6ece6aabe097fa3dae0eb75a7af8b3c7d588927151cc017ae0a0f6
@@ -16,9 +16,6 @@ module ImageBuilder
16
16
  attr_accessor :provisioners
17
17
  attr_accessor :variables
18
18
 
19
- @@default_path = ['/bin', '/usr/bin', '/sbin', '/usr/sbin', '/usr/local/bin']
20
- @@default_path << ::File.join(ENV['GEM_HOME'], 'bin') if ENV.key? 'GEM_HOME'
21
-
22
19
  @@packer_exe = 'packer'
23
20
 
24
21
  def initialize
@@ -30,7 +27,6 @@ module ImageBuilder
30
27
 
31
28
  def self.packer_path(path)
32
29
  @@packer_exe = ::File.expand_path(path)
33
- @@default_path.unshift ::File.dirname(::File.expand_path(@@packer_exe))
34
30
  end
35
31
 
36
32
  def self.packer_path=(path)
@@ -66,16 +62,12 @@ module ImageBuilder
66
62
 
67
63
  if args.include?('-debug')
68
64
  json_obj = JSON.parse(to_json)
69
-
70
- puts "DEBUG: PACKER_EXE = #{@@packer_exe}"
71
- puts "DEBUG: PATH = $PATH:#{@@default_path}"
72
65
  puts 'DEBUG: PACKER_JSON ='
73
66
  puts JSON.pretty_generate(json_obj)
74
67
  end
75
68
 
76
69
  # Some provisioners may take a long time to run without giving output (applying OS updates via Chef
77
70
  # to CentOS6, and AMI copying, comes to mind), so extend the timeout to 1.5 hours.
78
- # shellout = Mixlib::ShellOut.new(cmd, env: { 'PATH' => @@default_path.join(':') }, input: to_json, timeout: 5400)
79
71
  shellout = Mixlib::ShellOut.new(cmd, input: to_json, timeout: 5400)
80
72
  shellout.live_stdout = STDOUT
81
73
  shellout.live_stderr = STDERR
@@ -89,7 +81,7 @@ module ImageBuilder
89
81
  cmd = [@@packer_exe, 'validate'].concat(args)
90
82
  cmd << '-'
91
83
 
92
- shellout = Mixlib::ShellOut.new(cmd, env: { 'PATH' => "#{ENV['PATH']}:#{@@default_path.join(':')}" }, input: to_json)
84
+ shellout = Mixlib::ShellOut.new(cmd, input: to_json)
93
85
  shellout.inspect
94
86
  shellout.run_command
95
87
  shellout.error!
@@ -1,4 +1,4 @@
1
1
  # Generic top-level module comment
2
2
  module ImageBuilder
3
- VERSION = '0.0.5'
3
+ VERSION = '0.0.6'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Morris