dreck 0.2.0 → 0.2.1
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 +9 -9
- 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: 564351bf0edaae492672bd41d31efd620a7708bb
|
4
|
+
data.tar.gz: fccdefab8e79a4f0545a9df32d3460009d31861c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f6d93262e88173e0bd187c8c14afff7c493da88fa55e8222330ad55a5875c436c396866cbdf94a2f4c39dac412eed8c65ee68cace958418688bfa7f08ba5560
|
7
|
+
data.tar.gz: 2559072bfcbc67b7a7c1551e0782aa55d569153b53b7f3ffac8b3660d62226deee1c9c430279f145934e5226681d2ce5487e74f46f9e61564986fd418f71e5ae
|
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.2.
|
8
|
+
VERSION = "0.2.1"
|
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,21 +13,21 @@ module Dreck
|
|
13
13
|
# Raised during argument absorption if arguments are either left over
|
14
14
|
# or are insufficient to populate the expected results.
|
15
15
|
class AbsorptionError < DreckError
|
16
|
-
# @param
|
17
|
-
# @param
|
18
|
-
def initialize(
|
19
|
-
nmany =
|
20
|
-
super "#{nmany} arguments given (#{
|
16
|
+
# @param specified [Integer] the number of arguments specified
|
17
|
+
# @param supplied [Integer] the number of arguments supplied
|
18
|
+
def initialize(specified, supplied)
|
19
|
+
nmany = specified < supplied ? "too many" : "too few"
|
20
|
+
super "#{nmany} arguments given (#{supplied}, expected #{specified})"
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
24
|
# Raised during argument absorption if a greedy list was expected but all arguments
|
25
25
|
# have already been absorbed.
|
26
26
|
class GreedyAbsorptionError < DreckError
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
def initialize(
|
30
|
-
super "too few arguments given (#{
|
27
|
+
# @param specified [Integer] the number of arguments specified
|
28
|
+
# @param supplied [Integer] the number of arguments supplied
|
29
|
+
def initialize(specified, supplied)
|
30
|
+
super "too few arguments given (#{specified}, expected >#{supplied})"
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
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.2.
|
4
|
+
version: 0.2.1
|
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-07-
|
11
|
+
date: 2017-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Typechecks and coerces non-option arguments.
|
14
14
|
email: william@tuffbizz.com
|