geocoder 1.0.3 → 1.0.4
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.
- data/CHANGELOG.rdoc +6 -1
- data/lib/geocoder/cache.rb +7 -3
- data/lib/geocoder/version.rb +1 -1
- data/lib/tasks/geocoder.rake +4 -7
- metadata +2 -2
data/CHANGELOG.rdoc
CHANGED
@@ -2,11 +2,16 @@
|
|
2
2
|
|
3
3
|
Per-release changes to Geocoder.
|
4
4
|
|
5
|
+
== 1.0.4 (2011 Sep 18)
|
6
|
+
|
7
|
+
* Remove klass method from rake task, which could conflict with app methods (thanks github.com/mguterl).
|
8
|
+
|
5
9
|
== 1.0.3 (2011 Sep 17)
|
6
10
|
|
7
|
-
*
|
11
|
+
* Add support for Google Premier geocoding service (thanks github.com/steveh).
|
8
12
|
* Update Google API URL (thanks github.com/soorajb).
|
9
13
|
* Allow rescue from timeout with FreeGeoIP (thanks github.com/lukeledet).
|
14
|
+
* Fix: rake assets:precompile (Rails 3.1) not working in some situations.
|
10
15
|
* Fix: stop double-adjusting units when using kilometers (thanks github.com/hairyheron).
|
11
16
|
|
12
17
|
== 1.0.2 (2011 June 25)
|
data/lib/geocoder/cache.rb
CHANGED
@@ -21,14 +21,14 @@ module Geocoder
|
|
21
21
|
end
|
22
22
|
|
23
23
|
##
|
24
|
-
#
|
25
|
-
# or pass <tt>:all</tt> to
|
24
|
+
# Delete cache entry for given URL,
|
25
|
+
# or pass <tt>:all</tt> to clear all URLs.
|
26
26
|
#
|
27
27
|
def expire(url)
|
28
28
|
if url == :all
|
29
29
|
urls.each{ |u| expire(u) }
|
30
30
|
else
|
31
|
-
|
31
|
+
expire_single_url(url)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -66,5 +66,9 @@ module Geocoder
|
|
66
66
|
def interpret(value)
|
67
67
|
value == "" ? nil : value
|
68
68
|
end
|
69
|
+
|
70
|
+
def expire_single_url(url)
|
71
|
+
store.del(key_for(url))
|
72
|
+
end
|
69
73
|
end
|
70
74
|
end
|
data/lib/geocoder/version.rb
CHANGED
data/lib/tasks/geocoder.rake
CHANGED
@@ -1,13 +1,10 @@
|
|
1
|
-
def klass
|
2
|
-
class_name = ENV['CLASS'] || ENV['class']
|
3
|
-
raise "Please specify a CLASS (model)" unless class_name
|
4
|
-
Object.const_get(class_name)
|
5
|
-
end
|
6
|
-
|
7
1
|
namespace :geocode do
|
8
|
-
|
9
2
|
desc "Geocode all objects without coordinates."
|
10
3
|
task :all => :environment do
|
4
|
+
class_name = ENV['CLASS'] || ENV['class']
|
5
|
+
raise "Please specify a CLASS (model)" unless class_name
|
6
|
+
klass = Object.const_get(class_name)
|
7
|
+
|
11
8
|
klass.not_geocoded.each do |obj|
|
12
9
|
obj.geocode; obj.save
|
13
10
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: geocoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Alex Reisner
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-09-
|
13
|
+
date: 2011-09-18 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|