activerecord-mysql2rgeo-adapter
activerecord-mysql2rgeo-adapter copied to clipboard
Rails 7.2 support
Changes necessary to build the gem and get passing tests with Rails 7.2
Note: The CI build fails with Ruby 2.7. Would the maintainers of https://github.com/stadia/activerecord-mysql2rgeo-adapter be open to the idea of dropping support for Ruby 2.x?
Merged with latest changes in main, fixed merge conflicts
Hello. Will this PR be reviewed?
@stadia are there any updates on if/when this PR might be reviewed? We rely on the activerecord-mysql2rgeo-adapter gem and the lack of Rails 7.2 support is impeding our rails upgrade efforts.
It appears the author, @stadia, used the /gemini command without specifying an argument. This command requires an argument, such as review or summary. If the intention was to initiate a code review, the correct command is /gemini review. If they were looking for a summary of the pull request, it would be /gemini summary. For a list of available commands, they can use /gemini help.
/gemini review
/gemini summary
Summary of Changes
This pull request updates the activerecord-mysql2rgeo-adapter gem to support Rails 7.2. It includes changes to the gemspec, gemfiles, appraisal file, and test configurations to reflect the new Rails version. Additionally, it registers the adapter to prevent a deprecation warning and fixes a test failure related to decimal formatting in JSON output. A with_connection method was added to address test failures related to schema dumping.
Highlights
- Rails 7.2 Support: The gem is updated to be compatible with Rails 7.2, including updating dependencies and configurations.
- Adapter Registration: The adapter is now registered to avoid the
ActiveRecord::AdapterNotFounderror in Rails 7.2. - Test Fixes: A test failure related to decimal formatting in JSON output has been resolved, and a
with_connectionmethod was added to fix schema dumping issues.
Changelog
Click here to see the changelog
- .github/workflows/tests.yml
- Updated the Ruby version to 3.1 in the test matrix.
- Updated the gemfile to
ar72.gemfile.
- .rubocop_todo.yml
- Updated the excluded gemfile to
ar72.gemfile.
- Updated the excluded gemfile to
- .travis.yml
- Updated the gemfile to
ar72.gemfile.
- Updated the gemfile to
- Appraisals
- Updated the appraisal to
ar72and ActiveRecord version to~> 7.2.0.
- Updated the appraisal to
- CONTRIBUTING.md
- Updated the gemfile references to
ar72.gemfilein the example commands.
- Updated the gemfile references to
- activerecord-mysql2rgeo-adapter.gemspec
- Updated the ActiveRecord dependency to
~> 7.2.0. - Updated the required Ruby version to '>= 2.7.0'
- Updated the ActiveRecord dependency to
- gemfiles/ar72.gemfile
- Updated the ActiveRecord gem version to
~> 7.2.0.
- Updated the ActiveRecord gem version to
- lib/active_record/connection_adapters/mysql2rgeo/spatial_table_definition.rb
- Added
valid_column_definition_optionsmethod to allow geographic, has_m, spatial_type, and srid column definition options.
- Added
- lib/active_record/connection_adapters/mysql2rgeo/version.rb
- Updated the gem version to
7.2.0.
- Updated the gem version to
- lib/active_record/connection_adapters/mysql2rgeo_adapter.rb
- Updated the initialize method to use argument forwarding.
- Added a
with_connectionmethod that yields self.
- lib/activerecord-mysql2rgeo-adapter.rb
- Registered the adapter using
ActiveRecord::ConnectionAdapters.register.
- Registered the adapter using
- test/basic_test.rb
- Updated the regex in
test_point_to_jsonto account for possible missing decimal places.
- Updated the regex in
Activity
- The author, denisahearn, merged the PR with the latest changes in main and fixed merge conflicts.
- denisahearn asked if the PR would be reviewed.
- kmfrett inquired about the status of the PR, highlighting the need for Rails 7.2 support.
- gemini-code-assist[bot] pointed out that the
/geminicommand was used without an argument. - stadia requested a code review using
/gemini review. - stadia requested a summary using
/gemini summary. - denisahearn provided context for several changes via review comments, linking to relevant Rails PRs and explaining the purpose of the
with_connectionmethod and the adapter registration. - denisahearn explained the fix for the
test_point_to_jsonfailure.