noms-optconfig 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/{ruby-showconfig → noms-showconfig} +1 -0
- data/lib/noms/longopt.rb +4 -4
- data/lib/noms/optconfig.rb +2 -2
- data/lib/noms/optconfig/version.rb +6 -2
- metadata +4 -4
data/lib/noms/longopt.rb
CHANGED
@@ -25,7 +25,7 @@ class NOMS::Longopt < Hash
|
|
25
25
|
|
26
26
|
attr_accessor :optspec
|
27
27
|
|
28
|
-
def
|
28
|
+
def self.new_with_args(argv, *optspecs)
|
29
29
|
obj = Longopt.allocate
|
30
30
|
obj.getopts_with_argv(argv, *optspecs)
|
31
31
|
obj
|
@@ -40,7 +40,7 @@ class NOMS::Longopt < Hash
|
|
40
40
|
self
|
41
41
|
end
|
42
42
|
|
43
|
-
def
|
43
|
+
def self.default(opth)
|
44
44
|
obj = Longopt.allocate
|
45
45
|
obj.merge(opth)
|
46
46
|
end
|
@@ -178,9 +178,9 @@ NOMS::Longopt - Convenience class similar to Perl Getopt::Long
|
|
178
178
|
|
179
179
|
=head1 SYNOPSIS
|
180
180
|
|
181
|
-
require 'longoopt'
|
181
|
+
require 'noms/longoopt'
|
182
182
|
|
183
|
-
opt = Longopt.new('verbose', 'force!', 'logfile=s',
|
183
|
+
opt = NOMS::Longopt.new('verbose', 'force!', 'logfile=s',
|
184
184
|
'define=s%', 'user=s@')
|
185
185
|
|
186
186
|
print "Verbose enabled" if opt['verbose']
|
data/lib/noms/optconfig.rb
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
#
|
29
29
|
|
30
30
|
require 'rubygems'
|
31
|
-
require 'longopt'
|
31
|
+
require 'noms/longopt'
|
32
32
|
require 'json'
|
33
33
|
|
34
34
|
class NOMS
|
@@ -76,7 +76,7 @@ class NOMS::Optconfig < Hash
|
|
76
76
|
end
|
77
77
|
@config = nil
|
78
78
|
|
79
|
-
cmdlineopt = Longopt.new(optspec.keys)
|
79
|
+
cmdlineopt = NOMS::Longopt.new(optspec.keys)
|
80
80
|
|
81
81
|
if cmdlineopt.has_key? 'config'
|
82
82
|
@config = cmdlineopt['config']
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noms-optconfig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-02-
|
12
|
+
date: 2016-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -64,7 +64,7 @@ description: NOMS::Optconfig presents a standardized way to parse configuration
|
|
64
64
|
email:
|
65
65
|
- jbrinkley@evernote.com
|
66
66
|
executables:
|
67
|
-
-
|
67
|
+
- noms-showconfig
|
68
68
|
extensions: []
|
69
69
|
extra_rdoc_files: []
|
70
70
|
files:
|
@@ -72,7 +72,7 @@ files:
|
|
72
72
|
- lib/noms/optconfig/version.rb
|
73
73
|
- lib/noms/longopt.rb
|
74
74
|
- lib/noms/bashon.rb
|
75
|
-
- bin/
|
75
|
+
- bin/noms-showconfig
|
76
76
|
- bin/optconfig.sh
|
77
77
|
- bin/bash-showconfig
|
78
78
|
homepage: http://github.com/evernote/optconfig
|