simple_args_dispatch 0.4.2 → 0.4.3

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
- SHA1:
3
- metadata.gz: 62baf462d137ad6dcf7ed032c869bf16aa26485e
4
- data.tar.gz: 25c48b265d0df61dca569b1e7e13fcceb994692c
2
+ SHA256:
3
+ metadata.gz: 4e0aaa736c445777784918966132cfe019ad0312cd24f30cbb7c412e5ba1dc93
4
+ data.tar.gz: 995ab1333735f4a4290815e701d0f191d2909fbc836af6ec9c89d95e34a93b15
5
5
  SHA512:
6
- metadata.gz: 9a3bb2023c2c83e273aa8262000b3030b9485d2ace3dc18391c71431015aa59cf58e82ef0eab1717e9de244ac6ad91b353937541c7fe3ffb8ab24f2d1a2f8b97
7
- data.tar.gz: dbb502d70dfa7dc71885e3d1f86511d6194eeba39e527d7b16fb243c7c89222ec8103c55b16228111510b1c7523584b970ab8f83897a77970d415bccf0ca76b2
6
+ metadata.gz: c46c9a19b4b27421845f7775ee6ba67f461ec5f59f16adca72871590564309167cbc8ada94b7e6f9a98a3171ef065821f237dae77af90096176b98c453b5add4
7
+ data.tar.gz: 4a4e1a9cea5cb0652aca3e8bc60991eb12d214c6b12e08df16a6f507ea5cd61367cc3de4f8cc5a121b10c70a7dc7c646fac9062672935a10411bb7e15db999b2
@@ -22,7 +22,7 @@ module SimpleArgsDispatch
22
22
 
23
23
  def dispatch(app_name, args, actions, parent = nil, template_dir = '')
24
24
  arg = args.shift
25
- actions.each do |k, v|
25
+ actions[0..1].each do |k, v|
26
26
  if arg == k.to_s
27
27
  if v.is_a?(Hash)
28
28
  self.dispatch(app_name, args, v, "#{parent} #{arg}", template_dir)
@@ -94,7 +94,7 @@ module SimpleArgsDispatch
94
94
  end
95
95
 
96
96
  def show_available(app_name, available, prepend = nil, join='|', separator = new_line, extra_info = '')
97
- @speaker.speak_up("Usage: #{app_name} #{prepend + ' ' if prepend}#{available.map { |k, v| "#{'[' if v == :key}#{k.to_s}#{']' if v == :key}" }.join(join)}")
97
+ @speaker.speak_up("Usage: #{app_name} #{prepend + ' ' if prepend}#{available[0..1].map { |k, v| "#{'[' if v == :key}#{k.to_s}#{']' if v == :key}" }.join(join)}")
98
98
  if extra_info.to_s != ''
99
99
  @speaker.speak_up(separator)
100
100
  @speaker.speak_up(extra_info)
@@ -1,3 +1,3 @@
1
1
  module SimpleArgsDispatch
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_args_dispatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - R
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-11 00:00:00.000000000 Z
11
+ date: 2019-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -104,8 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
- rubyforge_project:
108
- rubygems_version: 2.6.14
107
+ rubygems_version: 3.0.1
109
108
  signing_key:
110
109
  specification_version: 4
111
110
  summary: Ruby utility to eaily parse command line arguments with optional use of YAML