geocoder 0.9.13 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of geocoder might be problematic. Click here for more details.

metadata CHANGED
@@ -2,71 +2,82 @@
2
2
  name: geocoder
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.13
5
+ version: 1.0.0
6
6
  platform: ruby
7
7
  authors:
8
- - Alex Reisner
8
+ - Alex Reisner
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-11 00:00:00 -04:00
13
+ date: 2011-05-09 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
17
- description: Provides object geocoding (by street or IP address), reverse geocoding (coordinates to street address), and distance queries for ActiveRecord and Mongoid. Designed for Rails but works with other Rack frameworks too.
17
+ description: Provides object geocoding (by street or IP address), reverse geocoding (coordinates to street address), distance queries for ActiveRecord and Mongoid, result caching, and more. Designed for Rails but works with Sinatra and other Rack frameworks too.
18
18
  email:
19
- - alex@alexreisner.com
20
- executables: []
21
-
19
+ - alex@alexreisner.com
20
+ executables:
21
+ - geocode
22
22
  extensions: []
23
23
 
24
24
  extra_rdoc_files: []
25
25
 
26
26
  files:
27
- - .gitignore
28
- - CHANGELOG.rdoc
29
- - LICENSE
30
- - README.rdoc
31
- - Rakefile
32
- - VERSION
33
- - lib/geocoder.rb
34
- - lib/geocoder/cache.rb
35
- - lib/geocoder/calculations.rb
36
- - lib/geocoder/configuration.rb
37
- - lib/geocoder/lookups/base.rb
38
- - lib/geocoder/lookups/freegeoip.rb
39
- - lib/geocoder/lookups/geocoder_ca.rb
40
- - lib/geocoder/lookups/google.rb
41
- - lib/geocoder/lookups/yahoo.rb
42
- - lib/geocoder/models/active_record.rb
43
- - lib/geocoder/models/base.rb
44
- - lib/geocoder/models/mongoid.rb
45
- - lib/geocoder/railtie.rb
46
- - lib/geocoder/request.rb
47
- - lib/geocoder/results/base.rb
48
- - lib/geocoder/results/freegeoip.rb
49
- - lib/geocoder/results/geocoder_ca.rb
50
- - lib/geocoder/results/google.rb
51
- - lib/geocoder/results/yahoo.rb
52
- - lib/geocoder/stores/active_record.rb
53
- - lib/geocoder/stores/active_record_legacy.rb
54
- - lib/geocoder/stores/base.rb
55
- - lib/geocoder/stores/mongoid.rb
56
- - lib/tasks/geocoder.rake
57
- - test/fixtures/freegeoip_74_200_247_59.json
58
- - test/fixtures/geocoder_ca_madison_square_garden.json
59
- - test/fixtures/geocoder_ca_no_results.json
60
- - test/fixtures/geocoder_ca_reverse.json
61
- - test/fixtures/google_garbage.json
62
- - test/fixtures/google_madison_square_garden.json
63
- - test/fixtures/google_no_locality.json
64
- - test/fixtures/google_no_results.json
65
- - test/fixtures/yahoo_garbage.json
66
- - test/fixtures/yahoo_madison_square_garden.json
67
- - test/fixtures/yahoo_no_results.json
68
- - test/geocoder_test.rb
69
- - test/test_helper.rb
27
+ - .gitignore
28
+ - CHANGELOG.rdoc
29
+ - LICENSE
30
+ - README.rdoc
31
+ - Rakefile
32
+ - bin/geocode
33
+ - lib/geocoder.rb
34
+ - lib/geocoder/cache.rb
35
+ - lib/geocoder/calculations.rb
36
+ - lib/geocoder/cli.rb
37
+ - lib/geocoder/configuration.rb
38
+ - lib/geocoder/lookups/base.rb
39
+ - lib/geocoder/lookups/bing.rb
40
+ - lib/geocoder/lookups/freegeoip.rb
41
+ - lib/geocoder/lookups/geocoder_ca.rb
42
+ - lib/geocoder/lookups/google.rb
43
+ - lib/geocoder/lookups/yahoo.rb
44
+ - lib/geocoder/lookups/yandex.rb
45
+ - lib/geocoder/models/active_record.rb
46
+ - lib/geocoder/models/base.rb
47
+ - lib/geocoder/models/mongoid.rb
48
+ - lib/geocoder/railtie.rb
49
+ - lib/geocoder/request.rb
50
+ - lib/geocoder/results/base.rb
51
+ - lib/geocoder/results/bing.rb
52
+ - lib/geocoder/results/freegeoip.rb
53
+ - lib/geocoder/results/geocoder_ca.rb
54
+ - lib/geocoder/results/google.rb
55
+ - lib/geocoder/results/yahoo.rb
56
+ - lib/geocoder/results/yandex.rb
57
+ - lib/geocoder/stores/active_record.rb
58
+ - lib/geocoder/stores/base.rb
59
+ - lib/geocoder/stores/mongoid.rb
60
+ - lib/geocoder/version.rb
61
+ - lib/tasks/geocoder.rake
62
+ - test/fixtures/bing_madison_square_garden.json
63
+ - test/fixtures/bing_no_results.json
64
+ - test/fixtures/bing_reverse.json
65
+ - test/fixtures/freegeoip_74_200_247_59.json
66
+ - test/fixtures/geocoder_ca_madison_square_garden.json
67
+ - test/fixtures/geocoder_ca_no_results.json
68
+ - test/fixtures/geocoder_ca_reverse.json
69
+ - test/fixtures/google_garbage.json
70
+ - test/fixtures/google_madison_square_garden.json
71
+ - test/fixtures/google_no_locality.json
72
+ - test/fixtures/google_no_results.json
73
+ - test/fixtures/yahoo_garbage.json
74
+ - test/fixtures/yahoo_madison_square_garden.json
75
+ - test/fixtures/yahoo_no_results.json
76
+ - test/fixtures/yandex_invalid_key.json
77
+ - test/fixtures/yandex_kremlin.json
78
+ - test/fixtures/yandex_no_results.json
79
+ - test/geocoder_test.rb
80
+ - test/test_helper.rb
70
81
  has_rdoc: true
