optix 1.2.5 → 2.0.0
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 +4 -4
- data/lib/optix/trollop.rb +6 -6
- data/lib/optix/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7455cbe29e1ddcb54711bde6c4f06080bc5730f6
|
|
4
|
+
data.tar.gz: 24e303a9b01919179a127cae03d281bcf5f5cab2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6249c0ea4a85adb1bfb31b851e2773236d917b1b3ad64121c5d3368444fb297b67fc868525721ce9df5fadbf6b6b3939df0dce40c78856772e45074347d89045
|
|
7
|
+
data.tar.gz: da14393fce1fa53be0af09840bba01fbe63f81d9c2d72676f7c2a87bc7978bb22adf321957aaef6d2b02ed6523b421a44b39e5f6478f484e66099dc16fad8d6c
|
data/lib/optix/trollop.rb
CHANGED
|
@@ -14,7 +14,7 @@ VERSION = "1.16.2"
|
|
|
14
14
|
## Thrown by Parser in the event of a commandline error. Not needed if
|
|
15
15
|
## you're using the Trollop::options entry.
|
|
16
16
|
class CommandlineError < StandardError; end
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
## Thrown by Parser if the user passes in '-h' or '--help'. Handled
|
|
19
19
|
## automatically by Trollop#options.
|
|
20
20
|
class HelpNeeded < StandardError; end
|
|
@@ -256,7 +256,7 @@ class Parser
|
|
|
256
256
|
syms.each { |sym| raise ArgumentError, "unknown option '#{sym}'" unless @specs[sym] }
|
|
257
257
|
@constraints << [:depends, syms]
|
|
258
258
|
end
|
|
259
|
-
|
|
259
|
+
|
|
260
260
|
## Marks two (or more!) options as conflicting.
|
|
261
261
|
def conflicts *syms
|
|
262
262
|
syms.each { |sym| raise ArgumentError, "unknown option '#{sym}'" unless @specs[sym] }
|
|
@@ -451,7 +451,7 @@ class Parser
|
|
|
451
451
|
# call this unless the cursor's at the beginning of a line.
|
|
452
452
|
|
|
453
453
|
left = {}
|
|
454
|
-
@specs.each do |name, spec|
|
|
454
|
+
@specs.each do |name, spec|
|
|
455
455
|
left[name] = "--#{spec[:long]}" +
|
|
456
456
|
(spec[:short] && spec[:short] != :none ? ", -#{spec[:short]}" : "") +
|
|
457
457
|
case spec[:type]
|
|
@@ -687,7 +687,7 @@ private
|
|
|
687
687
|
start = 0
|
|
688
688
|
ret = []
|
|
689
689
|
until start > str.length
|
|
690
|
-
nextt =
|
|
690
|
+
nextt =
|
|
691
691
|
if start + width >= str.length
|
|
692
692
|
str.length
|
|
693
693
|
else
|
|
@@ -784,10 +784,10 @@ def with_standard_exception_handling parser
|
|
|
784
784
|
exit(-1)
|
|
785
785
|
rescue HelpNeeded
|
|
786
786
|
parser.educate
|
|
787
|
-
exit
|
|
787
|
+
exit 1
|
|
788
788
|
rescue VersionNeeded
|
|
789
789
|
puts parser.version
|
|
790
|
-
exit
|
|
790
|
+
exit 1
|
|
791
791
|
end
|
|
792
792
|
end
|
|
793
793
|
|
data/lib/optix/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: optix
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Moe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-01-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: chronic
|