vagrant-dsc 1.0.5 → 1.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 +4 -4
- data/lib/vagrant-dsc/templates/runner.ps1.erb +3 -4
- data/lib/vagrant-dsc/version.rb +1 -1
- data/spec/provisioner/provisioner_spec.rb +17 -23
- metadata +3 -7
- data/spec/command_builder_spec.rb +0 -105
- data/spec/provisioner/base_test.rb.bak +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f37a6800d96aab5dc37e1d69a7e44cee9d559b3d
|
4
|
+
data.tar.gz: f2d0898a6c453fcba7a90c1b01e941ee01868644
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 382688986ac32d39dfd5014a5f9cbdf08517e17baff1196ab653c3e560036d1567e14fedcb023bd4fd0599ee78cf7a474e46937de7be4c4f60c33aee6c34a34e
|
7
|
+
data.tar.gz: 6cada93d1c44481e7cc9d252fae2de0a38b652b9d972e6c0d7fc28f216a9c22101450ee76293f1f2b23f48b9da6929d5167651a6feecff6ab292ac9fa4d7be46
|
@@ -26,12 +26,11 @@ echo "Running Configuration file: ${script}"
|
|
26
26
|
|
27
27
|
cd "<%= options[:temp_path] %>"
|
28
28
|
$StagingPath = $(Join-Path "<%= options[:temp_path] %>" "staging")
|
29
|
-
|
29
|
+
<%=options[:configuration_name]%> -OutputPath $StagingPath <%= options[:parameters] %>
|
30
30
|
<% else %>
|
31
31
|
$StagingPath = "<%= options[:mof_path] %>"
|
32
32
|
<% end %>
|
33
33
|
|
34
34
|
# Start a DSC Configuration run
|
35
|
-
|
36
|
-
del $StagingPath\*.mof
|
37
|
-
$response
|
35
|
+
Start-DscConfiguration -Force -Wait -Verbose -Path $StagingPath
|
36
|
+
del $StagingPath\*.mof
|
data/lib/vagrant-dsc/version.rb
CHANGED
@@ -274,12 +274,11 @@ echo \"Running Configuration file: ${script}\"
|
|
274
274
|
|
275
275
|
cd \"/tmp/vagrant-dsc-1\"
|
276
276
|
$StagingPath = $(Join-Path \"/tmp/vagrant-dsc-1\" \"staging\")
|
277
|
-
|
277
|
+
MyWebsite -OutputPath $StagingPath
|
278
278
|
|
279
279
|
# Start a DSC Configuration run
|
280
|
-
|
281
|
-
del $StagingPath\\*.mof
|
282
|
-
$response"
|
280
|
+
Start-DscConfiguration -Force -Wait -Verbose -Path $StagingPath
|
281
|
+
del $StagingPath\\*.mof"
|
283
282
|
|
284
283
|
expect(script).to eq(expect_script)
|
285
284
|
end
|
@@ -316,12 +315,11 @@ echo \"Running Configuration file: ${script}\"
|
|
316
315
|
|
317
316
|
cd \"/tmp/vagrant-dsc-1\"
|
318
317
|
$StagingPath = $(Join-Path \"/tmp/vagrant-dsc-1\" \"staging\")
|
319
|
-
|
318
|
+
MyWebsite -OutputPath $StagingPath
|
320
319
|
|
321
320
|
# Start a DSC Configuration run
|
322
|
-
|
323
|
-
del $StagingPath\\*.mof
|
324
|
-
$response"
|
321
|
+
Start-DscConfiguration -Force -Wait -Verbose -Path $StagingPath
|
322
|
+
del $StagingPath\\*.mof"
|
325
323
|
|
326
324
|
expect(script).to eq(expect_script)
|
327
325
|
end
|
@@ -357,12 +355,11 @@ echo \"Running Configuration file: ${script}\"
|
|
357
355
|
|
358
356
|
cd \"/tmp/vagrant-dsc-1\"
|
359
357
|
$StagingPath = $(Join-Path \"/tmp/vagrant-dsc-1\" \"staging\")
|
360
|
-
|
358
|
+
MyWebsite -OutputPath $StagingPath -Foo \"bar\" -ComputerName \"catz\"
|
361
359
|
|
362
360
|
# Start a DSC Configuration run
|
363
|
-
|
364
|
-
del $StagingPath\\*.mof
|
365
|
-
$response"
|
361
|
+
Start-DscConfiguration -Force -Wait -Verbose -Path $StagingPath
|
362
|
+
del $StagingPath\\*.mof"
|
366
363
|
|
367
364
|
expect(script).to eq(expect_script)
|
368
365
|
end
|
@@ -396,12 +393,11 @@ echo \"Running Configuration file: ${script}\"
|
|
396
393
|
|
397
394
|
cd \"/tmp/vagrant-dsc-1\"
|
398
395
|
$StagingPath = $(Join-Path \"/tmp/vagrant-dsc-1\" \"staging\")
|
399
|
-
|
396
|
+
MyWebsite -OutputPath $StagingPath -FooFlag -BarFlag -FooParam \"FooVal\"
|
400
397
|
|
401
398
|
# Start a DSC Configuration run
|
402
|
-
|
403
|
-
del $StagingPath\\*.mof
|
404
|
-
$response"
|
399
|
+
Start-DscConfiguration -Force -Wait -Verbose -Path $StagingPath
|
400
|
+
del $StagingPath\\*.mof"
|
405
401
|
|
406
402
|
expect(script).to eq(expect_script)
|
407
403
|
end
|
@@ -436,9 +432,8 @@ echo \"Running Configuration file: ${script}\"
|
|
436
432
|
$StagingPath = \"staging\"
|
437
433
|
|
438
434
|
# Start a DSC Configuration run
|
439
|
-
|
440
|
-
del $StagingPath\\*.mof
|
441
|
-
$response"
|
435
|
+
Start-DscConfiguration -Force -Wait -Verbose -Path $StagingPath
|
436
|
+
del $StagingPath\\*.mof"
|
442
437
|
|
443
438
|
expect(script).to eq(expect_script)
|
444
439
|
end
|
@@ -490,12 +485,11 @@ echo \"Running Configuration file: ${script}\"
|
|
490
485
|
|
491
486
|
cd \"/tmp/vagrant-dsc-1\"
|
492
487
|
$StagingPath = $(Join-Path \"/tmp/vagrant-dsc-1\" \"staging\")
|
493
|
-
|
488
|
+
MyWebsite -OutputPath $StagingPath -ConfigurationData \"/tmp/vagrant-dsc-1/manifests/MyConfig.psd1\"
|
494
489
|
|
495
490
|
# Start a DSC Configuration run
|
496
|
-
|
497
|
-
del $StagingPath\\*.mof
|
498
|
-
$response"
|
491
|
+
Start-DscConfiguration -Force -Wait -Verbose -Path $StagingPath
|
492
|
+
del $StagingPath\\*.mof"
|
499
493
|
|
500
494
|
expect(script).to eq(expect_script)
|
501
495
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-dsc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Fellows
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -180,8 +180,6 @@ files:
|
|
180
180
|
- lib/vagrant-dsc/templates/runner.ps1.erb
|
181
181
|
- lib/vagrant-dsc/version.rb
|
182
182
|
- spec/base.rb
|
183
|
-
- spec/command_builder_spec.rb
|
184
|
-
- spec/provisioner/base_test.rb.bak
|
185
183
|
- spec/provisioner/config_spec.rb
|
186
184
|
- spec/provisioner/provisioner_spec.rb
|
187
185
|
- spec/spec_helper.rb
|
@@ -206,14 +204,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
204
|
version: '0'
|
207
205
|
requirements: []
|
208
206
|
rubyforge_project:
|
209
|
-
rubygems_version: 2.
|
207
|
+
rubygems_version: 2.4.1
|
210
208
|
signing_key:
|
211
209
|
specification_version: 4
|
212
210
|
summary: DSC Provisioner for Vagrant
|
213
211
|
test_files:
|
214
212
|
- spec/base.rb
|
215
|
-
- spec/command_builder_spec.rb
|
216
|
-
- spec/provisioner/base_test.rb.bak
|
217
213
|
- spec/provisioner/config_spec.rb
|
218
214
|
- spec/provisioner/provisioner_spec.rb
|
219
215
|
- spec/spec_helper.rb
|
@@ -1,105 +0,0 @@
|
|
1
|
-
# require_relative "../../../base"
|
2
|
-
|
3
|
-
# require Vagrant.source_root.join("plugins/provisioners/chef/command_builder")
|
4
|
-
|
5
|
-
# describe VagrantPlugins::Chef::CommandBuilder do
|
6
|
-
|
7
|
-
# let(:machine) { double("machine") }
|
8
|
-
# let(:chef_config) { double("chef_config") }
|
9
|
-
|
10
|
-
# before(:each) do
|
11
|
-
# allow(chef_config).to receive(:provisioning_path).and_return('/tmp/vagrant-chef-1')
|
12
|
-
# allow(chef_config).to receive(:arguments).and_return(nil)
|
13
|
-
# allow(chef_config).to receive(:binary_env).and_return(nil)
|
14
|
-
# allow(chef_config).to receive(:binary_path).and_return(nil)
|
15
|
-
# allow(chef_config).to receive(:binary_env).and_return(nil)
|
16
|
-
# end
|
17
|
-
|
18
|
-
# describe '.initialize' do
|
19
|
-
# it 'should raise when chef type is not client or solo' do
|
20
|
-
# expect { VagrantPlugins::Chef::CommandBuilder.new(chef_config, :client_bad) }.
|
21
|
-
# to raise_error
|
22
|
-
# end
|
23
|
-
# end
|
24
|
-
|
25
|
-
# describe 'build_command' do
|
26
|
-
# describe 'windows' do
|
27
|
-
# subject do
|
28
|
-
# VagrantPlugins::Chef::CommandBuilder.new(chef_config, :client, true)
|
29
|
-
# end
|
30
|
-
|
31
|
-
# it "executes the chef-client in PATH by default" do
|
32
|
-
# expect(subject.build_command()).to match(/^chef-client/)
|
33
|
-
# end
|
34
|
-
|
35
|
-
# it "executes the chef-client using full path if binary_path is specified" do
|
36
|
-
# allow(chef_config).to receive(:binary_path).and_return(
|
37
|
-
# "c:\\opscode\\chef\\bin\\chef-client")
|
38
|
-
# expect(subject.build_command()).to match(/^c:\\opscode\\chef\\bin\\chef-client\\chef-client/)
|
39
|
-
# end
|
40
|
-
|
41
|
-
# it "builds a guest friendly client.rb path" do
|
42
|
-
# expect(subject.build_command()).to include(
|
43
|
-
# '-c c:\\tmp\\vagrant-chef-1\\client.rb')
|
44
|
-
# end
|
45
|
-
|
46
|
-
# it "builds a guest friendly solo.json path" do
|
47
|
-
# expect(subject.build_command()).to include(
|
48
|
-
# '-j c:\\tmp\\vagrant-chef-1\\dna.json')
|
49
|
-
# end
|
50
|
-
|
51
|
-
# it 'includes Chef arguments if specified' do
|
52
|
-
# allow(chef_config).to receive(:arguments).and_return("-l DEBUG")
|
53
|
-
# expect(subject.build_command()).to include(
|
54
|
-
# '-l DEBUG')
|
55
|
-
# end
|
56
|
-
|
57
|
-
# it 'includes --no-color if UI is not colored' do
|
58
|
-
# expect(subject.build_command()).to include(
|
59
|
-
# ' --no-color')
|
60
|
-
# end
|
61
|
-
# end
|
62
|
-
|
63
|
-
# describe 'linux' do
|
64
|
-
# subject do
|
65
|
-
# VagrantPlugins::Chef::CommandBuilder.new(chef_config, :client, false)
|
66
|
-
# end
|
67
|
-
|
68
|
-
# it "executes the chef-client in PATH by default" do
|
69
|
-
# expect(subject.build_command()).to match(/^chef-client/)
|
70
|
-
# end
|
71
|
-
|
72
|
-
# it "executes the chef-client using full path if binary_path is specified" do
|
73
|
-
# allow(chef_config).to receive(:binary_path).and_return(
|
74
|
-
# "/opt/chef/chef-client")
|
75
|
-
# expect(subject.build_command()).to match(/^\/opt\/chef\/chef-client/)
|
76
|
-
# end
|
77
|
-
|
78
|
-
# it "builds a guest friendly client.rb path" do
|
79
|
-
# expect(subject.build_command()).to include(
|
80
|
-
# '-c /tmp/vagrant-chef-1/client.rb')
|
81
|
-
# end
|
82
|
-
|
83
|
-
# it "builds a guest friendly solo.json path" do
|
84
|
-
# expect(subject.build_command()).to include(
|
85
|
-
# '-j /tmp/vagrant-chef-1/dna.json')
|
86
|
-
# end
|
87
|
-
|
88
|
-
# it 'includes Chef arguments if specified' do
|
89
|
-
# allow(chef_config).to receive(:arguments).and_return("-l DEBUG")
|
90
|
-
# expect(subject.build_command()).to include(
|
91
|
-
# '-l DEBUG')
|
92
|
-
# end
|
93
|
-
|
94
|
-
# it 'includes --no-color if UI is not colored' do
|
95
|
-
# expect(subject.build_command()).to include(
|
96
|
-
# ' --no-color')
|
97
|
-
# end
|
98
|
-
|
99
|
-
# it 'includes environment variables if specified' do
|
100
|
-
# allow(chef_config).to receive(:binary_env).and_return("ENVVAR=VAL")
|
101
|
-
# expect(subject.build_command()).to match(/^ENVVAR=VAL /)
|
102
|
-
# end
|
103
|
-
# end
|
104
|
-
# end
|
105
|
-
# end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
require_relative "../../../../base"
|
2
|
-
|
3
|
-
require Vagrant.source_root.join("plugins/provisioners/chef/provisioner/base")
|
4
|
-
|
5
|
-
describe VagrantPlugins::Chef::Provisioner::Base do
|
6
|
-
include_context "unit"
|
7
|
-
|
8
|
-
let(:machine) { double("machine") }
|
9
|
-
let(:config) { double("config") }
|
10
|
-
|
11
|
-
subject { described_class.new(machine, config) }
|
12
|
-
|
13
|
-
describe "#encrypted_data_bag_secret_key_path" do
|
14
|
-
let(:env) { double("env") }
|
15
|
-
let(:root_path) { "/my/root" }
|
16
|
-
|
17
|
-
before do
|
18
|
-
allow(machine).to receive(:env).and_return(env)
|
19
|
-
allow(env).to receive(:root_path).and_return(root_path)
|
20
|
-
end
|
21
|
-
|
22
|
-
it "returns absolute path as is" do
|
23
|
-
expect(config).to receive(:encrypted_data_bag_secret_key_path).
|
24
|
-
and_return("/foo/bar")
|
25
|
-
expect(subject.encrypted_data_bag_secret_key_path).to eq "/foo/bar"
|
26
|
-
end
|
27
|
-
|
28
|
-
it "returns relative path joined to root_path" do
|
29
|
-
expect(config).to receive(:encrypted_data_bag_secret_key_path).
|
30
|
-
and_return("secret")
|
31
|
-
expect(subject.encrypted_data_bag_secret_key_path).to eq "/my/root/secret"
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
describe "#guest_encrypted_data_bag_secret_key_path" do
|
36
|
-
it "returns nil if host path is not configured" do
|
37
|
-
allow(config).to receive(:encrypted_data_bag_secret_key_path).and_return(nil)
|
38
|
-
allow(config).to receive(:provisioning_path).and_return("/tmp/foo")
|
39
|
-
expect(subject.guest_encrypted_data_bag_secret_key_path).to be_nil
|
40
|
-
end
|
41
|
-
|
42
|
-
it "returns path under config.provisioning_path" do
|
43
|
-
allow(config).to receive(:encrypted_data_bag_secret_key_path).and_return("secret")
|
44
|
-
allow(config).to receive(:provisioning_path).and_return("/tmp/foo")
|
45
|
-
expect(File.dirname(subject.guest_encrypted_data_bag_secret_key_path)).
|
46
|
-
to eq "/tmp/foo"
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|