71
82
  homepage: http://www.rubygeocoder.com
72
83
  licenses: []
@@ -75,23 +86,23 @@ post_install_message:
75
86
  rdoc_options: []
76
87
 
77
88
  require_paths:
78
- - lib
89
+ - lib
79
90
  required_ruby_version: !ruby/object:Gem::Requirement
80
91
  none: false
81
92
  requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: "0"
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: "0"
85
96
  required_rubygems_version: !ruby/object:Gem::Requirement
86
97
  none: false
87
98
  requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: "0"
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: "0"
91
102
  requirements: []
92
103
 
93
104
  rubyforge_project:
94
- rubygems_version: 1.6.2
105
+ rubygems_version: 1.5.1
95
106
  signing_key:
96
107
  specification_version: 3
97
108
  summary: Complete geocoding solution for Ruby.
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.9.13
@@ -1,62 +0,0 @@
1
- module Geocoder::Store::ActiveRecord
2
- module Legacy
3
-
4
- ##
5
- # Fetch coordinates and update (save) +latitude+ and +longitude+ data.
6
- #
7
- def fetch_coordinates!
8
- warn "DEPRECATION WARNING: The 'fetch_coordinates!' method is deprecated and will be removed in geocoder v1.0. " +
9
- "Please use 'geocode' instead and then save your objects manually."
10
- do_lookup(false) do |o,rs|
11
- r = rs.first
12
- unless r.latitude.nil? or r.longitude.nil?
13
- o.send :update_attribute, self.class.geocoder_options[:latitude], r.latitude
14
- o.send :update_attribute, self.class.geocoder_options[:longitude], r.longitude
15
- end
16
- r.coordinates
17
- end
18
- end
19
-
20
- def fetch_coordinates(*args)
21
- warn "DEPRECATION WARNING: The 'fetch_coordinates' method will cease taking " +
22
- "an argument in geocoder v1.0. Please save your objects manually." if args.size > 0
23
- do_lookup(false) do |o,rs|
24
- r = rs.first
25
- unless r.latitude.nil? or r.longitude.nil?
26
- method = ((args.size > 0 && args.first) ? "update" : "write" ) + "_attribute"
27
- o.send method, self.class.geocoder_options[:latitude], r.latitude
28
- o.send method, self.class.geocoder_options[:longitude], r.longitude
29
- end
30
- r.coordinates
31
- end
32
- end
33
-
34
- ##
35
- # Fetch address and update (save) +address+ data.
36
- #
37
- def fetch_address!
38
- warn "DEPRECATION WARNING: The 'fetch_address!' method is deprecated and will be removed in geocoder v1.0. " +
39
- "Please use 'reverse_geocode' instead and then save your objects manually."
40
- do_lookup(true) do |o,rs|
41
- r = rs.first
42
- unless r.address.nil?
43
- o.send :update_attribute, self.class.geocoder_options[:fetched_address], r.address
44
- end
45
- r.address
46
- end
47
- end
48
-
49
- def fetch_address(*args)
50
- warn "DEPRECATION WARNING: The 'fetch_address' method will cease taking " +
51
- "an argument in geocoder v1.0. Please save your objects manually." if args.size > 0
52
- do_lookup(true) do |o,rs|
53
- r = rs.first
54
- unless r.latitude.nil? or r.longitude.nil?
55
- method = ((args.size > 0 && args.first) ? "update" : "write" ) + "_attribute"
56
- o.send method, self.class.geocoder_options[:fetched_address], r.address
57
- end
58
- r.address
59
- end
60
- end
61
- end
62
- end