dreck 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dreck.rb +1 -1
- data/lib/dreck/exceptions.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c92ebc35034ec54b87f763e6d2f080232cc5a4e1
|
4
|
+
data.tar.gz: '00601982073b1ac4bd08e734c38967236773d167'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c86759e00c6a8ad1bdfdfd414ed5bdc14303542994d2a47d813c00b2902e90f4eb8fc5158d7b08d94530037c287d9df86888386b4fe77242d507602bf9392710
|
7
|
+
data.tar.gz: c7a2b7d64a0ddc6ac9fe8b39ff00fac601dde294e4e537fe1d208cfbeb01577bf000a6d5e86487c729ae7d6afd9d0984681e2e519e55db598fc8976f5d61993a
|
data/lib/dreck.rb
CHANGED
@@ -5,7 +5,7 @@ require_relative "dreck/result"
|
|
5
5
|
# The primary namespace for {Dreck}.
|
6
6
|
module Dreck
|
7
7
|
# {Dreck}'s current version.
|
8
|
-
VERSION = "0.0.
|
8
|
+
VERSION = "0.0.7"
|
9
9
|
|
10
10
|
# Parse the given arguments and produce a result.
|
11
11
|
# @param args [Array<String>] the arguments to parse
|
data/lib/dreck/exceptions.rb
CHANGED
@@ -13,7 +13,7 @@ module Dreck
|
|
13
13
|
# @param greedy [Boolean] whether or not a list that absorbs the tail is present
|
14
14
|
def initialize(actual, expected, greedy = false)
|
15
15
|
nmany = actual > expected ? "too few" : "too many"
|
16
|
-
act = greedy ? expected : actual
|
16
|
+
act = greedy && actual > expected ? expected : actual
|
17
17
|
exp = greedy ? ">=#{actual}" : expected
|
18
18
|
super "#{nmany} arguments given (#{act}, expected #{exp})"
|
19
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dreck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Woodruff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Typechecks and coerces non-option arguments.
|
14
14
|
email: william@tuffbizz.com
|