dapp 0.25.0 → 0.25.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dapp/cli/command/options/tag.rb +18 -4
- data/lib/dapp/dapp/option_tags.rb +20 -7
- data/lib/dapp/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: 3da7856304ed795022546a6c8c52219b0bf4972a
|
4
|
+
data.tar.gz: de4113e5a102587051925011ae772c1df10360c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc756b6eec2c67b7dfb4dfb7dfb94f07750edb2e0d8c4e2454dc84e6e2de22ff0a502f35359f81e462498e570bf7c8d721868ce9304a954660a82837f177ae13
|
7
|
+
data.tar.gz: 7220a8eaccaa64444968ff16f7737b76ed931c428f8bf125efbc645430b2d0d33ff0cc422586925b05db174c6756455c6a3abf793a65e898b639405e48a5cf5a
|
@@ -5,11 +5,25 @@ module Dapp
|
|
5
5
|
module Tag
|
6
6
|
def self.extended(klass)
|
7
7
|
klass.class_eval do
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
"Add tag (can be used one or more times), specified text will be slugified".tap do |desc|
|
9
|
+
option :tag,
|
10
|
+
long: '--tag TAG',
|
11
|
+
description: desc,
|
12
|
+
default: [],
|
13
|
+
proc: proc { |v| composite_options(:tags) << v }
|
14
|
+
|
15
|
+
option :tag_slug,
|
16
|
+
long: '--tag-slug TAG',
|
17
|
+
description: desc,
|
18
|
+
default: [],
|
19
|
+
proc: proc { |v| composite_options(:slug_tags) << v }
|
20
|
+
end
|
21
|
+
|
22
|
+
option :tag_plain,
|
23
|
+
long: '--tag-plain TAG',
|
24
|
+
description: "Add tag (can be used one or more times)",
|
11
25
|
default: [],
|
12
|
-
proc: proc { |v| composite_options(:
|
26
|
+
proc: proc { |v| composite_options(:plain_tags) << v }
|
13
27
|
|
14
28
|
option :tag_branch,
|
15
29
|
long: '--tag-branch',
|
@@ -7,12 +7,21 @@ module Dapp
|
|
7
7
|
|
8
8
|
def tags_by_scheme
|
9
9
|
@tags_by_scheme_name ||= begin
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
{}.tap do |tags_by_scheme|
|
11
|
+
[slug_tags, branch_tags, ci_tags].each do |_tags_by_scheme|
|
12
|
+
_tags_by_scheme.each do |scheme, tags|
|
13
|
+
tags_by_scheme[scheme] ||= []
|
14
|
+
tags_by_scheme[scheme] += tags.map(&method(:consistent_uniq_slugify))
|
15
|
+
end
|
15
16
|
end
|
17
|
+
|
18
|
+
[plain_tags, commit_tags, build_tags].each do |_tags_by_scheme|
|
19
|
+
_tags_by_scheme.each do |scheme, tags|
|
20
|
+
tags_by_scheme[scheme] ||= []
|
21
|
+
tags_by_scheme[scheme] += tags
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
16
25
|
tags_by_scheme[:custom] = [:latest] if tags_by_scheme.values.flatten.empty?
|
17
26
|
end
|
18
27
|
end
|
@@ -22,8 +31,12 @@ module Dapp
|
|
22
31
|
tags_by_scheme.values.flatten
|
23
32
|
end
|
24
33
|
|
25
|
-
def
|
26
|
-
{ custom: options[:tag] }
|
34
|
+
def slug_tags
|
35
|
+
{ custom: [*options[:tag], *options[:tag_slug]]}
|
36
|
+
end
|
37
|
+
|
38
|
+
def plain_tags
|
39
|
+
{ custom: options[:tag_plain] }
|
27
40
|
end
|
28
41
|
|
29
42
|
def branch_tags
|
data/lib/dapp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Stolyarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|