alephant-lookup 0.1.4 → 0.1.5
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.
- checksums.yaml +4 -4
- data/lib/alephant/lookup/lookup_location.rb +1 -1
- data/lib/alephant/lookup/lookup_query.rb +2 -2
- data/lib/alephant/lookup/version.rb +1 -1
- data/spec/lookup_spec.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a638f4950630a5c4511309bb22dc92e87e81d065
|
|
4
|
+
data.tar.gz: 9bda60665e6933aa5d202259819afa149fe8f69c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0ab5c95260d1f454497ce8ec76e3996803f50e183eac95c6635ccb438807223190a2dc76f3db899ac37ea36136c5ca503758eea39651a935380dbc7b96ba758
|
|
7
|
+
data.tar.gz: 660e3c2daef3110a298a993a791fb13ff2f1f173848526688fa9db403e66137dc898a3ac22d85305d6b912228c393564de539d701c98f8c70c8219511978d8f4
|
|
@@ -6,7 +6,7 @@ module Alephant
|
|
|
6
6
|
attr_reader :component_id, :component_key, :opts, :opts_hash, :batch_version
|
|
7
7
|
attr_accessor :location
|
|
8
8
|
|
|
9
|
-
def initialize(component_id,
|
|
9
|
+
def initialize(component_id, opts, batch_version, location = nil)
|
|
10
10
|
@component_id = component_id
|
|
11
11
|
@batch_version = batch_version
|
|
12
12
|
@opts = opts
|
|
@@ -6,10 +6,10 @@ module Alephant
|
|
|
6
6
|
class LookupQuery
|
|
7
7
|
attr_reader :table_name, :lookup_location
|
|
8
8
|
|
|
9
|
-
def initialize(table_name, component_id,
|
|
9
|
+
def initialize(table_name, component_id, opts, batch_version)
|
|
10
10
|
@client = AWS::DynamoDB::Client::V20120810.new
|
|
11
11
|
@table_name = table_name
|
|
12
|
-
@lookup_location = LookupLocation.new(component_id,
|
|
12
|
+
@lookup_location = LookupLocation.new(component_id, opts, batch_version)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def run!
|
data/spec/lookup_spec.rb
CHANGED
|
@@ -64,7 +64,7 @@ describe Alephant::Lookup do
|
|
|
64
64
|
table.stub(:table_name).and_return('table_name')
|
|
65
65
|
|
|
66
66
|
instance = subject.new(table)
|
|
67
|
-
lookup = instance.read('id',{:variant => "foo"}
|
|
67
|
+
lookup = instance.read('id', 0, {:variant => "foo"})
|
|
68
68
|
|
|
69
69
|
expect(lookup.location).to eq('/location')
|
|
70
70
|
end
|
|
@@ -99,7 +99,7 @@ describe Alephant::Lookup do
|
|
|
99
99
|
.and_return(lookup_table)
|
|
100
100
|
|
|
101
101
|
instance = subject.new(lookup_table)
|
|
102
|
-
instance.write('id',
|
|
102
|
+
instance.write('id','0',{},'/location')
|
|
103
103
|
end
|
|
104
104
|
end
|
|
105
105
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: alephant-lookup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robert Kenny
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-03-
|
|
11
|
+
date: 2014-03-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -229,3 +229,4 @@ summary: Lookup a location in S3 using DynamoDB.
|
|
|
229
229
|
test_files:
|
|
230
230
|
- spec/lookup_spec.rb
|
|
231
231
|
- spec/spec_helper.rb
|
|
232
|
+
has_rdoc:
|