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.
Files changed (37) hide show
  1. data/README.markdown +3 -2
  2. data/bin/modify_timestamps.rb +31 -0
  3. data/bin/populate.rb +231 -0
  4. data/bin/quote.rb +206 -0
  5. data/lib/pvn/app.rb +4 -1
  6. data/lib/pvn/io/element.rb +9 -0
  7. data/lib/pvn/subcommands/base/command.rb +15 -15
  8. data/lib/pvn/subcommands/base/options.rb +4 -0
  9. data/lib/pvn/subcommands/diff/command.rb +46 -0
  10. data/lib/pvn/subcommands/diff/differ.rb +65 -0
  11. data/lib/pvn/subcommands/diff/local_differ.rb +103 -0
  12. data/lib/pvn/subcommands/diff/options.rb +28 -0
  13. data/lib/pvn/subcommands/diff/repository_differ.rb +145 -0
  14. data/lib/pvn/subcommands/log/command.rb +29 -11
  15. data/lib/pvn/subcommands/log/options.rb +0 -4
  16. data/lib/pvn/subcommands/pct/command.rb +10 -176
  17. data/lib/pvn/subcommands/pct/diffcount.rb +4 -2
  18. data/lib/pvn/subcommands/pct/differ.rb +34 -0
  19. data/lib/pvn/subcommands/pct/local_differ.rb +103 -0
  20. data/lib/pvn/subcommands/pct/options.rb +0 -4
  21. data/lib/pvn/subcommands/pct/repository_differ.rb +78 -0
  22. data/lib/pvn/subcommands/revision/base_option.rb +48 -0
  23. data/lib/pvn/subcommands/revision/revision_option.rb +2 -37
  24. data/lib/pvn/subcommands/status/command.rb +13 -8
  25. data/lib/pvn/subcommands/status/options.rb +0 -4
  26. data/lib/svnx/cat/command.rb +2 -0
  27. data/lib/svnx/info/entry.rb +3 -0
  28. data/lib/synoption/exception.rb +12 -0
  29. data/lib/synoption/set.rb +26 -0
  30. data/test/integration/pvn/subcommands/diff/command_test.rb +153 -0
  31. data/test/integration/svnx/log/test.rb +1 -1
  32. data/test/unit/pvn/revision/entry_test.rb +0 -13
  33. data/test/unit/svnx/info/entries_test.rb +3 -3
  34. data/test/unit/svnx/info/entry_test.rb +3 -2
  35. data/test/unit/svnx/status/entries_test.rb +1 -1
  36. data/test/unit/synoption/set_test.rb +34 -18
  37. 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
- def test_find_by_name
14
- xyz = BaseOption.new :xyz, '-x', "blah blah xyz", nil
15
- abc = BaseOption.new :abc, '-a', "abc yadda yadda", nil
16
- tnt = BaseOption.new :tnt, '-t', "tnt and so forth", nil
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 test_
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
- os = OptionSet.new [ xyz, abc, tnt ]
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
- assert_not_nil os.find_by_name(:xyz)
32
- assert_nil os.find_by_name(:bfd)
34
+ assert_equal 'foo', @xyz.value
35
+ assert_nil @abc.value
36
+ assert_nil @tnt.value
37
+ end
33
38
 
34
- assert_equal xyz, os.find_by_name(:xyz)
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: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
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-09 00:00:00 -04:00
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