Commit 92c5fe5
committed
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 5868a37 commit 92c5fe5
File tree
42 files changed
+5685
-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
+5685
-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 | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
| |||
| 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 | | |
| |||
108 | 113 | | |
109 | 114 | | |
110 | 115 | | |
111 | | - | |
| 116 | + | |
| 117 | + | |
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
116 | 122 | | |
117 | 123 | | |
118 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
119 | 130 | | |
120 | 131 | | |
121 | 132 | | |
| |||
181 | 192 | | |
182 | 193 | | |
183 | 194 | | |
184 | | - | |
| 195 | + | |
| 196 | + | |
185 | 197 | | |
186 | 198 | | |
187 | 199 | | |
| |||
193 | 205 | | |
194 | 206 | | |
195 | 207 | | |
196 | | - | |
197 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
198 | 213 | | |
199 | 214 | | |
200 | 215 | | |
201 | 216 | | |
202 | 217 | | |
203 | 218 | | |
204 | | - | |
| 219 | + | |
| 220 | + | |
205 | 221 | | |
206 | 222 | | |
207 | 223 | | |
| |||
213 | 229 | | |
214 | 230 | | |
215 | 231 | | |
216 | | - | |
| 232 | + | |
217 | 233 | | |
218 | | - | |
| 234 | + | |
219 | 235 | | |
220 | 236 | | |
221 | 237 | | |
| |||
0 commit comments