-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V0.11 refactor resource classes to modules (#1406)
* Restore previous include directives behavior * Default sort use _primary_key * Remove support for pluck attributes * Pass relationship instead of relationship name * Update copyright date * Ignore docker-compose override files * add _relation_name method * Rework resource class to support using modules for retrieving resources by way of a `resource_retrieval_strategy` Removes BasicResource class and replaces ActiveRelationResource with a module * Use `_relationship` helper method * Add ActiveRelationRetrieval Allows retrieval of resources by querying the primary table and joining the source table - the opposite of the v10 version * Skip extra pluck queries when not caching a resource * Test Cleanup * Adjust tested query counts based on default_resource_retrieval_strategy * create_implicit_polymorphic_type_relationships * Add ActiveRelationRetrievalV09 * Move resource down in the load order * Use underscore instead of downcase * Refactor Resource to load retrieval strategy as class loads * Simplify loading resource retrieval strategy modules Add SimpleResource that does not load a resource retrieval strategy module * Remove no longer need deferred_relationship code * Add warning about potentially unused `records_for_populate` * Rework loading the resource_retrieval_strategy to fix issue in real projects * Use SortedSets for resource_identities * Add sorted_set gem * Remove rails 5 support
- Loading branch information
Showing
42 changed files
with
5,690 additions
and
3,056 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,35 +47,21 @@ jobs: | |
- '7.0' | ||
- '6.1' | ||
- '6.0' | ||
- '5.2' | ||
- '5.1' | ||
database_url: | ||
- sqlite3:test_db | ||
- postgresql://postgres:password@localhost:5432/test | ||
- mysql2://root:[email protected]:3306/test | ||
exclude: | ||
- ruby: '3.2' | ||
rails: '6.0' | ||
- ruby: '3.2' | ||
rails: '5.2' | ||
- ruby: '3.2' | ||
rails: '5.1' | ||
- ruby: '3.1' | ||
rails: '6.0' | ||
- ruby: '3.1' | ||
rails: '5.2' | ||
- ruby: '3.1' | ||
rails: '5.1' | ||
- ruby: '3.0' | ||
rails: '6.0' | ||
- ruby: '3.0' | ||
rails: '5.2' | ||
- ruby: '3.0' | ||
rails: '5.1' | ||
- ruby: '2.6' | ||
rails: '7.0' | ||
- database_url: postgresql://postgres:password@localhost:5432/test | ||
rails: '5.1' | ||
env: | ||
RAILS_VERSION: ${{ matrix.rails }} | ||
DATABASE_URL: ${{ matrix.database_url }} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,4 @@ test_db | |
test_db-journal | ||
.idea | ||
*.iml | ||
*.override.yml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (c) 2014-2021 Cerebris Corporation | ||
Copyright (c) 2014-2023 Cerebris Corporation | ||
|
||
MIT License | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.