svnx 2.11.0 → 2.12.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 +4 -4
- data/lib/svnx/base/fields.rb +7 -3
- data/lib/svnx/base/tags.rb +16 -25
- data/lib/svnx/blame/options.rb +1 -1
- data/lib/svnx/commit/options.rb +1 -1
- data/lib/svnx/diff/options.rb +3 -5
- data/lib/svnx/log/options.rb +2 -2
- data/lib/svnx/propget/options.rb +1 -1
- data/lib/svnx/update/options.rb +1 -1
- data/lib/svnx/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af7831460d0a7cf194803286b08e91c66352cd09
|
4
|
+
data.tar.gz: 524c096737fc930fa597a455efc04e02fa2fd661
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7033404d1c9507cd1ac59c3d110e0e42a064d36952ab5bc4cf24d2cdec225feea2f85d05ca4125bd75c04c0eaa83e43b69b4c2244b8dbb7c4edb7c74eb6118f0
|
7
|
+
data.tar.gz: 198c69b523aa7cc2b0ea465aac9dba564918edc95e32d68160c6450cec46d1ce6ac987af251f84f67a5906566266c82edcb3659880d59e8cc8136a043ebeafc5
|
data/lib/svnx/base/fields.rb
CHANGED
@@ -32,8 +32,14 @@ module Svnx::Base
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def fields
|
35
|
+
# instance variable on the class itself, not an instance of the class
|
35
36
|
varname = '@fields'
|
36
|
-
|
37
|
+
cls = self.class
|
38
|
+
if cls.instance_variable_defined? varname
|
39
|
+
cls.instance_variable_get varname
|
40
|
+
else
|
41
|
+
false
|
42
|
+
end
|
37
43
|
end
|
38
44
|
|
39
45
|
module ClassMethods
|
@@ -42,8 +48,6 @@ module Svnx::Base
|
|
42
48
|
attr_reader(*what)
|
43
49
|
end
|
44
50
|
|
45
|
-
# Creates a reader method for each field, and assigns and validates them from an initialize
|
46
|
-
# method, which is also created.
|
47
51
|
def has_fields fields = Hash.new
|
48
52
|
fields.each do |name, arg|
|
49
53
|
has_field name, arg
|
data/lib/svnx/base/tags.rb
CHANGED
@@ -11,7 +11,7 @@ module Svnx::Base
|
|
11
11
|
case field
|
12
12
|
when :revision
|
13
13
|
to_args "-r", field
|
14
|
-
when :
|
14
|
+
when :ignore_whitespace
|
15
15
|
%w{ -x -bw -x --ignore-eol-style }
|
16
16
|
when :paths
|
17
17
|
nil
|
@@ -28,6 +28,7 @@ module Svnx::Base
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
# for common options/tags
|
31
32
|
def has(*fields)
|
32
33
|
fields.each do |field|
|
33
34
|
arg = mapping field
|
@@ -35,42 +36,32 @@ module Svnx::Base
|
|
35
36
|
end
|
36
37
|
end
|
37
38
|
|
39
|
+
# gets the value for the tag/option by calling methname
|
38
40
|
def to_args tagname, methname
|
39
41
|
Proc.new { |obj| [ tagname, obj.send(methname) ] }
|
40
42
|
end
|
41
43
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
Proc.new { |x| [ tag, x.send(sym) ] }
|
46
|
-
else
|
47
|
-
tag
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
def has_tag_field name
|
52
|
-
has_field name, to_tag(name)
|
53
|
-
end
|
54
|
-
|
55
|
-
def has_tag_fields(*names)
|
56
|
-
names.each do |name|
|
57
|
-
has_tag_field name
|
58
|
-
end
|
44
|
+
# converts the symbol to a tag
|
45
|
+
def to_tag sym
|
46
|
+
"--" + Svnx::StringUtil.with_dashes(sym)
|
59
47
|
end
|
60
48
|
|
61
|
-
|
62
|
-
|
49
|
+
# tags with no argument
|
50
|
+
def has_tag_field(*names)
|
51
|
+
has_tags(false, *names)
|
63
52
|
end
|
64
53
|
|
65
|
-
|
66
|
-
|
54
|
+
# tags with an argument
|
55
|
+
def has_tag_argument(*names)
|
56
|
+
has_tags(true, *names)
|
67
57
|
end
|
68
58
|
|
69
|
-
|
59
|
+
# tags with an argument
|
60
|
+
def has_tags(argument, *names)
|
70
61
|
names.each do |name|
|
71
62
|
tag = to_tag name
|
72
|
-
|
73
|
-
has_field name,
|
63
|
+
value = argument ? to_args(tag, name) : tag
|
64
|
+
has_field name, value
|
74
65
|
end
|
75
66
|
end
|
76
67
|
end
|
data/lib/svnx/blame/options.rb
CHANGED
data/lib/svnx/commit/options.rb
CHANGED
data/lib/svnx/diff/options.rb
CHANGED
@@ -10,10 +10,8 @@ end
|
|
10
10
|
|
11
11
|
module Svnx::Diff
|
12
12
|
class Options < Svnx::Base::Options
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
has :ignorewhitespace, :paths, :url
|
13
|
+
has_tag_argument :change, :depth
|
14
|
+
has_tag_field :ignore_properties
|
15
|
+
has :ignore_whitespace, :paths, :url
|
18
16
|
end
|
19
17
|
end
|
data/lib/svnx/log/options.rb
CHANGED
@@ -11,8 +11,8 @@ end
|
|
11
11
|
|
12
12
|
module Svnx::Log
|
13
13
|
class Options < Svnx::Base::Options
|
14
|
-
|
15
|
-
|
14
|
+
has_tag_argument :limit, :depth
|
15
|
+
has_tag_field :verbose, :stop_on_copy, :use_merge_history
|
16
16
|
has :revision, :url, :path
|
17
17
|
end
|
18
18
|
end
|
data/lib/svnx/propget/options.rb
CHANGED
data/lib/svnx/update/options.rb
CHANGED
data/lib/svnx/version.rb
CHANGED
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.
|
4
|
+
version: 2.12.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-09-
|
11
|
+
date: 2019-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: command-cacheable
|