enrichment_db 0.1.7 → 0.1.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e528182a7b7ca1f550d6fc15856de26df6d01fa1
4
- data.tar.gz: af053abcbedaa87037b748fbf7892c1c461e957a
3
+ metadata.gz: ed3f8eeeacef49594b8ea0f00704aeb7c3811264
4
+ data.tar.gz: 729c64791296348c4d968aa7bf78ca5226557176
5
5
  SHA512:
6
- metadata.gz: 2abd35e4045b2ee3816b9c14a57ac7f34dcac43a14bec0292d4b5e530e29fe24d8c20c5ced294f22f7bab523be2402050ab9fcbac6cfa79850fcdf11e5a438ca
7
- data.tar.gz: 70bf764a95eb810217ca424aa762af047c50d66f9054e8bfedb633b1a9b21cafbb724882ab95a334ea28ad994a5d413a7359763d22be8fe373ed68453ad2dc74
6
+ metadata.gz: 0c94f753bedfe284ae35e1c78da02d52fdc53d52beed85606839a683be7094b6a6aa335f44d3630f7ff8b2380388a1f21996c15fa72361a4656dbd61db196c41
7
+ data.tar.gz: 3c1972e705650dc9cb1323a6f26c6ceab96c3ff31dec4cf62342d183f5b40cc8654efe775dd21897687745147e1cb8c251560f7944dead0fef66acc4882e5995
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- enrichment_db (0.1.6)
4
+ enrichment_db (0.1.7)
5
5
  multi_json (~> 1.3)
6
6
  pg
7
7
  pr_geohash
@@ -82,7 +82,7 @@ class EnrichmentDb::Geo::Locator < EnrichmentDb::DatumModel
82
82
 
83
83
  fail EnrichmentDb::InvalidGeoPointFormat unless valid_geo_point?(geo)
84
84
  geo_format = geo.each_with_object({}) do |(k, v), h|
85
- h[k.to_sym] = v
85
+ h[k.to_sym] = v.to_f
86
86
  end
87
87
  GeoHash.encode(geo_format[:lat], geo_format[:lon])
88
88
  end
@@ -1,3 +1,3 @@
1
1
  module EnrichmentDb
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.8'
3
3
  end
@@ -9,9 +9,9 @@ describe EnrichmentDb::Geo::Locator do
9
9
  assert_equal id, result
10
10
  end
11
11
 
12
- it 'should correctly format a hash to a latlong' do
13
- lat = 10
14
- long = 180
12
+ it 'should break as the lat long format is incorrect' do
13
+ lat = -27.477541606
14
+ long = 153.012244888
15
15
  lat_long = { 'lat' => lat, 'long' => long }
16
16
  begin
17
17
  geohash = EnrichmentDb::Geo::Locator.format_geo(lat_long)
@@ -22,12 +22,12 @@ describe EnrichmentDb::Geo::Locator do
22
22
  end
23
23
  end
24
24
 
25
- it 'should break as the lat long format is incorrect' do
26
- lat = 10
27
- long = 180
25
+ it 'should correctly format a hash to a latlong' do
26
+ lat = -27.477541606
27
+ long = 153.012244888
28
28
  lat_long = { 'lat' => lat, 'lon' => long }
29
29
  geohash = EnrichmentDb::Geo::Locator.format_geo(lat_long)
30
- assert_equal 'xczbzurypzpg', geohash
30
+ assert_equal 'r7hg9vu5ewzr', geohash
31
31
  end
32
32
 
33
33
  it 'should find region from geohash' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enrichment_db
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
  - Aaron Wallis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-09 00:00:00.000000000 Z
11
+ date: 2015-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json