slop 4.8.0 → 4.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/lib/slop.rb +2 -2
  4. data/test/slop_test.rb +10 -0
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3519c62b207c9004fe10decdefafc6f429540355aaf42d6d001b726524546935
4
- data.tar.gz: f23973419fa0e1bbed6f7e3f1925ccfee2b28e3c87db57aa19f76b5df5c984c5
3
+ metadata.gz: 9ec00c622e6cf0e93fdcebfa0964225fd2a2be127fcf21191a47bb96a64afb2b
4
+ data.tar.gz: 129ca3a92e02e2ac696c4a1dbc805a6316e59f8802d7c06fe3b071ef4467e6e4
5
5
  SHA512:
6
- metadata.gz: 5658a5eee5fbd320aa88de052f6d0c6345be8f73d7d40ac22b4fdebfd157b72ae3ce02c279848acb62a6ca7819318800cc3c68abe3e40499f886368d6a7798c7
7
- data.tar.gz: 9d61f5fa3f804092ea4b56103ba509dc6392701f3260190f32d4d3e807fbb75c622c23c7b30b1b71adecedef15d3da82d7ab20bd648c4642ebe637f9dd4b41d1
6
+ metadata.gz: b6280d06c83bafc75d2b2169d0c08ac1470031777aad641a162dda1657dbaa8940dad56ae20431fe7dc34eba52ab6a6f42a8dbb0207ad0f568cc21d5ed84884d
7
+ data.tar.gz: ce64d1d1d442cbb4a09c130e14a7f4d9837d53cf6ed2b4b4c3db1264650ebaba50cf500418737bbf265940dc2f430c14b30641394aca1b5626680fec4d4f4411
@@ -1,6 +1,13 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ v4.8.1 (2020-03-31)
5
+ -------------------
6
+
7
+ Bug fixes:
8
+ * Fix keyword argument warning. [#251](https://github.com/leejarvis/slop/pull/251)
9
+
10
+
4
11
  v4.8.0 (2020-01-17)
5
12
  -------------------
6
13
 
@@ -6,7 +6,7 @@ require 'slop/types'
6
6
  require 'slop/error'
7
7
 
8
8
  module Slop
9
- VERSION = '4.8.0'
9
+ VERSION = '4.8.1'
10
10
 
11
11
  # Parse an array of options (defaults to ARGV). Accepts an
12
12
  # optional hash of configuration options and block.
@@ -20,7 +20,7 @@ module Slop
20
20
  #
21
21
  # Returns a Slop::Result.
22
22
  def self.parse(items = ARGV, **config, &block)
23
- Options.new(config, &block).parse(items)
23
+ Options.new(**config, &block).parse(items)
24
24
  end
25
25
 
26
26
  # Example:
@@ -1,6 +1,16 @@
1
1
  require "test_helper"
2
2
 
3
3
  describe Slop do
4
+ describe ".parse" do
5
+ it "parses a list of arguments" do
6
+ result = Slop.parse(%w[--name Lee]) do |o|
7
+ o.string "--name"
8
+ end
9
+
10
+ assert_equal "Lee", result[:name]
11
+ end
12
+ end
13
+
4
14
  describe ".option_defined?" do
5
15
  it "handles bad constant names" do
6
16
  assert_equal false, Slop.option_defined?("Foo?Bar")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slop
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.0
4
+ version: 4.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Jarvis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-17 00:00:00.000000000 Z
11
+ date: 2020-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake