vanagon 0.15.12 → 0.15.13
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/vanagon/engine/local.rb +9 -3
- data/spec/lib/vanagon/engine/local_spec.rb +18 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d09b65231595380fce620f446ce16458401d8d75
|
4
|
+
data.tar.gz: 2f854891d6e33677468e8a1442fb7b03a943a1b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f311cd091dcb5839a08a38e2bc515a76219ad2745c39103015c01d40fd1ab7e8dbda7c9b10299ebfff2e85f71da4f9818069fefe14ddb97bee59e87003a7a6d
|
7
|
+
data.tar.gz: 798f85247448b1bc3cb6705358450577cbe44823dd301ec5e4250dbbf883c068dc70534385a655e361adc756259a23ff141fcb938aeb3ed0a282b45f70ee9c10
|
data/lib/vanagon/engine/local.rb
CHANGED
@@ -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
|
-
|
45
|
-
FileUtils.
|
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.
|
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-
|
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.
|
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.
|