vanagon 0.15.12 → 0.15.13

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: d2c4eb81b2e7e740b09969dc3e70f4a7293ce2b1
4
- data.tar.gz: fd11e4e76da97f18170b90e2a80c2ef6863be29a
3
+ metadata.gz: d09b65231595380fce620f446ce16458401d8d75
4
+ data.tar.gz: 2f854891d6e33677468e8a1442fb7b03a943a1b4
5
5
  SHA512:
6
- metadata.gz: 9a9ee542de85c254ffc753e8355d6236953aff2dbf2d9107e664d234b172fbf7de469499892411f3efb902be94d52c3ba470fdb946d10f3b6d2e9194b6a2e9b9
7
- data.tar.gz: 656bffd6573ae387c554eaf0fd935665d2114236532eda69a81b68b1d99b8de6e816c78190dc242fe9297b34b4a0932409cafa9964a93d2baa98bfe6d00ecc9e
6
+ metadata.gz: 6f311cd091dcb5839a08a38e2bc515a76219ad2745c39103015c01d40fd1ab7e8dbda7c9b10299ebfff2e85f71da4f9818069fefe14ddb97bee59e87003a7a6d
7
+ data.tar.gz: 798f85247448b1bc3cb6705358450577cbe44823dd301ec5e4250dbbf883c068dc70534385a655e361adc756259a23ff141fcb938aeb3ed0a282b45f70ee9c10
@@ -40,9 +40,15 @@ class Vanagon
40
40
  FileUtils.cp_r(Dir.glob("#{workdir}/*"), @remote_workdir)
41
41
  end
42
42
 
43
- def retrieve_built_artifact
44
- FileUtils.mkdir_p("output")
45
- FileUtils.cp_r(Dir.glob("#{@remote_workdir}/output/*"), "output/")
43
+ def retrieve_built_artifact(artifacts_to_fetch, no_packaging)
44
+ output_path = 'output/'
45
+ FileUtils.mkdir_p(output_path)
46
+ unless no_packaging
47
+ artifacts_to_fetch << "#{@remote_workdir}/output/*"
48
+ end
49
+ artifacts_to_fetch.each do |path|
50
+ FileUtils.cp_r(Dir.glob(path), "output/")
51
+ end
46
52
  end
47
53
  end
48
54
  end
@@ -26,6 +26,24 @@ describe 'Vanagon::Engine::Local' do
26
26
  end
27
27
  end
28
28
 
29
+ describe '#retrieve_built_artifacts' do
30
+ it 'copies everything if we package' do
31
+ engine = Vanagon::Engine::Local.new(platform)
32
+ expect(FileUtils).to receive(:mkdir_p).with('output/').and_return true
33
+ expect(Dir).to receive(:glob).with('/output/*').and_return(['tmp/foo', 'tmp/bar'])
34
+ expect(FileUtils).to receive(:cp_r).with(['tmp/foo', 'tmp/bar'], 'output/')
35
+ engine.retrieve_built_artifact([], false)
36
+ end
37
+
38
+ it "only copies what you tell it to if we don't package" do
39
+ engine = Vanagon::Engine::Local.new(platform)
40
+ expect(FileUtils).to receive(:mkdir_p).with('output/').and_return true
41
+ expect(Dir).to receive(:glob).with('tmp/bar').and_return(['tmp/bar'])
42
+ expect(FileUtils).to receive(:cp_r).with(['tmp/bar'], 'output/')
43
+ engine.retrieve_built_artifact(['tmp/bar'], true)
44
+ end
45
+ end
46
+
29
47
  it 'returns "local" name' do
30
48
  expect(Vanagon::Engine::Local.new(platform).name).to eq('local')
31
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.12
4
+ version: 0.15.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-19 00:00:00.000000000 Z
11
+ date: 2018-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: git
@@ -259,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
259
  version: '0'
260
260
  requirements: []
261
261
  rubyforge_project:
262
- rubygems_version: 2.6.14
262
+ rubygems_version: 2.5.2.1
263
263
  signing_key:
264
264
  specification_version: 3
265
265
  summary: All of your packages will fit into this van with this one simple trick.