avm-tools 0.94.1 → 0.94.2

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: dce4ced28e926994fcd39732b69129d78a0a84b4fa7327d4f717a8ea218be36e
4
- data.tar.gz: 0561dd8132497d54f2eecb2b933968aca705c3976a6ae198d8394257bf9f0d29
3
+ metadata.gz: a418fd7c14cb6599e9c75eeba391a576aefb0897c6ce0f069568495cf0cb9802
4
+ data.tar.gz: 9ae79ac488f4fb96331b6d71bb7db9e943947b37577ffb725c3e10241b8b6206
5
5
  SHA512:
6
- metadata.gz: a63ff3adcd87aeaddcfee5045359c45d232bbc4d8d3dd4774a75d07feabc34493ee6432fe52a0b95e10aed80a3603a71f23dcfc5ae478e0dfd07cc331aeccfb1
7
- data.tar.gz: 83e4d3667c0f4dbe11c3421a27f786dce65cd698c0c1867d23dc16191c13c6cbc6574be40aa9c9728b4c69a72e267792ad6de892da13c0d34df0c864142e4f13
6
+ metadata.gz: 4faba2cbbbcdcc77ca7a925373de53056f7e1ef8caaa183f9eb6e8ca56c4de4e77e923cfa0567f8c83995cad400a3d09d698e18a77aa95dfbca98fcf8aa1d320
7
+ data.tar.gz: 772e38b1000548d8e37bc44b2ac9380948fbeaca3706b7d7218140895765fd053e589eabe95a23e64d19c931ee7e28cc18ce865931e76536d3f8c5dd83cd0ed5
@@ -1,19 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_cli/default_runner'
4
- require 'eac_ruby_utils/console/docopt_runner'
5
- require 'eac_ruby_utils/core_ext'
3
+ require 'eac_ruby_base0/core_ext'
6
4
 
7
5
  module Avm
8
6
  module Tools
9
7
  class Runner
10
8
  class LocalProject
11
9
  class Ruby
12
- class Bundler < ::EacRubyUtils::Console::DocoptRunner
10
+ class Bundler
13
11
  require_sub __FILE__
14
- include ::EacCli::DefaultRunner
15
-
16
- runner_definition do
12
+ runner_with :help, :subcommands do
17
13
  desc 'Ruby\'s bundler utitilies for local projects.'
18
14
  subcommands
19
15
  end
@@ -1,18 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'eac_cli/default_runner'
4
- require 'eac_ruby_utils/console/docopt_runner'
3
+ require 'eac_ruby_base0/core_ext'
5
4
 
6
5
  module Avm
7
6
  module Tools
8
7
  class Runner
9
8
  class LocalProject
10
9
  class Ruby
11
- class Bundler < ::EacRubyUtils::Console::DocoptRunner
12
- class GemfileLock < ::EacRubyUtils::Console::DocoptRunner
13
- include ::EacCli::DefaultRunner
14
-
15
- runner_definition do
10
+ class Bundler
11
+ class GemfileLock
12
+ runner_with :help do
16
13
  desc 'Manipulage a "Gemfile.lock" file.'
17
14
  bool_opt '-c', '--continue', 'Continue Git rebase/cherry-pick.'
18
15
  bool_opt '-i', '--install', 'Run "bundle install".'
@@ -34,7 +31,7 @@ module Avm
34
31
  private
35
32
 
36
33
  def complete?
37
- !option_or_all?('--recursive') || !conflict?
34
+ !option_or_all?(:recursive) || !conflict?
38
35
  end
39
36
 
40
37
  def rebasing?
@@ -51,21 +48,21 @@ module Avm
51
48
  end
52
49
 
53
50
  def bundle_install
54
- return unless check_capability(__method__, :ruby_gem, '--install')
51
+ return unless check_capability(__method__, :ruby_gem, :install)
55
52
 
56
53
  infom '"bundle install"...'
57
54
  bundle_run('install')
58
55
  end
59
56
 
60
57
  def bundle_update
61
- return unless check_capability(__method__, :ruby_gem, '--update')
58
+ return unless check_capability(__method__, :ruby_gem, :update)
62
59
 
63
60
  infom '"bundle update"...'
64
61
  bundle_run('update')
65
62
  end
66
63
 
67
64
  def git_continue
68
- return unless check_capability(__method__, :git_repo, '--continue')
65
+ return unless check_capability(__method__, :git_repo, :continue)
69
66
 
70
67
  infom "Adding \"#{gemfile_lock}\"..."
71
68
  instance.git_repo.command('add', gemfile_lock).execute!
@@ -115,11 +112,11 @@ module Avm
115
112
  end
116
113
 
117
114
  def option_or_all?(option)
118
- options.fetch(option) || options.fetch('--all')
115
+ parsed[option] || parsed.all?
119
116
  end
120
117
 
121
118
  def instance
122
- context(:instance)
119
+ runner_context.call(:instance)
123
120
  end
124
121
 
125
122
  def check_capability(caller, capability, option)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avm
4
4
  module Tools
5
- VERSION = '0.94.1'
5
+ VERSION = '0.94.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avm-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.94.1
4
+ version: 0.94.2
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: 2021-02-21 00:00:00.000000000 Z
11
+ date: 2021-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers