Pr0d1r2-geokit 1.3.2.7 → 1.3.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  class GeokitCachedGenerator < RspecModelGenerator
2
2
 
3
3
  def initialize(runtime_args, runtime_options = {})
4
- runtime_args = ['CachedLocation', 'address:string', 'provider:string', 'lng:float', 'lat:float']
4
+ runtime_args = ['CachedLocation', 'address:string', 'provider:string', 'lng:float', 'lat:float', 'city:string']
5
5
  super
6
6
  end
7
7
 
@@ -22,7 +22,7 @@ module Geokit
22
22
 
23
23
  def geocode_address_cached
24
24
  @geo = multi_geocoder.geocode(complete_address)
25
- self.lat, self.lng, self.provider = @geo.lat, @geo.lng, @geo.provider if @geo.success
25
+ self.lat, self.lng, self.provider, self.city = @geo.lat, @geo.lng, @geo.provider, @geo.city if @geo.success
26
26
  end
27
27
 
28
28
  def cache_locations?
@@ -34,9 +34,9 @@ module Geokit
34
34
  end
35
35
 
36
36
  def cache_location!
37
- cached_location.cache!(:lat => lat, :lng => lng, :provider => provider) if cache_locations?
37
+ cached_location.cache!(:lat => lat, :lng => lng, :provider => provider, :city => city) if cache_locations?
38
38
  end
39
39
 
40
40
  end
41
41
  end
42
- end
42
+ end
@@ -19,7 +19,7 @@ module Geokit
19
19
 
20
20
  def update!
21
21
  if !by_google? && geo.success
22
- self.lat, self.lng, self.provider = geo.lat, geo.lng, geo.provider
22
+ self.lat, self.lng, self.provider, self.city = geo.lat, geo.lng, geo.provider, geo.city
23
23
  save if changed?
24
24
  end
25
25
  end
@@ -35,7 +35,7 @@ module Geokit
35
35
 
36
36
  def fake_geoloc
37
37
  geoloc = Geokit::GeoLoc.new
38
- geoloc.lat, geoloc.lng, geoloc.provider, geoloc.success = lat, lng, provider, success?
38
+ geoloc.lat, geoloc.lng, geoloc.provider, geoloc.city, geoloc.success = lat, lng, provider, city, success?
39
39
  geoloc
40
40
  end
41
41
 
@@ -56,7 +56,7 @@ module Geokit
56
56
  end
57
57
 
58
58
  def changed?
59
- lat_changed? || lng_changed? || changed_to_google?
59
+ lat_changed? || lng_changed? || changed_to_google? || city_changed?
60
60
  end
61
61
 
62
62
  def geocoding_occured?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Pr0d1r2-geokit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2.7
4
+ version: 1.3.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andre Lewis and Bill Eisenhauer and Pr0d1r2 (Marcin Nowicki)
@@ -9,11 +9,11 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-11 00:00:00 -07:00
12
+ date: 2009-11-30 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
- description: Geokit Gem
16
+ description: Geokit Gem modified to have support for caching
17
17
  email:
18
18
  - andre@earthcode.com / bill_eisenhauer@yahoo.com / pr0d1r2@gmail.com
19
19
  executables: []
@@ -48,6 +48,8 @@ files:
48
48
  - lib/geokit/geocoders/cached_multi_geocoder.rb
49
49
  has_rdoc: true
50
50
  homepage: http://geokit.rubyforge.org
51
+ licenses: []
52
+
51
53
  post_install_message:
52
54
  rdoc_options:
53
55
  - --main
@@ -69,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
71
  requirements: []
70
72
 
71
73
  rubyforge_project: geokit
72
- rubygems_version: 1.2.0
74
+ rubygems_version: 1.3.5
73
75
  signing_key:
74
76
  specification_version: 2
75
77
  summary: none