svn_command_helper 1.3.0 → 1.4.0

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: 8a04d1ffee7008227fc5be923d5bbde0a425a9e8
4
- data.tar.gz: cebf87d6b3a2b3ca7e00511984b379cd9f97a11e
3
+ metadata.gz: 3cb975fbd441e67643656d6e1095cb685d6b8984
4
+ data.tar.gz: ec297b8f9b56e1f890e20a3100910887a153c5f0
5
5
  SHA512:
6
- metadata.gz: 6264f9c979f7e17a225f0ea5ca99c314a70da37dd27cae624cf2f98849ade586ce93cf69c7c9807e0ceefb7fa8c49a038906319f4ffc5b9e58b063f9f1990ad7
7
- data.tar.gz: 8fa7b2f1870ece39af35f2e8c13a3185dbe215a07e0ad7587d654b2c3e64fcd31c4f6bd17195b185cf8238950eeaf1a025f19166ef1c23ed822810e6deb8529d
6
+ metadata.gz: cd712b208d3a67221b772b252c398d6acaffb8fc1f6322671948d7f4fdeffa5e21bbed68c0ff5593b6b9c9b449b7751184d69c946b7114c2354bf59357c280d8
7
+ data.tar.gz: d495a0906e7559e6c1e13df4176eff85a3165498e47e91ee1d4889f7cb073a2dbaba9c22638687bd61c9ec384cf9771d291d81f07a763e31a733917cff201fe4
@@ -4,7 +4,7 @@ require 'yaml'
4
4
  require 'time'
5
5
  require 'tmpdir'
6
6
  require 'ostruct'
7
- require 'rexml/document'
7
+ require 'libxml'
8
8
  require "system_command_helper"
9
9
 
10
10
  # Subversion command helper
@@ -37,14 +37,14 @@ module SvnCommandHelper
37
37
  @list_cache[recursive][uri]
38
38
  else
39
39
  list_str = cap("svn list --xml #{recursive ? '-R' : ''} #{uri}")
40
- list = REXML::Document.new(list_str).elements.collect("/lists/list/entry") do |entry|
41
- commit = entry.elements["commit"]
40
+ list = LibXML::XML::Document.string(list_str).find("//lists/list/entry").map do |entry|
41
+ commit = entry.find_first("commit")
42
42
  OpenStruct.new({
43
- kind: entry.attribute("kind").value,
44
- path: entry.elements["name"].text,
45
- revision: commit.attribute("revision").value.to_i,
46
- author: commit.elements["author"].text,
47
- date: Time.iso8601(commit.elements["date"].text),
43
+ kind: entry["kind"],
44
+ path: entry.find_first("name").content,
45
+ revision: commit["revision"].to_i,
46
+ author: commit.find_first("author").content,
47
+ date: Time.iso8601(commit.find_first("date").content),
48
48
  })
49
49
  end
50
50
  @list_cache[recursive][uri] = list if @list_cache
@@ -1,4 +1,4 @@
1
1
  module SvnCommandHelper
2
2
  # version
3
- VERSION = "1.3.0"
3
+ VERSION = "1.4.0"
4
4
  end
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_dependency "system_command_helper", "~> 0.3"
23
+ spec.add_dependency "libxml-ruby", "~> 2.9"
23
24
  spec.add_development_dependency "bundler", "~> 1.11"
24
25
  spec.add_development_dependency "rake", "~> 10.0"
25
26
  spec.add_development_dependency "rspec", "~> 3.0"
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.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Narazaka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-11 00:00:00.000000000 Z
11
+ date: 2016-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: system_command_helper
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: libxml-ruby
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.9'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.9'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement