Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bump patch

  • Loading branch information...
commit ea3364803ce2951e17801256fa9dc5fd4fe0d62f 1 parent e6f841e
@kristianmandrup authored
Showing with 6 additions and 2 deletions.
  1. +1 −1  Gemfile
  2. +1 −1  VERSION
  3. +4 −0 lib/geo_calc/extensions/string.rb
View
2  Gemfile
@@ -5,7 +5,7 @@ gem "require_all", ">= 1.2.0"
gem "sugar-high", '>= 0.6.0'
gem 'sweetloader'
-gem "geo_units", ">= 0.3.1"
+gem "geo_units", ">= 0.3.1.1"
gem 'i18n', ">= 0.5"
gem 'activesupport', '>= 3.0.1'
View
2  VERSION
@@ -1 +1 @@
-0.7.7
+0.7.7.1
View
4 lib/geo_calc/extensions/string.rb
@@ -30,6 +30,8 @@ def to_lat
s = geo_clean
raise GeoDirectionMisMatch, "Direction E and W signify longitude and thus can't be converted to latitude, was: #{self}" if s =~ /[W|E]$/
s = s.parse_dms if s.respond_to? :parse_dms
+ rescue GeoUnits::Converter::Dms::ParseError
+ ensure
s.to_f.to_lat
end
@@ -38,6 +40,8 @@ def to_lng
s = geo_clean
raise GeoDirectionMisMatch, "Direction N and S signify latitude and thus can't be converted to longitude, was: #{self}" if s =~ /[N|S]$/
s = s.parse_dms if s.respond_to? :parse_dms
+ rescue GeoUnits::Converter::Dms::ParseError
+ ensure
s.to_f.to_lng
end
end

0 comments on commit ea33648

Please sign in to comment.
Something went wrong with that request. Please try again.