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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76f82aab82fd006ce53aa4b41917dd7c7bbe91f4
4
- data.tar.gz: c7c4d8928fecd566bc46dabc8016fcff6ba36397
3
+ metadata.gz: c92ebc35034ec54b87f763e6d2f080232cc5a4e1
4
+ data.tar.gz: '00601982073b1ac4bd08e734c38967236773d167'
5
5
  SHA512:
6
- metadata.gz: 6b682f13bdbadbe739f52c4ec155a616fa8570d8d0ecc2e203ebf53912746325199ceba5234057495e4cb98c56e4e3a3907b8a8cfda4f317fab49a064e5e0008
7
- data.tar.gz: ad5aedb658c0375d68145fe209253d2b4f4a1d4c63154e93abad0422936286310d2784553d7b7fbf063746d68f10f6dfc5512df313a032ef59d77cccd8cdd6a2
6
+ metadata.gz: c86759e00c6a8ad1bdfdfd414ed5bdc14303542994d2a47d813c00b2902e90f4eb8fc5158d7b08d94530037c287d9df86888386b4fe77242d507602bf9392710
7
+ data.tar.gz: c7a2b7d64a0ddc6ac9fe8b39ff00fac601dde294e4e537fe1d208cfbeb01577bf000a6d5e86487c729ae7d6afd9d0984681e2e519e55db598fc8976f5d61993a
@@ -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.6"
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
@@ -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.6
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-24 00:00:00.000000000 Z
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