slop 1.5.0 → 1.5.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.
Files changed (3) hide show
  1. data/lib/slop.rb +1 -2
  2. data/test/slop_test.rb +3 -1
  3. metadata +2 -2
@@ -16,7 +16,7 @@ class Slop
16
16
  class InvalidOptionError < RuntimeError; end
17
17
 
18
18
  # @return [String] The current version string
19
- VERSION = '1.5.0'
19
+ VERSION = '1.5.1'
20
20
 
21
21
  # Parses the items from a CLI format into a friendly object.
22
22
  #
@@ -166,7 +166,6 @@ class Slop
166
166
  alias :opt :option
167
167
  alias :on :option
168
168
 
169
-
170
169
  # Namespace options depending on what command is executed
171
170
  #
172
171
  # @param [Symbol, String] label
@@ -43,7 +43,9 @@ class SlopTest < TestCase
43
43
 
44
44
  test 'callback when option array is empty' do
45
45
  item1 = item2 = nil
46
- Slop.new { on_empty { item1 = 'foo' } }.parse
46
+ temp_argv([]) do
47
+ Slop.new { on_empty { item1 = 'foo' } }.parse
48
+ end
47
49
 
48
50
  assert_equal 'foo', item1
49
51
  assert_nil item2
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: slop
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.5.0
5
+ version: 1.5.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Lee Jarvis
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-16 00:00:00 +01:00
13
+ date: 2011-04-17 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies: []
16
16