georuby-ext 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/.jrubyrc +1 -0
  2. data/.travis.yml +23 -0
  3. data/Gemfile +6 -0
  4. data/Guardfile +12 -2
  5. data/MIT-LICENSE +20 -0
  6. data/README.rdoc +2 -28
  7. data/georuby-ext.gemspec +14 -11
  8. data/lib/georuby-ext.rb +17 -2
  9. data/lib/georuby-ext/core_ext.rb +11 -0
  10. data/lib/georuby-ext/geokit.rb +10 -3
  11. data/lib/georuby-ext/georuby/envelope.rb +36 -1
  12. data/lib/georuby-ext/georuby/ewkb_parser.rb +11 -0
  13. data/lib/georuby-ext/georuby/ewkt_parser.rb +11 -0
  14. data/lib/georuby-ext/georuby/geometry.rb +46 -2
  15. data/lib/georuby-ext/georuby/line_string.rb +19 -7
  16. data/lib/georuby-ext/georuby/linear_ring.rb +15 -0
  17. data/lib/georuby-ext/georuby/locators.rb +30 -17
  18. data/lib/georuby-ext/georuby/multi_polygon.rb +15 -1
  19. data/lib/georuby-ext/georuby/point.rb +148 -24
  20. data/lib/georuby-ext/georuby/polygon.rb +38 -27
  21. data/lib/georuby-ext/georuby/rtree.rb +133 -0
  22. data/lib/georuby-ext/georuby/srid.rb +17 -0
  23. data/lib/georuby-ext/proj4.rb +15 -2
  24. data/lib/georuby-ext/rgeo/cartesian/feature_methods.rb +58 -0
  25. data/lib/georuby-ext/rgeo/feature/geometry.rb +11 -0
  26. data/lib/georuby-ext/rgeo/feature/geometry_collection.rb +11 -0
  27. data/lib/georuby-ext/rgeo/feature/rgeo.rb +157 -0
  28. data/lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb +265 -0
  29. data/lib/georuby-ext/rspec_helper.rb +47 -8
  30. data/spec/lib/geokit_spec.rb +44 -0
  31. data/spec/lib/georuby/envelope_spec.rb +46 -0
  32. data/spec/lib/georuby/geometry_spec.rb +81 -0
  33. data/spec/{georuby → lib/georuby}/line_string_spec.rb +29 -14
  34. data/spec/lib/georuby/linear_ring_spec.rb +52 -0
  35. data/spec/lib/georuby/locators_spec.rb +123 -0
  36. data/spec/lib/georuby/multi_polygon_spec.rb +69 -0
  37. data/spec/lib/georuby/point_spec.rb +248 -0
  38. data/spec/lib/georuby/polygon_spec.rb +175 -0
  39. data/spec/lib/georuby/rtree_spec.rb +132 -0
  40. data/spec/lib/proj4_spec.rb +24 -0
  41. data/spec/lib/rgeo/cartesian/feature_methods_spec.rb +110 -0
  42. data/spec/lib/rgeo/geos/ffi_feature_methods_spec.rb +234 -0
  43. data/spec/spec_helper.rb +12 -8
  44. metadata +224 -189
  45. data/lib/georuby-ext/rgeo.rb +0 -23
  46. data/spec/georuby/linear_ring_spec.rb +0 -33
  47. data/spec/georuby/locators_spec.rb +0 -120
  48. data/spec/georuby/multi_polygon_spec.rb +0 -29
  49. data/spec/georuby/point_spec.rb +0 -44
  50. data/spec/georuby/polygon_spec.rb +0 -134
  51. data/spec/rgeo_spec.rb +0 -81
@@ -1,23 +1,27 @@
1
- begin
2
- require 'rspec'
3
- rescue LoadError
4
- require 'rubygems' unless ENV['NO_RUBYGEMS']
5
- require 'rspec'
6
- end
1
+ ENV["RAILS_ENV"] ||= 'test'
7
2
 
8
- $:.unshift(File.dirname(__FILE__) + '/../lib')
3
+ require 'rspec'
9
4
 
5
+ $:.unshift(File.dirname(__FILE__) + '/../lib')
10
6
  require 'georuby-ext'
11
7
  require 'georuby-ext/rspec_helper'
12
8
 
9
+ RSpec.configure do |c|
10
+
11
+ c.mock_with :rspec
12
+
13
+ end
14
+
13
15
  RSpec::Matchers.define :have_same do |*attributes|
14
16
  chain :than do |other|
15
17
  @other = other
16
18
  end
17
-
19
+
18
20
  match do |model|
19
21
  attributes.all? do |attribute|
20
22
  model.send(attribute) == @other.send(attribute)
21
23
  end
22
24
  end
23
25
  end
26
+
27
+
metadata CHANGED
@@ -1,155 +1,178 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: georuby-ext
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
5
4
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 1
10
- version: 0.0.1
5
+ version: 0.0.2
11
6
  platform: ruby
12
7
  authors:
13
- - Marc Florisson
14
- - Luc Donnet
15
- - Alban Peignier
8
+ - Marc Florisson
9
+ - Luc Donnet
10
+ - Alban Peignier
16
11
  autorequire:
17
12
  bindir: bin
18
13
  cert_chain: []
19
14
 
20
- date: 2011-10-11 00:00:00 Z
15
+ date: 2013-02-25 00:00:00 Z
21
16
  dependencies:
22
- - !ruby/object:Gem::Dependency
23
- version_requirements: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
32
- name: rspec
33
- type: :development
34
- prerelease: false
35
- requirement: *id001
36
- - !ruby/object:Gem::Dependency
37
- version_requirements: &id002 !ruby/object:Gem::Requirement
38
- none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
46
- name: rake
47
- type: :development
48
- prerelease: false
49
- requirement: *id002
50
- - !ruby/object:Gem::Dependency
51
- version_requirements: &id003 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
60
- name: guard
61
- type: :development
62
- prerelease: false
63
- requirement: *id003
64
- - !ruby/object:Gem::Dependency
65
- version_requirements: &id004 !ruby/object:Gem::Requirement
66
- none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
74
- name: rcov
75
- type: :development
76
- prerelease: false
77
- requirement: *id004
78
- - !ruby/object:Gem::Dependency
79
- version_requirements: &id005 !ruby/object:Gem::Requirement
80
- none: false
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- hash: 3
85
- segments:
86
- - 0
87
- version: "0"
88
- name: GeoRuby
89
- type: :runtime
90
- prerelease: false
91
- requirement: *id005
92
- - !ruby/object:Gem::Dependency
93
- version_requirements: &id006 !ruby/object:Gem::Requirement
94
- none: false
95
- requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
98
- hash: 3
99
- segments:
100
- - 0
101
- version: "0"
102
- name: geokit
103
- type: :runtime
104
- prerelease: false
105
- requirement: *id006
106
- - !ruby/object:Gem::Dependency
107
- version_requirements: &id007 !ruby/object:Gem::Requirement
108
- none: false
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- hash: 3
113
- segments:
114
- - 0
115
- version: "0"
116
- name: rgeo
117
- type: :runtime
118
- prerelease: false
119
- requirement: *id007
120
- - !ruby/object:Gem::Dependency
121
- version_requirements: &id008 !ruby/object:Gem::Requirement
122
- none: false
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- hash: 3
127
- segments:
128
- - 0
129
- version: "0"
130
- name: proj4rb
131
- type: :runtime
132
- prerelease: false
133
- requirement: *id008
134
- - !ruby/object:Gem::Dependency
135
- version_requirements: &id009 !ruby/object:Gem::Requirement
136
- none: false
137
- requirements:
138
- - - ">="
139
- - !ruby/object:Gem::Version
140
- hash: 3
141
- segments:
142
- - 0
143
- version: "0"
144
- name: activesupport
145
- type: :runtime
146
- prerelease: false
147
- requirement: *id009
17
+ - !ruby/object:Gem::Dependency
18
+ name: rspec
19
+ version_requirements: &id001 !ruby/object:Gem::Requirement
20
+ none: false
21
+ requirements:
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: "0"
25
+ requirement: *id001
26
+ prerelease: false
27
+ type: :development
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ version_requirements: &id002 !ruby/object:Gem::Requirement
31
+ none: false
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
36
+ requirement: *id002
37
+ prerelease: false
38
+ type: :development
39
+ - !ruby/object:Gem::Dependency
40
+ name: guard
41
+ version_requirements: &id003 !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 1.3.3
47
+ requirement: *id003
48
+ prerelease: false
49
+ type: :development
50
+ - !ruby/object:Gem::Dependency
51
+ name: guard-rspec
52
+ version_requirements: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
58
+ requirement: *id004
59
+ prerelease: false
60
+ type: :development
61
+ - !ruby/object:Gem::Dependency
62
+ name: guard-bundler
63
+ version_requirements: &id005 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: "0"
69
+ requirement: *id005
70
+ prerelease: false
71
+ type: :development
72
+ - !ruby/object:Gem::Dependency
73
+ name: georuby
74
+ version_requirements: &id006 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - "="
78
+ - !ruby/object:Gem::Version
79
+ version: 1.9.8
80
+ requirement: *id006
81
+ prerelease: false
82
+ type: :runtime
83
+ - !ruby/object:Gem::Dependency
84
+ name: dbf
85
+ version_requirements: &id007 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: "0"
91
+ requirement: *id007
92
+ prerelease: false
93
+ type: :runtime
94
+ - !ruby/object:Gem::Dependency
95
+ name: nokogiri
96
+ version_requirements: &id008 !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: "0"
102
+ requirement: *id008
103
+ prerelease: false
104
+ type: :runtime
105
+ - !ruby/object:Gem::Dependency
106
+ name: geokit
107
+ version_requirements: &id009 !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: "0"
113
+ requirement: *id009
114
+ prerelease: false
115
+ type: :runtime
116
+ - !ruby/object:Gem::Dependency
117
+ name: rgeo
118
+ version_requirements: &id010 !ruby/object:Gem::Requirement
119
+ none: false
120
+ requirements:
121
+ - - "="
122
+ - !ruby/object:Gem::Version
123
+ version: 0.3.20
124
+ requirement: *id010
125
+ prerelease: false
126
+ type: :runtime
127
+ - !ruby/object:Gem::Dependency
128
+ name: json_pure
129
+ version_requirements: &id011 !ruby/object:Gem::Requirement
130
+ none: false
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: "0"
135
+ requirement: *id011
136
+ prerelease: false
137
+ type: :runtime
138
+ - !ruby/object:Gem::Dependency
139
+ name: ffi-geos
140
+ version_requirements: &id012 !ruby/object:Gem::Requirement
141
+ none: false
142
+ requirements:
143
+ - - "="
144
+ - !ruby/object:Gem::Version
145
+ version: 0.1.1
146
+ requirement: *id012
147
+ prerelease: false
148
+ type: :runtime
149
+ - !ruby/object:Gem::Dependency
150
+ name: dr-ffi-proj4
151
+ version_requirements: &id013 !ruby/object:Gem::Requirement
152
+ none: false
153
+ requirements:
154
+ - - "="
155
+ - !ruby/object:Gem::Version
156
+ version: 0.0.1
157
+ requirement: *id013
158
+ prerelease: false
159
+ type: :runtime
160
+ - !ruby/object:Gem::Dependency
161
+ name: activesupport
162
+ version_requirements: &id014 !ruby/object:Gem::Requirement
163
+ none: false
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: "0"
168
+ requirement: *id014
169
+ prerelease: false
170
+ type: :runtime
148
171
  description: Use together GeoRuby, rgeo, geokit, proj4j (and others)
