eac_cli 0.27.5 → 0.27.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 938ea5f13a60ee96410614ad3a2467e1ee172f0edbbf8a853169f0c563f61fc6
4
- data.tar.gz: ac6f3fde9506adc953a59e96b8c152037233c7609e8194e65a70534dd2f2e358
3
+ metadata.gz: e6f469f383ca2343298743bc8ea036286aa17b853950c1fe6563a78a6aaeb00a
4
+ data.tar.gz: 52a728350332e7bb7782d9e9e5bf9302ef77f9101a3ec8bb6eaf230919452c5f
5
5
  SHA512:
6
- metadata.gz: fc0d1c69a1f274767b42dcd34456c004edf0896623c7791bc87e1d23fdfd92df65b5ce960e84c1341897b196ba4337de16d1c6e517966d0e6340e86059c2ff9c
7
- data.tar.gz: f9dd8eb35bb94e9cdf58d78021ef07f7fea1a9437c57300085bc8a835505100bfaa582fdf7d1f76b97a5cf959d3266bd980a33a38e6f6511f6a0cd5b77be7fee
6
+ metadata.gz: 32f0d4de473442cd637e159348af166aa6ae2611cd2f67b995f0fe0a4a190265dcd7de17eaadfc73322c35a05febe090a36225cb5b7258fdd39475ec7cd99ecb
7
+ data.tar.gz: 2f681a7a00aac52a079b2a5486654e9a9b2ae5f031aac037ad15e69b1f8840cf154f84041f9ad6a5903e06acabae2aa5b5d350de99341834711a0a24b147fba9
@@ -12,6 +12,14 @@ module EacCli
12
12
  def runner?(object)
13
13
  ::EacCli::Runner.runner?(object)
14
14
  end
15
+
16
+ # @return [Hash<String, EacCli::Runner>]
17
+ def subcommands_from_module(a_module)
18
+ a_module.constants
19
+ .map { |name| [name.to_s.underscore.gsub('_', '-'), a_module.const_get(name)] }
20
+ .select { |c| runner?(c[1]) }
21
+ .to_h.with_indifferent_access
22
+ end
15
23
  end
16
24
 
17
25
  common_concern do
@@ -26,11 +34,9 @@ module EacCli
26
34
  @available_subcommands ||= available_subcommands_auto.merge(available_subcommands_extra)
27
35
  end
28
36
 
37
+ # @return [Hash<String, EacCli::Runner>]
29
38
  def available_subcommands_auto
30
- self.class.constants
31
- .map { |name| [name.to_s.underscore.gsub('_', '-'), self.class.const_get(name)] }
32
- .select { |c| ::EacCli::RunnerWith::Subcommands.runner?(c[1]) }
33
- .to_h.with_indifferent_access
39
+ ::EacCli::RunnerWith::Subcommands.subcommands_from_module(self.class)
34
40
  end
35
41
 
36
42
  def available_subcommands_extra
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacCli
4
- VERSION = '0.27.5'
4
+ VERSION = '0.27.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.5
4
+ version: 0.27.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-21 00:00:00.000000000 Z
11
+ date: 2022-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize