haversine 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/haversine.gemspec +3 -3
- data/lib/haversine/distance.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7e9705f49bcdce8261e7df362d94eb11beef5c6
|
4
|
+
data.tar.gz: a277a0b91a9a267339f4316a43a5da197bee89b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c1fbc6a00e52402b696cb1eb01c96176215b563cbbd452416d9297d3b164a219fc77452b02492fb8acf06ea8e851b86cb30cacbfa79fc7d5f970432b39d48b0
|
7
|
+
data.tar.gz: 4a14f0093606ac4937fcb7a848da2abacc5fcd25081d14ed60330982f66f1e41984efad43599b1fadff6f6e96b6edb6f8933f13f7a8d6e71ddfcc7a310b62b44
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/haversine.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: haversine 0.3.
|
5
|
+
# stub: haversine 0.3.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "haversine".freeze
|
9
|
-
s.version = "0.3.
|
9
|
+
s.version = "0.3.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Kristian Mandrup".freeze, "Ryan Greenberg".freeze]
|
14
|
-
s.date = "2016-
|
14
|
+
s.date = "2016-10-04"
|
15
15
|
s.description = "Calculates the haversine distance between two locations using longitude and latitude. \nThis is done using Math formulas without resorting to Active Record or SQL DB functionality".freeze
|
16
16
|
s.email = "kmandrup@gmail.com".freeze
|
17
17
|
s.extra_rdoc_files = [
|
data/lib/haversine/distance.rb
CHANGED
@@ -40,7 +40,11 @@ module Haversine
|
|
40
40
|
alias_method :to_nm, :to_nautical_miles
|
41
41
|
|
42
42
|
def <=>(other)
|
43
|
-
|
43
|
+
if other.respond_to? :great_circle_distance # it's duck if it quacks
|
44
|
+
great_circle_distance <=> other.great_circle_distance
|
45
|
+
else
|
46
|
+
return nil # spitting out nil when objects are not comparable
|
47
|
+
end
|
44
48
|
end
|
45
49
|
end
|
46
50
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haversine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kristian Mandrup
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|