Skip to content

v 2.0 PR#4

Closed
AdrianCurtin wants to merge 107 commits into
v1.11.3from
master
Closed

v 2.0 PR#4
AdrianCurtin wants to merge 107 commits into
v1.11.3from
master

Conversation

@AdrianCurtin

Copy link
Copy Markdown

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

  • Introduced a complete Docker-based Parse Server integration testing environment, including configuration files (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]
  • Added a Makefile with commands for starting, stopping, and managing the Dockerized test server and running integration tests.

Testing & Build Tooling

  • Enhanced the Rakefile with dedicated tasks for running integration and unit tests, listing test files, and ensuring Docker is used for integration tests.
  • Updated .travis.yml to run tests only on Ruby 3.1.2, dropping support for Ruby 2.6 and 2.7.

Documentation & Changelog

  • Renamed and greatly expanded the changelog to 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

  • Removed the faraday_middleware requirement from .solargraph.yml and commented out the thin gem in the Gemfile due to compatibility issues, reflecting updated dependency management for Ruby 3.2+. [1] [2]

Other

  • Removed the --no-private flag 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

  • Added config/parse-config.json and .env.test for Parse Server and test environment configuration. [1] [2]
  • Added a Makefile for managing Dockerized Parse Server lifecycle and integration tests.

Testing & Build Tooling

  • Enhanced Rakefile with tasks for integration/unit tests and test file listing, enforcing Docker-based integration testing.
  • Updated .travis.yml to drop Ruby 2.6/2.7 and use Ruby 3.1.2 for CI.

Documentation & Changelog

  • Renamed and massively expanded Changes.md to CHANGELOG.md, documenting all major changes and new features in detail.

Dependency Management

  • Removed faraday_middleware from .solargraph.yml and commented out thin in Gemfile due to compatibility issues. [1] [2]

Other

  • Removed --no-private from .yardopts, affecting documentation output.

AdrianCurtin and others added 24 commits August 15, 2025 13:18
* 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
@AdrianCurtin AdrianCurtin force-pushed the master branch 3 times, most recently from 563033e to 31d8f8b Compare August 26, 2025 15:24
@AdrianCurtin AdrianCurtin force-pushed the master branch 3 times, most recently from 4d872c7 to 80bc82f Compare August 31, 2025 17:50
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.
@AdrianCurtin AdrianCurtin force-pushed the master branch 5 times, most recently from 7e7cf7f to ce528d7 Compare December 12, 2025 08:00
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.
@AdrianCurtin AdrianCurtin force-pushed the master branch 6 times, most recently from 3715085 to 7aa900b Compare January 9, 2026 02:58
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.
@AdrianCurtin AdrianCurtin force-pushed the master branch 4 times, most recently from c114c06 to c7d72b8 Compare January 9, 2026 06:02
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants