v 2.0 PR#4
Closed
AdrianCurtin wants to merge 107 commits into
Closed
Conversation
* Update faraday and rack, remove rack-middleware * Bring activemodel to v8 * Add matches key in query behaviors * Add starts with , array size, time range * Pass session and opts if provided to call_function * Add aggregate pipeline functions * Add does not equal linked pointer Output aggregate pipeline Output aggregate pipeline Fix typo & add parse string processing for pointers Format with _p_ * Format _created_at and updated_at fields for aggregation pipeline * Add date conversion as well * Add verbose aggregate method * Update dates * Update query.rb * Bump minimum ruby version to 3.2 & parsestack version * Add additional sum / min / max fields * Add return pointer options for various parse queries to reduce load * Add pluck, enhanced group_by, and sortable grouping to Query Introduces a pluck method for extracting field values from query results, enhances group_by and group_by_date to support array flattening, pointer conversion, and sortable results, and adds GroupedResult, SortableGroupBy, and SortableGroupByDate classes for flexible aggregation and sorting. Also adds group_objects_by for grouping actual objects in Ruby. Improves documentation and extensibility for advanced aggregation use cases. * Reorder sorotable * Add new feature tests * Add to_table functions * table tests and sorting * Adjust tests * Update query.rb * Update query.rb * Refactor aggregation logic and add Aggregation helper class Refactored aggregation-related methods in Parse::Query to use a new Aggregation helper class for executing MongoDB pipelines. This improves code reuse, consistency, and testability for aggregation operations such as distinct, count_distinct, and group_by. Updated related tests to focus on core logic and pointer conversion, and added new utility methods for raw results and pointer extraction. * Add pipeline aggregation * Recheck pointers * process pointers * Fix dates * Fix dates again * Return parse pointers instead of mongodb strings * distinct by default will return all ids * Change version to 1.12.0 * Adjust changes and readme * Update parse-stack.gemspec Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update test/lib/parse/query/aggregation_features_test.rb Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Adjust typos --------- Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
Co-Authored-By: Copilot <175728472+Copilot@users.noreply.github.com>
… distinct_objects + add to_time(:utc) to handle rails warning
& change tracking test & transaction test
Add tests and handling for idempotency
563033e to
31d8f8b
Compare
4d872c7 to
80bc82f
Compare
Introduces comprehensive Class-Level Permissions (CLP) support, including a new Parse::CLP class, DSL methods for defining operation-level and field-level permissions, and methods for filtering data based on user roles and ownership. Updates schema auto-upgrade to push CLPs, adds documentation and usage examples to README and CHANGELOG, and provides integration tests for CLP functionality.
Introduces tests that verify Parse Server's protectedFields CLP enforcement for raw HTTP requests and webhook/cloud function responses. These tests ensure that sensitive fields are properly filtered for non-admin users and that admin and owner-based access is respected, simulating access from any client (e.g., JS, Swift). Also updates role creation in test setup to use add_users instead of passing users in the constructor.
CLP methods `protect_fields` and `set_clp` now automatically convert Ruby snake_case property names to camelCase field names for Parse Server, ensuring consistency and reducing errors. Also updated documentation and bumped version to 3.2.1.
7e7cf7f to
ce528d7
Compare
Enhances the Parse::CLP class and Parse::Object DSL to support default permissions for all operations, pointer-based permissions (readUserFields, writeUserFields), and improved snake_case to camelCase field conversion. Updates integration and unit tests to cover new features, including default permission propagation, pointer permissions, and field name conversions.
Adds a test to ensure that when only protected fields are set (without set_default_permission), as_json(include_defaults: true) includes all operations with public access as the fallback default. This addresses an edge case that previously caused 'Permission denied' errors.
The `latest` and `last_updated` methods for both class and query instances now support a `limit:` option in constraints, allowing retrieval of multiple recent records while applying query filters. Updated documentation and examples to reflect this enhancement. Bumped version to 3.2.2.
Adds support for the :pointers_only option to PointerCollectionProxy#as_json, allowing serialization of full objects or pointers as needed. Parse::Object#as_json now always includes identification fields (objectId, className, __type, id) when using :only, unless :strict is true. Introduces :exclude as an alias for :except in as_json. Updates tests to cover new behaviors and documents changes in the changelog. Bumps version to 3.2.3.
Raise the required Ruby version to 3.1 in the gemspec and update CI to test against Ruby 3.1, 3.2, 3.3, and 3.4. Update version to 3.3.0 and document breaking changes in the changelog. Also update .gitignore to exclude markdown files.
3715085 to
7aa900b
Compare
Renames test classes and references in upsert_methods_integration_test.rb to use UpsertTestUser and UpsertTestProduct for clarity and isolation. Updates a test assertion in mongodb_operators_integration_test.rb to expect 3 products ending with 'Pro' instead of 2. Also renames the test class in product_test.rb to ProductModelTest. Updates CHANGELOG.md to fix a version section ordering issue and clarify improvements.
Introduced a new USAGE_GUIDE.md with practical examples for Parse Stack usage, including setup, models, queries, aggregation, transactions, ACLs, roles, CLP, push notifications, caching, direct MongoDB access, and error handling. Updated the README to summarize new features and breaking changes in versions 3.x and 2.x, and to reference the new usage guide for practical examples.
c114c06 to
c7d72b8
Compare
Moved Parse Server configuration to environment variables in the startup script and simplified server invocation. Updated LiveQuery integration test to use block-based configuration and improved setup/teardown for better test isolation.
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.
This pull request introduces a major overhaul to the testing and infrastructure setup for the project, focusing on comprehensive integration testing using a real Parse Server environment orchestrated with Docker. It also updates documentation, build, and test tooling to support these changes, and drops support for older Ruby versions and certain dependencies.
Key changes include:
Testing Infrastructure & Docker Integration
config/parse-config.json,.env.test), Docker Compose setup, and helper scripts for automated test server management. This ensures reliable, reproducible integration tests against a real Parse Server. [1] [2]Makefilewith commands for starting, stopping, and managing the Dockerized test server and running integration tests.Testing & Build Tooling
Rakefilewith dedicated tasks for running integration and unit tests, listing test files, and ensuring Docker is used for integration tests..travis.ymlto run tests only on Ruby 3.1.2, dropping support for Ruby 2.6 and 2.7.Documentation & Changelog
CHANGELOG.md, detailing all major new features, breaking changes, and improvements in this release, including transaction support, enhanced change tracking, request idempotency, ACL query constraints, and more.Dependency Management
faraday_middlewarerequirement from.solargraph.ymland commented out thethingem in theGemfiledue to compatibility issues, reflecting updated dependency management for Ruby 3.2+. [1] [2]Other
--no-privateflag from.yardopts, potentially changing YARD documentation output.These changes collectively modernize the development and testing workflow, improve reliability, and lay the groundwork for advanced features and robust integration testing.
Testing Infrastructure & Docker Integration
config/parse-config.jsonand.env.testfor Parse Server and test environment configuration. [1] [2]Makefilefor managing Dockerized Parse Server lifecycle and integration tests.Testing & Build Tooling
Rakefilewith tasks for integration/unit tests and test file listing, enforcing Docker-based integration testing..travis.ymlto drop Ruby 2.6/2.7 and use Ruby 3.1.2 for CI.Documentation & Changelog
Changes.mdtoCHANGELOG.md, documenting all major changes and new features in detail.Dependency Management
faraday_middlewarefrom.solargraph.ymland commented outthininGemfiledue to compatibility issues. [1] [2]Other
--no-privatefrom.yardopts, affecting documentation output.