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 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
- * Fix: rake assets:precompile (Rails 3.1) not working in some situations.
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)
@@ -21,14 +21,14 @@ module Geocoder
21
21
  end
22
22
 
23
23
  ##
24
- # Expire cache entry for given URL,
25
- # or pass <tt>:all</tt> to expire everything.
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
- self[url] = nil
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
@@ -1,3 +1,3 @@
1
1
  module Geocoder
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -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.3
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-17 00:00:00 -04:00
13
+ date: 2011-09-18 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies: []
16
16