149
172
  email:
150
- - marc@dryade.net
151
- - luc@dryade.net
152
- - alban@dryade.net
173
+ - mflorisson@cityway.fr
174
+ - ldonnet@cityway.fr
175
+ - alban@tryphon.eu
153
176
  executables: []
154
177
 
155
178
  extensions: []
@@ -157,32 +180,51 @@ extensions: []
157
180
  extra_rdoc_files: []
158
181
 
159
182
  files:
160
- - .gitignore
161
- - Gemfile
162
- - Guardfile
163
- - README.rdoc
164
- - Rakefile
165
- - georuby-ext.gemspec
166
- - lib/georuby-ext.rb
167
- - lib/georuby-ext/geokit.rb
168
- - lib/georuby-ext/georuby/envelope.rb
169
- - lib/georuby-ext/georuby/geometry.rb
170
- - lib/georuby-ext/georuby/line_string.rb
171
- - lib/georuby-ext/georuby/locators.rb
172
- - lib/georuby-ext/georuby/multi_polygon.rb
173
- - lib/georuby-ext/georuby/point.rb
174
- - lib/georuby-ext/georuby/polygon.rb
175
- - lib/georuby-ext/proj4.rb
176
- - lib/georuby-ext/rgeo.rb
177
- - lib/georuby-ext/rspec_helper.rb
178
- - spec/georuby/line_string_spec.rb
179
- - spec/georuby/linear_ring_spec.rb
180
- - spec/georuby/locators_spec.rb
181
- - spec/georuby/multi_polygon_spec.rb
182
- - spec/georuby/point_spec.rb
183
- - spec/georuby/polygon_spec.rb
184
- - spec/rgeo_spec.rb
185
- - spec/spec_helper.rb
183
+ - .gitignore
184
+ - .jrubyrc
185
+ - .travis.yml
186
+ - Gemfile
187
+ - Guardfile
188
+ - MIT-LICENSE
189
+ - README.rdoc
190
+ - Rakefile
191
+ - georuby-ext.gemspec
192
+ - lib/georuby-ext.rb
193
+ - lib/georuby-ext/core_ext.rb
194
+ - lib/georuby-ext/geokit.rb
195
+ - lib/georuby-ext/georuby/envelope.rb
196
+ - lib/georuby-ext/georuby/ewkb_parser.rb
197
+ - lib/georuby-ext/georuby/ewkt_parser.rb
198
+ - lib/georuby-ext/georuby/geometry.rb
199
+ - lib/georuby-ext/georuby/line_string.rb
200
+ - lib/georuby-ext/georuby/linear_ring.rb
201
+ - lib/georuby-ext/georuby/locators.rb
202
+ - lib/georuby-ext/georuby/multi_polygon.rb
203
+ - lib/georuby-ext/georuby/point.rb
204
+ - lib/georuby-ext/georuby/polygon.rb
205
+ - lib/georuby-ext/georuby/rtree.rb
206
+ - lib/georuby-ext/georuby/srid.rb
207
+ - lib/georuby-ext/proj4.rb
208
+ - lib/georuby-ext/rgeo/cartesian/feature_methods.rb
209
+ - lib/georuby-ext/rgeo/feature/geometry.rb
210
+ - lib/georuby-ext/rgeo/feature/geometry_collection.rb
211
+ - lib/georuby-ext/rgeo/feature/rgeo.rb
212
+ - lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb
213
+ - lib/georuby-ext/rspec_helper.rb
214
+ - spec/lib/geokit_spec.rb
215
+ - spec/lib/georuby/envelope_spec.rb
216
+ - spec/lib/georuby/geometry_spec.rb
217
+ - spec/lib/georuby/line_string_spec.rb
218
+ - spec/lib/georuby/linear_ring_spec.rb
219
+ - spec/lib/georuby/locators_spec.rb
220
+ - spec/lib/georuby/multi_polygon_spec.rb
221
+ - spec/lib/georuby/point_spec.rb
222
+ - spec/lib/georuby/polygon_spec.rb
223
+ - spec/lib/georuby/rtree_spec.rb
224
+ - spec/lib/proj4_spec.rb
225
+ - spec/lib/rgeo/cartesian/feature_methods_spec.rb
226
+ - spec/lib/rgeo/geos/ffi_feature_methods_spec.rb
227
+ - spec/spec_helper.rb
186
228
  homepage: http://github.com/dryade/georuby-ext
