rgeo-activerecord 5.1.1 → 6.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: cb9333047d9015a705f5bff61d30a82ab162b4d4
4
- data.tar.gz: a21b3212037d3bfe7dbf59f68ad87b3dfbe8f056
2
+ SHA256:
3
+ metadata.gz: 0eaf7ecbe5d6d765688cd03ed0a6ce434f6b2eb7c3f8cf4f77e94cf87859e22c
4
+ data.tar.gz: b10e77caf7d99659469548766255177627db551fc522fa76c26d4a0a2f775e74
5
5
  SHA512:
6
- metadata.gz: 26607180b536dbe371568598b6b9b5694ce99b7c85360242708759b7c58402445ae1bc51b44d699cef4e62724f78755e8390132b43dc3a994ef5fa7ab25150be
7
- data.tar.gz: 9d40eccd79541f4054b2e1ca5dc92557ce18a5290cee46f37aab0af90f5916790a36bd3c92e42011da1b8d0b2df8a42f21e9450d332272b7ddc8016a87d7e631
6
+ metadata.gz: bbec5edddc4e64e3d9587619bb6316a71651f37806ffdc0ff73fbd595003232e5ec6f783c73eba931f148687b9d07dc245d5437403b5eb5c3583fe0ae7684fdd
7
+ data.tar.gz: 1f487be6304b56fb804e6a97478093351d7a86586a14b94b6ca7c2ad1d2e9b6244767830e14f63a06dd4365c2b82b387759f1f311b939d907bf9c54a4ea1f7aa
data/History.md CHANGED
@@ -1,3 +1,27 @@
1
+ ### 6.2.2 / 2020-11-20
2
+
3
+ * Removed `Arel::Visitor::DepthFirst` for ActiveRecord 6.1 compatibility (kamipo)
4
+
5
+ ### 6.2.1 / 2019-07-01
6
+
7
+ * Include GeometryMixin in Cartesian modules (#52, andreasknoepfle)
8
+
9
+
10
+ ### 6.2.0 / 2019-05-09
11
+
12
+ * Allow ActiveRecord 6.0 (#50, corneverbruggen)
13
+
14
+
15
+ ### 6.1.0 / 2018-12-01
16
+
17
+ * Allow rgeo 2.0
18
+
19
+
20
+ ### 6.0.0 / 2017-12-02
21
+
22
+ * Require rgeo 1.0
23
+
24
+
1
25
  ### 5.1.1 / 2017-10-02
2
26
 
3
27
  * Fix #st_area #43
data/README.md CHANGED
@@ -28,13 +28,13 @@ Gemfile:
28
28
  ```ruby
29
29
  gem 'rgeo-activerecord'
30
30
  ```
31
+ Version `6.1` supports ActiveRecord 5.x and 6.0 with `rgeo` 1.0+.
31
32
 
32
- `rgeo-activerecord` has the following requirements:
33
+ Version `6.0` supports ActiveRecord 5.x with `rgeo` 1.x.
33
34
 
34
- * Ruby 1.9.3 or later
35
- * rgeo 0.3.20 or later.
35
+ Version `5.0` supports ActiveRecord 5.0 and 5.1, with `rgeo` 0.6.
36
36
 
37
- The latest version supports ActiveRecord 4.2 and later.
37
+ Version `4.0` supports ActiveRecord 4.2.
38
38
 
39
39
  Version `1.1.0` supports ActiveRecord 4.0 and 4.1
40
40
 
@@ -60,7 +60,7 @@ The supported keys when registering a spatial type are listed here with their de
60
60
  and other allowed values:
61
61
 
62
62
  ```
63
- geo_type: "geometry", # point, polygon, line_string, geometry_collection,
63
+ geo_type: "geometry", # point, polygon, line_string, geometry_collection,
64
64
  # multi_line_string, multi_point, multi_polygon
65
65
  has_m: false, # true
66
66
  has_z: false, # true
@@ -68,7 +68,7 @@ sql_type: "geometry", # geography
68
68
  srid: 0, # (any valid SRID)
69
69
  ```
70
70
 
71
- The default factories are `RGeo::Geographic.spherical_factory` for
71
+ The default factories are `RGeo::Geographic.spherical_factory` for
72
72
  geographic types, and `RGeo::Cartesian.preferred_factory` for geometric types.
73
73
 
74
74
  Here is an example setup:
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rgeo/active_record"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "rgeo"
2
4
  require "active_record"
3
5
  require "rgeo/active_record/version"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RGeo
2
4
  module ActiveRecord
3
5
  # A set of common Arel visitor hacks for spatial ToSql visitors.
@@ -84,11 +86,6 @@ module RGeo
84
86
  alias :visit_RGeo_Cartesian_BoundingBox :visit_String
85
87
  end
86
88
 
87
- Arel::Visitors::DepthFirst.class_eval do
88
- alias :visit_RGeo_Feature_Instance :terminal
89
- alias :visit_RGeo_Cartesian_BoundingBox :terminal
90
- end
91
-
92
89
  Arel::Visitors::ToSql.class_eval do
93
90
  alias :visit_RGeo_Feature_Instance :visit_String
94
91
  alias :visit_RGeo_Cartesian_BoundingBox :visit_String
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RGeo
2
4
  module ActiveRecord
3
5
  # Return a feature type module given a string type.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RGeo
2
4
  module ActiveRecord
3
5
  # This module is mixed into all geometry objects. It provides an
@@ -29,11 +31,7 @@ module RGeo
29
31
  require "rgeo/geo_json"
30
32
  value = proc { |geom| GeoJSON.encode(geom) }
31
33
  end
32
- if value.is_a?(Proc)
33
- @json_generator = value
34
- else
35
- @json_generator = DEFAULT_JSON_GENERATOR
36
- end
34
+ @json_generator = value.is_a?(Proc) ? value : DEFAULT_JSON_GENERATOR
37
35
  end
38
36
 
39
37
  # Given a feature, returns an object that can be serialized as JSON
@@ -51,8 +49,79 @@ module RGeo
51
49
  GeometryMixin.generate_json(self)
52
50
  end
53
51
  end
52
+
53
+ # include this module in every RGeo feature type
54
+ [
55
+ Geographic::ProjectedGeometryCollectionImpl,
56
+ Geographic::ProjectedLinearRingImpl,
57
+ Geographic::ProjectedLineImpl,
58
+ Geographic::ProjectedLineStringImpl,
59
+ Geographic::ProjectedMultiLineStringImpl,
60
+ Geographic::ProjectedMultiPointImpl,
61
+ Geographic::ProjectedMultiPolygonImpl,
62
+ Geographic::ProjectedPointImpl,
63
+ Geographic::ProjectedPolygonImpl,
64
+
65
+ Geographic::SphericalGeometryCollectionImpl,
66
+ Geographic::SphericalLinearRingImpl,
67
+ Geographic::SphericalLineImpl,
68
+ Geographic::SphericalLineStringImpl,
69
+ Geographic::SphericalMultiLineStringImpl,
70
+ Geographic::SphericalMultiPointImpl,
71
+ Geographic::SphericalMultiPolygonImpl,
72
+ Geographic::SphericalPointImpl,
73
+ Geographic::SphericalPolygonImpl,
74
+
75
+ Geos::ZMGeometryCollectionImpl,
76
+ Geos::ZMGeometryImpl,
77
+ Geos::ZMLinearRingImpl,
78
+ Geos::ZMLineImpl,
79
+ Geos::ZMLineStringImpl,
80
+ Geos::ZMMultiLineStringImpl,
81
+ Geos::ZMMultiPointImpl,
82
+ Geos::ZMMultiPolygonImpl,
83
+ Geos::ZMPointImpl,
84
+ Geos::ZMPolygonImpl,
85
+
86
+ Cartesian::GeometryCollectionImpl,
87
+ Cartesian::LinearRingImpl,
88
+ Cartesian::LineImpl,
89
+ Cartesian::LineStringImpl,
90
+ Cartesian::MultiLineStringImpl,
91
+ Cartesian::MultiPointImpl,
92
+ Cartesian::MultiPolygonImpl,
93
+ Cartesian::PointImpl,
94
+ Cartesian::PolygonImpl
95
+ ].each { |klass| klass.include(GeometryMixin) }
96
+
97
+ if RGeo::Geos.capi_supported?
98
+ [
99
+ Geos::CAPIGeometryCollectionImpl,
100
+ Geos::CAPIGeometryImpl,
101
+ Geos::CAPILinearRingImpl,
102
+ Geos::CAPILineImpl,
103
+ Geos::CAPILineStringImpl,
104
+ Geos::CAPIMultiLineStringImpl,
105
+ Geos::CAPIMultiPointImpl,
106
+ Geos::CAPIMultiPolygonImpl,
107
+ Geos::CAPIPointImpl,
108
+ Geos::CAPIPolygonImpl,
109
+ ].each { |klass| klass.include(GeometryMixin) }
110
+ end
111
+
112
+ if RGeo::Geos.ffi_supported?
113
+ [
114
+ Geos::FFIGeometryCollectionImpl,
115
+ Geos::FFIGeometryImpl,
116
+ Geos::FFILinearRingImpl,
117
+ Geos::FFILineImpl,
118
+ Geos::FFILineStringImpl,
119
+ Geos::FFIMultiLineStringImpl,
120
+ Geos::FFIMultiPointImpl,
121
+ Geos::FFIMultiPolygonImpl,
122
+ Geos::FFIPointImpl,
123
+ Geos::FFIPolygonImpl,
124
+ ].each { |klass| klass.include(GeometryMixin) }
125
+ end
54
126
  end
55
127
  end
56
-
57
- RGeo::Feature::MixinCollection::GLOBAL.for_type(RGeo::Feature::Geometry)
58
- .add(RGeo::ActiveRecord::GeometryMixin)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RGeo
2
4
  module ActiveRecord
3
5
  # Returns true if spatial expressions (i.e. the methods in the
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RGeo
2
4
  module ActiveRecord
3
5
  class SpatialFactoryStore
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RGeo
2
4
  module ActiveRecord
3
- VERSION = "5.1.1".freeze
5
+ VERSION = "6.2.2"
4
6
  end
5
7
  end
metadata CHANGED
@@ -1,71 +1,86 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgeo-activerecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.1
4
+ version: 6.2.2
5
5
  platform: ruby
6
6
  authors:
7
- - Daniel Azuma, Tee Parham
7
+ - Daniel Azuma
8
+ - Tee Parham
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2017-10-02 00:00:00.000000000 Z
12
+ date: 2020-12-11 00:00:00.000000000 Z
12
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activerecord
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '5.0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '5.0'
13
28
  - !ruby/object:Gem::Dependency
14
29
  name: rgeo
15
30
  requirement: !ruby/object:Gem::Requirement
16
31
  requirements:
17
- - - "~>"
32
+ - - ">="
18
33
  - !ruby/object:Gem::Version
19
- version: '0.3'
34
+ version: 1.0.0
20
35
  type: :runtime
21
36
  prerelease: false
22
37
  version_requirements: !ruby/object:Gem::Requirement
23
38
  requirements:
24
- - - "~>"
39
+ - - ">="
25
40
  - !ruby/object:Gem::Version
26
- version: '0.3'
41
+ version: 1.0.0
27
42
  - !ruby/object:Gem::Dependency
28
- name: activerecord
43
+ name: appraisal
29
44
  requirement: !ruby/object:Gem::Requirement
30
45
  requirements:
31
46
  - - "~>"
32
47
  - !ruby/object:Gem::Version
33
- version: '5.0'
34
- type: :runtime
48
+ version: '2.1'
49
+ type: :development
35
50
  prerelease: false
36
51
  version_requirements: !ruby/object:Gem::Requirement
37
52
  requirements:
38
53
  - - "~>"
39
54
  - !ruby/object:Gem::Version
40
- version: '5.0'
55
+ version: '2.1'
41
56
  - !ruby/object:Gem::Dependency
42
- name: minitest
57
+ name: ffi-geos
43
58
  requirement: !ruby/object:Gem::Requirement
44
59
  requirements:
45
60
  - - "~>"
46
61
  - !ruby/object:Gem::Version
47
- version: '5.8'
62
+ version: '1.2'
48
63
  type: :development
49
64
  prerelease: false
50
65
  version_requirements: !ruby/object:Gem::Requirement
51
66
  requirements:
52
67
  - - "~>"
53
68
  - !ruby/object:Gem::Version
54
- version: '5.8'
69
+ version: '1.2'
55
70
  - !ruby/object:Gem::Dependency
56
- name: rake
71
+ name: minitest
57
72
  requirement: !ruby/object:Gem::Requirement
58
73
  requirements:
59
74
  - - "~>"
60
75
  - !ruby/object:Gem::Version
61
- version: '12.0'
76
+ version: '5.8'
62
77
  type: :development
63
78
  prerelease: false
64
79
  version_requirements: !ruby/object:Gem::Requirement
65
80
  requirements:
66
81
  - - "~>"
67
82
  - !ruby/object:Gem::Version
68
- version: '12.0'
83
+ version: '5.8'
69
84
  - !ruby/object:Gem::Dependency
70
85
  name: mocha
71
86
  requirement: !ruby/object:Gem::Requirement
@@ -81,37 +96,40 @@ dependencies:
81
96
  - !ruby/object:Gem::Version
82
97
  version: '1.1'
83
98
  - !ruby/object:Gem::Dependency
84
- name: appraisal
99
+ name: rake
85
100
  requirement: !ruby/object:Gem::Requirement
86
101
  requirements:
87
102
  - - "~>"
88
103
  - !ruby/object:Gem::Version
89
- version: '2.1'
104
+ version: '12.0'
90
105
  type: :development
91
106
  prerelease: false
92
107
  version_requirements: !ruby/object:Gem::Requirement
93
108
  requirements:
94
109
  - - "~>"
95
110
  - !ruby/object:Gem::Version
96
- version: '2.1'
111
+ version: '12.0'
97
112
  - !ruby/object:Gem::Dependency
98
113
  name: rgeo-geojson
99
114
  requirement: !ruby/object:Gem::Requirement
100
115
  requirements:
101
116
  - - ">="
102
117
  - !ruby/object:Gem::Version
103
- version: 0.4.1
118
+ version: 1.0.0
104
119
  type: :development
105
120
  prerelease: false
106
121
  version_requirements: !ruby/object:Gem::Requirement
107
122
  requirements:
108
123
  - - ">="
109
124
  - !ruby/object:Gem::Version
110
- version: 0.4.1
125
+ version: 1.0.0
111
126
  description: RGeo is a geospatial data library for Ruby. RGeo::ActiveRecord is an
112
127
  optional RGeo module providing some spatial extensions to ActiveRecord, as well
113
128
  as common tools used by RGeo-based spatial adapters.
114
- email: dazuma@gmail.com, parhameter@gmail.com
129
+ email:
130
+ - dazuma@gmail.com
131
+ - parhameter@gmail.com
132
+ - kfdoggett@gmail.com
115
133
  executables: []
116
134
  extensions: []
117
135
  extra_rdoc_files: []
@@ -128,7 +146,8 @@ files:
128
146
  - lib/rgeo/active_record/spatial_factory_store.rb
129
147
  - lib/rgeo/active_record/version.rb
130
148
  homepage: https://github.com/rgeo/rgeo-activerecord
131
- licenses: []
149
+ licenses:
150
+ - BSD-3-Clause
132
151
  metadata: {}
133
152
  post_install_message:
134
153
  rdoc_options: []
@@ -138,15 +157,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
157
  requirements:
139
158
  - - ">="
140
159
  - !ruby/object:Gem::Version
141
- version: 2.2.2
160
+ version: 2.3.0
142
161
  required_rubygems_version: !ruby/object:Gem::Requirement
143
162
  requirements:
144
163
  - - ">="
145
164
  - !ruby/object:Gem::Version
146
165
  version: '0'
147
166
  requirements: []
148
- rubyforge_project:
149
- rubygems_version: 2.6.13
167
+ rubygems_version: 3.0.3
150
168
  signing_key:
151
169
  specification_version: 4
152
170
  summary: An RGeo module providing spatial extensions to ActiveRecord.