dynamodb_geo 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f54f79a1153702913ca165972a8936865949156e28970e62efc06e23076b0773
4
- data.tar.gz: 4171efed028b0cc80b39b35fe951c065da01ac6b7978c11e4264e9da5e0d5be1
3
+ metadata.gz: fbbaf8b8e654469fa6eb8bae4a2f5b82822cef9469cf6748e937946ca885aa26
4
+ data.tar.gz: 56a1e5719a58a56e7bb4aaad5d4a18eb58103c3aac4bd0ba19d3acb1844a61fd
5
5
  SHA512:
6
- metadata.gz: 04fec0da4cf2f1f62df873fd364dda594028ad566b283bd6ad56573f5d8c156237c5eb691546697001195944a483038931ee4728a8f317d9600b5114bb22af57
7
- data.tar.gz: d3a7da451c4e43850c0a3b44db65f967bd28df66ea35848be57d28eb5755a47a1cb1df7a2d87a29bb0af94eec583a889ba0231f35112f4bafa0003a86a539e68
6
+ metadata.gz: 43b1bdb8a511f633f08a7cfd7dd2aebcc9f5910e6a3dff65bd354d8241f5d524ce7a0b959e7f66a894ee05259527434f37d0529fc3a9b5bc6fe0802c3fd07f3d
7
+ data.tar.gz: 7ce0e309eb35766a074bd5a702eb22156a0685a965a219a52045fd4e8c1f5a6f9244eb1394bbab72e7ab2d7fc28d7b3f9367c34f6e957b6b54946de7196dea85
@@ -1,5 +1,5 @@
1
1
  module DynamodbGeo
2
2
  class Version
3
- STRING = '0.1.5'
3
+ STRING = '0.1.6'
4
4
  end
5
5
  end
@@ -56,7 +56,7 @@ class DynamodbManager
56
56
  phone: store.phone,
57
57
  name: store.name,
58
58
  }
59
- put_point(hash, json)
59
+ put_point(hash, json, store.uuid)
60
60
  end
61
61
 
62
62
  def get_stores(lat, long)
@@ -118,8 +118,8 @@ class DynamodbManager
118
118
  })
119
119
  end
120
120
 
121
- def put_point(hash, json)
122
- uuid = SecureRandom.uuid
121
+ def put_point(hash, json, uuid = nil)
122
+ uuid ||= SecureRandom.uuid
123
123
 
124
124
  @client.put_item({
125
125
  table_name: @table_name,
@@ -1,5 +1,5 @@
1
1
  class Store
2
- attr_accessor :lat, :long, :address, :city, :state, :zip, :area_code, :phone, :name, :geohash
2
+ attr_accessor :lat, :long, :address, :city, :state, :zip, :area_code, :phone, :name, :geohash, :uuid
3
3
  def initialize(store_data)
4
4
  @lat = store_data[:latitude]
5
5
  @long = store_data[:longitude]
@@ -11,5 +11,6 @@ class Store
11
11
  @phone = store_data[:phone]
12
12
  @name = store_data[:name]
13
13
  @geohash = store_data[:geohash] || Geohash.encode(lat, long, 10)
14
+ @uuid = store_data[:uuid]
14
15
  end
15
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamodb_geo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ahn
@@ -127,7 +127,7 @@ requirements: []
127
127
  rubygems_version: 3.1.2
128
128
  signing_key:
129
129
  specification_version: 4
130
- summary: dynamodb_geo-0.1.5
130
+ summary: dynamodb_geo-0.1.6
131
131
  test_files:
132
132
  - spec/dynamodb_geo_spec.rb
133
133
  - spec/geohash_spec.rb