mince_dynamo_db 2.0.0.pre.3 → 2.0.0.pre.4
Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ module MinceDynamoDb # :nodoc:
|
|
8
8
|
module Interface
|
9
9
|
# Not yet implemented
|
10
10
|
def self.update_field_with_value(collection_name, primary_key_value, field_name, new_value)
|
11
|
-
item = find(collection_name,
|
11
|
+
item = find(collection_name, primary_key, primary_key_value)
|
12
12
|
item.set(field_name => new_value)
|
13
13
|
end
|
14
14
|
|
@@ -36,7 +36,7 @@ module MinceDynamoDb # :nodoc:
|
|
36
36
|
# primary key.
|
37
37
|
#
|
38
38
|
# @return [String] the name of the primary key field.
|
39
|
-
def self.
|
39
|
+
def self.primary_key
|
40
40
|
Config.primary_key
|
41
41
|
end
|
42
42
|
|
@@ -35,7 +35,7 @@ describe MinceDynamoDb::Interface do
|
|
35
35
|
primary_key_value = mock("id of record")
|
36
36
|
field_name = mock 'field name'
|
37
37
|
new_value = mock 'new value'
|
38
|
-
items.stub(:where).with(described_class.
|
38
|
+
items.stub(:where).with(described_class.primary_key.to_s => primary_key_value).and_return([return_data])
|
39
39
|
|
40
40
|
attributes.should_receive(:set).with(field_name => new_value)
|
41
41
|
|
@@ -47,7 +47,7 @@ describe MinceDynamoDb::Interface do
|
|
47
47
|
primary_key_value = mock("id of record")
|
48
48
|
field_name = mock 'field name'
|
49
49
|
new_value = mock 'new value'
|
50
|
-
items.stub(:where).with(described_class.
|
50
|
+
items.stub(:where).with(described_class.primary_key.to_s => primary_key_value).and_return([return_data])
|
51
51
|
|
52
52
|
attributes.should_receive(:set).with(field_name => new_value)
|
53
53
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mince_dynamo_db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.pre.
|
4
|
+
version: 2.0.0.pre.4
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -173,7 +173,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
173
173
|
version: '0'
|
174
174
|
segments:
|
175
175
|
- 0
|
176
|
-
hash:
|
176
|
+
hash: 3357786729933259845
|
177
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
178
|
none: false
|
179
179
|
requirements:
|