arel-haversine 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -24,7 +24,7 @@ require 'arel/haversine'
24
24
  class Location < ActiveRecord::Base
25
25
  def self.in_order_of_proximity_to(latitude, longitude)
26
26
  order(
27
- Arel::Nodes::Haversine.new(
27
+ Arel::Haversine.new(
28
28
  arel_table[:latitude],
29
29
  arel_table[:longitude],
30
30
  latitude,
@@ -1,3 +1,5 @@
1
1
  require 'arel'
2
2
  require 'arel/haversine/version'
3
3
  require 'arel/nodes/haversine'
4
+
5
+ Arel::Haversine = Arel::Nodes::Haversine
@@ -1,5 +1,5 @@
1
1
  module Arel
2
2
  module Haversine
3
- VERSION = '0.0.2'
3
+ VERSION = '0.1.0'
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
1
  shared_examples 'distance calculations' do
2
2
  let(:google) { [37.422045, -122.084347] }
3
- let(:haversine) { Arel::Nodes::Haversine.new(*google, *san_francisco, unit: unit) }
3
+ let(:haversine) { Arel::Haversine.new(*google, *san_francisco, unit: unit) }
4
4
  let(:query) { project(haversine.as('distance')).to_sql }
5
5
  let(:result) { parse_results(execute(query)) }
6
6
  let(:san_francisco) { [37.77493, -122.419416] }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arel-haversine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: