haveapi 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/haveapi.gemspec +1 -1
- data/lib/haveapi/validators/inclusion.rb +11 -2
- data/lib/haveapi/version.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: f19eb81f8b3f54654715dfaa52c85e17675860a6
|
4
|
+
data.tar.gz: 5b5013c9f1b52af5a55935fd44d78a845d2fdd7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b1df715121edd42ba79af47601e2d5daa87226a2a4cdf887d6d54b046e5a287e17451d8950a8c9ed722ccfb8eed4cd0e6343b1fd6aa574db4fa39515c41c048
|
7
|
+
data.tar.gz: a2c9fec65f9ab767b856f1144732109262f44c803c67d634fd7f9b62d81919bfc210d8ae660b43ef820762489eba54b35a7a1799a1f9ee91eb8fdfc3df16000c
|
data/CHANGELOG
CHANGED
data/haveapi.gemspec
CHANGED
@@ -5,7 +5,7 @@ require 'haveapi/version'
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'haveapi'
|
7
7
|
s.version = HaveAPI::VERSION
|
8
|
-
s.date = '2016-01-
|
8
|
+
s.date = '2016-01-24'
|
9
9
|
s.summary =
|
10
10
|
s.description = 'Framework for creating self-describing APIs'
|
11
11
|
s.authors = 'Jakub Skokan'
|
@@ -16,8 +16,17 @@ module HaveAPI
|
|
16
16
|
takes :choices, :include
|
17
17
|
|
18
18
|
def setup
|
19
|
-
|
20
|
-
|
19
|
+
values = simple? ? take : take(:values)
|
20
|
+
|
21
|
+
if values.is_a?(::Hash)
|
22
|
+
@values = {}
|
23
|
+
|
24
|
+
values.each do |k, v|
|
25
|
+
@values[k.is_a?(::Symbol) ? k.to_s : k] = v
|
26
|
+
end
|
27
|
+
|
28
|
+
else
|
29
|
+
@values = values.map { |v| v.is_a?(::Symbol) ? v.to_s : v }
|
21
30
|
end
|
22
31
|
|
23
32
|
@message = take(:message, '%{value} cannot be used')
|
data/lib/haveapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haveapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakub Skokan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: require_all
|