particlecmd 0.1.4 → 0.1.5

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: b3f4b44e40270b7f5c36e3e8cc39755e3c1e5871e8c045381e9049b4cf8b6c0f
4
- data.tar.gz: 17442d8f8dbbd04e92c645c43bee0fc1e2fea72fa2b3d88258ec2bcad010c091
3
+ metadata.gz: ba0e8ddef89188e4a2354d7a1eb17b4b78ba7d3001ce85cd7eed307c77bc6cb8
4
+ data.tar.gz: 130cff036d3552ea34abf691e8c545a23dd300d9f8963a4c919e477f8324aa3f
5
5
  SHA512:
6
- metadata.gz: cc43ba6d83b3021c30cb53b9a4df9728f78d5124fb1cbd36dc8dbd907ca76a25f0b04c2bbabb9bd27cfb7898f36ffb526e8fe61b91f446b5315631e76eb92732
7
- data.tar.gz: db4140359fd7e119a5d3dd142431a313cb83656b138900379f50040b55f64cb1eaf8921df4acdb7d4b6be52ecf0d567df852cadb19fec6fef0068275273c6d22
6
+ metadata.gz: 24d8bb785727ae1d1aa60af31f4e1b9593e63293b038630027d4baf08dfdaa6a5eefda8d6029f10cfb123edb88ea6780eafa84cd08620b37b4a055ffb8c39de4
7
+ data.tar.gz: f58ca3d7ffe5af462ab37a642ebe0fc916cd40aed0455cc67390e91cd40bdb4e4ca08aee84aab7a6010d68d78aab96371a60859d252e64d0bc9b31e2952dd855
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- particlecmd (0.1.2)
4
+ particlecmd (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -14,8 +14,8 @@ require 'particlecmd'
14
14
  # d.option 'divide', argname: 'X', description: 'Divide the result by X'
15
15
  #end
16
16
 
17
- $sample = ParticleCMD::Definition.from_string 'add', 'a b -multiply -divide=X ...'
18
- puts $sample.inspect
17
+ $sample = ParticleCMD::Definition.from_string 'add', 'hello world a-very-long-positional --foo --bar --a-very-long-flag --baz=BAZ --quux=QUUX --a-very-long-option=ASDF ...'
18
+ puts $sample.help_message
19
19
 
20
20
  require 'shellwords'
21
21
 
@@ -100,11 +100,13 @@ class ParticleCMD::Definition
100
100
  @positionals.each do |p|
101
101
  s << (sprintf " %*s %s\n", nm, p[:name], p[:description])
102
102
  end
103
+ s << "\n"
103
104
  @flags.each do |f|
104
105
  s << (sprintf " %*s %s\n", nm, "--#{f[:name]}", f[:description])
105
106
  end
107
+ s << "\n"
106
108
  @options.each do |o|
107
- s << (sprintf " %*s=%s %s", nm-2, "--#{o[:name]}", o[:argname], o[:description])
109
+ s << (sprintf " %*s=%s %s\n", nm-o[:argname].length-1, "--#{o[:name]}", o[:argname], o[:description])
108
110
  end
109
111
  s
110
112
  end
@@ -1,3 +1,3 @@
1
1
  module ParticleCMD
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: particlecmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nickolay Ilyushin