vx-builder 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vx/builder/script/script.rb +3 -0
- data/lib/vx/builder/source/constants.rb +1 -1
- data/lib/vx/builder/source/matrix.rb +1 -1
- data/lib/vx/builder/version.rb +1 -1
- data/spec/fixtures/travis.yml +2 -0
- data/spec/lib/builder/source_matrix_spec.rb +11 -5
- data/spec/lib/builder/source_spec.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73e96e0bf3f8cc5311180c68c24f8ce2b91b2cb5
|
4
|
+
data.tar.gz: de07a671e32eaecfca0ffc59bebcf0334ae673ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4391e8339e7f1250acddf347442cfcbfe64bc6f04523f4edfe8805120cfec41a69ad127e59ec1c49e493bb52e0a5e461da2aec82c6eccd00452af0b63e2e784b
|
7
|
+
data.tar.gz: a8b3b91466510b7bfc586a3993e1a40478a8338c4c3f45b4e7c6ad77ed1ce99720d606eba264b1a73986f8fe24398a68f77926cb4fdfd66f1560417400d6946f
|
data/lib/vx/builder/version.rb
CHANGED
data/spec/fixtures/travis.yml
CHANGED
@@ -7,6 +7,7 @@ describe Vx::Builder::Source::Matrix do
|
|
7
7
|
rvm: %w{ 1.8.7 1.9.3 2.0.0 },
|
8
8
|
scala: %w{ 2.9.2 2.10.1 },
|
9
9
|
before_script: "echo before_script",
|
10
|
+
before_install: "echo before_install",
|
10
11
|
script: "echo script"
|
11
12
|
} }
|
12
13
|
let(:config) { Vx::Builder::Source.from_attributes attributes }
|
@@ -32,11 +33,15 @@ describe Vx::Builder::Source::Matrix do
|
|
32
33
|
subject { matrix.configurations }
|
33
34
|
|
34
35
|
it "should copy script from source" do
|
35
|
-
expect(subject.map(&:script).
|
36
|
+
expect(subject.map(&:script).flatten).to eq ["echo script"] * 12
|
36
37
|
end
|
37
38
|
|
38
39
|
it "should copy before_script from source" do
|
39
|
-
expect(subject.map(&:before_script).
|
40
|
+
expect(subject.map(&:before_script).flatten).to eq ["echo before_script"] * 12
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should copy before_install from source" do
|
44
|
+
expect(subject.map(&:before_install).flatten).to eq ["echo before_install"] * 12
|
40
45
|
end
|
41
46
|
|
42
47
|
context "without any matrix keys" do
|
@@ -50,9 +55,10 @@ describe Vx::Builder::Source::Matrix do
|
|
50
55
|
"matrix" => [],
|
51
56
|
"global" => []
|
52
57
|
},
|
53
|
-
"script"
|
54
|
-
"before_script"
|
55
|
-
"services"
|
58
|
+
"script" =>["/bin/true"],
|
59
|
+
"before_script" =>[],
|
60
|
+
"services" => [],
|
61
|
+
"before_install" => []
|
56
62
|
)}
|
57
63
|
end
|
58
64
|
|
@@ -27,9 +27,10 @@ describe Vx::Builder::Source do
|
|
27
27
|
|
28
28
|
context "build new instance" do
|
29
29
|
let(:expected) { {
|
30
|
-
"rvm"
|
31
|
-
"before_script"
|
32
|
-
"
|
30
|
+
"rvm" => ["2.0.0"],
|
31
|
+
"before_script" => ["echo before_script"],
|
32
|
+
"before_install" => ["echo before_install"],
|
33
|
+
"script" => ["RAILS_ENV=test ls -1 && echo DONE!"],
|
33
34
|
"env" => {
|
34
35
|
"matrix" => [],
|
35
36
|
"global" => []
|
@@ -50,6 +51,7 @@ describe Vx::Builder::Source do
|
|
50
51
|
let(:attrs) {{
|
51
52
|
rvm: "2.0.0",
|
52
53
|
before_script: "echo before_script",
|
54
|
+
before_install: "echo before_install",
|
53
55
|
script: "RAILS_ENV=test ls -1 && echo DONE!"
|
54
56
|
}}
|
55
57
|
subject { described_class.from_attributes(attrs).attributes }
|