vagrant-puppetfile 0.4.1 → 0.4.2

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: 8d5eeaa153d6998bc5003e12dd77d8c36de9e40f
4
- data.tar.gz: 9aa4016927c8a1bae872f5f357e3779c1b52629c
3
+ metadata.gz: 362c96b5711e8e8cd60b0f651938daeeb7128ace
4
+ data.tar.gz: e2dc0ec31dc197649d8e0ffb61b8cc80b47d8e6d
5
5
  SHA512:
6
- metadata.gz: 9080b1ee8a5c5adf04b3ed5b0045b115d864d3f439ba7aa7034ed868e64303063b20b9745d0d936c37519aa70e7d58a79b0157a2ae0f724af8f5b90e90a15908
7
- data.tar.gz: 8b706134b0534f732121a2f7af6bb0a8efb17e935dd503dc4165a3c4cef8d4e7a0f1860e0ab528d1e3b698c04766d40b1023c980e350525ecbe8a29f6a0da211
6
+ metadata.gz: 94763c4eac04534b5013f08d36a1f38eb75c0a93bd799f5efed5ae257cae9f7aa063b48a9b2e3b86d51642d5e6adde83f935099572fa36acfb135e39082adb75
7
+ data.tar.gz: 6a83f7e8f390f93b40eb83bb5e1cdfc6e2a5a553b556b20a8469be8c3b3966752851bfa434c71afdfea5486e07a79f4583eb7492728aba0e7e714bd3f62514fe
@@ -21,6 +21,6 @@
21
21
  module Vagrant
22
22
  module Puppetfile
23
23
  NAME = 'vagrant-puppetfile'
24
- VERSION = '0.4.1'
24
+ VERSION = '0.4.2'
25
25
  end
26
26
  end
@@ -161,7 +161,10 @@ module Vagrant
161
161
  @puppetfile = puppetfile
162
162
 
163
163
  # Make sure the evaluator actually exists and can be called.
164
- fail NoEvaluatorError, path unless available?
164
+ unless available?
165
+ logger.error("Unable to find command: #{path}")
166
+ fail NoEvaluatorError, path
167
+ end
165
168
 
166
169
  # Check for the puppetfile and bomb if it doesn't exist.
167
170
  unless File.readable?(puppetfile)
@@ -170,9 +173,19 @@ module Vagrant
170
173
  end
171
174
  end
172
175
 
176
+ def with_clean_env
177
+ if not defined? ::Bundler
178
+ yield
179
+ else
180
+ ::Bundler.with_clean_env do
181
+ ENV_CLEAN_KEYS.each { |k| ENV.delete(k) }
182
+ yield
183
+ end
184
+ end
185
+ end
186
+
173
187
  def command(*args)
174
- ::Bundler.with_clean_env do
175
- ENV_CLEAN_KEYS.each { |k| ENV.delete(k) }
188
+ with_clean_env do
176
189
  Open3.capture2e(path, *args.map(&:shellescape))
177
190
  end
178
191
  end
@@ -191,7 +204,7 @@ module Vagrant
191
204
  class R10k < Base
192
205
  def available?
193
206
  command('version').last.success?
194
- rescue
207
+ rescue SystemCallError
195
208
  false
196
209
  end
197
210
 
@@ -214,7 +227,7 @@ module Vagrant
214
227
 
215
228
  def available?
216
229
  command('version').last.success?
217
- rescue
230
+ rescue SystemCallError
218
231
  false
219
232
  end
220
233
 
@@ -234,7 +247,7 @@ module Vagrant
234
247
 
235
248
  def available?
236
249
  command('--version').last.success?
237
- rescue
250
+ rescue SystemCallError
238
251
  false
239
252
  end
240
253
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-puppetfile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Hanson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-16 00:00:00.000000000 Z
11
+ date: 2017-05-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Automatically installs puppet modules from a Puppetfile during Vagrant
14
14
  provisioning