junit_merge 0.1.0 → 0.1.1
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/CHANGELOG +4 -0
- data/lib/junit_merge/app.rb +1 -1
- data/lib/junit_merge/version.rb +1 -1
- data/test/junit_merge/test_app.rb +11 -2
- 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: fe328cd3a59857e1ae738c399c84d07c08de49f2
|
4
|
+
data.tar.gz: fb6a05b5e0f3de689191ae90b7396bf1bb96cd43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ba9e33377decf1b3d48de892f042f89b47f67e6c261a320701f111d3ef5f3acf9a3872cbe210bcdd96ea21c1df2735d5d97622ced06281460282db37a7cdb56
|
7
|
+
data.tar.gz: c4d6a895d587d93552b086545372c46f0a7852c07e0d6179acd572f4ba670932e144f8295bacbeede71692a11bdd35281f1d3eb7e08f7e7b52d602e5f572a92a
|
data/CHANGELOG
CHANGED
data/lib/junit_merge/app.rb
CHANGED
@@ -34,7 +34,7 @@ module JunitMerge
|
|
34
34
|
target_file_path = source_file_path.sub(source_path, target_path)
|
35
35
|
if File.exist?(target_file_path)
|
36
36
|
merge_file(source_file_path, target_file_path)
|
37
|
-
|
37
|
+
elsif !@update_only
|
38
38
|
FileUtils.mkdir_p(File.dirname(target_file_path))
|
39
39
|
FileUtils.cp(source_file_path, target_file_path)
|
40
40
|
end
|
data/lib/junit_merge/version.rb
CHANGED
@@ -106,7 +106,7 @@ describe JunitMerge::App do
|
|
106
106
|
stderr.string.must_equal('')
|
107
107
|
end
|
108
108
|
|
109
|
-
it "skips nodes only in the source if --update is given" do
|
109
|
+
it "skips nodes only in the source if --update-only is given" do
|
110
110
|
create_file("#{tmp}/source.xml", 'a.a' => :fail, 'a.b' => :error)
|
111
111
|
create_file("#{tmp}/target.xml", 'a.a' => :pass)
|
112
112
|
app.run('--update-only', "#{tmp}/source.xml", "#{tmp}/target.xml").must_equal 0
|
@@ -160,7 +160,7 @@ describe JunitMerge::App do
|
|
160
160
|
stderr.string.must_equal('')
|
161
161
|
end
|
162
162
|
|
163
|
-
it "adds files only in the source" do
|
163
|
+
it "adds files only in the source by default" do
|
164
164
|
create_file("#{tmp}/source/a.xml", 'a.a' => :fail, 'a.b' => :pass)
|
165
165
|
create_directory("#{tmp}/target")
|
166
166
|
app.run("#{tmp}/source", "#{tmp}/target").must_equal 0
|
@@ -169,6 +169,15 @@ describe JunitMerge::App do
|
|
169
169
|
stdout.string.must_equal('')
|
170
170
|
stderr.string.must_equal('')
|
171
171
|
end
|
172
|
+
|
173
|
+
it "skips files only in the source if --update-only is given" do
|
174
|
+
create_file("#{tmp}/source/a.xml", 'a.a' => :fail, 'a.b' => :pass)
|
175
|
+
create_directory("#{tmp}/target")
|
176
|
+
app.run('--update-only', "#{tmp}/source", "#{tmp}/target").must_equal 0
|
177
|
+
File.exist?("#{tmp}/target/a.xml").must_equal false
|
178
|
+
stdout.string.must_equal('')
|
179
|
+
stderr.string.must_equal('')
|
180
|
+
end
|
172
181
|
end
|
173
182
|
|
174
183
|
it "does not complain about empty files" do
|