mingle_keyvalue_store 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mingle_keyvalue_store.rb +5 -4
  3. metadata +23 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c1910ccee145828d9a7d53ead5c4cfde581b5cc
4
- data.tar.gz: ac50388c1c856bc03b27b7f145898fecdda41cfa
3
+ metadata.gz: 03614bdcad32cb978d33f244920d570f3a0ad7ce
4
+ data.tar.gz: 300bec550380496cdb2bd84a77e43c432fa3ad5f
5
5
  SHA512:
6
- metadata.gz: 9df6bbaccc33d18e9ef78eebf4be8a8c1dc410c1e6579fe3d0d7dc951306201b2a4ee300a0c94c2fcd3dc0a677f16a0f5a6cdf17955de0ff113ebcde6660fe97
7
- data.tar.gz: bd5be69673236578c891ce4bc648ba3f73af178e2ab765afc4477c92a44cddb1cbd4418ed0561add35afc1c3ac996022b226f97a7f64bac7f288a4259d5338df
6
+ metadata.gz: 8fd736ac1fbde5aa64c17f28bee24338c5f52f17abe6c0c05e7066da2345d63deb4e62ef4c317151c146b00ad7821b08751c67b576204a3c5504d5f0553cfc16
7
+ data.tar.gz: 8b71f1f67a926f92c00937da39b37f04e3aab6c6e6068ba1074f74d55a76c48c4195232ab46f1b9a1ad796b118aa9516cf1ce0ec88da1abeac6dffacb9c8f926
@@ -20,10 +20,11 @@ module Mingle
20
20
  end
21
21
 
22
22
  def []=(store_key, value)
23
+ raise ArgumentError, "Value must be String" unless value.is_a?(String)
23
24
  @pstore.transaction do
24
25
  @pstore["all_names"] ||= []
25
26
  @pstore["all_names"] = (@pstore["all_names"] + [store_key]).uniq
26
- @pstore[store_key] = JSON.parse(value.to_json)
27
+ @pstore[store_key] = value
27
28
  end
28
29
  end
29
30
 
@@ -51,7 +52,7 @@ module Mingle
51
52
  @pstore["all_names"].map do |name|
52
53
  {
53
54
  @key_column.to_s => name,
54
- @value_column.to_s => @pstore[name].to_json
55
+ @value_column.to_s => @pstore[name]
55
56
  }
56
57
  end
57
58
  end
@@ -74,12 +75,12 @@ module Mingle
74
75
 
75
76
  def [](store_key)
76
77
  if attribute = attributes(table_items[store_key])[@value_column]
77
- JSON.parse(attribute)
78
+ attribute
78
79
  end
79
80
  end
80
81
 
81
82
  def []=(store_key, value)
82
- table_items.create(@key_column => store_key, @value_column => value.to_json)
83
+ table_items.create(@key_column => store_key, @value_column => value)
83
84
  end
84
85
 
85
86
  def clear
metadata CHANGED
@@ -1,50 +1,50 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mingle_keyvalue_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian
8
8
  - sdqali
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-28 00:00:00.000000000 Z
12
+ date: 2014-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk
16
- requirement: !ruby/object:Gem::Requirement
16
+ version_requirements: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ~>
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.11'
21
- - - ">="
21
+ - - '>='
22
22
  - !ruby/object:Gem::Version
23
23
  version: 1.11.3
24
- type: :runtime
25
- prerelease: false
26
- version_requirements: !ruby/object:Gem::Requirement
24
+ requirement: !ruby/object:Gem::Requirement
27
25
  requirements:
28
- - - "~>"
26
+ - - ~>
29
27
  - !ruby/object:Gem::Version
30
28
  version: '1.11'
31
- - - ">="
29
+ - - '>='
32
30
  - !ruby/object:Gem::Version
33
31
  version: 1.11.3
32
+ prerelease: false
33
+ type: :runtime
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rake
36
- requirement: !ruby/object:Gem::Requirement
36
+ version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- type: :development
42
- prerelease: false
43
- version_requirements: !ruby/object:Gem::Requirement
41
+ requirement: !ruby/object:Gem::Requirement
44
42
  requirements:
45
- - - ">="
43
+ - - '>='
46
44
  - !ruby/object:Gem::Version
47
45
  version: '0'
46
+ prerelease: false
47
+ type: :development
48
48
  description: A key value store implentation that uses DynamoDB or Pstore underneath.
49
49
  email:
50
50
  - reginaldthedog@gmail.com
@@ -59,24 +59,24 @@ homepage: https://github.com/ThoughtWorksStudios/mingle_keyvalue_store
59
59
  licenses:
60
60
  - MIT
61
61
  metadata: {}
62
- post_install_message:
62
+ post_install_message:
63
63
  rdoc_options: []
64
64
  require_paths:
65
65
  - lib
66
66
  required_ruby_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - ">="
68
+ - - '>='
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  requirements: []
77
- rubyforge_project:
78
- rubygems_version: 2.2.0
79
- signing_key:
77
+ rubyforge_project:
78
+ rubygems_version: 2.1.9
79
+ signing_key:
80
80
  specification_version: 4
81
81
  summary: A key value store implentation that uses DynamoDB or Pstore underneath.
82
82
  test_files: []