classy_hash 0.1.5 → 0.1.6

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/classy_hash.rb +3 -1
  3. metadata +10 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db4eaffcfdfc4473eac0c0015e1b88467a05dfd7
4
- data.tar.gz: 7d8d571929c4083e87d0c13634da1b291b30066e
3
+ metadata.gz: c00ef449de055dd11f7d65c7b69078d335a5faac
4
+ data.tar.gz: 08492cddaf3d56b469fd326290c4668dcf3d6dea
5
5
  SHA512:
6
- metadata.gz: ae8d8af71f0f1d85b7273c6033202052c43d5fe8f7701390e8639172cd7a701e43249e9a539beea3e516659b11e50df3cd787acc2649cf2844c9c00c454edf16
7
- data.tar.gz: 6160ecd7f1fe24d247d3b65da2191d4449a612fa250e670af00cca30dca881e90a485ba9aad4e28d45f334341f73d1434558eb00ffeda542b56aa9852efd25c2
6
+ metadata.gz: b0eb3ad07f5843c3c477165b74553103bc3f250b09742dffd0c6b6157bc639b46e1fbf83825eda66b2d8deb1369f375e02e8ab27c1e644958bfc27fe3ec9e6ed
7
+ data.tar.gz: 79a18a2a41913d4d25b8ce8b15f47d5a4caac5b85ee91e77a762e9034f010496a28ddc2e83fecf86442ba10e0625c24ab32f3afb9663310ea5efbb5cb9b1c144
data/lib/classy_hash.rb CHANGED
@@ -81,9 +81,11 @@ module ClassyHash
81
81
  elsif c.is_a?(Array)
82
82
  "[#{self.multiconstraint_string(c, value)}]"
83
83
  elsif c.is_a?(Proc)
84
- c.call(value) || c.inspect
84
+ c.call(value) || "a value accepted by #{c.inspect}"
85
85
  elsif c == :optional
86
86
  nil
87
+ elsif c == TrueClass || c == FalseClass
88
+ 'true or false'
87
89
  else
88
90
  c.inspect
89
91
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: classy_hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Deseret Book
@@ -9,13 +9,15 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-01 00:00:00.000000000 Z
12
+ date: 2016-08-03 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: |2
15
15
  Classy Hash is a schema validator for Ruby Hashes. You provide a simple
16
16
  schema Hash, and Classy Hash will make sure your data matches, providing
17
17
  helpful error messages if it doesn't.
18
- email: mike@mikebourgeous.com
18
+ email:
19
+ - webdev@deseretbook.com
20
+ - mike@mikebourgeous.com
19
21
  executables: []
20
22
  extensions: []
21
23
  extra_rdoc_files: []
@@ -34,7 +36,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
34
36
  requirements:
35
37
  - - ">="
36
38
  - !ruby/object:Gem::Version
37
- version: 1.9.3
39
+ version: '2.0'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: 2.4.0
38
43
  required_rubygems_version: !ruby/object:Gem::Requirement
39
44
  requirements:
40
45
  - - ">="
@@ -42,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
47
  version: '0'
43
48
  requirements: []
44
49
  rubyforge_project:
45
- rubygems_version: 2.2.2
50
+ rubygems_version: 2.5.1
46
51
  signing_key:
47
52
  specification_version: 4
48
53
  summary: 'Classy Hash: Keep your Hashes classy; a Hash schema validator'