amiando 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/amiando/resource.rb +1 -1
- data/lib/amiando/version.rb +1 -1
- data/test/amiando/resource_test.rb +2 -2
- metadata +4 -4
data/lib/amiando/resource.rb
CHANGED
@@ -38,7 +38,7 @@ module Amiando
|
|
38
38
|
mapped_attributes = attributes.map do |key,value|
|
39
39
|
key = key.to_sym
|
40
40
|
mapped_key = inverted_mapping[key] || key
|
41
|
-
value = inverse_typecast(
|
41
|
+
value = inverse_typecast(mapped_key, value)
|
42
42
|
[mapped_key, value]
|
43
43
|
end
|
44
44
|
Hash[mapped_attributes]
|
data/lib/amiando/version.rb
CHANGED
@@ -76,8 +76,8 @@ describe Amiando::Resource do
|
|
76
76
|
|
77
77
|
it 'reverse maps attributes with typecasting' do
|
78
78
|
time = Time.at(0).utc
|
79
|
-
expected = { :
|
80
|
-
Wadus.reverse_map_params(:
|
79
|
+
expected = { :creation_time => time }
|
80
|
+
Wadus.reverse_map_params(:creationTime => '1970-01-01T00:00:00Z').must_equal expected
|
81
81
|
end
|
82
82
|
|
83
83
|
it 'automatically maps attributes for a request' do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amiando
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 7
|
10
|
+
version: 0.3.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jorge Dias
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-12-
|
19
|
+
date: 2011-12-20 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: typhoeus
|