svn_command_helper 1.4.0 → 1.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cb975fbd441e67643656d6e1095cb685d6b8984
4
- data.tar.gz: ec297b8f9b56e1f890e20a3100910887a153c5f0
3
+ metadata.gz: d2822279fd1a71b8b300daeaf421dec21d765aad
4
+ data.tar.gz: 49e95dcf1ff01a848ed92905f61f2eb6e07b92f4
5
5
  SHA512:
6
- metadata.gz: cd712b208d3a67221b772b252c398d6acaffb8fc1f6322671948d7f4fdeffa5e21bbed68c0ff5593b6b9c9b449b7751184d69c946b7114c2354bf59357c280d8
7
- data.tar.gz: d495a0906e7559e6c1e13df4176eff85a3165498e47e91ee1d4889f7cb073a2dbaba9c22638687bd61c9ec384cf9771d291d81f07a763e31a733917cff201fe4
6
+ metadata.gz: c67b3b38d64c8ff2baf92b3c9d5a327a28b6055d62d437cecdddedb87b0856a62f545e2efeb7942a75b9850bf8350d8e4a54b36fdbfda771fa1c49d47279e674
7
+ data.tar.gz: a163415a147810858a1730da95e198a4f7342c2fa993347c627379439ebe0bdef532b1a99f544bf803be2a976b0d6d239a29f847e66139739915a82f2a79ae05
@@ -111,12 +111,12 @@ module SvnCommandHelper
111
111
  # @return [Array<OpenStruct>] log (old to new order)
112
112
  def log(uri = ".", limit: nil, stop_on_copy: false)
113
113
  log = cap "svn log --xml #{limit ? "--limit #{limit}" : ""} #{stop_on_copy ? "--stop-on-copy" : ""} #{uri}"
114
- REXML::Document.new(log).elements.collect("/log/logentry") do |entry|
114
+ LibXML::XML::Document.string(log).find("//log/logentry").map do |entry|
115
115
  OpenStruct.new({
116
- revision: entry.attribute("revision").value.to_i,
117
- author: entry.elements["author"].text,
118
- date: Time.iso8601(entry.elements["date"].text),
119
- msg: entry.elements["msg"].text,
116
+ revision: entry["revision"].to_i,
117
+ author: entry.find_first("author").content,
118
+ date: Time.iso8601(entry.find_first("date").content),
119
+ msg: entry.find_first("msg").content,
120
120
  })
121
121
  end.reverse
122
122
  end
@@ -297,12 +297,12 @@ module SvnCommandHelper
297
297
  options << "-x --ignore-all-space" if ignore_all_space
298
298
 
299
299
  diff_str = cap("svn diff --xml --summarize #{from_uri} #{to_uri} #{options.join(' ')}")
300
- diff_list = REXML::Document.new(diff_str).elements.collect("/diff/paths/path") do |path|
300
+ diff_list = LibXML::XML::Document.string(diff_str).find("//diff/paths/path").map do |path|
301
301
  OpenStruct.new({
302
- kind: path.attribute("kind").value,
303
- item: path.attribute("item").value,
304
- props: path.attribute("props").value,
305
- path: path.text,
302
+ kind: path["kind"],
303
+ item: path["item"],
304
+ props: path["props"],
305
+ path: path.content,
306
306
  })
307
307
  end
308
308
  if ignore_properties
@@ -1,4 +1,4 @@
1
1
  module SvnCommandHelper
2
2
  # version
3
- VERSION = "1.4.0"
3
+ VERSION = "1.4.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svn_command_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Narazaka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-27 00:00:00.000000000 Z
11
+ date: 2016-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: system_command_helper