Repository navigation
Read persisted GeoJSON Point coordinates - #81
Merged
Merged
Conversation
houndci-bot
reviewed
Oct 18, 2026
| ) | ||
|
|
||
| expect(alarm.reload.spot.to_a).to eq([10, -9]) | ||
| expect(Alarm.within([10, -9], 1).to_a.map { |match| match.spot.to_a }).to eq([[10, -9]]) |
Collaborator
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. [92/80]
dblock
force-pushed
the
dblock/geojson-points
branch
from
November 24, 2026 19:09
66cdfd1 to
87d490f
Compare
Cover GeoJSON assignment, persisted BSON points, and real spherical queries without changing legacy array storage. Refs #73. This changes how persisted points are read, so the next release becomes 7.5.0 instead of 7.4.3, which was never published. Combine the GeoJSON read with the empty-array handling from #77, and add demongoize and demongoizes to the spelling vocabulary and the #77 spec to the block-length exclusions so lint passes again on master. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Gr21iR4JxWxGGyXdJ3uc9
dblock
force-pushed
the
dblock/geojson-points
branch
from
November 24, 2026 19:11
87d490f to
1ec7d78
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #73.
GeoJSON input is already accepted during assignment, but Point demongoization treated persisted GeoJSON hashes as positional arguments. Extract coordinates when loading a GeoJSON hash or BSON document, while preserving the existing array path and storage format.
Adds coverage for symbol/string keys and BSON documents, GeoJSON assignment to a spherical field, and direct GeoJSON writes to MongoDB followed by reload and real spherical queries. Documents that sphere indexing does not require changing legacy point-array storage.
Independent of the RGeo factory fix in #80; both PRs target master directly.
Prepared by an AI on behalf of @dblock.
Version
This changes how persisted points are read, so it sets the next release to 7.5.0:
Mongoid::Geospatial::VERSIONgoes from7.4.3to7.5.0, and the CHANGELOG heading becomes## 7.5.0 (Next)with its entries unchanged. 7.4.3 was never published; RubyGems has 7.4.2 as the latest.Rebase onto
masterdemongoizenow extracts GeoJSONcoordinatesfirst and then applies Handle persisted empty Point arrays #77's empty check to them, so both a stored[]and a GeoJSON point with empty coordinates read asnil.master(demongoizespelling and the block-length exclusion). This PR only addsdemongoizes, which its own spec uses.## 7.5.0 (Next). Local validation:rake lint(64 files) andactionlintare clean, and the suite passes (183 examples, 0 failures), including the version spec.This update was made by an AI (Claude) on behalf of @dblock.