pvn 0.0.5 → 0.0.6
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.
- data/README.markdown +3 -2
- data/bin/modify_timestamps.rb +31 -0
- data/bin/populate.rb +231 -0
- data/bin/quote.rb +206 -0
- data/lib/pvn/app.rb +4 -1
- data/lib/pvn/io/element.rb +9 -0
- data/lib/pvn/subcommands/base/command.rb +15 -15
- data/lib/pvn/subcommands/base/options.rb +4 -0
- data/lib/pvn/subcommands/diff/command.rb +46 -0
- data/lib/pvn/subcommands/diff/differ.rb +65 -0
- data/lib/pvn/subcommands/diff/local_differ.rb +103 -0
- data/lib/pvn/subcommands/diff/options.rb +28 -0
- data/lib/pvn/subcommands/diff/repository_differ.rb +145 -0
- data/lib/pvn/subcommands/log/command.rb +29 -11
- data/lib/pvn/subcommands/log/options.rb +0 -4
- data/lib/pvn/subcommands/pct/command.rb +10 -176
- data/lib/pvn/subcommands/pct/diffcount.rb +4 -2
- data/lib/pvn/subcommands/pct/differ.rb +34 -0
- data/lib/pvn/subcommands/pct/local_differ.rb +103 -0
- data/lib/pvn/subcommands/pct/options.rb +0 -4
- data/lib/pvn/subcommands/pct/repository_differ.rb +78 -0
- data/lib/pvn/subcommands/revision/base_option.rb +48 -0
- data/lib/pvn/subcommands/revision/revision_option.rb +2 -37
- data/lib/pvn/subcommands/status/command.rb +13 -8
- data/lib/pvn/subcommands/status/options.rb +0 -4
- data/lib/svnx/cat/command.rb +2 -0
- data/lib/svnx/info/entry.rb +3 -0
- data/lib/synoption/exception.rb +12 -0
- data/lib/synoption/set.rb +26 -0
- data/test/integration/pvn/subcommands/diff/command_test.rb +153 -0
- data/test/integration/svnx/log/test.rb +1 -1
- data/test/unit/pvn/revision/entry_test.rb +0 -13
- data/test/unit/svnx/info/entries_test.rb +3 -3
- data/test/unit/svnx/info/entry_test.rb +3 -2
- data/test/unit/svnx/status/entries_test.rb +1 -1
- data/test/unit/synoption/set_test.rb +34 -18
- metadata +20 -4
@@ -4,34 +4,50 @@
|
|
4
4
|
require 'tc'
|
5
5
|
require 'synoption/set'
|
6
6
|
require 'synoption/base_option'
|
7
|
-
require 'stringio'
|
8
7
|
|
9
8
|
module PVN
|
10
9
|
class SetTestCase < Test::Unit::TestCase
|
11
10
|
include Loggable
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
os = OptionSet.new [ xyz, abc, tnt ]
|
19
|
-
|
20
|
-
assert_not_nil os.find_by_name(:xyz)
|
21
|
-
assert_nil os.find_by_name(:bfd)
|
12
|
+
class TestOptionSet < OptionSet
|
13
|
+
def name
|
14
|
+
'test'
|
15
|
+
end
|
22
16
|
end
|
23
17
|
|
24
|
-
def
|
25
|
-
xyz = BaseOption.new :xyz, '-x', "blah blah xyz", nil
|
26
|
-
abc = BaseOption.new :abc, '-a', "abc yadda yadda", nil
|
27
|
-
tnt = BaseOption.new :tnt, '-t', "tnt and so forth", nil
|
18
|
+
def setup
|
19
|
+
@xyz = BaseOption.new :xyz, '-x', "blah blah xyz", nil
|
20
|
+
@abc = BaseOption.new :abc, '-a', "abc yadda yadda", nil
|
21
|
+
@tnt = BaseOption.new :tnt, '-t', "tnt and so forth", nil
|
28
22
|
|
29
|
-
|
23
|
+
@optset = TestOptionSet.new [ @xyz, @abc, @tnt ]
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_find_by_name
|
27
|
+
assert_not_nil @optset.find_by_name(:xyz)
|
28
|
+
assert_nil @optset.find_by_name(:bfd)
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_process
|
32
|
+
@optset.process %w{ -x foo }
|
30
33
|
|
31
|
-
|
32
|
-
assert_nil
|
34
|
+
assert_equal 'foo', @xyz.value
|
35
|
+
assert_nil @abc.value
|
36
|
+
assert_nil @tnt.value
|
37
|
+
end
|
33
38
|
|
34
|
-
|
39
|
+
def test_bad_option
|
40
|
+
assert_raises(OptionException) do
|
41
|
+
@optset.process %w{ -y foo }
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_stop_on_double_dash
|
46
|
+
@optset.process %w{ -- -x foo }
|
47
|
+
|
48
|
+
assert_nil @xyz.value
|
49
|
+
assert_nil @abc.value
|
50
|
+
assert_nil @tnt.value
|
35
51
|
end
|
36
52
|
end
|
37
53
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pvn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jeff Pace
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-09-
|
18
|
+
date: 2012-09-15 00:00:00 -04:00
|
19
19
|
default_executable: pvn
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -38,17 +38,22 @@ description: A set of extensions to the Subversion command line, inspired by Git
|
|
38
38
|
email: jeugenepace@gmail.com
|
39
39
|
executables:
|
40
40
|
- pvn
|
41
|
+
- pvndiff
|
41
42
|
extensions: []
|
42
43
|
|
43
44
|
extra_rdoc_files:
|
44
45
|
- README.markdown
|
45
46
|
files:
|
46
47
|
- bin/pvndiff
|
48
|
+
- bin/quote.rb
|
47
49
|
- bin/pvn
|
50
|
+
- bin/modify_timestamps.rb
|
51
|
+
- bin/populate.rb
|
48
52
|
- lib/synoption/boolean_option.rb
|
49
53
|
- lib/synoption/option.rb
|
50
54
|
- lib/synoption/fixnum_option.rb
|
51
55
|
- lib/synoption/match.rb
|
56
|
+
- lib/synoption/exception.rb
|
52
57
|
- lib/synoption/base_option.rb
|
53
58
|
- lib/synoption/set.rb
|
54
59
|
- lib/synoption/doc.rb
|
@@ -81,12 +86,21 @@ files:
|
|
81
86
|
- lib/pvn/subcommands/base/clargs.rb
|
82
87
|
- lib/pvn/subcommands/base/command.rb
|
83
88
|
- lib/pvn/subcommands/base/doc.rb
|
89
|
+
- lib/pvn/subcommands/diff/local_differ.rb
|
90
|
+
- lib/pvn/subcommands/diff/options.rb
|
91
|
+
- lib/pvn/subcommands/diff/repository_differ.rb
|
92
|
+
- lib/pvn/subcommands/diff/command.rb
|
93
|
+
- lib/pvn/subcommands/diff/differ.rb
|
94
|
+
- lib/pvn/subcommands/pct/local_differ.rb
|
84
95
|
- lib/pvn/subcommands/pct/options.rb
|
96
|
+
- lib/pvn/subcommands/pct/repository_differ.rb
|
85
97
|
- lib/pvn/subcommands/pct/clargs.rb
|
86
98
|
- lib/pvn/subcommands/pct/diffcount.rb
|
87
99
|
- lib/pvn/subcommands/pct/command.rb
|
100
|
+
- lib/pvn/subcommands/pct/differ.rb
|
88
101
|
- lib/pvn/subcommands/log/options.rb
|
89
102
|
- lib/pvn/subcommands/log/command.rb
|
103
|
+
- lib/pvn/subcommands/revision/base_option.rb
|
90
104
|
- lib/pvn/subcommands/revision/revision_regexp_option.rb
|
91
105
|
- lib/pvn/subcommands/revision/multiple_revisions_option.rb
|
92
106
|
- lib/pvn/subcommands/revision/revision_option.rb
|
@@ -148,6 +162,7 @@ files:
|
|
148
162
|
- test/unit/pvn/app_test.rb
|
149
163
|
- test/unit/pvn/revision/entry_test.rb
|
150
164
|
- test/integration/svnx/log/test.rb
|
165
|
+
- test/integration/pvn/subcommands/diff/command_test.rb
|
151
166
|
- test/integration/pvn/subcommands/log/command_test.rb
|
152
167
|
- README.markdown
|
153
168
|
has_rdoc: true
|
@@ -207,4 +222,5 @@ test_files:
|
|
207
222
|
- test/unit/pvn/app_test.rb
|
208
223
|
- test/unit/pvn/revision/entry_test.rb
|
209
224
|
- test/integration/svnx/log/test.rb
|
225
|
+
- test/integration/pvn/subcommands/diff/command_test.rb
|
210
226
|
- test/integration/pvn/subcommands/log/command_test.rb
|