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 CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 Ying Tsen Hong
1
+ Copyright (c) 2010, 2011, 2012 Ying Tsen Hong
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -2,6 +2,7 @@ require 'net/http'
2
2
  require 'cgi'
3
3
  require 'timeout'
4
4
  require 'json'
5
+ require 'yaml'
5
6
 
6
7
  # Geocoding is a time and resource intensive task.
7
8
  # Whenever possible, pre-geocode known addresses
@@ -1,3 +1,3 @@
1
1
  module SimpleGeocoder
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -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.1.9')
26
+ spec.add_dependency('json', '~>1.7.3')
27
27
  end
@@ -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 == {"lat"=> 40.0185510,"lng"=> -105.2582644}
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 'spec'
6
- require 'spec/autorun'
5
+ require 'rspec'
6
+ require 'rspec/autorun'
7
7
 
8
- Spec::Runner.configure do |config|
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: 29
5
- prerelease: false
4
+ hash: 27
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
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: 2010-10-25 00:00:00 -06:00
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: 1
28
+ hash: 13
30
29
  segments:
31
30
  - 1
32
- - 1
33
- - 9
34
- version: 1.1.9
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.1.gem
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.3.7
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