v5.7.2 - Range Queries, Presigned Embeddings, Bug Fixes
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
betweenconstraint now accepts a RubyRangein addition to a 2-element array, soPerson.where(:age.between => 5..25)andRecord.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$ltinstead. Beginless (..25) and endless (5..) ranges are also supported and constrain only the side that is present, soPerson.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 ofbetween:Person.query.where_not_between(:age, 5..25)compiles toage < 5 OR age > 25, accepting the same Range and 2-element Array forms asbetween. It is not available as afield.not_between => valuesymbol constraint, since a range's negation is inherently an$orof two comparisons and only one$orgroup can be safely merged into a compiled query;where_not_betweeninstead nests correctly inside a query's other.whereconditions and raisesArgumentErrorrather than silently dropping part of the query when one already exists.
embed_image and Presigned URLs
- FIXED:
embed_imagealways sent the source file's barefile.urlto the embedding provider (or to the SDK's own:bytes-mode downloader). On a private-bucket file adapter (S3/GCS configured withpresignedUrl: true),file.urlis 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_imagenow forwardsfile.presigned_urlwhen it is present and not yet expired, and falls back to the bare URL otherwise, for bothsource: :urlandsource: :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#getlooked up the target class with a rawObject.const_get(@table), which only worked when the Parse class name matched the Ruby constant name exactly. A model that renames its table viaparse_class "SomeOtherName"was never found by this lookup.Query#getnow passes the table name through toParse::Object.buildas a string, letting it run its ownParse::Model.find_classresolution, which already understandsparse_classaliasing. - FIXED: Internal warnings for authentication, timeout, and cloud-code errors (
Parse::Client._safe_warn) always wrote to STDERR, even when an app had configuredParse.logger = Rails.loggerfor the rest of its Parse request/response logging. These warnings now route throughParse::Middleware::Logging.loggerwhen 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