ffi-geos 2.3.1 → 2.5.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.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/main.yml +2 -2
  3. data/.rbenv-vars +1 -0
  4. data/.rubocop-minitest.yml +40 -17
  5. data/.rubocop.yml +664 -120
  6. data/.rubocop_todo.yml +30 -19
  7. data/MIT-LICENSE +1 -1
  8. data/README.rdoc +2 -0
  9. data/ffi-geos.gemspec +2 -2
  10. data/lib/ffi-geos/coordinate_sequence.rb +2 -1
  11. data/lib/ffi-geos/geojson_reader.rb +35 -0
  12. data/lib/ffi-geos/geojson_writer.rb +49 -0
  13. data/lib/ffi-geos/geometry.rb +101 -1
  14. data/lib/ffi-geos/geometry_collection.rb +1 -1
  15. data/lib/ffi-geos/line_string.rb +1 -1
  16. data/lib/ffi-geos/point.rb +9 -0
  17. data/lib/ffi-geos/polygon.rb +1 -1
  18. data/lib/ffi-geos/prepared_geometry.rb +20 -0
  19. data/lib/ffi-geos/version.rb +1 -1
  20. data/lib/ffi-geos/wkb_writer.rb +12 -0
  21. data/lib/ffi-geos.rb +156 -3
  22. data/test/coordinate_sequence_tests.rb +22 -4
  23. data/test/geojson_reader_tests.rb +174 -0
  24. data/test/geojson_writer_tests.rb +103 -0
  25. data/test/geometry/area_tests.rb +18 -0
  26. data/test/geometry/boundary_tests.rb +36 -0
  27. data/test/geometry/buffer_tests.rb +116 -0
  28. data/test/geometry/build_area_tests.rb +20 -0
  29. data/test/geometry/centroid_tests.rb +37 -0
  30. data/test/geometry/clip_by_rect_tests.rb +56 -0
  31. data/test/geometry/clone_tests.rb +29 -0
  32. data/test/geometry/concave_hull_of_polygons_tests.rb +28 -0
  33. data/test/geometry/concave_hull_tests.rb +38 -0
  34. data/test/geometry/convex_hull_tests.rb +26 -0
  35. data/test/geometry/coord_seq_tests.rb +27 -0
  36. data/test/geometry/delaunay_triangulation_tests.rb +82 -0
  37. data/test/geometry/densify_tests.rb +95 -0
  38. data/test/geometry/difference_tests.rb +108 -0
  39. data/test/geometry/dimensions_tests.rb +46 -0
  40. data/test/geometry/distance_tests.rb +29 -0
  41. data/test/geometry/dump_points_tests.rb +60 -0
  42. data/test/geometry/dup_tests.rb +29 -0
  43. data/test/geometry/empty_tests.rb +23 -0
  44. data/test/geometry/envelope_tests.rb +26 -0
  45. data/test/geometry/equal_identical_tests.rb +78 -0
  46. data/test/geometry/equal_tests.rb +62 -0
  47. data/test/geometry/exterior_ring_tests.rb +27 -0
  48. data/test/geometry/extract_unique_points_tests.rb +41 -0
  49. data/test/geometry/frecet_distance_tests.rb +24 -0
  50. data/test/geometry/get_geometry_n_tests.rb +21 -0
  51. data/test/geometry/hausdorff_distance_tests.rb +46 -0
  52. data/test/geometry/hilbert_code_tests.rb +45 -0
  53. data/test/geometry/interior_ring_n_tests.rb +64 -0
  54. data/test/geometry/interior_rings_tests.rb +36 -0
  55. data/test/geometry/interpolate_tests.rb +49 -0
  56. data/test/geometry/intersection_tests.rb +49 -0
  57. data/test/geometry/largest_empty_circle_tests.rb +26 -0
  58. data/test/geometry/length_tests.rb +18 -0
  59. data/test/geometry/line_merge_directed_tests.rb +28 -0
  60. data/test/geometry/line_merge_tests.rb +25 -0
  61. data/test/geometry/line_string_enumerator_tests.rb +20 -0
  62. data/test/geometry/line_substring_tests.rb +76 -0
  63. data/test/geometry/make_valid_tests.rb +27 -0
  64. data/test/geometry/maximum_inscribed_circle_tests.rb +21 -0
  65. data/test/geometry/minimum_bounding_circle_tests.rb +23 -0
  66. data/test/geometry/minimum_clearance_tests.rb +58 -0
  67. data/test/geometry/minimum_rotated_rectangle_tests.rb +28 -0
  68. data/test/geometry/minimum_width_tests.rb +26 -0
  69. data/test/geometry/misc_tests.rb +24 -0
  70. data/test/geometry/nearest_points_tests.rb +46 -0
  71. data/test/geometry/node_tests.rb +22 -0
  72. data/test/geometry/normalize_tests.rb +34 -0
  73. data/test/geometry/num_coordinates_tests.rb +39 -0
  74. data/test/geometry/num_goemetries_tests.rb +35 -0
  75. data/test/geometry/num_interior_rings_tests.rb +28 -0
  76. data/test/geometry/orient_polygons_tests.rb +101 -0
  77. data/test/geometry/point_on_surface_tests.rb +37 -0
  78. data/test/geometry/polygon_hull_simplify_tests.rb +55 -0
  79. data/test/geometry/polygonize_tests.rb +173 -0
  80. data/test/geometry/precision_tests.rb +42 -0
  81. data/test/geometry/project_tests.rb +56 -0
  82. data/test/geometry/relate_tests.rb +73 -0
  83. data/test/geometry/relationships_tests.rb +138 -0
  84. data/test/geometry/reverse_tests.rb +44 -0
  85. data/test/geometry/ring_tests.rb +18 -0
  86. data/test/geometry/shared_path_tests.rb +31 -0
  87. data/test/geometry/simple_tests.rb +18 -0
  88. data/test/geometry/simplify_tests.rb +21 -0
  89. data/test/geometry/snap_tests.rb +20 -0
  90. data/test/geometry/srid_copy_policy_tests.rb +94 -0
  91. data/test/geometry/start_and_end_point_tests.rb +24 -0
  92. data/test/geometry/sym_difference_tests.rb +114 -0
  93. data/test/geometry/topology_preserve_simplify_tests.rb +21 -0
  94. data/test/geometry/union_tests.rb +216 -0
  95. data/test/geometry/valid_tests.rb +56 -0
  96. data/test/geometry/voronoi_diagram_tests.rb +62 -0
  97. data/test/geometry_collection_tests.rb +14 -2
  98. data/test/interrupt_tests.rb +1 -1
  99. data/test/line_string_tests.rb +24 -3
  100. data/test/misc_tests.rb +1 -1
  101. data/test/point/has_m_tests.rb +43 -0
  102. data/test/point/x_y_z_m_tests.rb +51 -0
  103. data/test/point_tests.rb +25 -3
  104. data/test/polygon_tests.rb +14 -1
  105. data/test/prepared_geometry_tests.rb +31 -0
  106. data/test/strtree_tests.rb +11 -18
  107. data/test/test_helper.rb +2 -0
  108. data/test/tools_tests.rb +7 -0
  109. data/test/utils_tests.rb +14 -3
  110. data/test/wkb_reader_tests.rb +1 -0
  111. data/test/wkb_writer_tests.rb +46 -5
  112. data/test/wkt_reader_tests.rb +2 -0
  113. data/test/wkt_writer_tests.rb +20 -2
  114. metadata +160 -7
  115. data/test/geometry_tests.rb +0 -2096
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb538fc74121ad3a69c5e76990cadbbdeb65394b249f2a9d29baa81c27effbe0
4
- data.tar.gz: 55371fd3931c952efcdd2a7fc0ba337d9baff3386b884b733529f7c9028a250a
3
+ metadata.gz: 4a368ffbb2203c904845ddae2f7c0e62068c87478062851cc2db32efd52f5abe
4
+ data.tar.gz: 1c7e5caf6ae7e879ffbeb1044f32b93c8de98680af37c6e419187315ee8e8977
5
5
  SHA512:
