google-geocode 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ = 1.2.1
2
+
3
+ * Upgrade to rc-rest 2.0.0
4
+
5
+ = 1.2.0
6
+
7
+ * Lost to time
8
+
9
+ = 1.1.0
10
+
11
+ * Better error handling
12
+
13
+ = 1.0.0
14
+
15
+ * Birthday!
File without changes
@@ -1,6 +1,7 @@
1
- LICENSE
1
+ History.txt
2
+ LICENSE.txt
2
3
  Manifest.txt
3
- README
4
+ README.txt
4
5
  Rakefile
5
6
  lib/google_geocode.rb
6
7
  test/test_google_geocode.rb
@@ -20,7 +20,7 @@ Just install the gem:
20
20
 
21
21
  == Using google-geocode
22
22
 
23
- First you need a Google Maps API key. Yuo can register for one here:
23
+ First you need a Google Maps API key. You can register for one here:
24
24
 
25
25
  http://www.google.com/apis/maps/signup.html
26
26
 
data/Rakefile CHANGED
@@ -1,68 +1,27 @@
1
- require 'rubygems'
2
- require 'rake'
3
- require 'rake/testtask'
4
- require 'rake/rdoctask'
5
- require 'rake/gempackagetask'
1
+ require 'hoe'
6
2
 
7
- $VERBOSE = nil
3
+ require './lib/google_geocode'
8
4
 
9
- spec = Gem::Specification.new do |s|
10
- s.name = 'google-geocode'
11
- s.version = '1.2.0'
12
- s.summary = 'Google Geocoder API Library'
13
- s.description = 'Map addresses to latitude and longitude with Google\'s Geocoder.'
14
- s.author = 'Eric Hodel'
15
- s.email = 'eric@robotcoop.com'
5
+ DEV_DOC_PATH = 'Libraries/google-geocode'
16
6
 
17
- s.has_rdoc = true
18
- s.files = File.read('Manifest.txt').split($/)
19
- s.require_path = 'lib'
20
-
21
- s.add_dependency 'rc-rest', '>= 1.0.0'
22
- end
23
-
24
- desc 'Run tests'
25
- task :default => [ :test ]
7
+ hoe = Hoe.new 'google-geocode', GoogleGeocode::VERSION do |p|
8
+ p.summary = 'Google Geocoder API Library'
9
+ p.description = 'Map addresses to latitude and longitude with Google\'s Geocoder.'
10
+ p.author = 'Eric Hodel'
11
+ p.email = 'drbrain@segment7.net'
12
+ p.url = "http://dev.robotcoop.com/#{DEV_DOC_PATH}"
13
+ p.changes = File.read('History.txt').scan(/\A(=.*?)^=/m).first.first
14
+ p.rubyforge_name = 'rctools'
26
15
 
27
- Rake::TestTask.new('test') do |t|
28
- t.libs << '../rc-rest/lib'
29
- t.pattern = 'test/test_*.rb'
30
- t.verbose = true
16
+ p.extra_deps << ['rc-rest', '>= 2.0.0']
31
17
  end
32
18
 
33
- desc 'Update Manifest.txt'
34
- task :update_manifest do
35
- sh "find . -type f | sed -e 's%./%%' | egrep -v 'svn|swp|~' | egrep -v '^(doc|pkg)/' | sort > Manifest.txt"
36
- end
37
-
38
- desc 'Generate RDoc'
39
- Rake::RDocTask.new :rdoc do |rd|
40
- rd.rdoc_dir = 'doc'
41
- rd.rdoc_files.add 'lib', 'README', 'LICENSE'
42
- rd.main = 'README'
43
- rd.options << '-d' if `which dot` =~ /\/dot/
44
- rd.options << '-t Google Geocode'
45
- end
19
+ SPEC = hoe.spec
46
20
 
47
- desc 'Generate RDoc for dev.robotcoop.com'
48
- Rake::RDocTask.new :dev_rdoc do |rd|
49
- rd.rdoc_dir = '../../../www/trunk/dev/html/Libraries/google-geocode'
50
- rd.rdoc_files.add 'lib', 'README', 'LICENSE'
51
- rd.main = 'README'
52
- rd.options << '-d' if `which dot` =~ /\/dot/
53
- rd.options << '-t Google Geocode'
21
+ begin
22
+ require '../tasks'
23
+ rescue LoadError
54
24
  end
