Skip to content

Commit

Permalink
Update rgeo dependency to version 3.0 and adjust tests for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff.dean committed Feb 28, 2025
1 parent 7acaf7e commit c540ecb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
BUNDLE_GEMFILE: ${{matrix.gemfile}}
strategy:
matrix:
ruby: ['3.0', '2.7']
ruby: ['3.3', '3.2', '3.1', '3.0']
gemfile:
- gemfiles/ar71.gemfile
mysql: ['5.7', '8.0']
mysql: ['5.7']
steps:
- name: Set Up Actions
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install GEOS
run: sudo apt-get install libgeos-dev
- name: Set Up Ruby
Expand Down
2 changes: 1 addition & 1 deletion activerecord-mysql2rgeo-adapter.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |spec|

spec.add_dependency "activerecord", "~> 7.1.0"
spec.add_dependency "rgeo-activerecord", "~> 7.0.0"
spec.add_dependency "rgeo", "~> 2.0"
spec.add_dependency "rgeo", "~> 3.0"

spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "minitest", "~> 5.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ def new_column_definition(name, type, **options)

column
end

def valid_column_definition_options
super + %i[geographic has_m spatial_type srid]
end
end

module ColumnDefinitionUtils
Expand Down
2 changes: 1 addition & 1 deletion test/basic_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_point_to_json
obj = SpatialModel.new
assert_match(/"latlon":null/, obj.to_json)
obj.latlon = factory.point(1.0, 2.0)
assert_match(/"latlon":"POINT\s\(1\.0\s2\.0\)"/, obj.to_json)
assert_match(/"latlon":"POINT\s\(1(\.0)?\s2(\.0)?\)"/, obj.to_json)
end

def test_custom_column
Expand Down

0 comments on commit c540ecb

Please sign in to comment.