6
- metadata.gz: efd983b0b469595f2103d2057411e8bcb6a01c2742d26d9b99fac2ddeeffb749d30d61be13a7e3b1838091c63cc68fe1e769bde26fce0df6ceb277df9550845f
7
- data.tar.gz: cfcc398d7bc3243ee4519e7160a3c9ee0c8c16fe1aab2c9697b12ccd407ecf41e6972b4fb4554b9e3fb3d7dd9c75fc1e2d59f8214527759ae11bde85ab1dd0d3
6
+ metadata.gz: 0c622960a0b977f3d3730a40063a0b10376884f7604f6e6b2d9ff0eceafe6b4f1786844d5159e917582b0747d64bd4942f6bd8d3a5db6b39244a10ed9ecdc86c
7
+ data.tar.gz: 5f60b73b15067e9569071d70ae20c1f7fdb92f1eab06c2f05cb378105ca2ef503d274843f3b0a3c47c255912b97b02f21f14711a875f26a067b2b7b54bad3d0f
@@ -8,10 +8,10 @@ name: FFI Geos
8
8
  pull_request:
9
9
  jobs:
10
10
  tests:
11
- runs-on: ubuntu-latest
11
+ runs-on: ubuntu-24.04
12
12
  strategy:
13
13
  matrix:
