getopt 1.4.3 → 1.4.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e01b97f25a4930c245cb4297d867d3c99db93bea
4
- data.tar.gz: bae1d1f080a05aa8c87010f7b141caaefe71d94a
2
+ SHA256:
3
+ metadata.gz: 686d33e55b2c112171c79a42bd3fe4e84eac024f04ef4523523aad17c628dd43
4
+ data.tar.gz: 2e9f498abcb51dc6c926d7814f8ab0b4d824adec1d37642b26b7fa041f998481
5
5
  SHA512:
6
- metadata.gz: cb33d4cc4bc8b1f1afa3a99b3297f8e3bb79cebfd1a7bd2f7e97493c6198dc1ab6b3f0654bb22ed509a2b1079facb83e11ffe82428fa17f4676424373a3907fa
7
- data.tar.gz: 6c8cd8707a430ee5727a43b5cb1854e169ad8838f6f42c95a37a2550c8d1e4f9c22e390be55487431f8cbe861ddf33ba8817d4dbf288eb9771b66224d8424283
6
+ metadata.gz: '027628a21d93e2ca0efb18c39376fb4a5fee5cb4eb8fb9ed5e4d3b38fd8caa4567efda95a0de0ea957ab5bff81ce039511ac72af99cd901e6860ecec1fc8c46a'
7
+ data.tar.gz: 97876faaac893803d5ac129d1ac980b74ad34a9e5b730bae449d044588541690894721d7e5b092c4406b7b318e200155d38625b8fa076c360edd5a5a69abaab9
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ == 1.4.4 - 24-Mar-2018
2
+ * Fixed a deprecation warning.
3
+ * Now requires Ruby 2.2 or later.
4
+ * Added metadata to the gemspec.
5
+ * Updated the cert.
6
+
1
7
  == 1.4.3 - 7-Jan-2016
2
8
  * This gem is now signed.
3
9
  * The gem related tasks in the Rakefile now assume Rubygems 2.x.
data/MANIFEST CHANGED
@@ -11,5 +11,6 @@
11
11
  * lib/getopt-std.rb
12
12
  * lib/getopt/long.rb
13
13
  * lib/getopt/std.rb
14
+ * lib/getopt/version.rb
14
15
  * test/test_getopt_long.rb
15
16
  * test/test_getopt_std.rb
data/README CHANGED
@@ -184,7 +184,7 @@ INCREMENT
184
184
  Artistic 2.0
185
185
 
186
186
  = Copyright
187
- (C) 2005-2016, Daniel J. Berger
187
+ (C) 2005-2018, Daniel J. Berger
188
188
  All Rights Reserved
189
189
 
190
190
  = Author
@@ -1,21 +1,26 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
2
+ MIIEcDCCAtigAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MREwDwYDVQQDDAhkamJl
3
3
  cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
4
- MB4XDTE1MDkwMjIwNDkxOFoXDTE2MDkwMTIwNDkxOFowPzERMA8GA1UEAwwIZGpi
4
+ MB4XDTE4MDMxODE1MjIwN1oXDTI4MDMxNTE1MjIwN1owPzERMA8GA1UEAwwIZGpi
5
5
  ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
6
- bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyTkvXqRp6hLs9eoJOS
7
- Hmi8kRYbq9Vkf15/hMxJpotYMgJVHHWrmDcC5Dye2PbnXjTkKf266Zw0PtT9h+lI
8
- S3ts9HO+vaCFSMwFFZmnWJSpQ3CNw2RcHxjWkk9yF7imEM8Kz9ojhiDXzBetdV6M
9
- gr0lV/alUr7TNVBDngbXEfTWscyXh1qd7xZ4EcOdsDktCe5G45N/o3662tPQvJsi
10
- FOF0CM/KuBsa/HL1/eoEmF4B3EKIRfTHrQ3hu20Kv3RJ88QM4ec2+0dd97uX693O
11
- zv6981fyEg+aXLkxrkViM/tz2qR2ZE0jPhHTREPYeMEgptRkTmWSKAuLVWrJEfgl
12
- DtkCAwEAAaN3MHU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ZFr3cIBtO1gFvQWW7E/Y3ijliWJS1GQFq
14
+ 058qERadHGu1yu1dojmFRo6W2KZvY9al2yIlbkpDrD5MYQIDAQABo3cwdTAJBgNV
15
+ HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUFZsMapgzJimzsbaBG2Tm8j5e
16
+ AzgwHQYDVR0RBBYwFIESZGpiZXJnOTZAZ21haWwuY29tMB0GA1UdEgQWMBSBEmRq
17
+ YmVyZzk2QGdtYWlsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAW2tnYixXQtKxgGXq
18
+ /3iSWG2bLwvxS4go3srO+aRXZHrFUMlJ5W0mCxl03aazxxKTsVVpZD8QZxvK91OQ
19
+ h9zr9JBYqCLcCVbr8SkmYCi/laxIZxsNE5YI8cC8vvlLI7AMgSfPSnn/Epq1GjGY
20
+ 6L1iRcEDtanGCIvjqlCXO9+BmsnCfEVehqZkQHeYczA03tpOWb6pon2wzvMKSsKH
21
+ ks0ApVdstSLz1kzzAqem/uHdG9FyXdbTAwH1G4ZPv69sQAFAOCgAqYmdnzedsQtE
22
+ 1LQfaQrx0twO+CZJPcRLEESjq8ScQxWRRkfuh2VeR7cEU7L7KqT10mtUwrvw7APf
23
+ DYoeCY9KyjIBjQXfbj2ke5u1hZj94Fsq9FfbEQg8ygCgwThnmkTrrKEiMSs3alYR
24
+ ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
25
+ WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
21
26
  -----END CERTIFICATE-----
data/getopt.gemspec CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'getopt'
5
- spec.version = '1.4.3'
5
+ spec.version = '1.4.4'
6
6
  spec.author = 'Daniel J. Berger'
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
@@ -15,6 +15,16 @@ Gem::Specification.new do |spec|
15
15
  spec.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
16
16
 
17
17
  spec.add_development_dependency('test-unit', '>= 2.5.0')
18
+ spec.required_ruby_version = '>= 2.2.0'
19
+
20
+ spec.metadata = {
21
+ 'homepage_uri' => 'https://github.com/djberg96/getopt',
22
+ 'bug_tracker_uri' => 'https://github.com/djberg96/getopt/issues',
23
+ 'changelog_uri' => 'https://github.com/djberg96/getopt/blob/master/CHANGES',
24
+ 'documentation_uri' => 'https://github.com/djberg96/getopt/wiki',
25
+ 'source_code_uri' => 'https://github.com/djberg96/getopt',
26
+ 'wiki_uri' => 'https://github.com/djberg96/getopt/wiki'
27
+ }
18
28
 
19
29
  spec.description = <<-EOF
20
30
  The getopt library provides two different command line option parsers.
data/lib/getopt/long.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require_relative 'version'
2
+
1
3
  # The Getopt module serves as a namespace only
2
4
  module Getopt
3
5
 
@@ -12,13 +14,11 @@ module Getopt
12
14
 
13
15
  # The Getopt::Long class encapsulates longhanded parameter parsing options
14
16
  class Long
17
+ include Getopt::Version
15
18
 
16
19
  # Error raised if an illegal option or argument is passed
17
20
  class Error < StandardError; end
18
21
 
19
- # The version of the getopt library
20
- VERSION = '1.4.3'
21
-
22
22
  # Takes an array of switches. Each array consists of up to three
23
23
  # elements that indicate the name and type of switch. Returns a hash
24
24
  # containing each switch name, minus the '-', as a key. The value
@@ -59,7 +59,7 @@ module Getopt
59
59
  valid.push(switch[0]) # Set valid long switches
60
60
 
61
61
  # Set type for long switch, default to BOOLEAN.
62
- if switch[1].kind_of?(Fixnum)
62
+ if switch[1].kind_of?(Integer)
63
63
  switch[2] = switch[1]
64
64
  types[switch[0]] = switch[2]
65
65
  switch[1] = switch[0][1..2]
@@ -75,7 +75,7 @@ module Getopt
75
75
  syns[switch[0]] = switch[1] unless syns[switch[1]]
76
76
  syns[switch[1]] = switch[0] unless syns[switch[1]]
77
77
 
78
- switch[1] = [switch[1]] if RUBY_VERSION.to_f >= 1.9
78
+ switch[1] = [switch[1]]
79
79
 
80
80
  switch[1].each{ |char|
81
81
  types[char] = switch[2] # Set type for short switch
@@ -217,7 +217,7 @@ module Getopt
217
217
  # the same value
218
218
  hash.dup.each{ |switch, val|
219
219
  if syns.keys.include?(switch)
220
- syns[switch] = [syns[switch]] if RUBY_VERSION.to_f >= 1.9
220
+ syns[switch] = [syns[switch]]
221
221
  syns[switch].each{ |key|
222
222
  hash[key] = val
223
223
  }
data/lib/getopt/std.rb CHANGED
@@ -1,17 +1,17 @@
1
+ require_relative 'version'
2
+
1
3
  # The Getopt module serves as a namespace only
2
4
  module Getopt
3
5
 
4
6
  # The Getopt::Std class serves as a base class for the getopts method.
5
7
  class Std
8
+ include Getopt::Version
6
9
 
7
10
  # The Getopt::Std::Error class is raised if there are any illegal
8
11
  # command line arguments.
9
12
  #
10
13
  class Error < StandardError; end
11
14
 
12
- # The version of the getopt library
13
- VERSION = '1.4.3'
14
-
15
15
  # Processes single character command line options with option
16
16
  # clustering. This information is parsed from ARGV and returned
17
17
  # as a hash, with the switch (minus the "-") as the key. The value
@@ -0,0 +1,6 @@
1
+ module Getopt
2
+ module Version
3
+ # The version of the getopt library
4
+ VERSION = '1.4.4'.freeze
5
+ end
6
+ end
@@ -14,7 +14,8 @@ class TC_Getopt_Long < Test::Unit::TestCase
14
14
  end
15
15
 
16
16
  def test_version
17
- assert_equal('1.4.3', Long::VERSION)
17
+ assert_equal('1.4.4', Long::VERSION)
18
+ assert_true(Long::VERSION.frozen?)
18
19
  end
19
20
 
20
21
  def test_constants
@@ -10,7 +10,8 @@ include Getopt
10
10
 
11
11
  class TC_Getopt_Std < Test::Unit::TestCase
12
12
  def test_version
13
- assert_equal('1.4.3', Std::VERSION)
13
+ assert_equal('1.4.4', Std::VERSION)
14
+ assert_true(Std::VERSION.frozen?)
14
15
  end
15
16
 
16
17
  def test_getopts_basic
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: getopt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -10,27 +10,32 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
13
+ MIIEcDCCAtigAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MREwDwYDVQQDDAhkamJl
14
14
  cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
15
- MB4XDTE1MDkwMjIwNDkxOFoXDTE2MDkwMTIwNDkxOFowPzERMA8GA1UEAwwIZGpi
15
+ MB4XDTE4MDMxODE1MjIwN1oXDTI4MDMxNTE1MjIwN1owPzERMA8GA1UEAwwIZGpi
16
16
  ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
17
- bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyTkvXqRp6hLs9eoJOS
18
- Hmi8kRYbq9Vkf15/hMxJpotYMgJVHHWrmDcC5Dye2PbnXjTkKf266Zw0PtT9h+lI
19
- S3ts9HO+vaCFSMwFFZmnWJSpQ3CNw2RcHxjWkk9yF7imEM8Kz9ojhiDXzBetdV6M
20
- gr0lV/alUr7TNVBDngbXEfTWscyXh1qd7xZ4EcOdsDktCe5G45N/o3662tPQvJsi
21
- FOF0CM/KuBsa/HL1/eoEmF4B3EKIRfTHrQ3hu20Kv3RJ88QM4ec2+0dd97uX693O
22
- zv6981fyEg+aXLkxrkViM/tz2qR2ZE0jPhHTREPYeMEgptRkTmWSKAuLVWrJEfgl
23
- DtkCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYE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Gu1yu1dojmFRo6W2KZvY9al2yIlbkpDrD5MYQIDAQABo3cwdTAJBgNV
26
+ HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUFZsMapgzJimzsbaBG2Tm8j5e
27
+ AzgwHQYDVR0RBBYwFIESZGpiZXJnOTZAZ21haWwuY29tMB0GA1UdEgQWMBSBEmRq
28
+ YmVyZzk2QGdtYWlsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAW2tnYixXQtKxgGXq
29
+ /3iSWG2bLwvxS4go3srO+aRXZHrFUMlJ5W0mCxl03aazxxKTsVVpZD8QZxvK91OQ
30
+ h9zr9JBYqCLcCVbr8SkmYCi/laxIZxsNE5YI8cC8vvlLI7AMgSfPSnn/Epq1GjGY
31
+ 6L1iRcEDtanGCIvjqlCXO9+BmsnCfEVehqZkQHeYczA03tpOWb6pon2wzvMKSsKH
32
+ ks0ApVdstSLz1kzzAqem/uHdG9FyXdbTAwH1G4ZPv69sQAFAOCgAqYmdnzedsQtE
33
+ 1LQfaQrx0twO+CZJPcRLEESjq8ScQxWRRkfuh2VeR7cEU7L7KqT10mtUwrvw7APf
34
+ DYoeCY9KyjIBjQXfbj2ke5u1hZj94Fsq9FfbEQg8ygCgwThnmkTrrKEiMSs3alYR
35
+ ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
36
+ WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
32
37
  -----END CERTIFICATE-----
33
- date: 2016-01-07 00:00:00.000000000 Z
38
+ date: 2018-03-24 00:00:00.000000000 Z
34
39
  dependencies:
35
40
  - !ruby/object:Gem::Dependency
36
41
  name: test-unit
@@ -70,6 +75,7 @@ files:
70
75
  - lib/getopt
71
76
  - lib/getopt/long.rb
72
77
  - lib/getopt/std.rb
78
+ - lib/getopt/version.rb
73
79
  - lib/getopt-long.rb
74
80
  - lib/getopt-std.rb
75
81
  - lib/getopt.rb
@@ -82,7 +88,13 @@ files:
82
88
  homepage: https://github.com/djberg96/getopt
83
89
  licenses:
84
90
  - Artistic 2.0
85
- metadata: {}
91
+ metadata:
92
+ homepage_uri: https://github.com/djberg96/getopt
93
+ bug_tracker_uri: https://github.com/djberg96/getopt/issues
94
+ changelog_uri: https://github.com/djberg96/getopt/blob/master/CHANGES
95
+ documentation_uri: https://github.com/djberg96/getopt/wiki
96
+ source_code_uri: https://github.com/djberg96/getopt
97
+ wiki_uri: https://github.com/djberg96/getopt/wiki
86
98
  post_install_message:
87
99
  rdoc_options: []
88
100
  require_paths:
@@ -91,7 +103,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
103
  requirements:
92
104
  - - ">="
93
105
  - !ruby/object:Gem::Version
94
- version: '0'
106
+ version: 2.2.0
95
107
  required_rubygems_version: !ruby/object:Gem::Requirement
96
108
  requirements:
97
109
  - - ">="
@@ -99,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
111
  version: '0'
100
112
  requirements: []
101
113
  rubyforge_project:
102
- rubygems_version: 2.5.1
114
+ rubygems_version: 2.7.6
103
115
  signing_key:
104
116
  specification_version: 4
105
117
  summary: Getopt::Std and Getopt::Long option parsers for Ruby
metadata.gz.sig CHANGED
Binary file