Skip to content

v5.7.2 - Range Queries, Presigned Embeddings, Bug Fixes

Choose a tag to compare

@AdrianCurtin AdrianCurtin released this 04 Aug 22:33
· 7 commits to main since this release
0736699

Feature Release

A query and embeddings release: adds Ruby Range support to the between constraint plus its logical negation where_not_between, fixes embed_image so it can use presigned URLs against private-bucket file adapters, and closes two smaller correctness issues in Query#get and Parse::Client._safe_warn.

Range and Not-Between Queries

  • NEW: The between constraint now accepts a Ruby Range in addition to a 2-element array, so Person.where(:age.between => 5..25) and Record.where(:date.between => 5.days.ago...2.days.ago) work directly. An inclusive range (..) maps its upper bound to $lte, matching the existing array form, while an exclusive range (...) maps it to $lt instead. Beginless (..25) and endless (5..) ranges are also supported and constrain only the side that is present, so Person.where(:age.between => 18..) compiles to {"$gte" => 18} with no upper bound. The array form is unchanged, and both forms produce identical output for the same bounds.
  • NEW: Query#where_not_between(field, value) adds the logical negation of between: Person.query.where_not_between(:age, 5..25) compiles to age < 5 OR age > 25, accepting the same Range and 2-element Array forms as between. It is not available as a field.not_between => value symbol constraint, since a range's negation is inherently an $or of two comparisons and only one $or group can be safely merged into a compiled query; where_not_between instead nests correctly inside a query's other .where conditions and raises ArgumentError rather than silently dropping part of the query when one already exists.

embed_image and Presigned URLs

  • FIXED: embed_image always sent the source file's bare file.url to the embedding provider (or to the SDK's own :bytes-mode downloader). On a private-bucket file adapter (S3/GCS configured with presignedUrl: true), file.url is the canonical URL with its signature stripped, so the provider's fetch (or the SDK's download) got a 403 instead of the image. embed_image now forwards file.presigned_url when it is present and not yet expired, and falls back to the bare URL otherwise, for both source: :url and source: :bytes. The stored digest is still keyed on the bare canonical URL, so a save that only rotates the file's signature does not trigger a needless re-embed.

Smaller Fixes

  • FIXED: Query#get looked up the target class with a raw Object.const_get(@table), which only worked when the Parse class name matched the Ruby constant name exactly. A model that renames its table via parse_class "SomeOtherName" was never found by this lookup. Query#get now passes the table name through to Parse::Object.build as a string, letting it run its own Parse::Model.find_class resolution, which already understands parse_class aliasing.
  • FIXED: Internal warnings for authentication, timeout, and cloud-code errors (Parse::Client._safe_warn) always wrote to STDERR, even when an app had configured Parse.logger = Rails.logger for the rest of its Parse request/response logging. These warnings now route through Parse::Middleware::Logging.logger when one is configured; STDERR remains the fallback both when no logger is configured and when a configured logger itself raises.

Commit: 0736699
Author: Adrian Curtin
Date: August 4, 2026