187
229
  licenses: []
188
230
 
@@ -190,38 +232,31 @@ post_install_message:
190
232
  rdoc_options: []
191
233
 
192
234
  require_paths:
193
- - lib
235
+ - lib
194
236
  required_ruby_version: !ruby/object:Gem::Requirement
195
237
  none: false
196
238
  requirements:
197
- - - ">="
198
- - !ruby/object:Gem::Version
199
- hash: 3
200
- segments:
201
- - 0
202
- version: "0"
239
+ - - ">="
240
+ - !ruby/object:Gem::Version
241
+ hash: 2
242
+ segments:
243
+ - 0
244
+ version: "0"
203
245
  required_rubygems_version: !ruby/object:Gem::Requirement
204
246
  none: false
205
247
  requirements:
206
- - - ">="
207
- - !ruby/object:Gem::Version
208
- hash: 3
209
- segments:
210
- - 0
211
- version: "0"
248
+ - - ">="
249
+ - !ruby/object:Gem::Version
250
+ hash: 2
251
+ segments:
252
+ - 0
253
+ version: "0"
212
254
  requirements: []
213
255
 
214
- rubyforge_project: georuby-ext
215
- rubygems_version: 1.7.2
256
+ rubyforge_project:
257
+ rubygems_version: 1.8.24
216
258
  signing_key:
217
259
  specification_version: 3
218
260
  summary: Extension to Ruby geometry libraries
219
- test_files:
220
- - spec/georuby/line_string_spec.rb
221
- - spec/georuby/linear_ring_spec.rb
222
- - spec/georuby/locators_spec.rb
223
- - spec/georuby/multi_polygon_spec.rb
224
- - spec/georuby/point_spec.rb
225
- - spec/georuby/polygon_spec.rb
226
- - spec/rgeo_spec.rb
227
- - spec/spec_helper.rb
261
+ test_files: []
262
+