nofxx-postgis_adapter 0.5.1 → 0.5.5
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/README.rdoc +17 -4
- data/VERSION.yml +2 -2
- data/lib/postgis_adapter.rb +2 -4
- data/lib/postgis_functions/common.rb +8 -8
- data/lib/postgis_functions.rb +6 -5
- data/postgis_adapter.gemspec +12 -19
- data/spec/db/models_postgis.rb +7 -3
- data/spec/db/schema_postgis.rb +17 -13
- data/spec/postgis_adapter/common_spatial_adapter_spec.rb +3 -3
- data/spec/postgis_adapter_spec.rb +13 -13
- data/spec/postgis_functions_spec.rb +9 -1
- data/spec/spec.opts +2 -3
- data/spec/spec_helper.rb +5 -4
- metadata +8 -15
- data/Manifest.txt +0 -32
- data/install.rb +0 -0
- data/script/console +0 -10
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/spec/db/database_postgis.yml +0 -4
- data/uninstall.rb +0 -0
data/README.rdoc
CHANGED
@@ -237,16 +237,29 @@ geometric column in PostGIS, along with the addition of a spatial
|
|
237
237
|
index on the column :
|
238
238
|
|
239
239
|
ActiveRecord::Schema.define do
|
240
|
-
|
241
|
-
t.string
|
242
|
-
t.point
|
240
|
+
create_table :places do |t|
|
241
|
+
t.string :name
|
242
|
+
t.point :geom, :srid => 4326, :with_z => true, :null => false
|
243
243
|
|
244
244
|
t.timestamps
|
245
245
|
end
|
246
|
-
|
246
|
+
|
247
|
+
add_index :places, :geom, :spatial => true
|
247
248
|
end
|
248
249
|
|
249
250
|
|
251
|
+
Types:
|
252
|
+
|
253
|
+
point
|
254
|
+
polygon
|
255
|
+
line_string
|
256
|
+
multi_point
|
257
|
+
multi_polygon
|
258
|
+
multi_line_string
|
259
|
+
geometry
|
260
|
+
geometry_collection
|
261
|
+
|
262
|
+
|
250
263
|
=== Fixtures
|
251
264
|
|
252
265
|
If you use fixtures for your unit tests, at some point,
|
data/VERSION.yml
CHANGED
data/lib/postgis_adapter.rb
CHANGED
@@ -145,14 +145,12 @@ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.class_eval do
|
|
145
145
|
# <table_name>_<column_name>_spatial_index unless
|
146
146
|
# the key :name is present in the options hash, in which case its
|
147
147
|
# value is taken as the name of the index.
|
148
|
-
def add_index(table_name,column_name,options = {})
|
148
|
+
def add_index(table_name, column_name, options = {})
|
149
149
|
index_name = options[:name] || index_name(table_name,:column => Array(column_name))
|
150
150
|
if options[:spatial]
|
151
151
|
execute "CREATE INDEX #{index_name} ON #{table_name} USING GIST (#{Array(column_name).join(", ")} GIST_GEOMETRY_OPS)"
|
152
152
|
else
|
153
|
-
|
154
|
-
#all together
|
155
|
-
execute "CREATE #{index_type} INDEX #{index_name} ON #{table_name} (#{Array(column_name).join(", ")})"
|
153
|
+
super
|
156
154
|
end
|
157
155
|
end
|
158
156
|
|
@@ -235,7 +235,7 @@ module PostgisFunctions
|
|
235
235
|
|
236
236
|
def simplify!(tolerance=0.1)
|
237
237
|
#FIXME: not good..
|
238
|
-
self.update_attribute(
|
238
|
+
self.update_attribute(geo_columns.first, simplify)
|
239
239
|
end
|
240
240
|
|
241
241
|
#
|
@@ -438,7 +438,7 @@ module PostgisFunctions
|
|
438
438
|
# Return Geometry ST_Transform(geometry g1, integer srid);
|
439
439
|
#
|
440
440
|
def transform!(new_srid)
|
441
|
-
self[
|
441
|
+
self[geo_columns.first] = postgis_calculate("Transform", self, new_srid)
|
442
442
|
end
|
443
443
|
|
444
444
|
def transform(new_srid)
|
@@ -461,7 +461,7 @@ module PostgisFunctions
|
|
461
461
|
# Returns the instance`s geom srid
|
462
462
|
#
|
463
463
|
def srid
|
464
|
-
self[
|
464
|
+
self[geo_columns.first].srid
|
465
465
|
end
|
466
466
|
|
467
467
|
#
|
@@ -494,7 +494,7 @@ module PostgisFunctions
|
|
494
494
|
# Return Geometry
|
495
495
|
def to_utm!(utm=nil)
|
496
496
|
utm ||= utm_zone
|
497
|
-
self[
|
497
|
+
self[geo_columns.first] = transform(utm)
|
498
498
|
end
|
499
499
|
|
500
500
|
def to_utm
|
@@ -519,7 +519,7 @@ module PostgisFunctions
|
|
519
519
|
# Returns Float
|
520
520
|
#
|
521
521
|
def length
|
522
|
-
|
522
|
+
postgis_calculate(:length, self).to_f
|
523
523
|
end
|
524
524
|
|
525
525
|
#
|
@@ -530,7 +530,7 @@ module PostgisFunctions
|
|
530
530
|
# Returns Float
|
531
531
|
#
|
532
532
|
def length_3d
|
533
|
-
|
533
|
+
postgis_calculate(:length3d, self).to_f
|
534
534
|
end
|
535
535
|
|
536
536
|
#
|
@@ -551,7 +551,7 @@ module PostgisFunctions
|
|
551
551
|
# Returns Float length_spheroid(geometry linestring, spheroid);
|
552
552
|
#
|
553
553
|
def length_spheroid(spheroid = EARTH_SPHEROID)
|
554
|
-
|
554
|
+
postgis_calculate(:length_spheroid, self, spheroid).to_f
|
555
555
|
end
|
556
556
|
|
557
557
|
#
|
@@ -709,7 +709,7 @@ module PostgisFunctions
|
|
709
709
|
# Returns Float ST_Distance_Sphere(geometry pointlonlatA, geometry pointlonlatB);
|
710
710
|
#
|
711
711
|
def distance_sphere_to(other)
|
712
|
-
|
712
|
+
postgis_calculate(:distance_sphere, [self, other]).to_f
|
713
713
|
end
|
714
714
|
|
715
715
|
#
|
data/lib/postgis_functions.rb
CHANGED
@@ -26,12 +26,12 @@ module PostgisFunctions
|
|
26
26
|
raise StandardError, "#{e}"
|
27
27
|
end
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
def get_column_name
|
32
|
-
@geo_column ||= postgis_geoms[:columns][0]
|
29
|
+
def geo_columns
|
30
|
+
@geo_columns ||= postgis_geoms[:columns]
|
33
31
|
end
|
34
32
|
|
33
|
+
private
|
34
|
+
|
35
35
|
#
|
36
36
|
# Construct the PostGIS SQL query
|
37
37
|
#
|
@@ -44,6 +44,7 @@ module PostgisFunctions
|
|
44
44
|
|
45
45
|
tables = on_db.map do |t| {
|
46
46
|
:name => t.class.table_name,
|
47
|
+
:column => t.geo_columns.first,
|
47
48
|
:uid => unique_identifier,
|
48
49
|
:id => t[:id] }
|
49
50
|
end
|
@@ -54,7 +55,7 @@ module PostgisFunctions
|
|
54
55
|
options = nil
|
55
56
|
end
|
56
57
|
|
57
|
-
fields = tables.map { |f| "#{f[:uid]}.#{
|
58
|
+
fields = tables.map { |f| "#{f[:uid]}.#{f[:column]}" } # W1.geom
|
58
59
|
fields << not_db.map { |g| "'#{g.as_hex_ewkb}'::geometry"} unless not_db.empty?
|
59
60
|
fields.map! { |f| "ST_Transform(#{f}, #{transform})" } if transform # ST_Transform(W1.geom,x)
|
60
61
|
conditions = tables.map { |f| "#{f[:uid]}.id = #{f[:id]}" } # W1.id = 5
|
data/postgis_adapter.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{postgis_adapter}
|
5
|
-
s.version = "0.5.
|
5
|
+
s.version = "0.5.5"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Marcos Augusto"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-06-14}
|
10
10
|
s.description = %q{Execute PostGIS functions on Active Record}
|
11
11
|
s.email = %q{x@nofxx.com}
|
12
12
|
s.extra_rdoc_files = [
|
@@ -16,12 +16,10 @@ Gem::Specification.new do |s|
|
|
16
16
|
".gitignore",
|
17
17
|
"History.txt",
|
18
18
|
"MIT-LICENSE",
|
19
|
-
"Manifest.txt",
|
20
19
|
"README.rdoc",
|
21
20
|
"Rakefile",
|
22
21
|
"VERSION.yml",
|
23
22
|
"init.rb",
|
24
|
-
"install.rb",
|
25
23
|
"lib/postgis_adapter.rb",
|
26
24
|
"lib/postgis_adapter/acts_as_geom.rb",
|
27
25
|
"lib/postgis_adapter/common_spatial_adapter.rb",
|
@@ -31,10 +29,6 @@ Gem::Specification.new do |s|
|
|
31
29
|
"lib/postgis_functions/common.rb",
|
32
30
|
"postgis_adapter.gemspec",
|
33
31
|
"rails/init.rb",
|
34
|
-
"script/console",
|
35
|
-
"script/destroy",
|
36
|
-
"script/generate",
|
37
|
-
"spec/db/database_postgis.yml",
|
38
32
|
"spec/db/models_postgis.rb",
|
39
33
|
"spec/db/schema_postgis.rb",
|
40
34
|
"spec/postgis_adapter/acts_as_geom_spec.rb",
|
@@ -45,26 +39,25 @@ Gem::Specification.new do |s|
|
|
45
39
|
"spec/postgis_functions/common_spec.rb",
|
46
40
|
"spec/postgis_functions_spec.rb",
|
47
41
|
"spec/spec.opts",
|
48
|
-
"spec/spec_helper.rb"
|
49
|
-
"uninstall.rb"
|
42
|
+
"spec/spec_helper.rb"
|
50
43
|
]
|
51
44
|
s.homepage = %q{http://github.com/nofxx/postgis_adapter}
|
52
45
|
s.rdoc_options = ["--charset=UTF-8"]
|
53
46
|
s.require_paths = ["lib"]
|
54
47
|
s.rubyforge_project = %q{postgis_adapter}
|
55
|
-
s.rubygems_version = %q{1.3.
|
48
|
+
s.rubygems_version = %q{1.3.4}
|
56
49
|
s.summary = %q{PostGIS Adapter for Active Record}
|
57
50
|
s.test_files = [
|
58
|
-
"spec/
|
59
|
-
"spec/postgis_functions/class_spec.rb",
|
60
|
-
"spec/postgis_functions/bbox_spec.rb",
|
61
|
-
"spec/postgis_functions/common_spec.rb",
|
62
|
-
"spec/db/models_postgis.rb",
|
51
|
+
"spec/db/models_postgis.rb",
|
63
52
|
"spec/db/schema_postgis.rb",
|
64
|
-
"spec/postgis_adapter_spec.rb",
|
65
|
-
"spec/postgis_adapter/common_spatial_adapter_spec.rb",
|
66
53
|
"spec/postgis_adapter/acts_as_geom_spec.rb",
|
67
|
-
"spec/
|
54
|
+
"spec/postgis_adapter/common_spatial_adapter_spec.rb",
|
55
|
+
"spec/postgis_functions_spec.rb",
|
56
|
+
"spec/spec_helper.rb",
|
57
|
+
"spec/postgis_adapter_spec.rb",
|
58
|
+
"spec/postgis_functions/class_spec.rb",
|
59
|
+
"spec/postgis_functions/common_spec.rb",
|
60
|
+
"spec/postgis_functions/bbox_spec.rb"
|
68
61
|
]
|
69
62
|
|
70
63
|
if s.respond_to? :specification_version then
|
data/spec/db/models_postgis.rb
CHANGED
@@ -31,13 +31,13 @@ end
|
|
31
31
|
class Table3dmPoint < ActiveRecord::Base
|
32
32
|
end
|
33
33
|
|
34
|
-
class
|
34
|
+
class Table4dPoint < ActiveRecord::Base
|
35
35
|
end
|
36
36
|
|
37
|
-
class
|
37
|
+
class TableSridLineString < ActiveRecord::Base
|
38
38
|
end
|
39
39
|
|
40
|
-
class
|
40
|
+
class TableSrid4dPolygon < ActiveRecord::Base
|
41
41
|
end
|
42
42
|
|
43
43
|
class City < ActiveRecord::Base
|
@@ -55,3 +55,7 @@ end
|
|
55
55
|
class CommonGeo < ActiveRecord::Base
|
56
56
|
acts_as_geom :geom
|
57
57
|
end
|
58
|
+
|
59
|
+
class DiffName < ActiveRecord::Base
|
60
|
+
acts_as_geom :the_geom
|
61
|
+
end
|
data/spec/db/schema_postgis.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
#add some postgis specific tables
|
3
2
|
ActiveRecord::Schema.define() do
|
4
3
|
|
@@ -62,27 +61,32 @@ ActiveRecord::Schema.define() do
|
|
62
61
|
end
|
63
62
|
|
64
63
|
create_table :cities, :force => true do |t|
|
65
|
-
t.string
|
66
|
-
t.integer
|
67
|
-
t.polygon
|
64
|
+
t.string :data, :limit => 100
|
65
|
+
t.integer :value
|
66
|
+
t.polygon :geom, :null => false, :srid => 4326
|
68
67
|
end
|
69
68
|
|
70
69
|
create_table :positions, :force => true do |t|
|
71
|
-
t.string
|
72
|
-
t.integer
|
73
|
-
t.point
|
70
|
+
t.string :data, :limit => 100
|
71
|
+
t.integer :value
|
72
|
+
t.point :geom, :null => false, :srid => 4326
|
74
73
|
end
|
75
74
|
|
76
75
|
create_table :streets, :force => true do |t|
|
77
|
-
t.string
|
78
|
-
t.integer
|
79
|
-
t.line_string
|
76
|
+
t.string :data, :limit => 100
|
77
|
+
t.integer :value
|
78
|
+
t.line_string :geom, :null => false, :srid => 4326
|
80
79
|
end
|
81
80
|
|
82
81
|
create_table :common_geos, :force => true do |t|
|
83
|
-
t.string
|
84
|
-
t.integer
|
85
|
-
t.point
|
82
|
+
t.string :data, :limit => 100
|
83
|
+
t.integer :value
|
84
|
+
t.point :geom, :null => false, :srid => 4326
|
85
|
+
end
|
86
|
+
|
87
|
+
create_table :diff_names, :force => true do |t|
|
88
|
+
t.string :data
|
89
|
+
t.point :the_geom, :null => false, :srid => 4326
|
86
90
|
end
|
87
91
|
|
88
92
|
end
|
@@ -13,7 +13,7 @@ describe "CommonSpatialAdapter" do
|
|
13
13
|
create_table "parks", :force => true do |t|
|
14
14
|
t.string "data", :limit => 100
|
15
15
|
t.integer "value"
|
16
|
-
t.polygon "geom", :null=>false, :srid => 4326 , :with_z => true
|
16
|
+
t.polygon "geom", :null => false, :srid => 4326 , :with_z => true, :with_m => true
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -180,8 +180,8 @@ describe "CommonSpatialAdapter" do
|
|
180
180
|
|
181
181
|
after(:all) do
|
182
182
|
ActiveRecord::Base.connection.execute('DROP VIEW viewparks')
|
183
|
-
end
|
184
|
-
|
183
|
+
end
|
184
|
+
end
|
185
185
|
|
186
186
|
describe "Dump" do
|
187
187
|
before(:all) do
|
@@ -129,25 +129,25 @@ describe "PostgisAdapter" do
|
|
129
129
|
describe "Find" do
|
130
130
|
|
131
131
|
ActiveRecord::Schema.define() do
|
132
|
-
create_table
|
133
|
-
t.
|
134
|
-
t.
|
135
|
-
t.
|
132
|
+
create_table :areas, :force => true do |t|
|
133
|
+
t.string :data, :limit => 100
|
134
|
+
t.integer :value
|
135
|
+
t.point :geom, :null => false, :srid => 4326
|
136
136
|
end
|
137
|
-
add_index
|
137
|
+
add_index :areas, :geom, :spatial => true, :name => "areas_spatial_index"
|
138
138
|
end
|
139
139
|
|
140
|
-
class
|
140
|
+
class Area < ActiveRecord::Base
|
141
141
|
end
|
142
142
|
|
143
143
|
it "should create some points" do
|
144
|
-
|
145
|
-
|
146
|
-
|
144
|
+
Area.create!(:data => "Point1", :geom => Point.from_x_y(1.2,0.75,4326))
|
145
|
+
Area.create!(:data => "Point2",:geom => Point.from_x_y(0.6,1.3,4326))
|
146
|
+
Area.create!(:data => "Point3", :geom => Point.from_x_y(2.5,2,4326))
|
147
147
|
end
|
148
148
|
|
149
149
|
it "should find by geom" do
|
150
|
-
pts =
|
150
|
+
pts = Area.find_all_by_geom(LineString.from_coordinates([[0,0],[2,2]],4326))
|
151
151
|
pts.should be_instance_of(Array)
|
152
152
|
pts.length.should eql(2)
|
153
153
|
pts[0].data.should match /Point/
|
@@ -155,12 +155,12 @@ describe "PostgisAdapter" do
|
|
155
155
|
end
|
156
156
|
|
157
157
|
it "should find by geom again" do
|
158
|
-
pts =
|
158
|
+
pts = Area.find_all_by_geom(LineString.from_coordinates([[2.49,1.99],[2.51,2.01]],4326))
|
159
159
|
pts[0].data.should eql("Point3")
|
160
160
|
end
|
161
161
|
|
162
162
|
it "should find by geom column bbox condition" do
|
163
|
-
pts =
|
163
|
+
pts = Area.find_all_by_geom([[0,0],[2,2],4326])
|
164
164
|
pts.should be_instance_of(Array)
|
165
165
|
pts.length.should eql(2)
|
166
166
|
pts[0].data.should match /Point/
|
@@ -168,7 +168,7 @@ describe "PostgisAdapter" do
|
|
168
168
|
end
|
169
169
|
|
170
170
|
it "should not mess with rails finder" do
|
171
|
-
pts =
|
171
|
+
pts = Area.find_all_by_data "Point1"
|
172
172
|
pts.should have(1).park
|
173
173
|
end
|
174
174
|
|
@@ -6,6 +6,7 @@ describe "PostgisFunctions" do
|
|
6
6
|
@s1 ||= Street.create!(:data => "Street1", :geom => LineString.from_coordinates([[-43,-20],[-42,-28]],4326))
|
7
7
|
@p1 ||= Position.create!(:data => "Point1", :geom => Point.from_x_y(-43,-22,4326))
|
8
8
|
@cg ||= CommonGeo.create!(:data => "Point1", :geom => Point.from_x_y(-43,-22,4326))
|
9
|
+
@px = DiffName.create!(:data => "Hey", :the_geom => Point.from_x_y(10,20, 4326))
|
9
10
|
end
|
10
11
|
|
11
12
|
describe "Common Mix" do
|
@@ -40,6 +41,13 @@ describe "PostgisFunctions" do
|
|
40
41
|
|
41
42
|
it { @s1.length_spheroid.should be_close(891883.597963462,0.0001) }
|
42
43
|
|
43
|
-
|
44
|
+
it "should work with a diff column name" do
|
45
|
+
px2 = DiffName.create!(:data => "Hey 2", :the_geom => Point.from_x_y(20,20, 4326))
|
46
|
+
@px.distance_to(px2).should be_close(10.0, 0.1)
|
47
|
+
end
|
44
48
|
|
49
|
+
it "should work with mixed column names" do
|
50
|
+
@px.distance_to(@s1).should be_close(66.4,1)
|
51
|
+
end
|
52
|
+
end
|
45
53
|
end
|
data/spec/spec.opts
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -2,15 +2,16 @@ require 'rubygems'
|
|
2
2
|
require 'spec'
|
3
3
|
require 'pg'
|
4
4
|
require 'activerecord'
|
5
|
-
require 'rspec_spinner'
|
5
|
+
# require 'rspec_spinner'
|
6
6
|
|
7
7
|
gem 'activerecord', "=2.3.2"
|
8
8
|
|
9
9
|
$:.unshift((File.join(File.dirname(__FILE__), '..', 'lib')))
|
10
10
|
require 'postgis_adapter'
|
11
11
|
GeoRuby::SimpleFeatures.srid = -1
|
12
|
-
|
12
|
+
|
13
13
|
# ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
|
14
|
-
ActiveRecord::Base.establish_connection(
|
15
|
-
|
14
|
+
ActiveRecord::Base.establish_connection({ :adapter => "postgresql", :database => "postgis_plugin",
|
15
|
+
:username => "postgres", :password => "" })
|
16
|
+
require File.dirname(__FILE__) + '/db/schema_postgis.rb'
|
16
17
|
require File.dirname(__FILE__) + '/db/models_postgis.rb'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nofxx-postgis_adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcos Augusto
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-06-14 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -25,12 +25,10 @@ files:
|
|
25
25
|
- .gitignore
|
26
26
|
- History.txt
|
27
27
|
- MIT-LICENSE
|
28
|
-
- Manifest.txt
|
29
28
|
- README.rdoc
|
30
29
|
- Rakefile
|
31
30
|
- VERSION.yml
|
32
31
|
- init.rb
|
33
|
-
- install.rb
|
34
32
|
- lib/postgis_adapter.rb
|
35
33
|
- lib/postgis_adapter/acts_as_geom.rb
|
36
34
|
- lib/postgis_adapter/common_spatial_adapter.rb
|
@@ -40,10 +38,6 @@ files:
|
|
40
38
|
- lib/postgis_functions/common.rb
|
41
39
|
- postgis_adapter.gemspec
|
42
40
|
- rails/init.rb
|
43
|
-
- script/console
|
44
|
-
- script/destroy
|
45
|
-
- script/generate
|
46
|
-
- spec/db/database_postgis.yml
|
47
41
|
- spec/db/models_postgis.rb
|
48
42
|
- spec/db/schema_postgis.rb
|
49
43
|
- spec/postgis_adapter/acts_as_geom_spec.rb
|
@@ -55,7 +49,6 @@ files:
|
|
55
49
|
- spec/postgis_functions_spec.rb
|
56
50
|
- spec/spec.opts
|
57
51
|
- spec/spec_helper.rb
|
58
|
-
- uninstall.rb
|
59
52
|
has_rdoc: false
|
60
53
|
homepage: http://github.com/nofxx/postgis_adapter
|
61
54
|
post_install_message:
|
@@ -83,13 +76,13 @@ signing_key:
|
|
83
76
|
specification_version: 3
|
84
77
|
summary: PostGIS Adapter for Active Record
|
85
78
|
test_files:
|
86
|
-
- spec/postgis_functions_spec.rb
|
87
|
-
- spec/postgis_functions/class_spec.rb
|
88
|
-
- spec/postgis_functions/bbox_spec.rb
|
89
|
-
- spec/postgis_functions/common_spec.rb
|
90
79
|
- spec/db/models_postgis.rb
|
91
80
|
- spec/db/schema_postgis.rb
|
92
|
-
- spec/postgis_adapter_spec.rb
|
93
|
-
- spec/postgis_adapter/common_spatial_adapter_spec.rb
|
94
81
|
- spec/postgis_adapter/acts_as_geom_spec.rb
|
82
|
+
- spec/postgis_adapter/common_spatial_adapter_spec.rb
|
83
|
+
- spec/postgis_functions_spec.rb
|
95
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/Manifest.txt
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
MIT-LICENSE
|
3
|
-
Manifest.txt
|
4
|
-
README.rdoc
|
5
|
-
Rakefile
|
6
|
-
init.rb
|
7
|
-
install.rb
|
8
|
-
lib/postgis_adapter.rb
|
9
|
-
lib/postgis_adapter/acts_as_geom.rb
|
10
|
-
lib/postgis_adapter/common_spatial_adapter.rb
|
11
|
-
lib/postgis_functions.rb
|
12
|
-
lib/postgis_functions/bbox.rb
|
13
|
-
lib/postgis_functions/class.rb
|
14
|
-
lib/postgis_functions/common.rb
|
15
|
-
postgis_adapter.gemspec
|
16
|
-
rails/init.rb
|
17
|
-
script/console
|
18
|
-
script/destroy
|
19
|
-
script/generate
|
20
|
-
spec/db/database_postgis.yml
|
21
|
-
spec/db/models_postgis.rb
|
22
|
-
spec/db/schema_postgis.rb
|
23
|
-
spec/postgis_adapter/acts_as_geom_spec.rb
|
24
|
-
spec/postgis_adapter/common_spatial_adapter_spec.rb
|
25
|
-
spec/postgis_adapter_spec.rb
|
26
|
-
spec/postgis_functions/bbox_spec.rb
|
27
|
-
spec/postgis_functions/class_spec.rb
|
28
|
-
spec/postgis_functions/common_spec.rb
|
29
|
-
spec/postgis_functions_spec.rb
|
30
|
-
spec/spec.opts
|
31
|
-
spec/spec_helper.rb
|
32
|
-
uninstall.rb
|
data/install.rb
DELETED
File without changes
|
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
|