55
25
 
56
- desc 'Build Gem'
57
- Rake::GemPackageTask.new spec do |pkg|
58
- pkg.need_tar = true
59
- end
60
-
61
- desc 'Clean up'
62
- task :clean => [ :clobber_rdoc, :clobber_package ]
63
-
64
- desc 'Clean up'
65
- task :clobber => [ :clean ]
66
-
67
26
  # vim: syntax=Ruby
68
27
 
@@ -1,3 +1,4 @@
1
+ require 'rubygems'
1
2
  require 'rc_rest'
2
3
 
3
4
  ##
@@ -7,6 +8,11 @@ require 'rc_rest'
7
8
 
8
9
  class GoogleGeocode < RCRest
9
10
 
11
+ ##
12
+ # This is the version you are running.
13
+
14
+ VERSION = '1.2.1'
15
+
10
16
  ##
11
17
  # Base error class
12
18
 
@@ -35,14 +41,14 @@ class GoogleGeocode < RCRest
35
41
 
36
42
  def initialize(key)
37
43
  @key = key
38
- @url = URI.parse 'http://maps.google.com/maps/geo'
44
+ @url = URI.parse 'http://maps.google.com/maps/'
39
45
  end
40
46
 
41
47
  ##
42
48
  # Locates +address+ returning a Location struct.
43
49
 
44
50
  def locate(address)
45
- get :q => address
51
+ get :geo, :q => address
46
52
  end
47
53
 
48
54
  ##
@@ -87,11 +93,11 @@ class GoogleGeocode < RCRest
87
93
  # Creates a URL from the Hash +params+. Automatically adds the key and
88
94
  # sets the output type to 'xml'.
89
95
 
90
- def make_url(params)
96
+ def make_url(method, params)
91
97
  params[:key] = @key
92
98
  params[:output] = 'xml'
93
99
 
94
- super params
100
+ super method, params
95
101
  end
96
102
 
97
103
  end
@@ -1,4 +1,6 @@
1
1
  require 'test/unit'
2
+
3
+ require 'rubygems'
2
4
  require 'rc_rest/uri_stub'
3
5
 
4
6
  require 'google_geocode'
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.99
2
+ rubygems_version: 0.9.0.6
3
3
  specification_version: 1
4
4
  name: google-geocode
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.2.0
7
- date: 2006-06-16 00:00:00 -07:00
6
+ version: 1.2.1
7
+ date: 2006-11-27 00:00:00 -08:00
8
8
  summary: Google Geocoder API Library
9
9
  require_paths:
10
10
  - lib
11
- email: eric@robotcoop.com
12
- homepage:
13
- rubyforge_project:
11
+ email: drbrain@segment7.net
12
+ homepage: http://dev.robotcoop.com/Libraries/google-geocode
13
+ rubyforge_project: rctools
14
14
  description: Map addresses to latitude and longitude with Google's Geocoder.
15
15
  autorequire:
16
16
  default_executable:
@@ -29,14 +29,15 @@ post_install_message:
29
29
  authors:
30
30
  - Eric Hodel
31
31
  files:
32
- - LICENSE
32
+ - History.txt
33
+ - LICENSE.txt
33
34
  - Manifest.txt
34
- - README
35
+ - README.txt
35
36
  - Rakefile
36
37
  - lib/google_geocode.rb
37
38
  - test/test_google_geocode.rb
38
- test_files: []
39
-
39
+ test_files:
40
+ - test/test_google_geocode.rb
40
41
  rdoc_options: []
41
42
 
42
43
  extra_rdoc_files: []
@@ -48,6 +49,15 @@ extensions: []
48
49
  requirements: []
49
50
 
50
51
  dependencies:
52
+ - !ruby/object:Gem::Dependency
53
+ name: hoe
54
+ version_requirement:
55
+ version_requirements: !ruby/object:Gem::Version::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ version: 1.1.4
60
+ version:
51
61
  - !ruby/object:Gem::Dependency
52
62
  name: rc-rest
53
63
  version_requirement:
@@ -55,5 +65,5 @@ dependencies:
55
65
  requirements:
56
66
  - - ">="
57
67
  - !ruby/object:Gem::Version
58
- version: 1.0.0
68
+ version: 2.0.0
59
69
  version: