geo_calc 0.7.7 → 0.7.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/geo_calc.gemspec +4 -4
- data/lib/geo_calc/extensions/string.rb +4 -0
- metadata +4 -4
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.7
|
1
|
+
0.7.7.1
|
data/geo_calc.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "geo_calc"
|
8
|
-
s.version = "0.7.7"
|
8
|
+
s.version = "0.7.7.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kristian Mandrup"]
|
@@ -66,7 +66,7 @@ Gem::Specification.new do |s|
|
|
66
66
|
s.add_runtime_dependency(%q<require_all>, [">= 1.2.0"])
|
67
67
|
s.add_runtime_dependency(%q<sugar-high>, [">= 0.6.0"])
|
68
68
|
s.add_runtime_dependency(%q<sweetloader>, [">= 0"])
|
69
|
-
s.add_runtime_dependency(%q<geo_units>, [">= 0.3.1"])
|
69
|
+
s.add_runtime_dependency(%q<geo_units>, [">= 0.3.1.1"])
|
70
70
|
s.add_runtime_dependency(%q<i18n>, [">= 0.5"])
|
71
71
|
s.add_runtime_dependency(%q<activesupport>, [">= 3.0.1"])
|
72
72
|
s.add_development_dependency(%q<rspec>, [">= 2.5.0"])
|
@@ -77,7 +77,7 @@ Gem::Specification.new do |s|
|
|
77
77
|
s.add_dependency(%q<require_all>, [">= 1.2.0"])
|
78
78
|
s.add_dependency(%q<sugar-high>, [">= 0.6.0"])
|
79
79
|
s.add_dependency(%q<sweetloader>, [">= 0"])
|
80
|
-
s.add_dependency(%q<geo_units>, [">= 0.3.1"])
|
80
|
+
s.add_dependency(%q<geo_units>, [">= 0.3.1.1"])
|
81
81
|
s.add_dependency(%q<i18n>, [">= 0.5"])
|
82
82
|
s.add_dependency(%q<activesupport>, [">= 3.0.1"])
|
83
83
|
s.add_dependency(%q<rspec>, [">= 2.5.0"])
|
@@ -89,7 +89,7 @@ Gem::Specification.new do |s|
|
|
89
89
|
s.add_dependency(%q<require_all>, [">= 1.2.0"])
|
90
90
|
s.add_dependency(%q<sugar-high>, [">= 0.6.0"])
|
91
91
|
s.add_dependency(%q<sweetloader>, [">= 0"])
|
92
|
-
s.add_dependency(%q<geo_units>, [">= 0.3.1"])
|
92
|
+
s.add_dependency(%q<geo_units>, [">= 0.3.1.1"])
|
93
93
|
s.add_dependency(%q<i18n>, [">= 0.5"])
|
94
94
|
s.add_dependency(%q<activesupport>, [">= 3.0.1"])
|
95
95
|
s.add_dependency(%q<rspec>, [">= 2.5.0"])
|
@@ -30,6 +30,8 @@ class String
|
|
30
30
|
s = geo_clean
|
31
31
|
raise GeoDirectionMisMatch, "Direction E and W signify longitude and thus can't be converted to latitude, was: #{self}" if s =~ /[W|E]$/
|
32
32
|
s = s.parse_dms if s.respond_to? :parse_dms
|
33
|
+
rescue GeoUnits::Converter::Dms::ParseError
|
34
|
+
ensure
|
33
35
|
s.to_f.to_lat
|
34
36
|
end
|
35
37
|
|
@@ -38,6 +40,8 @@ class String
|
|
38
40
|
s = geo_clean
|
39
41
|
raise GeoDirectionMisMatch, "Direction N and S signify latitude and thus can't be converted to longitude, was: #{self}" if s =~ /[N|S]$/
|
40
42
|
s = s.parse_dms if s.respond_to? :parse_dms
|
43
|
+
rescue GeoUnits::Converter::Dms::ParseError
|
44
|
+
ensure
|
41
45
|
s.to_f.to_lng
|
42
46
|
end
|
43
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geo_calc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.7
|
4
|
+
version: 0.7.7.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - ! '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.3.1
|
69
|
+
version: 0.3.1.1
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.3.1
|
77
|
+
version: 0.3.1.1
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: i18n
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -229,7 +229,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
229
229
|
version: '0'
|
230
230
|
segments:
|
231
231
|
- 0
|
232
|
-
hash:
|
232
|
+
hash: 1583934071997688869
|
233
233
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
234
234
|
none: false
|
235
235
|
requirements:
|