gogo_maps 0.0.5 → 0.2.70000000

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
  SHA1:
3
- metadata.gz: 214de8fecd1e9b7a258de32a1113557f6af2d409
4
- data.tar.gz: d28cd8addf55e22eeed81f78acaf24b146d1b248
3
+ metadata.gz: e02e369a04b46ef473ad2660f77444884d7c2ca4
4
+ data.tar.gz: ee51da9063670fa3b47d1fb21ea27cfac1e765c5
5
5
  SHA512:
6
- metadata.gz: 95931298ff7f224e6855f5940d0925532e8d5ae892f93d28f4a32e1a2a8d276b5359c1e2fcbce83e4416b25db8d4fd1662cfe7ccfe52bc4ebb18c221737d5c76
7
- data.tar.gz: 1cdda3f069f7b3cf549a2bae9e74863136536dd6085de21f30a1979d6d334c3701478e38506a71d07c1f849a75b7453860e7d9900060997ecddb28cb45a91bb1
6
+ metadata.gz: a784dda03805f47eaf4f17b096c56807d8fe90bb839eb6c9eca5aea16d9ca5c083a0783ec57c3f2dbadf4a5a3ca535b860cae0fb5a6550a215e95d0255bfb03f
7
+ data.tar.gz: 61aacd3eb512f3c891ee9d9b16612e93efd85534d5ab5561d5c3e6f0d59702ba6ad61280c3fbf038d43f5f9cc9d2b0e08848dd0cc68b101eadd32a246d9ba235
data/README.md CHANGED
@@ -4,7 +4,7 @@ Super simple geocode interface for Ruby, by using awesome GoogleMaps API
4
4
 
5
5
  ## Installation
6
6
 
7
- Install gem as you like.
7
+ Install gem as you like.
8
8
 
9
9
  $ gem install gogo_maps
10
10
 
@@ -18,10 +18,10 @@ require 'gogo_maps'
18
18
 
19
19
  # Address to lat and lng.
20
20
  GogoMaps.get(address: '長野県上高井郡高山村')
21
- # => {"lat"=>36.6797676, "lng"=>138.3632554}
21
+ # => { lat: 36.6797676, lng: 138.3632554}
22
22
 
23
23
  GogoMaps.get(address: '神奈川県横浜市港北区日吉')
24
- # => {"lat"=>35.5565107, "lng"=>139.6460026}
24
+ # => { lat: 35.5565107, lng: 139.6460026 }
25
25
 
26
26
  # Lat and lng to Address.
27
27
  GogoMaps.get(latlng: '35.6506135,139.7539103')
@@ -1,3 +1,4 @@
1
1
  module GogoMaps
2
- VERSION = "0.0.5"
2
+ # Napier's constant
3
+ VERSION = "0.2.70000000"
3
4
  end
data/lib/gogo_maps.rb CHANGED
@@ -41,8 +41,12 @@ module GogoMaps
41
41
  end
42
42
 
43
43
  case sym
44
- when :to_latlng then location['geometry']['location']
45
- when :to_address then location['formatted_address']
44
+ when :to_latlng
45
+ location['geometry']['location'].each_with_object({}) do | (k, v), rslt |
46
+ rslt[k.to_s.to_sym] = v
47
+ end
48
+ when :to_address
49
+ location['formatted_address']
46
50
  end
47
51
  end
48
52
  end
@@ -16,17 +16,17 @@ describe GogoMaps do
16
16
  expect(
17
17
  GogoMaps.get(address: '長野県上高井郡高山村')
18
18
  ).to eq(
19
- {"lat"=>36.6797676, "lng"=>138.3632554}
19
+ { lat: 36.6797676, lng: 138.3632554 }
20
20
  )
21
21
  expect(
22
22
  GogoMaps.get(address: '神奈川県横浜市港北区日吉')
23
23
  ).to eq(
24
- {"lat"=>35.5565107, "lng"=>139.6460026}
24
+ { lat: 35.5565107, lng: 139.6460026 }
25
25
  )
26
26
  expect(
27
27
  GogoMaps.get(address: '902 Rockefeller Dr, Sunnyvale, CA', language: :en)
28
28
  ).to eq(
29
- {"lat"=>37.358126, "lng"=>-122.050636}
29
+ { lat: 37.358126, lng: -122.050636 }
30
30
  )
31
31
  end
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gogo_maps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.2.70000000
5
5
  platform: ruby
6
6
  authors:
7
7
  - gogotanaka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-23 00:00:00.000000000 Z
11
+ date: 2014-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler