postgis_adapter 0.3.5 → 0.3.8
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/Rakefile +36 -87
- data/VERSION.yml +4 -0
- data/lib/postgis_adapter.rb +1 -9
- data/lib/postgis_functions.rb +3 -1
- data/spec/postgis_adapter_spec.rb +17 -14
- data/spec/postgis_functions/common_spec.rb +5 -0
- data/spec/postgis_functions_spec.rb +4 -1
- data/spec/spec_helper.rb +10 -20
- metadata +25 -54
- data/MIT-LICENSE +0 -21
- data/init.rb +0 -1
- data/install.rb +0 -0
- data/postgis_adapter.gemspec +0 -40
- data/script/console +0 -10
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/uninstall.rb +0 -0
data/Rakefile
CHANGED
@@ -1,100 +1,49 @@
|
|
1
|
-
|
2
|
-
$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
1
|
+
require 'rubygems'
|
3
2
|
require 'rake'
|
4
|
-
require 'spec/rake/spectask'
|
5
|
-
require 'rake/rdoctask'
|
6
|
-
require 'active_record'
|
7
|
-
require 'active_record/connection_adapters/postgresql_adapter'
|
8
|
-
%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
|
9
|
-
require File.dirname(__FILE__) + '/lib/postgis_adapter'
|
10
|
-
|
11
|
-
# Generate all the Rake tasks
|
12
|
-
# Run 'rake -T' to see list of generated tasks (from gem root directory)PostgisAdapter::VERSION
|
13
|
-
$hoe = Hoe.new('postgis_adapter', PostgisAdapter::VERSION) do |p|
|
14
|
-
p.developer('Marcos Piccinini', 'x@nofxx.com')
|
15
|
-
p.summary = "Postgis Adapter for Activer Record"
|
16
|
-
p.description = "Postgis Adapter for Activer Record"
|
17
|
-
p.url = "http://github.com/nofxx/postgis_adapter"
|
18
|
-
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
19
|
-
# p.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
|
20
|
-
p.rubyforge_name = "postgis_adapter" # TODO this is default value
|
21
|
-
p.extra_deps = [
|
22
|
-
['activerecord','>= 2.0.2'],
|
23
|
-
]
|
24
|
-
p.extra_dev_deps = [
|
25
|
-
['newgem', ">= #{::Newgem::VERSION}"]
|
26
|
-
]
|
27
|
-
|
28
|
-
p.clean_globs |= %w[**/.DS_Store tmp *.log]
|
29
|
-
path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
|
30
|
-
p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
|
31
|
-
p.rsync_args = '-av --delete --ignore-errors'
|
32
|
-
end
|
33
|
-
|
34
|
-
require 'newgem/tasks' # load /tasks/*.rake
|
35
|
-
Dir['tasks/**/*.rake'].each { |t| load t }
|
36
3
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
t.rcov = true
|
49
|
-
t.rcov_dir = 'coverage'
|
50
|
-
t.rcov_opts = ['--html', '--exclude', "\.autotest,schema.rb,init.rb,\.gitignore,spec\/spec_helper.rb,spec\/db/*,#{ENV['GEM_HOME']}"]
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "postgis_adapter"
|
8
|
+
gem.summary = "PostGIS Adapter for Active Record"
|
9
|
+
gem.description = "Execute PostGIS functions on Active Record"
|
10
|
+
gem.email = "x@nofxx.com"
|
11
|
+
gem.homepage = "http://github.com/nofxx/postgis_adapter"
|
12
|
+
gem.authors = ["Marcos Augusto"]
|
13
|
+
gem.rubyforge_project = "postgis_adapter"
|
14
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
51
15
|
end
|
16
|
+
rescue LoadError
|
17
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
52
18
|
end
|
53
19
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
namespace :db do
|
60
|
-
task :migrate do
|
61
|
-
load('spec/db/schema_postgis.rb')
|
62
|
-
end
|
20
|
+
require 'spec/rake/spectask'
|
21
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
22
|
+
spec.libs << 'lib' << 'spec'
|
23
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
63
24
|
end
|
64
25
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
rdoc.options << '--line-numbers' << '--inline-source'
|
70
|
-
rdoc.rdoc_files.include('README.rdoc')
|
71
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
26
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
27
|
+
spec.libs << 'lib' << 'spec'
|
28
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
29
|
+
spec.rcov = true
|
72
30
|
end
|
73
31
|
|
74
|
-
# From Rspec Rakefile
|
75
|
-
#
|
76
|
-
def egrep(pattern)
|
77
|
-
Dir['**/*.rb'].each do |fn|
|
78
|
-
count = 0
|
79
|
-
open(fn) do |f|
|
80
|
-
while line = f.gets
|
81
|
-
count += 1
|
82
|
-
if line =~ pattern
|
83
|
-
puts "#{fn}:#{count}:#{line}"
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
32
|
|
90
|
-
|
91
|
-
task :complete_release => [:verify_committed, :post_news, :release]
|
33
|
+
task :default => :spec
|
92
34
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
35
|
+
require 'rake/rdoctask'
|
36
|
+
Rake::RDocTask.new do |rdoc|
|
37
|
+
if File.exist?('VERSION.yml')
|
38
|
+
config = YAML.load(File.read('VERSION.yml'))
|
39
|
+
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
|
40
|
+
else
|
41
|
+
version = ""
|
99
42
|
end
|
43
|
+
|
44
|
+
rdoc.rdoc_dir = 'rdoc'
|
45
|
+
rdoc.title = "postgis_adapter #{version}"
|
46
|
+
rdoc.rdoc_files.include('README*')
|
47
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
100
48
|
end
|
49
|
+
|
data/VERSION.yml
ADDED
data/lib/postgis_adapter.rb
CHANGED
@@ -18,10 +18,6 @@ require 'postgis_adapter/acts_as_geom'
|
|
18
18
|
include GeoRuby::SimpleFeatures
|
19
19
|
include SpatialAdapter
|
20
20
|
|
21
|
-
module PostgisAdapter
|
22
|
-
VERSION = '0.3.5'
|
23
|
-
end
|
24
|
-
|
25
21
|
#tables to ignore in migration : relative to PostGIS management of geometric columns
|
26
22
|
ActiveRecord::SchemaDumper.ignore_tables << "spatial_ref_sys" << "geometry_columns"
|
27
23
|
|
@@ -51,11 +47,7 @@ ActiveRecord::Base.class_eval do
|
|
51
47
|
"#{table_name}.#{column_name} && ? "
|
52
48
|
end
|
53
49
|
else
|
54
|
-
|
55
|
-
"#{table_name}.#{attribute_condition(column_name, value)}"
|
56
|
-
rescue ArgumentError
|
57
|
-
"#{table_name}.#{column_name} #{attribute_condition(value)}"
|
58
|
-
end
|
50
|
+
"#{table_name}.#{attribute_condition(column_name, value)}"
|
59
51
|
end
|
60
52
|
end.join(' AND ')
|
61
53
|
end
|
data/lib/postgis_functions.rb
CHANGED
@@ -40,8 +40,9 @@ module PostgisFunctions
|
|
40
40
|
# DistanceSphere/Spheroid => meters
|
41
41
|
#
|
42
42
|
def construct_geometric_sql(type,geoms,options)
|
43
|
+
not_db, on_db = geoms.partition { |g| g.is_a? Geometry }
|
43
44
|
|
44
|
-
tables =
|
45
|
+
tables = on_db.map do |t| {
|
45
46
|
:name => t.class.table_name,
|
46
47
|
:uid => unique_identifier,
|
47
48
|
:id => t[:id] }
|
@@ -54,6 +55,7 @@ module PostgisFunctions
|
|
54
55
|
end
|
55
56
|
|
56
57
|
fields = tables.map { |f| "#{f[:uid]}.#{get_column_name}" } # W1.geom
|
58
|
+
fields << not_db.map { |g| "'#{g.as_hex_ewkb}'::geometry"} unless not_db.empty?
|
57
59
|
fields.map! { |f| "ST_Transform(#{f}, #{transform})" } if transform # ST_Transform(W1.geom,x)
|
58
60
|
conditions = tables.map { |f| "#{f[:uid]}.id = #{f[:id]}" } # W1.id = 5
|
59
61
|
tables.map! { |f| "#{f[:name]} #{f[:uid]}" } # streets W1
|
@@ -33,6 +33,7 @@ describe "PostgisAdapter" do
|
|
33
33
|
pt.geom.should == Point.from_x_y_m(-1.6,2.8,-3.4)
|
34
34
|
pt.geom.m.should eql(-3.4)
|
35
35
|
end
|
36
|
+
|
36
37
|
it "should est_4d_points" do
|
37
38
|
pt = Table4dPoint.create!(:geom => Point.from_x_y_z_m(-1.6,2.8,-3.4,15))
|
38
39
|
pt = Table4dPoint.find(:first)
|
@@ -62,19 +63,18 @@ describe "PostgisAdapter" do
|
|
62
63
|
end
|
63
64
|
|
64
65
|
it "should find" do
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
end
|
69
|
-
|
70
|
-
it "should test_srid_line_string" do
|
71
|
-
ls = TableSridLineString.create!(:geom => LineString.from_coordinates([[1.4,2.5],[1.5,6.7]],4326))
|
72
|
-
ls = TableSridLineString.find(:first)
|
73
|
-
ls_e = LineString.from_coordinates([[1.4,2.5],[1.5,6.7]],4326)
|
74
|
-
ls.geom.should be_instance_of(LineString)
|
75
|
-
ls.geom.srid.should eql(4326)
|
66
|
+
find = TableLineString.find(:first)
|
67
|
+
find.geom.should be_instance_of(LineString)
|
68
|
+
find.geom.points.first.y.should eql(2.5)
|
76
69
|
end
|
77
70
|
|
71
|
+
it "should test_srid_line_string" do
|
72
|
+
ls = TableSridLineString.create!(:geom => LineString.from_coordinates([[1.4,2.5],[1.5,6.7]],4326))
|
73
|
+
ls = TableSridLineString.find(:first)
|
74
|
+
ls_e = LineString.from_coordinates([[1.4,2.5],[1.5,6.7]],4326)
|
75
|
+
ls.geom.should be_instance_of(LineString)
|
76
|
+
ls.geom.srid.should eql(4326)
|
77
|
+
end
|
78
78
|
|
79
79
|
it "hsould test_multi_line_string" do
|
80
80
|
ml = TableMultiLineString.create!(:geom => MultiLineString.from_line_strings([LineString.from_coordinates([[1.5,45.2],[-54.432612,-0.012]]),LineString.from_coordinates([[1.5,45.2],[-54.432612,-0.012],[45.4326,4326.3]])]))
|
@@ -92,8 +92,7 @@ describe "PostgisAdapter" do
|
|
92
92
|
|
93
93
|
it "should get it back" do
|
94
94
|
pg = TablePolygon.find(:first)
|
95
|
-
pg.geom.should
|
96
|
-
#assert_equal(Polygon.from_coordinates([[[12.4,-45.3],[45.4,41.6],[4.456,1.0698],[12.4,-45.3]],[[2.4,5.3],[5.4,1.4263],[14.46,1.06],[2.4,5.3]]]),pg.geom)
|
95
|
+
pg.geom.should == Polygon.from_coordinates([[[12.4,-45.3],[45.4,41.6],[4.456,1.0698],[12.4,-45.3]],[[2.4,5.3],[5.4,1.4263],[14.46,1.06],[2.4,5.3]]])
|
97
96
|
end
|
98
97
|
|
99
98
|
it "should test_multi_polygon" do
|
@@ -113,7 +112,6 @@ describe "PostgisAdapter" do
|
|
113
112
|
|
114
113
|
describe "Geometry" do
|
115
114
|
|
116
|
-
|
117
115
|
it "should test_geometry" do
|
118
116
|
gm = TableGeometry.create!(:geom => LineString.from_coordinates([[12.4,-45.3],[45.4,41.6],[4.456,1.0698]]))
|
119
117
|
find = TableGeometry.find(:first)
|
@@ -169,6 +167,11 @@ describe "PostgisAdapter" do
|
|
169
167
|
pts[1].data.should match /Point/
|
170
168
|
end
|
171
169
|
|
170
|
+
it "should not mess with rails finder" do
|
171
|
+
pts = Park.find_all_by_data "Point1"
|
172
|
+
pts.should have(1).park
|
173
|
+
end
|
174
|
+
|
172
175
|
end
|
173
176
|
|
174
177
|
end
|
@@ -40,6 +40,11 @@ describe "Common Functions" do
|
|
40
40
|
it { @p1.distance_spheroid_to(@p2).should be_close(627129.502639041, 0.000001) }
|
41
41
|
it { @p1.distance_spheroid_to(@p3).should be_close(1096324.48117672, 0.000001) }
|
42
42
|
|
43
|
+
it "should find the distance from a unsaved point" do
|
44
|
+
@p1.distance_to(@p2).should be_close(5.65685424949238,0.001)
|
45
|
+
@p1.distance_to(Point.from_x_y(5,5,4326)).should be_close(5.65685424949238,0.001)
|
46
|
+
end
|
47
|
+
|
43
48
|
it { @p1.should_not be_inside(@c1) }
|
44
49
|
it { @p1.should be_outside(@c1) }
|
45
50
|
it { @p1.should be_inside_circle(2.0,2.0,20.0) }
|
@@ -2,7 +2,6 @@ require File.dirname(__FILE__) + '/spec_helper.rb'
|
|
2
2
|
|
3
3
|
describe "PostgisFunctions" do
|
4
4
|
before(:all) do
|
5
|
-
#load_schema
|
6
5
|
@c1 ||= City.create!(:data => "City1", :geom => Polygon.from_coordinates([[[12,45],[45,42],[4,1],[12,45]],[[2,5],[5,1],[14,1],[2,5]]],4326))
|
7
6
|
@s1 ||= Street.create!(:data => "Street1", :geom => LineString.from_coordinates([[-43,-20],[-42,-28]],4326))
|
8
7
|
@p1 ||= Position.create!(:data => "Point1", :geom => Point.from_x_y(-43,-22,4326))
|
@@ -27,6 +26,10 @@ describe "PostgisFunctions" do
|
|
27
26
|
@p1.should_not be_inside(@c1)
|
28
27
|
end
|
29
28
|
|
29
|
+
it "should find the distance from a unsaved point" do
|
30
|
+
@p1.distance_to(Point.from_x_y(5,5,4326)).should be_close(55.0726792520575, 0.001)
|
31
|
+
end
|
32
|
+
|
30
33
|
it { @c1.area(32640).should be_close(9165235788987.37, 0.01) }
|
31
34
|
|
32
35
|
it { @c1.area.should be_close(720.0, 0.1) }
|
data/spec/spec_helper.rb
CHANGED
@@ -1,25 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
require 'spec'
|
3
|
+
require 'postgres'
|
4
4
|
require 'activerecord'
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
require '
|
11
|
-
end
|
12
|
-
require 'rspec_spinner'
|
5
|
+
require 'rspec_spinner'
|
6
|
+
|
7
|
+
gem 'activerecord', "=2.3.2"
|
8
|
+
|
9
|
+
$:.unshift((File.join(File.dirname(__FILE__), '..', 'lib')))
|
10
|
+
require 'postgis_adapter'
|
13
11
|
|
14
|
-
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
15
12
|
config = YAML.load_file(File.dirname(__FILE__) + '/db/database_postgis.yml')
|
16
|
-
ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
|
13
|
+
# ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
|
17
14
|
ActiveRecord::Base.establish_connection(config)
|
18
|
-
|
19
|
-
require File.dirname(__FILE__) + '/../init.rb'
|
20
15
|
require File.dirname(__FILE__) + '/db/models_postgis.rb'
|
21
|
-
|
22
|
-
def load_schema
|
23
|
-
load(File.dirname(__FILE__) + "/db/schema_postgis.rb")
|
24
|
-
end
|
25
|
-
|
metadata
CHANGED
@@ -1,66 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postgis_adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Marcos
|
7
|
+
- Marcos Augusto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-23 00:00:00 -03:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
version_requirement:
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 2.0.2
|
24
|
-
version:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: newgem
|
27
|
-
type: :development
|
28
|
-
version_requirement:
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.3.0
|
34
|
-
version:
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: hoe
|
37
|
-
type: :development
|
38
|
-
version_requirement:
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 1.8.0
|
44
|
-
version:
|
45
|
-
description: Postgis Adapter for Activer Record
|
46
|
-
email:
|
47
|
-
- x@nofxx.com
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: Execute PostGIS functions on Active Record
|
17
|
+
email: x@nofxx.com
|
48
18
|
executables: []
|
49
19
|
|
50
20
|
extensions: []
|
51
21
|
|
52
22
|
extra_rdoc_files:
|
53
|
-
- History.txt
|
54
|
-
- Manifest.txt
|
55
23
|
- README.rdoc
|
56
24
|
files:
|
57
25
|
- History.txt
|
58
|
-
- MIT-LICENSE
|
59
26
|
- Manifest.txt
|
60
27
|
- README.rdoc
|
61
28
|
- Rakefile
|
62
|
-
-
|
63
|
-
- install.rb
|
29
|
+
- VERSION.yml
|
64
30
|
- lib/postgis_adapter.rb
|
65
31
|
- lib/postgis_adapter/acts_as_geom.rb
|
66
32
|
- lib/postgis_adapter/common_spatial_adapter.rb
|
@@ -68,11 +34,7 @@ files:
|
|
68
34
|
- lib/postgis_functions/bbox.rb
|
69
35
|
- lib/postgis_functions/class.rb
|
70
36
|
- lib/postgis_functions/common.rb
|
71
|
-
- postgis_adapter.gemspec
|
72
37
|
- rails/init.rb
|
73
|
-
- script/console
|
74
|
-
- script/destroy
|
75
|
-
- script/generate
|
76
38
|
- spec/db/database_postgis.yml
|
77
39
|
- spec/db/models_postgis.rb
|
78
40
|
- spec/db/schema_postgis.rb
|
@@ -85,13 +47,13 @@ files:
|
|
85
47
|
- spec/postgis_functions_spec.rb
|
86
48
|
- spec/spec.opts
|
87
49
|
- spec/spec_helper.rb
|
88
|
-
- uninstall.rb
|
89
50
|
has_rdoc: true
|
90
51
|
homepage: http://github.com/nofxx/postgis_adapter
|
52
|
+
licenses: []
|
53
|
+
|
91
54
|
post_install_message:
|
92
55
|
rdoc_options:
|
93
|
-
- --
|
94
|
-
- README.rdoc
|
56
|
+
- --charset=UTF-8
|
95
57
|
require_paths:
|
96
58
|
- lib
|
97
59
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -109,9 +71,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
71
|
requirements: []
|
110
72
|
|
111
73
|
rubyforge_project: postgis_adapter
|
112
|
-
rubygems_version: 1.3.
|
74
|
+
rubygems_version: 1.3.2
|
113
75
|
signing_key:
|
114
|
-
specification_version:
|
115
|
-
summary:
|
116
|
-
test_files:
|
117
|
-
|
76
|
+
specification_version: 3
|
77
|
+
summary: PostGIS Adapter for Active Record
|
78
|
+
test_files:
|
79
|
+
- spec/db/models_postgis.rb
|
80
|
+
- spec/db/schema_postgis.rb
|
81
|
+
- spec/postgis_adapter/acts_as_geom_spec.rb
|
82
|
+
- spec/postgis_adapter/common_spatial_adapter_spec.rb
|
83
|
+
- spec/postgis_functions_spec.rb
|
84
|
+
- spec/spec_helper.rb
|
85
|
+
- spec/postgis_adapter_spec.rb
|
86
|
+
- spec/postgis_functions/class_spec.rb
|
87
|
+
- spec/postgis_functions/common_spec.rb
|
88
|
+
- spec/postgis_functions/bbox_spec.rb
|
data/MIT-LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
Spatial Adapter Copyright (c) 2006 Guilhem Vellut <guilhem.vellut+georuby@gmail.com>
|
2
|
-
PostGis Adapter Functions (c) 2008 Marcos Piccinini <nofxx>
|
3
|
-
|
4
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
5
|
-
a copy of this software and associated documentation files (the
|
6
|
-
"Software"), to deal in the Software without restriction, including
|
7
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
8
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
-
permit persons to whom the Software is furnished to do so, subject to
|
10
|
-
the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be
|
13
|
-
included in all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/init.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + "/rails/init"
|
data/install.rb
DELETED
File without changes
|
data/postgis_adapter.gemspec
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
Gem::Specification.new do |s|
|
4
|
-
s.name = %q{postgis_adapter}
|
5
|
-
s.version = "0.3.5"
|
6
|
-
|
7
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = ["Marcos Piccinini"]
|
9
|
-
s.date = %q{2009-04-14}
|
10
|
-
s.description = %q{Postgis Adapter for Activer Record}
|
11
|
-
s.email = ["x@nofxx.com"]
|
12
|
-
s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc"]
|
13
|
-
s.files = ["History.txt", "MIT-LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "init.rb", "install.rb", "lib/postgis_adapter.rb", "lib/postgis_adapter/acts_as_geom.rb", "lib/postgis_adapter/common_spatial_adapter.rb", "lib/postgis_functions.rb", "lib/postgis_functions/bbox.rb", "lib/postgis_functions/class.rb", "lib/postgis_functions/common.rb", "postgis_adapter.gemspec", "rails/init.rb", "script/console", "script/destroy", "script/generate", "spec/db/database_postgis.yml", "spec/db/models_postgis.rb", "spec/db/schema_postgis.rb", "spec/postgis_adapter/acts_as_geom_spec.rb", "spec/postgis_adapter/common_spatial_adapter_spec.rb", "spec/postgis_adapter_spec.rb", "spec/postgis_functions/bbox_spec.rb", "spec/postgis_functions/class_spec.rb", "spec/postgis_functions/common_spec.rb", "spec/postgis_functions_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "uninstall.rb"]
|
14
|
-
s.has_rdoc = true
|
15
|
-
s.homepage = %q{http://github.com/nofxx/postgis_adapter}
|
16
|
-
s.rdoc_options = ["--main", "README.rdoc"]
|
17
|
-
s.require_paths = ["lib"]
|
18
|
-
s.rubyforge_project = %q{postgis_adapter}
|
19
|
-
s.rubygems_version = %q{1.3.1}
|
20
|
-
s.summary = %q{Postgis Adapter for Activer Record}
|
21
|
-
|
22
|
-
if s.respond_to? :specification_version then
|
23
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
24
|
-
s.specification_version = 2
|
25
|
-
|
26
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
27
|
-
s.add_runtime_dependency(%q<activerecord>, [">= 2.0.2"])
|
28
|
-
s.add_development_dependency(%q<newgem>, [">= 1.3.0"])
|
29
|
-
s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
|
30
|
-
else
|
31
|
-
s.add_dependency(%q<activerecord>, [">= 2.0.2"])
|
32
|
-
s.add_dependency(%q<newgem>, [">= 1.3.0"])
|
33
|
-
s.add_dependency(%q<hoe>, [">= 1.8.0"])
|
34
|
-
end
|
35
|
-
else
|
36
|
-
s.add_dependency(%q<activerecord>, [">= 2.0.2"])
|
37
|
-
s.add_dependency(%q<newgem>, [">= 1.3.0"])
|
38
|
-
s.add_dependency(%q<hoe>, [">= 1.8.0"])
|
39
|
-
end
|
40
|
-
end
|
data/script/console
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# File: script/console
|
3
|
-
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
-
|
5
|
-
libs = " -r irb/completion"
|
6
|
-
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
-
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
-
libs << " -r #{File.dirname(__FILE__) + '/../lib/postgis_adapter.rb'}"
|
9
|
-
puts "Loading postgis_adapter gem"
|
10
|
-
exec "#{irb} #{libs} --simple-prompt"
|
data/script/destroy
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/destroy'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/generate
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/generate'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Generate.new.run(ARGV)
|
data/uninstall.rb
DELETED
File without changes
|