14
- ruby: [ '2.6', '2.7', '3.0', '3.1' ]
14
+ ruby: [ '3.0', '3.1', '3.2', '3.3' ]
15
15
  name: Ruby ${{ matrix.ruby }} tests
16
16
  steps:
17
17
  - name: Check out app
data/.rbenv-vars ADDED
@@ -0,0 +1 @@
1
+ RUBYOPT=-W:deprecated -W:experimental
@@ -28,17 +28,6 @@ Minitest/AssertInDelta:
28
28
  Enabled: true
29
29
  VersionAdded: '0.10'
30
30
 
31
- Minitest/AssertionInLifecycleHook:
32
- Description: 'This cop checks for usage of assertions in lifecycle hooks.'
33
- Enabled: true
34
- VersionAdded: '0.10'
35
-
36
- Minitest/AssertMatch:
37
- Description: 'This cop enforces the test to use `assert_match` instead of using `assert(matcher.match(object))`.'
38
- StyleGuide: 'https://minitest.rubystyle.guide#assert-match'
39
- Enabled: true
40
- VersionAdded: '0.6'
41
-
42
31
  Minitest/AssertIncludes:
43
32
  Description: 'This cop enforces the test to use `assert_includes` instead of using `assert(collection.include?(object))`.'
44
33
  StyleGuide: 'https://minitest.rubystyle.guide#assert-includes'
@@ -57,6 +46,12 @@ Minitest/AssertKindOf:
57
46
  Enabled: true
58
47
  VersionAdded: '0.10'
59
48
 
49
+ Minitest/AssertMatch:
50
+ Description: 'This cop enforces the test to use `assert_match` instead of using `assert(matcher.match(object))`.'
51
+ StyleGuide: 'https://minitest.rubystyle.guide#assert-match'
52
+ Enabled: true
53
+ VersionAdded: '0.6'
54
+
60
55
  Minitest/AssertNil:
61
56
  Description: 'This cop enforces the test to use `assert_nil` instead of using `assert_equal(nil, something)` or `assert(something.nil?)`.'
62
57
  StyleGuide: 'https://minitest.rubystyle.guide#assert-nil'
@@ -75,6 +70,12 @@ Minitest/AssertPathExists:
75
70
  Enabled: true
76
71
  VersionAdded: '0.10'
77
72
 
73
+ Minitest/AssertPredicate:
74
+ Description: 'This cop enforces the test to use `assert_predicate` instead of using `assert(obj.a_predicate_method?)`.'
75
+ StyleGuide: 'https://minitest.rubystyle.guide/#assert-predicate'
76
+ Enabled: true
77
+ VersionAdded: '0.18'
78
+
78
79
  Minitest/AssertRespondTo:
79
80
  Description: 'This cop enforces the test to use `assert_respond_to(object, :do_something)` over `assert(object.respond_to?(:do_something))`.'
80
81
  StyleGuide: 'https://minitest.rubystyle.guide#assert-responds-to-method'
@@ -99,6 +100,17 @@ Minitest/AssertWithExpectedArgument:
99
100
  Safe: false
100
101
  VersionAdded: '0.11'
101
102
 
103
+ Minitest/AssertionInLifecycleHook:
104
+ Description: 'This cop checks for usage of assertions in lifecycle hooks.'
105
+ Enabled: true
106
+ VersionAdded: '0.10'
107
+
108
+ Minitest/DuplicateTestRun:
109
+ Description: 'This cop detects duplicate test runs caused by one test class inheriting from another.'
110
+ StyleGuide: 'https://minitest.rubystyle.guide/#subclassing-test-cases'
111
+ Enabled: true
112
+ VersionAdded: '0.19'
113
+
102
114
  Minitest/GlobalExpectations:
103
115
  Description: 'This cop checks for deprecated global expectations.'
104
116
  StyleGuide: 'https://minitest.rubystyle.guide#global-expectations'
@@ -164,12 +176,6 @@ Minitest/RefuteIncludes:
164
176
  Enabled: true
165
177
  VersionAdded: '0.3'
166
178
 
167
- Minitest/RefuteMatch:
168
- Description: 'This cop enforces the test to use `refute_match` instead of using `refute(matcher.match(object))`.'
169
- StyleGuide: 'https://minitest.rubystyle.guide#refute-match'
170
- Enabled: true
171
- VersionAdded: '0.6'
172
-
173
179
  Minitest/RefuteInstanceOf:
174
180
  Description: 'This cop enforces the test to use `refute_instance_of(Class, object)` over `refute(object.instance_of?(Class))`.'
175
181
  StyleGuide: 'https://minitest.rubystyle.guide#refute-instance-of'
@@ -182,6 +188,12 @@ Minitest/RefuteKindOf:
182
188
  Enabled: true
183
189
  VersionAdded: '0.10'
184
190
 
191
+ Minitest/RefuteMatch:
192
+ Description: 'This cop enforces the test to use `refute_match` instead of using `refute(matcher.match(object))`.'
193
+ StyleGuide: 'https://minitest.rubystyle.guide#refute-match'
194
+ Enabled: true
195
+ VersionAdded: '0.6'
196
+
185
197
  Minitest/RefuteNil:
186
198
  Description: 'This cop enforces the test to use `refute_nil` instead of using `refute_equal(nil, something)` or `refute(something.nil?)`.'
187
199
  StyleGuide: 'https://minitest.rubystyle.guide#refute-nil'
@@ -194,12 +206,23 @@ Minitest/RefutePathExists:
194
206
  Enabled: true
195
207
  VersionAdded: '0.10'
196
208
 
209
+ Minitest/RefutePredicate:
210
+ Description: 'This cop enforces the test to use `refute_predicate` instead of using `refute(obj.a_predicate_method?)`.'
211
+ StyleGuide: 'https://minitest.rubystyle.guide/#refute-predicate'
212
+ Enabled: true
213
+ VersionAdded: '0.18'
214
+
197
215
  Minitest/RefuteRespondTo:
198
216
  Description: 'This cop enforces the test to use `refute_respond_to(object, :do_something)` over `refute(object.respond_to?(:do_something))`.'
199
217
  StyleGuide: 'https://minitest.rubystyle.guide#refute-respond-to'
200
218
  Enabled: true
201
219
  VersionAdded: '0.4'
202
220
 
221
+ Minitest/SkipEnsure:
222
+ Description: 'Checks that `ensure` call even if `skip`.'
223
+ Enabled: true
224
+ VersionAdded: '0.20'
225
+
203
226
  Minitest/TestMethodName:
204
227
  Description: 'This cop enforces that test method names start with `test_` prefix.'
205
228
  Enabled: true