svnx 2.6.0 → 2.7.0

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: 50079e8c0d3f86c8a009821814c9e9a78c45bdeb
4
- data.tar.gz: c49d4ebfdad90bd3c802bee3a594568a403382e1
3
+ metadata.gz: b8ec7139dbe80c6857309246b41071cc4db44d4e
4
+ data.tar.gz: 09a10d1d01c520b4c9754e3f551f1b2086830c81
5
5
  SHA512:
6
- metadata.gz: 50257c6d0088444a0f6e879dfb88b6b4fe532637e2f4f5d35a7b9a23953dd56688b1b640a35f118addb9286773ee418764d6d53ac33e8cbf74e8f9f85c9a277e
7
- data.tar.gz: 7810f14c074ef37485d10a18073852d3b9350446b3cf37b7a21759319cd50a9fedad75d3ac18523d3e4f72fc5634812f8108b83d96fc620d1841f18f966ee1b5
6
+ metadata.gz: 0a7031a81df0adc128f5a9bd835fef720372a6051ff3badbc71054286fcc3232f96b42d6dc4ac7c1fae081073e109216b635e3f99cd5377c81b79360a6e8f298
7
+ data.tar.gz: 30238c1108f0f22efd176f338c6db0b0faf5500c0712225ccaafcaf5693f70304ffc0026f5ca2025a79adb8c86e1dda0dab4109a250da1c0c2b911a87ae1ffdf
@@ -2,6 +2,7 @@
2
2
  # -*- ruby -*-
3
3
 
4
4
  require 'svnx/util/objutil'
5
+ require 'svnx/util/strutil'
5
6
 
6
7
  module Svnx
7
8
  module Base
@@ -16,7 +17,7 @@ module Svnx::Base
16
17
  def mapping field
17
18
  case field
18
19
  when :revision
19
- Proc.new { |x| [ "-r", x.revision ] }
20
+ Proc.new { |x| [ "-r", x.send(:revision) ] }
20
21
  when :ignorewhitespace, :ignore_whitespace
21
22
  %w{ -x -bw -x --ignore-eol-style }
22
23
  when :paths
@@ -28,7 +29,7 @@ module Svnx::Base
28
29
  when :url
29
30
  nil
30
31
  when :file
31
- Proc.new { |x| [ "-F", x.file ] }
32
+ Proc.new { |x| [ "--file", x.file ] }
32
33
  else
33
34
  raise "invalid field '#{field}'"
34
35
  end
@@ -40,6 +41,15 @@ module Svnx::Base
40
41
  has_field field, arg
41
42
  end
42
43
  end
44
+
45
+ def to_tag sym, invoke = nil
46
+ tag = "--" + StringUtil.with_dashes(sym)
47
+ if invoke
48
+ Proc.new { |x| [ tag, x.send(sym) ] }
49
+ else
50
+ tag
51
+ end
52
+ end
43
53
  end
44
54
 
45
55
  def initialize args
@@ -2,6 +2,7 @@
2
2
  # -*- ruby -*-
3
3
 
4
4
  require 'svnx/base/options'
5
+ require 'svnx/util/strutil'
5
6
 
6
7
  module Svnx
7
8
  module Log
@@ -10,10 +11,11 @@ end
10
11
 
11
12
  module Svnx::Log
12
13
  class Options < Svnx::Base::Options
13
- has_fields limit: Proc.new { |x| [ "--limit", x.limit ] },
14
- verbose: "-v",
15
-
16
- revision: Proc.new { |x| "-r" + x.revision.to_s }
17
- has :url, :path
14
+ has_fields limit: Proc.new { |x| [ "--limit", x.send(:limit) ] },
15
+ verbose: "-v",
16
+ stop_on_copy: to_tag(:stop_on_copy),
17
+ use_merge_history: "--use-merge-history",
18
+ depth: Proc.new { |x| [ "--depth", x.send(:depth) ] }
19
+ has :revision, :url, :path
18
20
  end
19
21
  end
@@ -10,6 +10,7 @@ end
10
10
 
11
11
  module Svnx::Update
12
12
  class Options < Svnx::Base::Options
13
- has :revision, :paths
13
+ has :revision
14
+ has :paths
14
15
  end
15
16
  end
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/ruby -w
2
+ # -*- ruby -*-
3
+
4
+ class StringUtil
5
+ class << self
6
+ def with_dashes x
7
+ x.to_s.gsub "_", "-"
8
+ end
9
+
10
+ def with_underscores x
11
+ x.to_s.gsub "-", "_"
12
+ end
13
+ end
14
+ end
data/lib/svnx/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
 
4
4
  module Svnx
5
5
  NAME = 'svnx'
6
- VERSION = '2.6.0'
6
+ VERSION = '2.7.0'
7
7
  end
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: 2.6.0
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Pace
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-29 00:00:00.000000000 Z
11
+ date: 2019-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: command-cacheable
@@ -196,6 +196,7 @@ files:
196
196
  - lib/svnx/util/dateutil.rb
197
197
  - lib/svnx/util/englishtime.rb
198
198
  - lib/svnx/util/objutil.rb
199
+ - lib/svnx/util/strutil.rb
199
200
  - lib/svnx/util/timeutil.rb
200
201
  - lib/svnx/version.rb
201
202
  - repackage