simple_geocoder 0.0.1 → 0.0.2
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.
- data/MIT-LICENSE +1 -1
- data/lib/simple_geocoder/geocoder.rb +1 -0
- data/lib/simple_geocoder/version.rb +1 -1
- data/simple_geocoder.gemspec +3 -3
- data/spec/geocoder_spec.rb +2 -1
- data/spec/spec_helper.rb +3 -4
- metadata +13 -15
data/MIT-LICENSE
CHANGED
data/simple_geocoder.gemspec
CHANGED
@@ -2,10 +2,10 @@ require File.expand_path("../lib/simple_geocoder/version", __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = 'simple_geocoder'
|
5
|
-
spec.summary = 'Simple interface to Google Geocoding API V3'
|
5
|
+
spec.summary = 'Simple interface to Google Geocoding API V3 for ruby.'
|
6
6
|
spec.version = ::SimpleGeocoder::VERSION
|
7
7
|
spec.platform = Gem::Platform::RUBY
|
8
|
-
spec.email = 'tsenying gmail'
|
8
|
+
spec.email = 'tsenying at gmail dot com'
|
9
9
|
spec.authors = ['Ying Tsen Hong']
|
10
10
|
spec.homepage = 'http://github.com/tsenying/simple_geocoder'
|
11
11
|
|
@@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
|
|
23
23
|
# spec.require_paths = ["lib"] # default
|
24
24
|
spec.has_rdoc = "true"
|
25
25
|
|
26
|
-
spec.add_dependency('json', '~>1.
|
26
|
+
spec.add_dependency('json', '~>1.7.3')
|
27
27
|
end
|
data/spec/geocoder_spec.rb
CHANGED
@@ -5,7 +5,8 @@ describe SimpleGeocoder::Geocoder do
|
|
5
5
|
address = '2000 28th St, Boulder, CO'
|
6
6
|
result = SimpleGeocoder::Geocoder.new.geocode(address)
|
7
7
|
result['status'].should == "OK" # at least one geocode returned
|
8
|
-
result['results'][0]['geometry']['location'].should
|
8
|
+
result['results'][0]['geometry']['location']['lat'].should be_within(0.0001).of(40.018551)
|
9
|
+
result['results'][0]['geometry']['location']['lng'].should be_within(0.0001).of(-105.2582644)
|
9
10
|
end
|
10
11
|
|
11
12
|
it "can find lat/lng in string" do
|
data/spec/spec_helper.rb
CHANGED
@@ -2,9 +2,8 @@ require 'rubygems'
|
|
2
2
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
3
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
4
4
|
require 'simple_geocoder'
|
5
|
-
require '
|
6
|
-
require '
|
5
|
+
require 'rspec'
|
6
|
+
require 'rspec/autorun'
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
RSpec.configure do |config|
|
10
9
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_geocoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 27
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ying Tsen Hong
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2012-05-21 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: json
|
@@ -26,16 +25,16 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ~>
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
28
|
+
hash: 13
|
30
29
|
segments:
|
31
30
|
- 1
|
32
|
-
-
|
33
|
-
-
|
34
|
-
version: 1.
|
31
|
+
- 7
|
32
|
+
- 3
|
33
|
+
version: 1.7.3
|
35
34
|
type: :runtime
|
36
35
|
version_requirements: *id001
|
37
36
|
description: Simple Geocoder
|
38
|
-
email: tsenying gmail
|
37
|
+
email: tsenying at gmail dot com
|
39
38
|
executables: []
|
40
39
|
|
41
40
|
extensions: []
|
@@ -51,11 +50,10 @@ files:
|
|
51
50
|
- lib/simple_geocoder.rb
|
52
51
|
- MIT-LICENSE
|
53
52
|
- README.rdoc
|
54
|
-
- simple_geocoder-0.0.
|
53
|
+
- simple_geocoder-0.0.2.gem
|
55
54
|
- simple_geocoder.gemspec
|
56
55
|
- spec/geocoder_spec.rb
|
57
56
|
- spec/spec_helper.rb
|
58
|
-
has_rdoc: true
|
59
57
|
homepage: http://github.com/tsenying/simple_geocoder
|
60
58
|
licenses: []
|
61
59
|
|
@@ -85,9 +83,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
83
|
requirements: []
|
86
84
|
|
87
85
|
rubyforge_project: N/A
|
88
|
-
rubygems_version: 1.
|
86
|
+
rubygems_version: 1.8.10
|
89
87
|
signing_key:
|
90
88
|
specification_version: 3
|
91
|
-
summary: Simple interface to Google Geocoding API V3
|
89
|
+
summary: Simple interface to Google Geocoding API V3 for ruby.
|
92
90
|
test_files: []
|
93
91
|
|