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: 493f91da0b605f4a9a83c65ad7147af44d9cae1d2776647fc0daeeaa911351ff
4
- data.tar.gz: 4ab6779365c2601f3a913aeeb658ad39f42273f8f6bbc05a93a89817006d89ca
3
+ metadata.gz: 31c309491959a0594c3df8dc41fc1289c23bf01a1b49098ab71ab088ee1902ae
4
+ data.tar.gz: 6e6e2234030d966e8bfc89e7d4d55b9012f59152dcc62694cde7a7ebdd8d8b5f
5
5
  SHA512:
6
- metadata.gz: 1b945f2e35f0d2b79be9fb7ec67d9b6cfd2c3c2e0381918626ed966136a2136b50c161844dc78c3b7337abe269ca93aa3eb2d73a9aafc77d7b72a4d7b32ecc36
7
- data.tar.gz: cc0e2ebe992386740b907725086b9e29184bf8f18aded506db9a7f5c3eb774eba38cd86eed6738f89b05a042ad7c06cbf17c15d5e16a0fac146839198acd4f2e
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avmtrf1
4
4
  module Tools
5
- VERSION = '0.36.0'
5
+ VERSION = '0.37.0'
6
6
  end
7
7
  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.36.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-01-24 00:00:00.000000000 Z
11
+ date: 2022-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-selenium