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 +1 -1
- data/lib/arel/haversine.rb +2 -0
- data/lib/arel/haversine/version.rb +1 -1
- data/spec/support/shared_examples.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
data/lib/arel/haversine.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
shared_examples 'distance calculations' do
|
2
2
|
let(:google) { [37.422045, -122.084347] }
|
3
|
-
let(:haversine) { Arel::
|
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] }
|