vagrant-puppetfile 0.4.1 → 0.4.2
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 +4 -4
- data/lib/vagrant/puppetfile/version.rb +1 -1
- data/lib/vagrant/puppetfile.rb +19 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 362c96b5711e8e8cd60b0f651938daeeb7128ace
|
4
|
+
data.tar.gz: e2dc0ec31dc197649d8e0ffb61b8cc80b47d8e6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94763c4eac04534b5013f08d36a1f38eb75c0a93bd799f5efed5ae257cae9f7aa063b48a9b2e3b86d51642d5e6adde83f935099572fa36acfb135e39082adb75
|
7
|
+
data.tar.gz: 6a83f7e8f390f93b40eb83bb5e1cdfc6e2a5a553b556b20a8469be8c3b3966752851bfa434c71afdfea5486e07a79f4583eb7492728aba0e7e714bd3f62514fe
|
data/lib/vagrant/puppetfile.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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.
|
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-
|
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
|