activerecord-postgres-earthdistance 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +21 -0
- data/.rspec +2 -0
- data/.travis.yml +7 -0
- data/Gemfile +4 -10
- data/Gemfile.lock +92 -69
- data/README.md +124 -0
- data/Rakefile +12 -40
- data/activerecord-postgres-earthdistance.gemspec +24 -117
- data/lib/activerecord-postgres-earthdistance.rb +5 -46
- data/lib/activerecord-postgres-earthdistance/activerecord.rb +9 -10
- data/lib/activerecord-postgres-earthdistance/acts_as_geolocated.rb +24 -0
- data/lib/activerecord-postgres-earthdistance/railties.rb +40 -0
- data/lib/templates/setup_earthdistance.rb +4 -427
- data/spec/act_as_geolocated_spec.rb +29 -0
- data/{test/app/app/models → spec/fixtures}/place.rb +0 -0
- data/spec/spec_helper.rb +46 -0
- metadata +67 -109
- data/README.rdoc +0 -17
- data/VERSION +0 -1
- data/test/app/.gitignore +0 -4
- data/test/app/Gemfile +0 -5
- data/test/app/Gemfile.lock +0 -83
- data/test/app/README +0 -256
- data/test/app/Rakefile +0 -7
- data/test/app/app/controllers/application_controller.rb +0 -3
- data/test/app/app/helpers/application_helper.rb +0 -2
- data/test/app/app/views/layouts/application.html.erb +0 -14
- data/test/app/config.ru +0 -4
- data/test/app/config/application.rb +0 -42
- data/test/app/config/boot.rb +0 -13
- data/test/app/config/database.yml +0 -25
- data/test/app/config/environment.rb +0 -5
- data/test/app/config/environments/development.rb +0 -26
- data/test/app/config/environments/production.rb +0 -49
- data/test/app/config/environments/test.rb +0 -35
- data/test/app/config/initializers/backtrace_silencers.rb +0 -7
- data/test/app/config/initializers/inflections.rb +0 -10
- data/test/app/config/initializers/mime_types.rb +0 -5
- data/test/app/config/initializers/secret_token.rb +0 -7
- data/test/app/config/initializers/session_store.rb +0 -8
- data/test/app/config/initializers/use_sql_schema.rb +0 -3
- data/test/app/config/locales/en.yml +0 -5
- data/test/app/config/routes.rb +0 -58
- data/test/app/db/development_structure.sql +0 -807
- data/test/app/db/migrate/20110225205046_setup_earthdistance.rb +0 -434
- data/test/app/db/migrate/20110225205131_create_places.rb +0 -15
- data/test/app/db/schema.rb +0 -24
- data/test/app/db/seeds.rb +0 -7
- data/test/app/doc/README_FOR_APP +0 -2
- data/test/app/lib/tasks/.gitkeep +0 -0
- data/test/app/public/404.html +0 -26
- data/test/app/public/422.html +0 -26
- data/test/app/public/500.html +0 -26
- data/test/app/public/favicon.ico +0 -0
- data/test/app/public/images/rails.png +0 -0
- data/test/app/public/index.html +0 -239
- data/test/app/public/javascripts/application.js +0 -2
- data/test/app/public/javascripts/controls.js +0 -965
- data/test/app/public/javascripts/dragdrop.js +0 -974
- data/test/app/public/javascripts/effects.js +0 -1123
- data/test/app/public/javascripts/prototype.js +0 -6001
- data/test/app/public/javascripts/rails.js +0 -175
- data/test/app/public/robots.txt +0 -5
- data/test/app/public/stylesheets/.gitkeep +0 -0
- data/test/app/script/rails +0 -6
- data/test/app/test/performance/browsing_test.rb +0 -9
- data/test/app/test/test_helper.rb +0 -13
- data/test/app/test/unit/place_test.rb +0 -27
- data/test/app/vendor/plugins/.gitkeep +0 -0
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -1,11 +1,5 @@
|
|
1
|
-
source
|
1
|
+
source "http://rubygems.org"
|
2
2
|
|
3
|
-
gem
|
4
|
-
|
5
|
-
|
6
|
-
group :development do
|
7
|
-
gem "shoulda", ">= 0"
|
8
|
-
gem "bundler", "~> 1.0.0"
|
9
|
-
gem "jeweler", "~> 1.6.2"
|
10
|
-
gem "rcov", ">= 0"
|
11
|
-
end
|
3
|
+
# specify gem dependencies in activerecord-postgres-earthdistance.gemspec
|
4
|
+
# except the platform-specific dependencies below
|
5
|
+
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,84 +1,107 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
activerecord-postgres-earthdistance (0.2.0)
|
5
|
+
pg
|
6
|
+
rails (>= 3.1)
|
7
|
+
rake
|
8
|
+
|
1
9
|
GEM
|
2
10
|
remote: http://rubygems.org/
|
3
11
|
specs:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
rack (~> 1.2
|
15
|
-
rack-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
arel (
|
32
|
-
builder (
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
i18n (0.
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
rake
|
41
|
-
mail (2.2.19)
|
42
|
-
activesupport (>= 2.3.6)
|
12
|
+
actionmailer (3.2.11)
|
13
|
+
actionpack (= 3.2.11)
|
14
|
+
mail (~> 2.4.4)
|
15
|
+
actionpack (3.2.11)
|
16
|
+
activemodel (= 3.2.11)
|
17
|
+
activesupport (= 3.2.11)
|
18
|
+
builder (~> 3.0.0)
|
19
|
+
erubis (~> 2.7.0)
|
20
|
+
journey (~> 1.0.4)
|
21
|
+
rack (~> 1.4.0)
|
22
|
+
rack-cache (~> 1.2)
|
23
|
+
rack-test (~> 0.6.1)
|
24
|
+
sprockets (~> 2.2.1)
|
25
|
+
activemodel (3.2.11)
|
26
|
+
activesupport (= 3.2.11)
|
27
|
+
builder (~> 3.0.0)
|
28
|
+
activerecord (3.2.11)
|
29
|
+
activemodel (= 3.2.11)
|
30
|
+
activesupport (= 3.2.11)
|
31
|
+
arel (~> 3.0.2)
|
32
|
+
tzinfo (~> 0.3.29)
|
33
|
+
activeresource (3.2.11)
|
34
|
+
activemodel (= 3.2.11)
|
35
|
+
activesupport (= 3.2.11)
|
36
|
+
activesupport (3.2.11)
|
37
|
+
i18n (~> 0.6)
|
38
|
+
multi_json (~> 1.0)
|
39
|
+
arel (3.0.2)
|
40
|
+
builder (3.0.4)
|
41
|
+
diff-lcs (1.1.3)
|
42
|
+
erubis (2.7.0)
|
43
|
+
hike (1.2.1)
|
44
|
+
i18n (0.6.1)
|
45
|
+
journey (1.0.4)
|
46
|
+
json (1.7.6)
|
47
|
+
mail (2.4.4)
|
43
48
|
i18n (>= 0.4.0)
|
44
49
|
mime-types (~> 1.16)
|
45
50
|
treetop (~> 1.4.8)
|
46
|
-
mime-types (1.
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
rack
|
51
|
-
|
52
|
-
|
51
|
+
mime-types (1.20.1)
|
52
|
+
multi_json (1.5.0)
|
53
|
+
pg (0.14.1)
|
54
|
+
polyglot (0.3.3)
|
55
|
+
rack (1.4.4)
|
56
|
+
rack-cache (1.2)
|
57
|
+
rack (>= 0.4)
|
58
|
+
rack-ssl (1.3.3)
|
59
|
+
rack
|
60
|
+
rack-test (0.6.2)
|
53
61
|
rack (>= 1.0)
|
54
|
-
rails (3.
|
55
|
-
actionmailer (= 3.
|
56
|
-
actionpack (= 3.
|
57
|
-
activerecord (= 3.
|
58
|
-
activeresource (= 3.
|
59
|
-
activesupport (= 3.
|
62
|
+
rails (3.2.11)
|
63
|
+
actionmailer (= 3.2.11)
|
64
|
+
actionpack (= 3.2.11)
|
65
|
+
activerecord (= 3.2.11)
|
66
|
+
activeresource (= 3.2.11)
|
67
|
+
activesupport (= 3.2.11)
|
60
68
|
bundler (~> 1.0)
|
61
|
-
railties (= 3.
|
62
|
-
railties (3.
|
63
|
-
actionpack (= 3.
|
64
|
-
activesupport (= 3.
|
69
|
+
railties (= 3.2.11)
|
70
|
+
railties (3.2.11)
|
71
|
+
actionpack (= 3.2.11)
|
72
|
+
activesupport (= 3.2.11)
|
73
|
+
rack-ssl (~> 1.3.2)
|
65
74
|
rake (>= 0.8.7)
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
75
|
+
rdoc (~> 3.4)
|
76
|
+
thor (>= 0.14.6, < 2.0)
|
77
|
+
rake (10.0.3)
|
78
|
+
rdoc (3.12)
|
79
|
+
json (~> 1.4)
|
80
|
+
rspec (2.12.0)
|
81
|
+
rspec-core (~> 2.12.0)
|
82
|
+
rspec-expectations (~> 2.12.0)
|
83
|
+
rspec-mocks (~> 2.12.0)
|
84
|
+
rspec-core (2.12.2)
|
85
|
+
rspec-expectations (2.12.1)
|
86
|
+
diff-lcs (~> 1.1.3)
|
87
|
+
rspec-mocks (2.12.2)
|
88
|
+
sprockets (2.2.2)
|
89
|
+
hike (~> 1.2)
|
90
|
+
multi_json (~> 1.0)
|
91
|
+
rack (~> 1.0)
|
92
|
+
tilt (~> 1.1, != 1.3.0)
|
93
|
+
thor (0.17.0)
|
94
|
+
tilt (1.3.3)
|
95
|
+
treetop (1.4.12)
|
96
|
+
polyglot
|
72
97
|
polyglot (>= 0.3.1)
|
73
|
-
tzinfo (0.3.
|
98
|
+
tzinfo (0.3.35)
|
74
99
|
|
75
100
|
PLATFORMS
|
76
101
|
ruby
|
77
102
|
|
78
103
|
DEPENDENCIES
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
rcov
|
84
|
-
shoulda
|
104
|
+
activerecord-postgres-earthdistance!
|
105
|
+
bundler
|
106
|
+
rdoc
|
107
|
+
rspec (~> 2.11)
|
data/README.md
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
#ActiveRecord + PostgreSQL Earthdistance [](http://travis-ci.org/softa/activerecord-postgres-earthdistance)
|
2
|
+
|
3
|
+
Check distances with latitude and longitude using PostgreSQL special indexes.
|
4
|
+
This gem enables your model to query the database using the earthdistance extension. This should be much faster than using trigonometry functions over standart indexs.
|
5
|
+
|
6
|
+
##Requirements
|
7
|
+
|
8
|
+
Postgresql 9.1+ with contrib and Rails 3.1+
|
9
|
+
On Ubuntu, this is easy: `sudo apt-get install postgresql-contrib-9.1`
|
10
|
+
|
11
|
+
On Mac you have a couple of options:
|
12
|
+
|
13
|
+
* [the binary package kindly provided by EnterpriseDB](http://www.enterprisedb.com/products-services-training/pgdownload#osx)
|
14
|
+
* [Homebrew’s](https://github.com/mxcl/homebrew) Postgres installation also includes the contrib packages: `brew install postgres`
|
15
|
+
* [Postgres.app](http://postgresapp.com/)
|
16
|
+
|
17
|
+
##Install
|
18
|
+
|
19
|
+
|
20
|
+
Earthdistance is a PostgreSQL contrib module, [check it out first](http://www.postgresql.org/docs/9.2/static/earthdistance.html).
|
21
|
+
|
22
|
+
Then, just add this to your Gemfile:
|
23
|
+
|
24
|
+
`gem 'activerecord-postgres-earthdistance'`
|
25
|
+
|
26
|
+
And run your bundler:
|
27
|
+
|
28
|
+
`bundle install`
|
29
|
+
|
30
|
+
Now you need to create a migration that adds earthdistance support for your
|
31
|
+
PostgreSQL database:
|
32
|
+
|
33
|
+
`rails g earthdistance:setup`
|
34
|
+
|
35
|
+
Run it:
|
36
|
+
|
37
|
+
`rake db:migrate`
|
38
|
+
|
39
|
+
Now let's add some gist indexes to make queries ultra-fast.
|
40
|
+
For the model Place we could create an index over the lat and lng fields:
|
41
|
+
|
42
|
+
`rails g migration add_index_to_places`
|
43
|
+
|
44
|
+
Edit the created migration:
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
class AddIndexToPlaces < ActiveRecord::Migration
|
48
|
+
def change
|
49
|
+
add_earthdistance_index :places
|
50
|
+
end
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
54
|
+
This will create the index with a SQL like this:
|
55
|
+
```sql
|
56
|
+
CREATE INDEX places_earthdistance_ix ON places USING GIST (ll_to_earth(lat, lng));
|
57
|
+
```
|
58
|
+
|
59
|
+
##Usage
|
60
|
+
|
61
|
+
This gem only provides a custom serialization coder.
|
62
|
+
If you want to use it just put in your Gemfile:
|
63
|
+
|
64
|
+
gem 'activerecord-postgres-earthdistance'
|
65
|
+
|
66
|
+
Now add a line (for each earthdistance column) on the model you have your earthdistance columns.
|
67
|
+
Assuming a model called **Person**, with a **data** field on it, the
|
68
|
+
code should look like:
|
69
|
+
|
70
|
+
```ruby
|
71
|
+
class Place < ActiveRecord::Base
|
72
|
+
acts_as_geolocated
|
73
|
+
end
|
74
|
+
```
|
75
|
+
|
76
|
+
This way, you will automatically look for columns with names such as lat/latitude and lng/longitude.
|
77
|
+
But you can use alternative names passing them as:
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
class Place < ActiveRecord::Base
|
81
|
+
acts_as_geolocated lat: 'latitude_column_name', lng: 'longitude_column_name'
|
82
|
+
end
|
83
|
+
```
|
84
|
+
|
85
|
+
###Querying the database
|
86
|
+
|
87
|
+
To query for all places within a given radius of 100 meters from the origin 30,50 just use:
|
88
|
+
```ruby
|
89
|
+
Place.within_radius(500, 30, 50).all
|
90
|
+
```
|
91
|
+
|
92
|
+
##Test Database
|
93
|
+
|
94
|
+
To have earthdistance enabled when you load your database schema (as happens in rake db:test:prepare), you
|
95
|
+
have two options.
|
96
|
+
|
97
|
+
The first option is creating a template database with earthdistance installed and set the template option
|
98
|
+
in database.yml to that database.
|
99
|
+
|
100
|
+
The second option is to uncomment or add the following line in config/application.rb
|
101
|
+
|
102
|
+
config.active_record.schema_format = :sql
|
103
|
+
|
104
|
+
This will change your schema dumps from Ruby to SQL. If you're
|
105
|
+
unsure about the implications of this change, we suggest reading this
|
106
|
+
[Rails Guide](http://guides.rubyonrails.org/migrations.html#schema-dumping-and-you).
|
107
|
+
|
108
|
+
##Help
|
109
|
+
|
110
|
+
You can use issues in github for that. Or else you can reach us at
|
111
|
+
twitter: [@dbiazus](https://twitter.com/#!/dbiazus)
|
112
|
+
|
113
|
+
##Note on Patches/Pull Requests
|
114
|
+
|
115
|
+
|
116
|
+
* Fork the project.
|
117
|
+
* Make your feature addition or bug fix.
|
118
|
+
* Add tests for it. This is important so I don’t break it in a future version unintentionally.
|
119
|
+
* Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
120
|
+
* Send me a pull request. Bonus points for topic branches.
|
121
|
+
|
122
|
+
##Copyright
|
123
|
+
|
124
|
+
Copyright © 2010 Diogo Biazus. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -1,7 +1,12 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.unshift File.expand_path("../lib", __FILE__)
|
3
|
+
require 'bundler/gem_tasks'
|
3
4
|
require 'rubygems'
|
4
|
-
require '
|
5
|
+
require 'rspec/core/rake_task'
|
6
|
+
require 'rdoc/task'
|
7
|
+
|
8
|
+
task :default => :spec
|
9
|
+
|
5
10
|
begin
|
6
11
|
Bundler.setup(:default, :development)
|
7
12
|
rescue Bundler::BundlerError => e
|
@@ -9,47 +14,14 @@ rescue Bundler::BundlerError => e
|
|
9
14
|
$stderr.puts "Run `bundle install` to install missing gems"
|
10
15
|
exit e.status_code
|
11
16
|
end
|
12
|
-
require 'rake'
|
13
17
|
|
14
|
-
|
15
|
-
Jeweler::Tasks.new do |gem|
|
16
|
-
gem.name = "activerecord-postgres-earthdistance"
|
17
|
-
gem.license = "MIT"
|
18
|
-
gem.name = "activerecord-postgres-earthdistance"
|
19
|
-
gem.summary = %Q{Now you can filter records within a radius}
|
20
|
-
gem.description = %Q{I'll write it tomorrow}
|
21
|
-
gem.email = "diogob@gmail.com"
|
22
|
-
gem.homepage = "http://github.com/softa/activerecord-postgres-earthdistance"
|
23
|
-
gem.authors = ["Juan Maiz", "Diogo Biazus"]
|
24
|
-
gem.add_dependency "pg"
|
25
|
-
gem.add_dependency "rails"
|
26
|
-
# dependencies defined in Gemfile
|
27
|
-
end
|
28
|
-
Jeweler::RubygemsDotOrgTasks.new
|
29
|
-
|
30
|
-
require 'rake/testtask'
|
31
|
-
Rake::TestTask.new(:test) do |test|
|
32
|
-
test.libs << 'lib' << 'test'
|
33
|
-
test.pattern = 'test/**/test_*.rb'
|
34
|
-
test.verbose = true
|
35
|
-
end
|
18
|
+
RSpec::Core::RakeTask.new(:spec)
|
36
19
|
|
37
|
-
|
38
|
-
Rcov::RcovTask.new do |test|
|
39
|
-
test.libs << 'test'
|
40
|
-
test.pattern = 'test/**/test_*.rb'
|
41
|
-
test.verbose = true
|
42
|
-
test.rcov_opts << '--exclude "gems/*"'
|
43
|
-
end
|
44
|
-
|
45
|
-
task :default => :test
|
46
|
-
|
47
|
-
require 'rake/rdoctask'
|
48
|
-
Rake::RDocTask.new do |rdoc|
|
20
|
+
RDoc::Task.new do |rdoc|
|
49
21
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
50
|
-
|
51
22
|
rdoc.rdoc_dir = 'rdoc'
|
52
|
-
rdoc.title = "activerecord-postgres-
|
23
|
+
rdoc.title = "activerecord-postgres-hstore #{version}"
|
53
24
|
rdoc.rdoc_files.include('README*')
|
54
25
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
55
26
|
end
|
27
|
+
|
@@ -1,124 +1,31 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib/', __FILE__)
|
3
|
+
$:.unshift lib unless $:.include?(lib)
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.
|
6
|
+
s.name = "activerecord-postgres-earthdistance"
|
7
|
+
s.version = "0.2.0"
|
9
8
|
|
10
|
-
s.
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
"Gemfile",
|
22
|
-
"Gemfile.lock",
|
23
|
-
"LICENSE",
|
24
|
-
"README.rdoc",
|
25
|
-
"Rakefile",
|
26
|
-
"VERSION",
|
27
|
-
"activerecord-postgres-earthdistance.gemspec",
|
28
|
-
"lib/activerecord-postgres-earthdistance.rb",
|
29
|
-
"lib/activerecord-postgres-earthdistance/activerecord.rb",
|
30
|
-
"lib/templates/cube.sql",
|
31
|
-
"lib/templates/earthdistance.sql",
|
32
|
-
"lib/templates/setup_earthdistance.rb",
|
33
|
-
"test/app/.gitignore",
|
34
|
-
"test/app/Gemfile",
|
35
|
-
"test/app/Gemfile.lock",
|
36
|
-
"test/app/README",
|
37
|
-
"test/app/Rakefile",
|
38
|
-
"test/app/app/controllers/application_controller.rb",
|
39
|
-
"test/app/app/helpers/application_helper.rb",
|
40
|
-
"test/app/app/models/place.rb",
|
41
|
-
"test/app/app/views/layouts/application.html.erb",
|
42
|
-
"test/app/config.ru",
|
43
|
-
"test/app/config/application.rb",
|
44
|
-
"test/app/config/boot.rb",
|
45
|
-
"test/app/config/database.yml",
|
46
|
-
"test/app/config/environment.rb",
|
47
|
-
"test/app/config/environments/development.rb",
|
48
|
-
"test/app/config/environments/production.rb",
|
49
|
-
"test/app/config/environments/test.rb",
|
50
|
-
"test/app/config/initializers/backtrace_silencers.rb",
|
51
|
-
"test/app/config/initializers/inflections.rb",
|
52
|
-
"test/app/config/initializers/mime_types.rb",
|
53
|
-
"test/app/config/initializers/secret_token.rb",
|
54
|
-
"test/app/config/initializers/session_store.rb",
|
55
|
-
"test/app/config/initializers/use_sql_schema.rb",
|
56
|
-
"test/app/config/locales/en.yml",
|
57
|
-
"test/app/config/routes.rb",
|
58
|
-
"test/app/db/development_structure.sql",
|
59
|
-
"test/app/db/migrate/20110225205046_setup_earthdistance.rb",
|
60
|
-
"test/app/db/migrate/20110225205131_create_places.rb",
|
61
|
-
"test/app/db/schema.rb",
|
62
|
-
"test/app/db/seeds.rb",
|
63
|
-
"test/app/doc/README_FOR_APP",
|
64
|
-
"test/app/lib/tasks/.gitkeep",
|
65
|
-
"test/app/public/404.html",
|
66
|
-
"test/app/public/422.html",
|
67
|
-
"test/app/public/500.html",
|
68
|
-
"test/app/public/favicon.ico",
|
69
|
-
"test/app/public/images/rails.png",
|
70
|
-
"test/app/public/index.html",
|
71
|
-
"test/app/public/javascripts/application.js",
|
72
|
-
"test/app/public/javascripts/controls.js",
|
73
|
-
"test/app/public/javascripts/dragdrop.js",
|
74
|
-
"test/app/public/javascripts/effects.js",
|
75
|
-
"test/app/public/javascripts/prototype.js",
|
76
|
-
"test/app/public/javascripts/rails.js",
|
77
|
-
"test/app/public/robots.txt",
|
78
|
-
"test/app/public/stylesheets/.gitkeep",
|
79
|
-
"test/app/script/rails",
|
80
|
-
"test/app/test/performance/browsing_test.rb",
|
81
|
-
"test/app/test/test_helper.rb",
|
82
|
-
"test/app/test/unit/place_test.rb",
|
83
|
-
"test/app/vendor/plugins/.gitkeep"
|
84
|
-
]
|
85
|
-
s.homepage = %q{http://github.com/softa/activerecord-postgres-earthdistance}
|
86
|
-
s.licenses = ["MIT"]
|
87
|
-
s.require_paths = ["lib"]
|
88
|
-
s.rubygems_version = %q{1.6.2}
|
89
|
-
s.summary = %q{Now you can filter records within a radius}
|
9
|
+
s.platform = Gem::Platform::RUBY
|
10
|
+
s.license = "MIT"
|
11
|
+
s.authors = ["Diogo Biazus"]
|
12
|
+
s.email = "diogo@biazus.me"
|
13
|
+
s.homepage = "http://github.com/diogob/activerecord-postgres-earthdistance"
|
14
|
+
s.summary = "Check distances with latitude and longitude using PostgreSQL special indexes"
|
15
|
+
s.description = "This gem enables your model to query the database using the earthdistance extension. This should be much faster than using trigonometry functions over standart indexs."
|
16
|
+
s.required_ruby_version = ">= 1.8.7"
|
17
|
+
s.required_rubygems_version = ">= 1.3.6"
|
90
18
|
|
91
|
-
|
92
|
-
|
19
|
+
s.add_dependency "rails", ">= 3.1"
|
20
|
+
s.add_dependency "rake"
|
21
|
+
s.add_dependency "pg"
|
22
|
+
s.add_development_dependency "bundler"
|
23
|
+
s.add_development_dependency "rdoc"
|
24
|
+
s.add_development_dependency "rspec", "~> 2.11"
|
93
25
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.6.2"])
|
100
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
101
|
-
s.add_runtime_dependency(%q<pg>, [">= 0"])
|
102
|
-
s.add_runtime_dependency(%q<rails>, [">= 0"])
|
103
|
-
else
|
104
|
-
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
105
|
-
s.add_dependency(%q<pg>, [">= 0.11"])
|
106
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
107
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
108
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
109
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
110
|
-
s.add_dependency(%q<pg>, [">= 0"])
|
111
|
-
s.add_dependency(%q<rails>, [">= 0"])
|
112
|
-
end
|
113
|
-
else
|
114
|
-
s.add_dependency(%q<rails>, [">= 3.0.0"])
|
115
|
-
s.add_dependency(%q<pg>, [">= 0.11"])
|
116
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
117
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
118
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
119
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
120
|
-
s.add_dependency(%q<pg>, [">= 0"])
|
121
|
-
s.add_dependency(%q<rails>, [">= 0"])
|
122
|
-
end
|
26
|
+
git_files = `git ls-files`.split("\n") rescue ''
|
27
|
+
s.files = git_files
|
28
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
29
|
+
s.executables = []
|
30
|
+
s.require_paths = %w(lib)
|
123
31
|
end
|
124
|
-
|