optimist 3.0.0 → 3.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 335830b11859ca8643cd5fe74d6444f147ab2873
4
- data.tar.gz: 9a483cf4a178eaf83c6093ea177e29cc0cf63c32
2
+ SHA256:
3
+ metadata.gz: 1cab432ee3e689f1cfbb1a53a0ef94e3c912cdc54fca85e5c92b2cd0a9b82561
4
+ data.tar.gz: 67ec3054aa363ece24f9d0f57f03414581a1d11558c2df913a42ba1394db932f
5
5
  SHA512:
6
- metadata.gz: 7f18e81587cb3f617d7dfc26183c1d821a058891a638560c60c85202237fb084e57c77ffdc7b5a245a81e378769852b9e51827e8b41329298c7b7f0a3cb2f395
7
- data.tar.gz: c6f2d0245b46cb58470b4ff6f31ac7df483c8d7f48c1d0da27cdcd3681fef55dced81a2765dc33035b808e7c7ba9519363019bd486f3496a74ebaa11f011f219
6
+ metadata.gz: 1abab08da653806a765f24afc1c838eddefe7461a12a0e75505ddfa6eb86cc9d2f85205d407f71f420ebd61c64600c27159b4b1915d51ba36d02099b7163ce65
7
+ data.tar.gz: a3f5fffb9d1e5ee2d479cd66ff8ecfaf2af34e41776be4b135abfb8281f54adcdcf6e23c98e834cf9b8f207c7141d67a3fe1ef2ce50274930a9200da796262a3
@@ -1,9 +1,12 @@
1
1
  language: ruby
2
- sudo: false
2
+ cache: bundler
3
3
  rvm:
4
- - "2.2"
5
- - "2.3.4"
6
- - "2.5.1"
4
+ - 2.2
5
+ - 2.3
6
+ - 2.4
7
+ - 2.5
8
+ - 2.6
9
+ - 2.7
7
10
  - jruby-head
8
11
  matrix:
9
12
  allow_failures:
@@ -1,3 +1,8 @@
1
+ == [3.0.1] / 2020-04-20
2
+
3
+ * Add a LICENSE.txt file to the released package
4
+ * Test fixes (thanks @aried3r, @neontapir, @npras)
5
+
1
6
  == [3.0.0] / 2018-08-24
2
7
 
3
8
  * The gem has been officially renamed to optimist
@@ -163,6 +168,8 @@
163
168
  == 1.0 / 2007-01-29
164
169
  * Initial release.
165
170
 
171
+ [3.0.1]: https://github.com/ManageIQ/optimist/compare/v3.0.0...v3.0.1
172
+ [3.0.0]: https://github.com/ManageIQ/optimist/compare/v2.1.3...v3.0.0
166
173
  [2.1.3]: https://github.com/ManageIQ/optimist/compare/v2.1.2...v2.1.3
167
174
  [2.1.2]: https://github.com/ManageIQ/optimist/compare/v2.1.1...v2.1.2
168
175
  [2.1.1]: https://github.com/ManageIQ/optimist/compare/v2.1.0...v2.1.1
@@ -0,0 +1,23 @@
1
+ Copyright (c) 2008-2014 William Morgan
2
+ Copyright (c) 2014 Red Hat, Inc
3
+
4
+ MIT License
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining
7
+ a copy of this software and associated documentation files (the
8
+ "Software"), to deal in the Software without restriction, including
9
+ without limitation the rights to use, copy, modify, merge, publish,
10
+ distribute, sublicense, and/or sell copies of the Software, and to
11
+ permit persons to whom the Software is furnished to do so, subject to
12
+ the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
21
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -8,7 +8,7 @@ require 'date'
8
8
  module Optimist
9
9
  # note: this is duplicated in gemspec
10
10
  # please change over there too
11
- VERSION = "3.0.0"
11
+ VERSION = "3.0.1"
12
12
 
13
13
  ## Thrown by Parser in the event of a commandline error. Not needed if
14
14
  ## you're using the Optimist::options entry.
@@ -590,11 +590,11 @@ class Option
590
590
  @optshash = Hash.new()
591
591
  end
592
592
 
593
- def opts (key)
593
+ def opts(key)
594
594
  @optshash[key]
595
595
  end
596
596
 
597
- def opts= (o)
597
+ def opts=(o)
598
598
  @optshash = o
599
599
  end
600
600
 
@@ -620,7 +620,7 @@ class Option
620
620
 
621
621
  def required? ; opts(:required) ; end
622
622
 
623
- def parse (_paramlist, _neg_given)
623
+ def parse(_paramlist, _neg_given)
624
624
  raise NotImplementedError, "parse must be overridden for newly registered type"
625
625
  end
626
626
 
@@ -390,12 +390,12 @@ class ParserTest < ::MiniTest::Test
390
390
  opts = @p.parse %w(-a -b)
391
391
  assert_equal true, opts[:arg1]
392
392
  assert_equal true, opts[:arg2]
393
- assert_equal nil, opts[:arg3]
393
+ assert_nil opts[:arg3]
394
394
 
395
395
  opts = @p.parse %w(-ab)
396
396
  assert_equal true, opts[:arg1]
397
397
  assert_equal true, opts[:arg2]
398
- assert_equal nil, opts[:arg3]
398
+ assert_nil opts[:arg3]
399
399
 
400
400
  opts = @p.parse %w(-ac 4 -b)
401
401
  assert_equal true, opts[:arg1]
@@ -464,7 +464,7 @@ Options:
464
464
  assert_equal 5, opts[:arg]
465
465
  end
466
466
 
467
- def test_integer_formatting
467
+ def test_integer_formatting_default
468
468
  @p.opt :arg, "desc", :type => :integer, :short => "i", :default => 3
469
469
  opts = @p.parse %w(-i)
470
470
  assert_equal 3, opts[:arg]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optimist
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Morgan
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-08-24 00:00:00.000000000 Z
13
+ date: 2020-04-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest
@@ -70,6 +70,7 @@ files:
70
70
  - FAQ.txt
71
71
  - Gemfile
72
72
  - History.txt
73
+ - LICENSE.txt
73
74
  - README.md
74
75
  - Rakefile
75
76
  - lib/optimist.rb
@@ -106,8 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
107
  - !ruby/object:Gem::Version
107
108
  version: '0'
108
109
  requirements: []
109
- rubyforge_project:
110
- rubygems_version: 2.6.13
110
+ rubygems_version: 3.1.2
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Optimist is a commandline option parser for Ruby that just gets out of your