junit_merge 0.1.0 → 0.1.1

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: 7c5988839b9f2e70c06f6c8537422507866f45f9
4
- data.tar.gz: 433480317edd29129dfeea288ae73e66780e9e2c
3
+ metadata.gz: fe328cd3a59857e1ae738c399c84d07c08de49f2
4
+ data.tar.gz: fb6a05b5e0f3de689191ae90b7396bf1bb96cd43
5
5
  SHA512:
6
- metadata.gz: 4976b5600a486350cd924e8dce075a69a15d1ac6b17ca18a58a28c455687aebf14079c8f50eee1c48a47dde9b9b6753b8a823ac2e27ce67c88c657be0120c969
7
- data.tar.gz: 7f8430c30a18fb3d1f145f064199e96cc617c5a9f99ba002a67dfdbc28397553249963564b5d829ee8865f08996c5bce139701cacacec72924210449577c1ec6
6
+ metadata.gz: 4ba9e33377decf1b3d48de892f042f89b47f67e6c261a320701f111d3ef5f3acf9a3872cbe210bcdd96ea21c1df2735d5d97622ced06281460282db37a7cdb56
7
+ data.tar.gz: c4d6a895d587d93552b086545372c46f0a7852c07e0d6179acd572f4ba670932e144f8295bacbeede71692a11bdd35281f1d3eb7e08f7e7b52d602e5f572a92a
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.1.1 2014-04-18
2
+
3
+ * Merging directories with --update-only shouldn't add files only in the source.
4
+
1
5
  == 0.1.0 2014-04-18
2
6
 
3
7
  * Allow passing any number of source files.
@@ -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
- else
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
@@ -1,5 +1,5 @@
1
1
  module JunitMerge
2
- VERSION = [0, 1, 0]
2
+ VERSION = [0, 1, 1]
3
3
 
4
4
  class << VERSION
5
5
  include Comparable
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: junit_merge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Ogata