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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5257398613d740fce304d12c6c23032fb6bd7c1d
4
- data.tar.gz: 7ffdad76a515dc827e2f24c18efdedf29f57f3b0
3
+ metadata.gz: f7e9705f49bcdce8261e7df362d94eb11beef5c6
4
+ data.tar.gz: a277a0b91a9a267339f4316a43a5da197bee89b1
5
5
  SHA512:
6
- metadata.gz: d00df6e6d32290977c4adc24e7f8e8845ffc064ffeb618bf89d35ebb5c792029ab26563d30bf6512671e12b8766f28551ce83f612d67bf869312b6a2c4ea69a1
7
- data.tar.gz: 3adc943366ed143d5f7a6450292797404c2c29e0eee5fe3ef38d064c9b2597c8be4e4e81536dcae1999674cd67e9a376e8bf08acf2218f7836bd77935c7bb417
6
+ metadata.gz: 3c1fbc6a00e52402b696cb1eb01c96176215b563cbbd452416d9297d3b164a219fc77452b02492fb8acf06ea8e851b86cb30cacbfa79fc7d5f970432b39d48b0
7
+ data.tar.gz: 4a14f0093606ac4937fcb7a848da2abacc5fcd25081d14ed60330982f66f1e41984efad43599b1fadff6f6e96b6edb6f8933f13f7a8d6e71ddfcc7a310b62b44
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -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.1 ruby lib
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.1"
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-06-23"
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 = [
@@ -40,7 +40,11 @@ module Haversine
40
40
  alias_method :to_nm, :to_nautical_miles
41
41
 
42
42
  def <=>(other)
43
- great_circle_distance <=> other.great_circle_distance
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.1
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-06-23 00:00:00.000000000 Z
12
+ date: 2016-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec