svnx 1.0.0 → 1.0.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/lib/svnx.rb +1 -1
- data/lib/svnx/base/command.rb +0 -3
- data/lib/svnx/log/args.rb +10 -7
- data/lib/svnx/log/command.rb +2 -44
- data/lib/svnx/log/exec.rb +27 -0
- data/lib/svnx/log/line.rb +42 -0
- data/test/integration/svnx/io/element_test.rb +3 -3
- data/test/unit/svnx/log/args_test.rb +15 -0
- data/test/unit/svnx/log/exec_test.rb +15 -0
- data/test/unit/svnx/log/line_test.rb +14 -0
- data/test/unit/system/command/cachefile_test.rb +0 -2
- data/test/unit/system/command/caching_test.rb +2 -2
- metadata +11 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6eeffb9336d56a2ec27ae467c19b772407b05efe
|
4
|
+
data.tar.gz: 4665ae1fc141ee1a4bad2808d31fb28ec15e3b99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e148e4792f0fb77881cdd968715410378fc50d4542588e5ade9b462873eda6f5694ab1ae581a542354e7f724fc49c7b591f1d40e00d68102de4e34ae0df7f682
|
7
|
+
data.tar.gz: e5d6d3a2e25971b555e7ad7935f01c3dd0dec318c4e5cd6f74d50c9e32468dd835059f3fa22a39f8f399a08a5aef8c0e015fa7b30c6857349263047ca1ce705f
|
data/lib/svnx.rb
CHANGED
data/lib/svnx/base/command.rb
CHANGED
@@ -16,12 +16,9 @@ module SVNx
|
|
16
16
|
include Logue::Loggable
|
17
17
|
|
18
18
|
def initialize subcmd, args
|
19
|
-
# info "args: #{args}"
|
20
19
|
cmdargs = [ 'svn', subcmd ]
|
21
20
|
cmdargs << '--xml' if uses_xml?
|
22
|
-
# info "cmdargs: #{cmdargs}"
|
23
21
|
cmdargs.concat args
|
24
|
-
# info "cmdargs: #{cmdargs}"
|
25
22
|
super cmdargs
|
26
23
|
end
|
27
24
|
|
data/lib/svnx/log/args.rb
CHANGED
@@ -7,13 +7,8 @@ require 'svnx/base/command'
|
|
7
7
|
require 'logue/loggable'
|
8
8
|
require 'svnx/base/args'
|
9
9
|
|
10
|
-
module
|
11
|
-
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
module SVNx::LogCmdLine
|
16
|
-
class LogCommandArgs < SVNx::CommandArgs
|
10
|
+
module SvnLog
|
11
|
+
class Args < SVNx::CommandArgs
|
17
12
|
include Logue::Loggable
|
18
13
|
|
19
14
|
attr_reader :limit
|
@@ -52,3 +47,11 @@ module SVNx::LogCmdLine
|
|
52
47
|
end
|
53
48
|
end
|
54
49
|
end
|
50
|
+
|
51
|
+
# the old name and module
|
52
|
+
module SVNx
|
53
|
+
module LogCmdLine
|
54
|
+
class LogCommandArgs < SvnLog::Args
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/lib/svnx/log/command.rb
CHANGED
@@ -1,48 +1,6 @@
|
|
1
1
|
#!/usr/bin/ruby -w
|
2
2
|
# -*- ruby -*-
|
3
3
|
|
4
|
-
require 'system/command/line'
|
5
|
-
require 'system/command/caching'
|
6
|
-
require 'svnx/base/command'
|
7
|
-
require 'logue/loggable'
|
8
4
|
require 'svnx/log/args'
|
9
|
-
|
10
|
-
|
11
|
-
module LogCmdLine
|
12
|
-
# this can be either an Array (for which to_a returns itself), or
|
13
|
-
# a CommandArgs, which also has to_a.
|
14
|
-
def initialize args = Array.new
|
15
|
-
super "log", args.to_a
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
class LogCommandLine < CommandLine
|
20
|
-
include LogCmdLine
|
21
|
-
end
|
22
|
-
|
23
|
-
class LogCommandLineCaching < CachingCommandLine
|
24
|
-
include LogCmdLine
|
25
|
-
end
|
26
|
-
|
27
|
-
class LogCommand < Command
|
28
|
-
def initialize args
|
29
|
-
@use_cache = args.use_cache
|
30
|
-
super
|
31
|
-
end
|
32
|
-
|
33
|
-
def command_line
|
34
|
-
cls = @use_cache ? LogCommandLineCaching : LogCommandLine
|
35
|
-
cls.new @args
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
class LogExec
|
40
|
-
attr_reader :entries
|
41
|
-
|
42
|
-
def initialize args
|
43
|
-
cmd = LogCommand.new LogCommandArgs.new(args)
|
44
|
-
entcls = args[:entries_class] || SVNx::Log::Entries
|
45
|
-
@entries = entcls.new :xmllines => cmd.execute
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
5
|
+
require 'svnx/log/exec'
|
6
|
+
require 'svnx/log/line'
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# -*- ruby -*-
|
3
|
+
|
4
|
+
require 'system/command/line'
|
5
|
+
require 'system/command/caching'
|
6
|
+
require 'svnx/base/command'
|
7
|
+
require 'logue/loggable'
|
8
|
+
require 'svnx/log/args'
|
9
|
+
require 'svnx/log/entries'
|
10
|
+
require 'svnx/log/line'
|
11
|
+
|
12
|
+
module SvnLog
|
13
|
+
class Exec
|
14
|
+
attr_reader :entries
|
15
|
+
|
16
|
+
def initialize args
|
17
|
+
cmd = SVNx::LogCommand.new Args.new(args)
|
18
|
+
entcls = args[:entries_class] || SVNx::Log::Entries
|
19
|
+
@entries = entcls.new :xmllines => cmd.execute
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
module SVNx
|
25
|
+
class LogExec < SvnLog::Exec
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# -*- ruby -*-
|
3
|
+
|
4
|
+
require 'system/command/line'
|
5
|
+
require 'system/command/caching'
|
6
|
+
require 'svnx/base/command'
|
7
|
+
require 'svnx/log/args'
|
8
|
+
|
9
|
+
module SvnLog
|
10
|
+
module LogCmdLine
|
11
|
+
# this can be either an Array (for which to_a returns itself), or
|
12
|
+
# a CommandArgs, which also has to_a.
|
13
|
+
def initialize args = Array.new
|
14
|
+
super "log", args.to_a
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
class LogCommandLine < SVNx::CommandLine
|
19
|
+
include LogCmdLine
|
20
|
+
end
|
21
|
+
|
22
|
+
class LogCommandLineCaching < SVNx::CachingCommandLine
|
23
|
+
include LogCmdLine
|
24
|
+
end
|
25
|
+
|
26
|
+
class CommandLine < SVNx::Command
|
27
|
+
def initialize args
|
28
|
+
@use_cache = args.use_cache
|
29
|
+
super
|
30
|
+
end
|
31
|
+
|
32
|
+
def command_line
|
33
|
+
cls = @use_cache ? LogCommandLineCaching : LogCommandLine
|
34
|
+
cls.new @args
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
module SVNx
|
40
|
+
class LogCommand < SvnLog::CommandLine
|
41
|
+
end
|
42
|
+
end
|
@@ -227,9 +227,9 @@ module SVNx::IO
|
|
227
227
|
b0 = Element.new local: PENDING_PATH + '/B.txt'
|
228
228
|
b1 = Element.new local: PENDING_PATH + '/B.txt'
|
229
229
|
|
230
|
-
assert_comparable
|
231
|
-
assert_comparable
|
232
|
-
assert_comparable
|
230
|
+
assert_comparable(-1, a, b0)
|
231
|
+
assert_comparable( 1, b0, a)
|
232
|
+
assert_comparable( 0, b0, b1)
|
233
233
|
end
|
234
234
|
end
|
235
235
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# -*- ruby -*-
|
3
|
+
|
4
|
+
require 'minitest/autorun'
|
5
|
+
require 'pathname'
|
6
|
+
require 'svnx/log/args'
|
7
|
+
|
8
|
+
class ArgsTest < Minitest::Test
|
9
|
+
def test_equivalent_api
|
10
|
+
a = SvnLog::Args.new limit: 1
|
11
|
+
b = SVNx::LogCmdLine::LogCommandArgs.new limit: 1
|
12
|
+
|
13
|
+
assert_equal b.limit, a.limit
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# -*- ruby -*-
|
3
|
+
|
4
|
+
require 'minitest/autorun'
|
5
|
+
require 'pathname'
|
6
|
+
require 'svnx/log/tc'
|
7
|
+
require 'svnx/log/exec'
|
8
|
+
|
9
|
+
class ExecTest < Minitest::Test
|
10
|
+
def test_equivalent_api
|
11
|
+
a = SvnLog::Exec
|
12
|
+
b = SVNx::LogExec
|
13
|
+
assert_equal b.superclass, a
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# -*- ruby -*-
|
3
|
+
|
4
|
+
require 'minitest/autorun'
|
5
|
+
require 'pathname'
|
6
|
+
require 'svnx/log/line'
|
7
|
+
|
8
|
+
class LineTest < Minitest::Test
|
9
|
+
def test_equivalent_api
|
10
|
+
a = SvnLog::CommandLine
|
11
|
+
b = SVNx::LogCommand
|
12
|
+
assert_equal b.superclass, a
|
13
|
+
end
|
14
|
+
end
|
@@ -4,9 +4,9 @@
|
|
4
4
|
require 'system/command/caching'
|
5
5
|
require 'system/command/tc'
|
6
6
|
|
7
|
-
# Ruby 2 changes this to "file: Class#method", so we've got to cache it (ironic,
|
8
|
-
# no?)
|
7
|
+
# Ruby 2 changes this to "file: Class#method", so we've got to cache it (ironic, no?)
|
9
8
|
$curfile = $0
|
9
|
+
puts "caching_test: $curfile: #{$curfile}"
|
10
10
|
|
11
11
|
module System
|
12
12
|
class CachingCommandLineTestCase < CommandTestCase
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svnx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Pace
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logue
|
@@ -61,6 +61,8 @@ files:
|
|
61
61
|
- lib/svnx/log/command.rb
|
62
62
|
- lib/svnx/log/entries.rb
|
63
63
|
- lib/svnx/log/entry.rb
|
64
|
+
- lib/svnx/log/exec.rb
|
65
|
+
- lib/svnx/log/line.rb
|
64
66
|
- lib/svnx/revision/argfactory.rb
|
65
67
|
- lib/svnx/revision/argument.rb
|
66
68
|
- lib/svnx/revision/error.rb
|
@@ -79,8 +81,11 @@ files:
|
|
79
81
|
- test/unit/svnx/base/action_test.rb
|
80
82
|
- test/unit/svnx/cat/command_test.rb
|
81
83
|
- test/unit/svnx/info/entries_test.rb
|
84
|
+
- test/unit/svnx/log/args_test.rb
|
82
85
|
- test/unit/svnx/log/entries_test.rb
|
83
86
|
- test/unit/svnx/log/entry_test.rb
|
87
|
+
- test/unit/svnx/log/exec_test.rb
|
88
|
+
- test/unit/svnx/log/line_test.rb
|
84
89
|
- test/unit/svnx/revision/argfactory_test.rb
|
85
90
|
- test/unit/svnx/revision/argument_test.rb
|
86
91
|
- test/unit/svnx/revision/range_test.rb
|
@@ -108,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
113
|
version: '0'
|
109
114
|
requirements: []
|
110
115
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
116
|
+
rubygems_version: 2.5.1
|
112
117
|
signing_key:
|
113
118
|
specification_version: 4
|
114
119
|
summary: Wrapper around Subversion command line.
|
@@ -120,8 +125,11 @@ test_files:
|
|
120
125
|
- test/unit/svnx/base/action_test.rb
|
121
126
|
- test/unit/svnx/cat/command_test.rb
|
122
127
|
- test/unit/svnx/info/entries_test.rb
|
128
|
+
- test/unit/svnx/log/args_test.rb
|
123
129
|
- test/unit/svnx/log/entries_test.rb
|
124
130
|
- test/unit/svnx/log/entry_test.rb
|
131
|
+
- test/unit/svnx/log/exec_test.rb
|
132
|
+
- test/unit/svnx/log/line_test.rb
|
125
133
|
- test/unit/svnx/revision/argfactory_test.rb
|
126
134
|
- test/unit/svnx/revision/argument_test.rb
|
127
135
|
- test/unit/svnx/revision/range_test.rb
|