avm-tools 0.9.0 → 0.10.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: e8b25be966f98e7a370ad067bda6a661bcc1f88d07dd69bffec2348892398bf7
4
- data.tar.gz: f3638c69e985e7949e9b46a699aa11ab0d317ac58bccb738af02de82ad822680
3
+ metadata.gz: 9b9966433679b8b863a82239dad178559c9868141db3d4f1ca2f6669d5131824
4
+ data.tar.gz: 78ac90fef0632e9e465ed85cbf07d05da8ec42ac2bb67e44d4ca38bbcabac6de
5
5
  SHA512:
6
- metadata.gz: 8277fe1870b2d7f3d0ef25ae40fec80173ba517cbadae7b738d6c7988ea8e68ead17b3c514b771d6d243bef645143e523c79ed9c74598b00b7e94e19f75432b0
7
- data.tar.gz: 82c493e6451ab92ff90edc735c23324224ad11e977f852ec052c606df44667f52f46f86bc71ef8f8939c4ccbab9a8b55457cf970197a0adc13daebeeaf5f134e
6
+ metadata.gz: 1fca490fd5d4a8b3035b047bf0fcff7a7218e51c311c5cbb1fd7d1f2c7bdf4bbe89b9f81687181c47574b08d8b11d68205e31a84fee93271ba47a1e44dec0d2f
7
+ data.tar.gz: e77ce5f6750d8163224233afce0f78080e461955642a1f31c782c99c853cf27fcfb87cb35689ae8e1fddc3aa23271bf3bc8cb7a69b319f2645401e1dc492c764
@@ -14,11 +14,11 @@ module Avm
14
14
  include ::EacRubyUtils::SimpleCache
15
15
  include ::EacRubyUtils::Console::Speaker
16
16
 
17
- attr_reader :no_avm_branch_name
17
+ attr_reader :no_validate_branch
18
18
 
19
19
  def initialize(options)
20
20
  consumer = ::EacRubyUtils::OptionsConsumer.new(options)
21
- dir, @no_avm_branch_name = consumer.consume_all(:dir, :no_avm_branch_name)
21
+ dir, @no_validate_branch = consumer.consume_all(:dir, :no_validate_branch)
22
22
  consumer.validate
23
23
  @git = ::EacLauncher::Git::Base.new(dir)
24
24
  end
@@ -33,6 +33,7 @@ module Avm
33
33
  assert_tag
34
34
  push
35
35
  remove_local_branch
36
+ clipboard_copy_tracker_message
36
37
  true
37
38
  end
38
39
 
@@ -6,11 +6,11 @@ module Avm
6
6
  module Git
7
7
  module Issue
8
8
  class Complete
9
- def branch
9
+ def branch_uncached
10
10
  @git.current_branch
11
11
  end
12
12
 
13
- def branch_hash
13
+ def branch_hash_uncached
14
14
  @git.rev_parse("refs/heads/#{branch}")
15
15
  end
16
16
 
@@ -21,7 +21,7 @@ module Avm
21
21
  def branch_name_result
22
22
  ::Avm::Result.success_or_error(
23
23
  branch_name,
24
- issue_id || no_avm_branch_name
24
+ issue_id || no_validate_branch
25
25
  )
26
26
  end
27
27
 
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'clipboard'
4
+
5
+ module Avm
6
+ module Git
7
+ module Issue
8
+ class Complete
9
+ def clipboard_copy_tracker_message
10
+ ::Clipboard.copy(textile_tracker_message)
11
+ infov 'Copied to clipboard', textile_tracker_message
12
+ end
13
+
14
+ private
15
+
16
+ def textile_tracker_message_uncached
17
+ "Revisado para commit:#{branch_short_hash}, ok."
18
+ end
19
+
20
+ def branch_short_hash
21
+ git(['log', '--pretty=format:%h', '-1', '-q', branch_hash])
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -20,10 +20,10 @@ module Avm
20
20
  __PROGRAM__ -h | --help
21
21
 
22
22
  Options:
23
- -h --help Show this screen.
24
- -C <path> Path to Git repository [default: .].
25
- --no-avm Does not require valid AVM issue\'s branch/tag name.
26
- -y --yes Does not ask for user confirmation.
23
+ -h --help Show this screen.
24
+ -C <path> Path to Git repository [default: .].
25
+ -B --no-validate-branch Does not validate branch/tag name.
26
+ -y --yes Does not ask for user confirmation.
27
27
  DOCOPT
28
28
 
29
29
  def run
@@ -40,7 +40,8 @@ module Avm
40
40
  end
41
41
 
42
42
  def git_complete_issue_options
43
- { dir: options.fetch('-C'), no_avm_branch_name: options.fetch('--no-avm') }
43
+ { dir: options.fetch('-C'),
44
+ no_validate_branch: options.fetch('--no-validate-branch') }
44
45
  end
45
46
  end
46
47
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.9.0'
5
+ VERSION = '0.10.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,15 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-26 00:00:00.000000000 Z
11
+ date: 2019-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: clipboard
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.3.3
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.3.3
13
33
  - !ruby/object:Gem::Dependency
14
34
  name: eac_launcher
15
35
  requirement: !ruby/object:Gem::Requirement
@@ -113,6 +133,7 @@ files:
113
133
  - lib/avm/git/issue/complete/_local_tag.rb
114
134
  - lib/avm/git/issue/complete/_push.rb
115
135
  - lib/avm/git/issue/complete/_remote.rb
136
+ - lib/avm/git/issue/complete/_tracker.rb
116
137
  - lib/avm/git/issue/complete/_validations.rb
117
138
  - lib/avm/instances.rb
118
139
  - lib/avm/instances/application.rb