geo-spider 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,18 +14,17 @@ module GeoSpider
14
14
  results = @element.inner_html.scan(REGEXP)
15
15
  results = results.map(&:first)
16
16
 
17
- locations = []
17
+ found_locations = []
18
18
 
19
19
  results.each do |result|
20
20
  begin
21
21
  p = geocoder.locate(result)
22
- locations << Location.new(:latitude => p.latitude, :longitude => p.longitude, :title => result)
23
- rescue Graticule::Error
22
+ found_locations << Location.new(:latitude => p.latitude, :longitude => p.longitude, :title => result)
23
+ rescue Graticule::Error => e
24
24
  next
25
25
  end
26
-
27
- return locations
28
26
  end
27
+ return found_locations
29
28
  end
30
29
 
31
30
  # You need to set a valid Yahoo API key before the UK postcode geocoding will work. Yahoo have vastly better UK postcode accuracy than the other large mapping providers, apart from perhaps Multimap.
@@ -2,7 +2,7 @@ module GeoSpider
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geo-spider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Taylor