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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c5949089f07c15226d74339f06a2dc0c1f09fb8
4
- data.tar.gz: 8b6f6e19b9c3b21ec1ea7ce9aaa47fb0bbeb6589
3
+ metadata.gz: f19eb81f8b3f54654715dfaa52c85e17675860a6
4
+ data.tar.gz: 5b5013c9f1b52af5a55935fd44d78a845d2fdd7d
5
5
  SHA512:
6
- metadata.gz: a7e6f414ffd0950b1c5a0acad38dc8821054dcb9bd82a28cba1b2cd30712d21476a36467b36be0223ea17d3a0336469d8685332fecc4a36ceb87057b917b79e6
7
- data.tar.gz: c088d335f5588f90a1c9cb3ea5ce7f7799f14981d4a4d8eb1a46adf707c6c51fbc07689ce36b7c88c567f5a5cd8fb441789bd01a01990c2e28e6a1f8538cf428
6
+ metadata.gz: 8b1df715121edd42ba79af47601e2d5daa87226a2a4cdf887d6d54b046e5a287e17451d8950a8c9ed722ccfb8eed4cd0e6343b1fd6aa574db4fa39515c41c048
7
+ data.tar.gz: a2c9fec65f9ab767b856f1144732109262f44c803c67d634fd7f9b62d81919bfc210d8ae660b43ef820762489eba54b35a7a1799a1f9ee91eb8fdfc3df16000c
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ * Sun Jan 24 2016 - version 0.4.2
2
+ - Inclusion validator: handle hash correctly, don't overwrite given values
3
+
1
4
  * Sat Jan 23 2016 - version 0.4.1
2
5
  - Fix parameter label setting
3
6
  - Don't change hash arguments given to parameters
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-20'
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
- @values = (simple? ? take : take(:values)).map! do |v|
20
- v.is_a?(::Symbol) ? v.to_s : v
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')
@@ -1,4 +1,4 @@
1
1
  module HaveAPI
2
2
  PROTOCOL_VERSION = '1.0'
3
- VERSION = '0.4.1'
3
+ VERSION = '0.4.2'
4
4
  end
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.1
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-20 00:00:00.000000000 Z
11
+ date: 2016-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: require_all