kvom 6.8.0.beta.200.566.d1df6eb → 6.8.0.beta.200.621.4c8e1b0
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.
- data/lib/kvom/adapter/dynamodb_document.rb +10 -13
- metadata +20 -18
@@ -133,9 +133,16 @@ class DynamodbDocument < Document
|
|
133
133
|
value = @attributes[name]
|
134
134
|
coding = @coding[name]
|
135
135
|
return value unless coding
|
136
|
-
|
137
|
-
|
138
|
-
|
136
|
+
self[name] =
|
137
|
+
case coding
|
138
|
+
when "json"
|
139
|
+
MultiJson.decode(value)
|
140
|
+
when "jsonvalue"
|
141
|
+
# currently the only values to decode are: null, true, false, ""
|
142
|
+
MultiJson.decode("{\"k\":#{value}}")["k"]
|
143
|
+
else
|
144
|
+
raise "Unexpected coding #{coding} for attribute #{name}"
|
145
|
+
end
|
139
146
|
end
|
140
147
|
|
141
148
|
def []=(name, value)
|
@@ -143,16 +150,6 @@ class DynamodbDocument < Document
|
|
143
150
|
@attributes[name] = value
|
144
151
|
end
|
145
152
|
|
146
|
-
private
|
147
|
-
|
148
|
-
def parse_json_value(value)
|
149
|
-
case value[0]
|
150
|
-
when ?{
|
151
|
-
MultiJson.decode(value)
|
152
|
-
else
|
153
|
-
MultiJson.decode("{\"key\":#{value}}")["key"]
|
154
|
-
end
|
155
|
-
end
|
156
153
|
end
|
157
154
|
end
|
158
155
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kvom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15922107031
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 6
|
@@ -9,13 +9,15 @@ version: !ruby/object:Gem::Version
|
|
9
9
|
- 0
|
10
10
|
- beta
|
11
11
|
- 200
|
12
|
-
-
|
13
|
-
-
|
12
|
+
- 621
|
13
|
+
- 4
|
14
|
+
- c
|
15
|
+
- 8
|
16
|
+
- e
|
14
17
|
- 1
|
15
|
-
-
|
16
|
-
-
|
17
|
-
|
18
|
-
version: 6.8.0.beta.200.566.d1df6eb
|
18
|
+
- b
|
19
|
+
- 0
|
20
|
+
version: 6.8.0.beta.200.621.4c8e1b0
|
19
21
|
platform: ruby
|
20
22
|
authors:
|
21
23
|
- Kristian Hanekamp, Infopark AG
|
@@ -23,12 +25,10 @@ autorequire:
|
|
23
25
|
bindir: bin
|
24
26
|
cert_chain: []
|
25
27
|
|
26
|
-
date: 2012-04-
|
28
|
+
date: 2012-04-18 00:00:00 +02:00
|
27
29
|
default_executable:
|
28
30
|
dependencies:
|
29
31
|
- !ruby/object:Gem::Dependency
|
30
|
-
name: rspec
|
31
|
-
prerelease: false
|
32
32
|
requirement: &id001 !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
@@ -38,11 +38,11 @@ dependencies:
|
|
38
38
|
segments:
|
39
39
|
- 0
|
40
40
|
version: "0"
|
41
|
+
prerelease: false
|
41
42
|
type: :development
|
43
|
+
name: rspec
|
42
44
|
version_requirements: *id001
|
43
45
|
- !ruby/object:Gem::Dependency
|
44
|
-
name: helpful_configuration
|
45
|
-
prerelease: false
|
46
46
|
requirement: &id002 !ruby/object:Gem::Requirement
|
47
47
|
none: false
|
48
48
|
requirements:
|
@@ -52,11 +52,11 @@ dependencies:
|
|
52
52
|
segments:
|
53
53
|
- 0
|
54
54
|
version: "0"
|
55
|
+
prerelease: false
|
55
56
|
type: :development
|
57
|
+
name: helpful_configuration
|
56
58
|
version_requirements: *id002
|
57
59
|
- !ruby/object:Gem::Dependency
|
58
|
-
name: couchrest
|
59
|
-
prerelease: false
|
60
60
|
requirement: &id003 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
@@ -66,11 +66,11 @@ dependencies:
|
|
66
66
|
segments:
|
67
67
|
- 0
|
68
68
|
version: "0"
|
69
|
+
prerelease: false
|
69
70
|
type: :runtime
|
71
|
+
name: couchrest
|
70
72
|
version_requirements: *id003
|
71
73
|
- !ruby/object:Gem::Dependency
|
72
|
-
name: activemodel
|
73
|
-
prerelease: false
|
74
74
|
requirement: &id004 !ruby/object:Gem::Requirement
|
75
75
|
none: false
|
76
76
|
requirements:
|
@@ -80,11 +80,11 @@ dependencies:
|
|
80
80
|
segments:
|
81
81
|
- 0
|
82
82
|
version: "0"
|
83
|
+
prerelease: false
|
83
84
|
type: :runtime
|
85
|
+
name: activemodel
|
84
86
|
version_requirements: *id004
|
85
87
|
- !ruby/object:Gem::Dependency
|
86
|
-
name: aws-sdk
|
87
|
-
prerelease: false
|
88
88
|
requirement: &id005 !ruby/object:Gem::Requirement
|
89
89
|
none: false
|
90
90
|
requirements:
|
@@ -94,7 +94,9 @@ dependencies:
|
|
94
94
|
segments:
|
95
95
|
- 0
|
96
96
|
version: "0"
|
97
|
+
prerelease: false
|
97
98
|
type: :runtime
|
99
|
+
name: aws-sdk
|
98
100
|
version_requirements: *id005
|
99
101
|
description: Use it to build object models in ruby on top of a key value store.
|
100
102
|
email:
|