noms-optconfig 1.6.0 → 1.6.1

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.
@@ -15,6 +15,7 @@
15
15
  #
16
16
 
17
17
  require 'noms/optconfig'
18
+ require 'json'
18
19
 
19
20
  $VERSION = NOMS::Optconfig::VERSION
20
21
 
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 Longopt.new_with_args(argv, *optspecs)
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 Longopt.default(opth)
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']
@@ -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']
@@ -1,5 +1,9 @@
1
- class Optconfig
1
+ class NOMS
2
2
 
3
- VERSION = '1.6.0'
3
+ end
4
+
5
+ class NOMS::Optconfig
6
+
7
+ VERSION = '1.6.1'
4
8
 
5
9
  end
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.0
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-03 00:00:00.000000000 Z
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
- - ruby-showconfig
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/ruby-showconfig
75
+ - bin/noms-showconfig
76
76
  - bin/optconfig.sh
77
77
  - bin/bash-showconfig
78
78
  homepage: http://github.com/evernote/optconfig