dynamodb_geo 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dynamodb_geo/version.rb +1 -1
- data/lib/store.rb +10 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d340e57a2a4560a39e25bced58d8bbef10427e1d7597cfb855dee033f4592ebe
|
4
|
+
data.tar.gz: 26125976630f46b293e2903155c242c89f32e1b8aab70f9a545042cbf3cb1438
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d6c3b08e34a6fe3414d6694694294171fe561e05f11028f426971efef422505474646518bee6f9a767ba66f7b798a886c794c095b3671c1b4853b1b61a3d332
|
7
|
+
data.tar.gz: 10ef5eb008734bf7dcb536e2d276c28e59a581515637a3ba69746a45fa07f712856d49f694209f222a915ab138328aabaac6dc7414d9dae44310e5ec93965f9a
|
data/lib/dynamodb_geo/version.rb
CHANGED
data/lib/store.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
class Store
|
2
2
|
attr_accessor :lat, :long, :address, :city, :state, :zip, :area_code, :phone, :name, :geohash
|
3
3
|
def initialize(store_data)
|
4
|
-
@lat = store_data[
|
5
|
-
@long = store_data[
|
6
|
-
@address = store_data[
|
7
|
-
@city = store_data[
|
8
|
-
@state = store_data[
|
9
|
-
@zip = store_data[
|
10
|
-
@area_code = store_data[
|
11
|
-
@phone = store_data[
|
12
|
-
@name = store_data[
|
13
|
-
@geohash = store_data[
|
4
|
+
@lat = store_data[:latitude]
|
5
|
+
@long = store_data[:longitude]
|
6
|
+
@address = store_data[:address]
|
7
|
+
@city = store_data[:city]
|
8
|
+
@state = store_data[:state]
|
9
|
+
@zip = store_data[:zip]
|
10
|
+
@area_code = store_data[:area_code]
|
11
|
+
@phone = store_data[:phone]
|
12
|
+
@name = store_data[:name]
|
13
|
+
@geohash = store_data[:geohash] || Geohash.encode(lat, long, 10)
|
14
14
|
end
|
15
15
|
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.
|
4
|
+
version: 0.1.4
|
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.
|
130
|
+
summary: dynamodb_geo-0.1.4
|
131
131
|
test_files:
|
132
132
|
- spec/dynamodb_geo_spec.rb
|
133
133
|
- spec/geohash_spec.rb
|