travis_github_deployer 0.2.5 → 0.2.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8639d71d860f68a5208f77c71274ad44fc424d9c
|
4
|
+
data.tar.gz: b10c3eb39b0b2dbceb75b2c7c18743148a1a394b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d57af910a7354d35c552c4285c9fe4ae3555892f18fbfaa15367a27beb07b6a4507aa5181285fee3063eca7b627a079d85fa507acaf320abcf19923ca4c9315
|
7
|
+
data.tar.gz: e1de0bc87e49b1864a0986ea620c11c1bb299c36d475c9a74d4a5071f47fa9b3db923f2f14996acf839301e1d8af279123bd39fa3a14a1c735282efec3ada967
|
@@ -73,7 +73,7 @@ class TravisGithubDeployer
|
|
73
73
|
|
74
74
|
def get_destination_and_add_file_to_purge source, target_or_hash
|
75
75
|
if target_or_hash.instance_of?(Hash)
|
76
|
-
files_to_purge << source if
|
76
|
+
files_to_purge << source if target_or_hash["purge"]
|
77
77
|
destination_file = target_or_hash["destination"]
|
78
78
|
else
|
79
79
|
destination_file = target_or_hash
|
@@ -135,13 +135,12 @@ describe "travis github deployer" do
|
|
135
135
|
expect(subject).to receive(:prepare_files_to_deploy).with(files_to_deploy)
|
136
136
|
subject.load_configuration
|
137
137
|
|
138
|
-
expect(subject.destination_repository).to eq("https://github.com/cpputest/cpputest.github.io.git")
|
139
|
-
|
138
|
+
expect(subject.destination_repository).to eq("https://github.com/cpputest/cpputest.github.io.git")
|
140
139
|
end
|
141
140
|
|
142
141
|
it "can parse destination with file to purge" do
|
143
142
|
source = "src_file"
|
144
|
-
target = {"destination"=>"dest", "purge"=>
|
143
|
+
target = {"destination"=>"dest", "purge"=>true}
|
145
144
|
expect(subject.get_destination_and_add_file_to_purge(source, target)).to eq("dest")
|
146
145
|
expect(subject.files_to_purge).to eq(["src_file"])
|
147
146
|
end
|
@@ -154,7 +153,7 @@ describe "travis github deployer" do
|
|
154
153
|
end
|
155
154
|
|
156
155
|
it "can have sources to purge from history" do
|
157
|
-
files_to_purge = { "myfile" => { "destination" => "destination_dir", "purge" =>
|
156
|
+
files_to_purge = { "myfile" => { "destination" => "destination_dir", "purge" => true } }
|
158
157
|
expect(Dir).to receive(:glob).with("myfile").and_return(["myfile"])
|
159
158
|
|
160
159
|
subject.prepare_files_to_deploy(files_to_purge)
|
@@ -177,7 +176,19 @@ describe "travis github deployer" do
|
|
177
176
|
}.to raise_error(StandardError, "File: 'not_exists' found in the configuration didn't exist. Deploy failed.")
|
178
177
|
end
|
179
178
|
|
180
|
-
|
179
|
+
it "parses the real yaml file correctly" do
|
180
|
+
allow(subject).to receive (:prepare_files_to_deploy) do |files_hash|
|
181
|
+
files_hash.each { |source, values|
|
182
|
+
subject.get_destination_and_add_file_to_purge(source, values)
|
183
|
+
}
|
184
|
+
end
|
185
|
+
|
186
|
+
subject.load_configuration
|
187
|
+
expect(subject.files_to_purge).to eq(
|
188
|
+
["cpputest_build/cpputest-3.7dev.tar.gz", "cpputest_build/cpputest-3.7dev.zip"]
|
189
|
+
)
|
190
|
+
end
|
191
|
+
|
181
192
|
it "isn't verbose by default" do
|
182
193
|
subject.command_line_arguments([""])
|
183
194
|
expect(subject.verbose).to eq(false)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: travis_github_deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bas Vodde
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|