gogo_maps 0.0.1 → 0.0.2

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: 138dba58c1abed99303b17676aa6d3e35dacead5
4
- data.tar.gz: c7f96e7a130276c9bfc530c2b96da6349cfad2b9
3
+ metadata.gz: 77e5eba4e7e66a37b5ff65fc956c806e90c093bc
4
+ data.tar.gz: bf25955da9d889e04161fd0f952e4bf51c26a244
5
5
  SHA512:
6
- metadata.gz: 34f9c1d25e107718b38eab66ad742e3223abc65f58069ba5116c7dc634df87b638067b9cb0fce9d69852dd4a4cb58a847e3372065aa5f9da429cebec26012df4
7
- data.tar.gz: 1c16213c7932269e32d0048cae49cbaf689ce0d5b39f7c2d8915da3e10f578ea71420abdc4be57ea6b1d464a93ffa26f43148f6430b9f6fa638eef7f6333a3c0
6
+ metadata.gz: 6392d9778628fd901ac67ad600affe5b4ff6f48b28de84a4897a744c58fb490efb9602e1f8a70d45be214d8f5f43be17d253f92e30b8d9e04c42808d751be5d4
7
+ data.tar.gz: d0e87ba852cca5c5cceae219b0c842410059dd3c50e10373caaf871dc000aced3ab679810a3399599e3ec3e77e431043a666272adcd4730cf7eb417313dce015
data/README.md CHANGED
@@ -1,31 +1,36 @@
1
1
  # GogoMaps
2
2
 
3
- TODO: Write a gem description
3
+ Super simple geocode interface for Ruby.
4
4
 
5
5
  ## Installation
6
6
 
7
- Add this line to your application's Gemfile:
7
+ Install gem as you like.
8
8
 
9
- ```ruby
10
- gem 'gogo_maps'
11
- ```
9
+ $ gem install gogo_maps
10
+
11
+ or
12
12
 
13
- And then execute:
13
+ $ echo "gem 'gogo_maps'" >> Gemfile
14
14
 
15
- $ bundle
15
+ ## Demo
16
+ ```ruby
17
+ require 'gogo_maps'
16
18
 
17
- Or install it yourself as:
19
+ # Address to lat and lng.
20
+ GogoMaps.get(address: '長野県上高井郡高山村')
21
+ # => {"lat"=>36.6797676, "lng"=>138.3632554}
18
22
 
19
- $ gem install gogo_maps
23
+ GogoMaps.get(address: '神奈川県横浜市港北区日吉')
24
+ # => {"lat"=>35.5565107, "lng"=>139.6460026}
20
25
 
21
- ## Usage
26
+ # Lat and lng to Address.
27
+ GogoMaps.get(latlng: '35.6506135,139.7539103')
28
+ # => '日本, 東京都港区芝1丁目11−14'
22
29
 
23
- TODO: Write usage instructions here
30
+ GogoMaps.get(latlng: '37.358126,-122.050636', language: :en)
31
+ # => '902 Rockefeller Drive, Sunnyvale, CA 94087, USA'
32
+ ```
24
33
 
25
34
  ## Contributing
26
-
27
- 1. Fork it ( https://github.com/[my-github-username]/gogo_maps/fork )
28
- 2. Create your feature branch (`git checkout -b my-new-feature`)
29
- 3. Commit your changes (`git commit -am 'Add some feature'`)
30
- 4. Push to the branch (`git push origin my-new-feature`)
31
- 5. Create a new Pull Request
35
+ Please feel free to.
36
+ Make you commiter if you wanna be.
@@ -1,3 +1,3 @@
1
1
  module GogoMaps
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/gogo_maps.rb CHANGED
@@ -17,7 +17,6 @@ module GogoMaps
17
17
  ENDPOINT = 'http://maps.googleapis.com'
18
18
  @@_conn ||= Faraday.new(url: ENDPOINT) do |faraday|
19
19
  faraday.request :url_encoded
20
- faraday.response :logger
21
20
  faraday.adapter Faraday.default_adapter
22
21
  end
23
22
 
@@ -37,6 +37,11 @@ describe GogoMaps do
37
37
  ).to eq(
38
38
  '日本, 東京都港区芝1丁目11−14'
39
39
  )
40
+ expect(
41
+ GogoMaps.get(latlng: '37.358126,-122.050636', language: :en)
42
+ ).to eq(
43
+ '902 Rockefeller Drive, Sunnyvale, CA 94087, USA'
44
+ )
40
45
  end
41
46
  end
42
47
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gogo_maps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - gogotanaka