Commit a2fc02f
authored
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 support1 parent 3cd93a2 commit a2fc02f
File tree
42 files changed
+5690
-3056
lines changed- .github/workflows
- lib
- jsonapi
- active_relation
- tasks
- test
- controllers
- fixtures
- helpers
- integration/requests
- unit
- active_relation_resource_finder
- resource
- serializer
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
42 files changed
+5690
-3056
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | 50 | | |
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 57 | | |
64 | 58 | | |
65 | | - | |
66 | | - | |
67 | 59 | | |
68 | 60 | | |
69 | 61 | | |
70 | 62 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 63 | | |
76 | 64 | | |
77 | | - | |
78 | | - | |
79 | 65 | | |
80 | 66 | | |
81 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
48 | | - | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| |||
90 | 95 | | |
91 | 96 | | |
92 | 97 | | |
93 | | - | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
100 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
101 | 112 | | |
102 | 113 | | |
103 | 114 | | |
| |||
163 | 174 | | |
164 | 175 | | |
165 | 176 | | |
166 | | - | |
| 177 | + | |
| 178 | + | |
167 | 179 | | |
168 | 180 | | |
169 | 181 | | |
| |||
175 | 187 | | |
176 | 188 | | |
177 | 189 | | |
178 | | - | |
179 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
180 | 195 | | |
181 | 196 | | |
182 | 197 | | |
183 | 198 | | |
184 | 199 | | |
185 | 200 | | |
186 | | - | |
| 201 | + | |
| 202 | + | |
187 | 203 | | |
188 | 204 | | |
189 | 205 | | |
| |||
195 | 211 | | |
196 | 212 | | |
197 | 213 | | |
198 | | - | |
| 214 | + | |
199 | 215 | | |
200 | | - | |
| 216 | + | |
201 | 217 | | |
202 | 218 | | |
203 | 219 | | |
| |||
294 | 310 | | |
295 | 311 | | |
296 | 312 | | |
297 | | - | |
| 313 | + | |
0 commit comments