avmtrf1-tools 0.36.0 → 0.37.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31c309491959a0594c3df8dc41fc1289c23bf01a1b49098ab71ab088ee1902ae
|
4
|
+
data.tar.gz: 6e6e2234030d966e8bfc89e7d4d55b9012f59152dcc62694cde7a7ebdd8d8b5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74b0a854547a9cbab8d4f46114d8e5cce72a3a149c5d9028ee92c8e8ad2779aef249e1cdce545d0cab0d9a2990a14a5b17a99f71ce2a8cc39bc762f955bc8dfe
|
7
|
+
data.tar.gz: 2c924ccd64479d9b4e6bd6e8a47b2e5a7d30beefac7bd1763731cf6b48598325f088614c0b510312e8b3b96b92493e3b3ae8d947dbe8fd9c7292c0db008d4393
|
@@ -13,6 +13,11 @@ module Avmtrf1
|
|
13
13
|
source
|
14
14
|
end
|
15
15
|
|
16
|
+
# @return [String]
|
17
|
+
def markdown_link(object_type = 'commit')
|
18
|
+
"[#{git_commit.abbreviated_commit_hash}|#{web_url(object_type)}]"
|
19
|
+
end
|
20
|
+
|
16
21
|
# @return [String]
|
17
22
|
def textile_link(object_type = 'commit')
|
18
23
|
"\"#{git_commit.abbreviated_commit_hash}\":#{web_url(object_type)}"
|
@@ -13,6 +13,7 @@ module Avmtrf1
|
|
13
13
|
class CommitLink
|
14
14
|
runner_with :help, :output do
|
15
15
|
desc 'Mostra o link de uma revisão no Gitlab do TRF1.'
|
16
|
+
bool_opt '-m', '--markdown', 'Formata URL como link Markdown.'
|
16
17
|
bool_opt '-t', '--tree', 'URL com "tree" no lugar de "commit".'
|
17
18
|
bool_opt '-T', '--textile', 'Formata URL como link Textile.'
|
18
19
|
pos_arg 'revisions', optional: true, repeat: true
|
@@ -48,7 +49,8 @@ module Avmtrf1
|
|
48
49
|
|
49
50
|
# @return [String]
|
50
51
|
def commit_output(commit)
|
51
|
-
return commit.textile_link if parsed.textile?
|
52
|
+
return commit.textile_link(object_type) if parsed.textile?
|
53
|
+
return commit.markdown_link(object_type) if parsed.markdown?
|
52
54
|
|
53
55
|
commit.web_url(object_type)
|
54
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avmtrf1-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.37.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo H. Bogoni
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha-selenium
|