hermod 1.2.2 → 1.2.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4d40bccb37c4c61cf02ab0bd89a8932a9f3ec0b
4
- data.tar.gz: e885202d718924adf30ba38de5458eb8c744c54f
3
+ metadata.gz: 007bbe64b27318ad3c57e53eb766f0e96036d19e
4
+ data.tar.gz: 9f3d1ad9465d5146f800791b413d850274a42760
5
5
  SHA512:
6
- metadata.gz: 5fbd5803537fbffb72181d76b02ee80dd331f42785dcacef522b029f066fc39f10a001c7dfe6c6f77c3f267993ae7d02230c43a10ddf2c6062df49d0dbe8dfac
7
- data.tar.gz: 55e59b5baebf9c6dc598dd02343fd6dc48272b87803f4c5a5aee83e4a523a2b49518e4344a2093a75905d5e32488f5a343d89e051683564639def023e64461a6
6
+ metadata.gz: 2854aafc9bb97ae8db69a86ff550601b39789e8c262b366ab6ebc2f83247338f688abf83a9fa5e8a9ae58db80b9d685242908db45dd83b036599f6739e239e40
7
+ data.tar.gz: c15b093a474a529636d39367867cfb020c9cfc2751203b11869008e546547e4b4de213858c3d48d0ad5f86407a05f1a0a62a86b8caa75659288ba4ea91b0b90e
@@ -14,7 +14,7 @@ module Hermod
14
14
  private
15
15
 
16
16
  def test
17
- allowed_values.include? value
17
+ value.blank? || allowed_values.include?(value)
18
18
  end
19
19
 
20
20
  def message
@@ -1,3 +1,3 @@
1
1
  module Hermod
2
- VERSION = "1.2.2"
2
+ VERSION = "1.2.3"
3
3
  end
@@ -11,6 +11,11 @@ module Hermod
11
11
  subject.valid?("Cat", {}).must_equal true
12
12
  end
13
13
 
14
+ it "allows blank values" do
15
+ subject.valid?("", {}).must_equal true
16
+ subject.valid?(nil, {}).must_equal true
17
+ end
18
+
14
19
  it "raises an error for values not in the list" do
15
20
  ex = proc { subject.valid?("Albatross", {}) }.must_raise InvalidInputError
16
21
  ex.message.must_equal "must be one of Antelope, Bear, Cat, Dog, or Elephant, not Albatross"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hermod
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Mills
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-29 00:00:00.000000000 Z
11
+ date: 2014-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libxml-ruby