mingle_keyvalue_store 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/lib/mingle_keyvalue_store.rb +6 -3
- metadata +63 -57
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4c1910ccee145828d9a7d53ead5c4cfde581b5cc
|
4
|
+
data.tar.gz: ac50388c1c856bc03b27b7f145898fecdda41cfa
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9df6bbaccc33d18e9ef78eebf4be8a8c1dc410c1e6579fe3d0d7dc951306201b2a4ee300a0c94c2fcd3dc0a677f16a0f5a6cdf17955de0ff113ebcde6660fe97
|
7
|
+
data.tar.gz: bd5be69673236578c891ce4bc648ba3f73af178e2ab765afc4477c92a44cddb1cbd4418ed0561add35afc1c3ac996022b226f97a7f64bac7f288a4259d5338df
|
@@ -68,12 +68,12 @@ module Mingle
|
|
68
68
|
class DynamodbBased
|
69
69
|
def initialize(table_name, key_column, value_column)
|
70
70
|
@key_column = key_column
|
71
|
-
@value_column = value_column
|
71
|
+
@value_column = value_column.to_s
|
72
72
|
@table_name = table_name
|
73
73
|
end
|
74
74
|
|
75
75
|
def [](store_key)
|
76
|
-
if attribute = table_items[store_key]
|
76
|
+
if attribute = attributes(table_items[store_key])[@value_column]
|
77
77
|
JSON.parse(attribute)
|
78
78
|
end
|
79
79
|
end
|
@@ -91,7 +91,7 @@ module Mingle
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def all_items
|
94
|
-
table_items.map { |item| item
|
94
|
+
table_items.map { |item| attributes(item) }
|
95
95
|
end
|
96
96
|
|
97
97
|
def delete(key)
|
@@ -99,6 +99,9 @@ module Mingle
|
|
99
99
|
end
|
100
100
|
|
101
101
|
private
|
102
|
+
def attributes(item)
|
103
|
+
item.attributes.to_h(:consistent_read => true)
|
104
|
+
end
|
102
105
|
|
103
106
|
def table_items
|
104
107
|
table = AWS::DynamoDB.new.tables[@table_name]
|
metadata
CHANGED
@@ -1,76 +1,82 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: mingle_keyvalue_store
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
7
|
-
|
8
|
-
|
6
|
+
authors:
|
7
|
+
- Ian
|
8
|
+
- sdqali
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
12
|
+
date: 2014-05-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: aws-sdk
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.11'
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.11.3
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
requirements:
|
28
|
+
- - "~>"
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '1.11'
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.11.3
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: rake
|
36
|
+
requirement: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
type: :development
|
42
|
+
prerelease: false
|
43
|
+
version_requirements: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
39
48
|
description: A key value store implentation that uses DynamoDB or Pstore underneath.
|
40
|
-
email:
|
41
|
-
|
42
|
-
|
49
|
+
email:
|
50
|
+
- reginaldthedog@gmail.com
|
51
|
+
- sadiqalikm@gmail.com
|
43
52
|
executables: []
|
44
|
-
|
45
53
|
extensions: []
|
46
|
-
|
47
54
|
extra_rdoc_files: []
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
- lib/mingle_keyvalue_store.rb
|
55
|
+
files:
|
56
|
+
- README.md
|
57
|
+
- lib/mingle_keyvalue_store.rb
|
52
58
|
homepage: https://github.com/ThoughtWorksStudios/mingle_keyvalue_store
|
53
|
-
licenses:
|
54
|
-
|
59
|
+
licenses:
|
60
|
+
- MIT
|
55
61
|
metadata: {}
|
56
|
-
|
57
62
|
post_install_message:
|
58
63
|
rdoc_options: []
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
-
|
65
|
-
|
66
|
-
|
67
|
-
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
68
76
|
requirements: []
|
69
|
-
|
70
77
|
rubyforge_project:
|
71
|
-
rubygems_version: 2.
|
78
|
+
rubygems_version: 2.2.0
|
72
79
|
signing_key:
|
73
80
|
specification_version: 4
|
74
81
|
summary: A key value store implentation that uses DynamoDB or Pstore underneath.
|
75
82
|
test_files: []
|
76
|
-
|