deep_pluck 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ccf8d7148c3cc85af9e85d04417e445a7f67bbe8c6d7feabfef12fbce6207a9
4
- data.tar.gz: 2999ce4ea1a1224f9618f56014926887352bae0e3a6724073d518ddc64c99e9c
3
+ metadata.gz: f334446e290e022ad9068a6c0fece12f532628708edf9366da59d87c06adb1a6
4
+ data.tar.gz: bea13f1d44eba4803c50952946d9b005a73361a2cca32e6642131849d727056a
5
5
  SHA512:
6
- metadata.gz: e92f37c683aa8dab7c73555bb03e35ec3791a7eeebcba494af915efb3490e946785995b0a21cfc5f7ee5acd90b5479b99963dc05b327266d89ad1ccce5622719
7
- data.tar.gz: 986d208e8861aae0536584add5703813c8a1b3572af9ed82705a0904536ff28b6f69041c84c6ad5e13043a14b9dcfbe53853250bd8d4969857d566cf19afb5a6
6
+ metadata.gz: e8f5b83282fe42694af18b96b37eaa24f202da8f3a80445c9a1844f75e99cd9e48c61793f389482e6cd26db980893c360c97e4c60f6dc4b8b6208256dd8b2162
7
+ data.tar.gz: 531479ac099907faddf48f670fbb6ece2b05f2a20ce13258ba60664de77ef0429940c1d5407688c7b6ccae94c778948c515c4bbd4df1c9fc1c1540f83f9ac664
data/.github/FUNDING.yml CHANGED
File without changes
@@ -25,6 +25,7 @@ jobs:
25
25
  - 2.7
26
26
  - 3.0
27
27
  - 3.1
28
+ - 3.2
28
29
  gemfile:
29
30
  - 3.2.gemfile
30
31
  - 4.2.gemfile
@@ -35,6 +36,7 @@ jobs:
35
36
  - 6.1.gemfile
36
37
  - 7.0.gemfile
37
38
  - 7.1.gemfile
39
+ - 7.2.gemfile
38
40
  exclude:
39
41
  - gemfile: 3.2.gemfile
40
42
  ruby: 2.6
@@ -44,24 +46,34 @@ jobs:
44
46
  ruby: 3.0
45
47
  - gemfile: 3.2.gemfile
46
48
  ruby: 3.1
49
+ - gemfile: 3.2.gemfile
50
+ ruby: 3.2
47
51
  - gemfile: 4.2.gemfile
48
52
  ruby: 2.7
49
53
  - gemfile: 4.2.gemfile
50
54
  ruby: 3.0
51
55
  - gemfile: 4.2.gemfile
52
56
  ruby: 3.1
57
+ - gemfile: 4.2.gemfile
58
+ ruby: 3.2
53
59
  - gemfile: 5.0.gemfile
54
60
  ruby: 3.0
55
61
  - gemfile: 5.0.gemfile
56
62
  ruby: 3.1
63
+ - gemfile: 5.0.gemfile
64
+ ruby: 3.2
57
65
  - gemfile: 5.1.gemfile
58
66
  ruby: 3.0
59
67
  - gemfile: 5.1.gemfile
60
68
  ruby: 3.1
69
+ - gemfile: 5.1.gemfile
70
+ ruby: 3.2
61
71
  - gemfile: 5.2.gemfile
62
72
  ruby: 3.0
63
73
  - gemfile: 5.2.gemfile
64
74
  ruby: 3.1
75
+ - gemfile: 5.2.gemfile
76
+ ruby: 3.2
65
77
  - gemfile: 6.0.gemfile
66
78
  ruby: 2.3
67
79
  - gemfile: 6.1.gemfile
@@ -74,6 +86,14 @@ jobs:
74
86
  ruby: 2.3
75
87
  - gemfile: 7.1.gemfile
76
88
  ruby: 2.6
89
+ - gemfile: 7.2.gemfile
90
+ ruby: 2.3
91
+ - gemfile: 7.2.gemfile
92
+ ruby: 2.6
93
+ - gemfile: 7.2.gemfile
94
+ ruby: 2.7
95
+ - gemfile: 7.2.gemfile
96
+ ruby: 3.0
77
97
  env:
78
98
  BUNDLE_GEMFILE: "gemfiles/${{ matrix.gemfile }}"
79
99
 
data/.gitignore CHANGED
File without changes
data/.rubocop.yml CHANGED
File without changes
data/CHANGELOG.md CHANGED
@@ -1,94 +1,96 @@
1
- ## Change Log
2
-
3
- ### [upcoming](https://github.com/khiav223577/deep_pluck/compare/v1.3.0...HEAD) 2023/12/24
4
- - [#61](https://github.com/khiav223577/deep_pluck/pull/61) Skip the step of publishing code coverage for the PR from forked repos (@khiav223577)
5
- - [#59](https://github.com/khiav223577/deep_pluck/pull/59) Fix: missing data caused by wrong association definition in test cases (@khiav223577)
6
-
7
- ### [v1.3.0](https://github.com/khiav223577/deep_pluck/compare/v1.2.1...v1.3.0) 2023/08/10
8
- - [#58](https://github.com/khiav223577/deep_pluck/pull/58) add frozen_string_literal (@khiav223577)
9
- - [#57](https://github.com/khiav223577/deep_pluck/pull/57) Always show the association key even if there is no data (@khiav223577)
10
-
11
- ### [v1.2.1](https://github.com/khiav223577/deep_pluck/compare/v1.2.0...v1.2.1) 2023/08/06
12
- - [#56](https://github.com/khiav223577/deep_pluck/pull/56) Fix: deep_pluck at has_many association with primary_key options will fail (@khiav223577)
13
- - [#55](https://github.com/khiav223577/deep_pluck/pull/55) Drop the support of ruby 2.2 (@khiav223577)
14
- - [#54](https://github.com/khiav223577/deep_pluck/pull/54) Refactor: use gem to setup autoload paths in tests (@khiav223577)
15
- - [#53](https://github.com/khiav223577/deep_pluck/pull/53) Support Rails 7.0 (@khiav223577)
16
- - [#52](https://github.com/khiav223577/deep_pluck/pull/52) Support Ruby 3.1 (@khiav223577)
17
- - [#51](https://github.com/khiav223577/deep_pluck/pull/51) Support Ruby 3.0 (@khiav223577)
18
-
19
- ### [v1.2.0](https://github.com/khiav223577/deep_pluck/compare/v1.1.7...v1.2.0) 2021/06/10
20
- - [#50](https://github.com/khiav223577/deep_pluck/pull/50) Support `globalize` gem (@khiav223577)
21
-
22
- ### [v1.1.7](https://github.com/khiav223577/deep_pluck/compare/v1.1.6...v1.1.7) 2021/04/10
23
- - [#48](https://github.com/khiav223577/deep_pluck/pull/48) Fix: joins incorrect table when doing inverse lookup for HABTM associations with custom name (@khiav223577)
24
- - [#45](https://github.com/khiav223577/deep_pluck/pull/45) Do not publish code coverage for PRs from forks (@moon-moon-husky)
25
-
26
- ### [v1.1.6](https://github.com/khiav223577/deep_pluck/compare/v1.1.5...v1.1.6) 2021/02/09
27
- - [#43](https://github.com/khiav223577/deep_pluck/pull/43) Fix has_and_belongs_to_many issues when it does not specify "through" table (@khiav223577)
28
- - [#42](https://github.com/khiav223577/deep_pluck/pull/42) Migrating from Travis CI to GitHub Actions (@khiav223577)
29
-
30
- ### [v1.1.5](https://github.com/khiav223577/deep_pluck/compare/v1.1.4...v1.1.5) 2021/01/10
31
- - [#39](https://github.com/khiav223577/deep_pluck/pull/39) Compatibility with Rails 6.1.1 (@klausbadelt)
32
- - [#40](https://github.com/khiav223577/deep_pluck/pull/40) Exclude tests from coverage (@klausbadelt)
33
-
34
- ### [v1.1.4](https://github.com/khiav223577/deep_pluck/compare/v1.1.3...v1.1.4) 2020/01/13
35
- - [#36](https://github.com/khiav223577/deep_pluck/pull/36) A workaround to fix mismatched association named (@khiav223577)
36
- - [#35](https://github.com/khiav223577/deep_pluck/pull/35) Support Ruby 2.7 (@khiav223577)
37
-
38
- ### [v1.1.3](https://github.com/khiav223577/deep_pluck/compare/v1.1.2...v1.1.3) 2019/12/17
39
- - [#34](https://github.com/khiav223577/deep_pluck/pull/34) Support for plucking directly on a has_one through association (@khiav223577)
40
-
41
- ### [v1.1.2](https://github.com/khiav223577/deep_pluck/compare/v1.1.1...v1.1.2) 2019/09/25
42
- - [#32](https://github.com/khiav223577/deep_pluck/pull/32) Remove unneeded `PreloadedModel` (@khiav223577)
43
- - [#31](https://github.com/khiav223577/deep_pluck/pull/31) Support Rails 6.0 (@khiav223577)
44
- - [#30](https://github.com/khiav223577/deep_pluck/pull/30) Lock sqlite3 version to 1.3.x (@khiav223577)
45
- - [#28](https://github.com/khiav223577/deep_pluck/pull/28) Fix: broken test cases after bundler 2.0 was released (@khiav223577)
46
- - [#27](https://github.com/khiav223577/deep_pluck/pull/27) Remove deprecated codeclimate-test-reporter gem and update travis config (@khiav223577)
47
-
48
- ### [v1.1.1](https://github.com/khiav223577/deep_pluck/compare/v1.1.0...v1.1.1) 2018/07/08
49
- - [#26](https://github.com/khiav223577/deep_pluck/pull/26) Fix: `id` may disappear when plucking at model instance (@khiav223577)
50
- - [#25](https://github.com/khiav223577/deep_pluck/pull/25) Refactor - move models definition to separate files (@khiav223577)
51
- - [#24](https://github.com/khiav223577/deep_pluck/pull/24) test Rails 5.2 (@khiav223577)
52
- - [#23](https://github.com/khiav223577/deep_pluck/pull/23) It should test both 5.0.x and 5.1.x (@khiav223577)
53
- - [#22](https://github.com/khiav223577/deep_pluck/pull/22) #deep_pluck at active model without plucking deeply will cause ArgumentError (@khiav223577)
54
- - [#20](https://github.com/khiav223577/deep_pluck/pull/20) [ENHANCE] Eliminate Extra Select Loop in Hash Lookup (@berniechiu)
55
-
56
- ### [v1.1.0](https://github.com/khiav223577/deep_pluck/compare/v1.0.3...v1.1.0) 2018/02/15
57
- - [#19](https://github.com/khiav223577/deep_pluck/pull/19) Support deep_pluck at active model (@khiav223577)
58
- - [#18](https://github.com/khiav223577/deep_pluck/pull/18) Add rubocop and Improve code quality (@khiav223577)
59
-
60
- ### [v1.0.3](https://github.com/khiav223577/deep_pluck/compare/v1.0.2...v1.0.3) 2017/06/30
61
- - [#15](https://github.com/khiav223577/deep_pluck/pull/15) Test deep_pluck in rails 5.1.x (@khiav223577)
62
- - [#14](https://github.com/khiav223577/deep_pluck/pull/14) Handle polymorphic associations correctly. (@Bogadon)
63
-
64
- ### [v1.0.0](https://github.com/khiav223577/deep_pluck/compare/v0.1.4...v1.0.0) 2017/03/28
65
- - [#12](https://github.com/khiav223577/deep_pluck/pull/12) Reduce cyclomatic complexity in model.rb (@khiav223577)
66
-
67
- ### [v0.1.4](https://github.com/khiav223577/deep_pluck/compare/v0.1.3...v0.1.4) 2017/03/27
68
- - [#11](https://github.com/khiav223577/deep_pluck/pull/11) Fix conditional associations (@khiav223577)
69
-
70
- ### [v0.1.3](https://github.com/khiav223577/deep_pluck/compare/v0.1.2...v0.1.3) 2017/03/20
71
- - [#10](https://github.com/khiav223577/deep_pluck/pull/10) Fix custom foreign_key, custom primary_key issues (@khiav223577)
72
- - [#9](https://github.com/khiav223577/deep_pluck/pull/9) Fix has_and_belongs_to_many (@khiav223577)
73
-
74
- ### [v0.1.2](https://github.com/khiav223577/deep_pluck/compare/v0.1.1...v0.1.2) 2017/03/17
75
- - [#8](https://github.com/khiav223577/deep_pluck/pull/8) Fix that some need columns are missing (@khiav223577)
76
- - [#7](https://github.com/khiav223577/deep_pluck/pull/7) Raise error message when association not found (@khiav223577)
77
-
78
- ### [v0.1.1](https://github.com/khiav223577/deep_pluck/compare/v0.1.0...v0.1.1) 2017/03/16
79
- - [#6](https://github.com/khiav223577/deep_pluck/pull/6) Fix deep_pluck with #joins (@khiav223577)
80
-
81
- ### [v0.1.0](https://github.com/khiav223577/deep_pluck/compare/v0.0.4...v0.1.0) 2017/03/15
82
- - [#5](https://github.com/khiav223577/deep_pluck/pull/5) Support pluck many-to-many associations (@khiav223577)
83
-
84
- ### [v0.0.4](https://github.com/khiav223577/deep_pluck/compare/v0.0.3...v0.0.4) 2017/03/14
85
- - [#4](https://github.com/khiav223577/deep_pluck/pull/4) Fix use deep_pluck on NullRelation will raise exception and prevent unneeded query. (@khiav223577)
86
-
87
- ### [v0.0.3](https://github.com/khiav223577/deep_pluck/compare/v0.0.2...v0.0.3) 2017/03/06
88
- - [#3](https://github.com/khiav223577/deep_pluck/pull/3) Support more than two level (@khiav223577)
89
-
90
- ### [v0.0.2](https://github.com/khiav223577/deep_pluck/compare/v0.0.1...v0.0.2) 2017/03/06
91
- - [#2](https://github.com/khiav223577/deep_pluck/pull/2) The result of has_one association should not be array (@khiav223577)
92
-
93
- ### v0.0.1 2017/03/04
94
- - [#1](https://github.com/khiav223577/deep_pluck/pull/1) Implement deep_pluck (@khiav223577)
1
+ ## Change Log
2
+
3
+ ### [v1.3.1](https://github.com/khiav223577/deep_pluck/compare/v1.3.0...v1.3.1) 2023/12/24
4
+ - [#64](https://github.com/khiav223577/deep_pluck/pull/64) Support Rails 7.1 (@khiav223577)
5
+ - [#63](https://github.com/khiav223577/deep_pluck/pull/63) Deal with the parameter handling which was changed in Rails 7.0.6 (@khiav223577)
6
+ - [#61](https://github.com/khiav223577/deep_pluck/pull/61) Skip the step of publishing code coverage for the PR from forked repos (@khiav223577)
7
+ - [#59](https://github.com/khiav223577/deep_pluck/pull/59) Fix: missing data caused by wrong association definition in test cases (@khiav223577)
8
+
9
+ ### [v1.3.0](https://github.com/khiav223577/deep_pluck/compare/v1.2.1...v1.3.0) 2023/08/10
10
+ - [#58](https://github.com/khiav223577/deep_pluck/pull/58) add frozen_string_literal (@khiav223577)
11
+ - [#57](https://github.com/khiav223577/deep_pluck/pull/57) Always show the association key even if there is no data (@khiav223577)
12
+
13
+ ### [v1.2.1](https://github.com/khiav223577/deep_pluck/compare/v1.2.0...v1.2.1) 2023/08/06
14
+ - [#56](https://github.com/khiav223577/deep_pluck/pull/56) Fix: deep_pluck at has_many association with primary_key options will fail (@khiav223577)
15
+ - [#55](https://github.com/khiav223577/deep_pluck/pull/55) Drop the support of ruby 2.2 (@khiav223577)
16
+ - [#54](https://github.com/khiav223577/deep_pluck/pull/54) Refactor: use gem to setup autoload paths in tests (@khiav223577)
17
+ - [#53](https://github.com/khiav223577/deep_pluck/pull/53) Support Rails 7.0 (@khiav223577)
18
+ - [#52](https://github.com/khiav223577/deep_pluck/pull/52) Support Ruby 3.1 (@khiav223577)
19
+ - [#51](https://github.com/khiav223577/deep_pluck/pull/51) Support Ruby 3.0 (@khiav223577)
20
+
21
+ ### [v1.2.0](https://github.com/khiav223577/deep_pluck/compare/v1.1.7...v1.2.0) 2021/06/10
22
+ - [#50](https://github.com/khiav223577/deep_pluck/pull/50) Support `globalize` gem (@khiav223577)
23
+
24
+ ### [v1.1.7](https://github.com/khiav223577/deep_pluck/compare/v1.1.6...v1.1.7) 2021/04/10
25
+ - [#48](https://github.com/khiav223577/deep_pluck/pull/48) Fix: joins incorrect table when doing inverse lookup for HABTM associations with custom name (@khiav223577)
26
+ - [#45](https://github.com/khiav223577/deep_pluck/pull/45) Do not publish code coverage for PRs from forks (@moon-moon-husky)
27
+
28
+ ### [v1.1.6](https://github.com/khiav223577/deep_pluck/compare/v1.1.5...v1.1.6) 2021/02/09
29
+ - [#43](https://github.com/khiav223577/deep_pluck/pull/43) Fix has_and_belongs_to_many issues when it does not specify "through" table (@khiav223577)
30
+ - [#42](https://github.com/khiav223577/deep_pluck/pull/42) Migrating from Travis CI to GitHub Actions (@khiav223577)
31
+
32
+ ### [v1.1.5](https://github.com/khiav223577/deep_pluck/compare/v1.1.4...v1.1.5) 2021/01/10
33
+ - [#39](https://github.com/khiav223577/deep_pluck/pull/39) Compatibility with Rails 6.1.1 (@klausbadelt)
34
+ - [#40](https://github.com/khiav223577/deep_pluck/pull/40) Exclude tests from coverage (@klausbadelt)
35
+
36
+ ### [v1.1.4](https://github.com/khiav223577/deep_pluck/compare/v1.1.3...v1.1.4) 2020/01/13
37
+ - [#36](https://github.com/khiav223577/deep_pluck/pull/36) A workaround to fix mismatched association named (@khiav223577)
38
+ - [#35](https://github.com/khiav223577/deep_pluck/pull/35) Support Ruby 2.7 (@khiav223577)
39
+
40
+ ### [v1.1.3](https://github.com/khiav223577/deep_pluck/compare/v1.1.2...v1.1.3) 2019/12/17
41
+ - [#34](https://github.com/khiav223577/deep_pluck/pull/34) Support for plucking directly on a has_one through association (@khiav223577)
42
+
43
+ ### [v1.1.2](https://github.com/khiav223577/deep_pluck/compare/v1.1.1...v1.1.2) 2019/09/25
44
+ - [#32](https://github.com/khiav223577/deep_pluck/pull/32) Remove unneeded `PreloadedModel` (@khiav223577)
45
+ - [#31](https://github.com/khiav223577/deep_pluck/pull/31) Support Rails 6.0 (@khiav223577)
46
+ - [#30](https://github.com/khiav223577/deep_pluck/pull/30) Lock sqlite3 version to 1.3.x (@khiav223577)
47
+ - [#28](https://github.com/khiav223577/deep_pluck/pull/28) Fix: broken test cases after bundler 2.0 was released (@khiav223577)
48
+ - [#27](https://github.com/khiav223577/deep_pluck/pull/27) Remove deprecated codeclimate-test-reporter gem and update travis config (@khiav223577)
49
+
50
+ ### [v1.1.1](https://github.com/khiav223577/deep_pluck/compare/v1.1.0...v1.1.1) 2018/07/08
51
+ - [#26](https://github.com/khiav223577/deep_pluck/pull/26) Fix: `id` may disappear when plucking at model instance (@khiav223577)
52
+ - [#25](https://github.com/khiav223577/deep_pluck/pull/25) Refactor - move models definition to separate files (@khiav223577)
53
+ - [#24](https://github.com/khiav223577/deep_pluck/pull/24) test Rails 5.2 (@khiav223577)
54
+ - [#23](https://github.com/khiav223577/deep_pluck/pull/23) It should test both 5.0.x and 5.1.x (@khiav223577)
55
+ - [#22](https://github.com/khiav223577/deep_pluck/pull/22) #deep_pluck at active model without plucking deeply will cause ArgumentError (@khiav223577)
56
+ - [#20](https://github.com/khiav223577/deep_pluck/pull/20) [ENHANCE] Eliminate Extra Select Loop in Hash Lookup (@berniechiu)
57
+
58
+ ### [v1.1.0](https://github.com/khiav223577/deep_pluck/compare/v1.0.3...v1.1.0) 2018/02/15
59
+ - [#19](https://github.com/khiav223577/deep_pluck/pull/19) Support deep_pluck at active model (@khiav223577)
60
+ - [#18](https://github.com/khiav223577/deep_pluck/pull/18) Add rubocop and Improve code quality (@khiav223577)
61
+
62
+ ### [v1.0.3](https://github.com/khiav223577/deep_pluck/compare/v1.0.2...v1.0.3) 2017/06/30
63
+ - [#15](https://github.com/khiav223577/deep_pluck/pull/15) Test deep_pluck in rails 5.1.x (@khiav223577)
64
+ - [#14](https://github.com/khiav223577/deep_pluck/pull/14) Handle polymorphic associations correctly. (@Bogadon)
65
+
66
+ ### [v1.0.0](https://github.com/khiav223577/deep_pluck/compare/v0.1.4...v1.0.0) 2017/03/28
67
+ - [#12](https://github.com/khiav223577/deep_pluck/pull/12) Reduce cyclomatic complexity in model.rb (@khiav223577)
68
+
69
+ ### [v0.1.4](https://github.com/khiav223577/deep_pluck/compare/v0.1.3...v0.1.4) 2017/03/27
70
+ - [#11](https://github.com/khiav223577/deep_pluck/pull/11) Fix conditional associations (@khiav223577)
71
+
72
+ ### [v0.1.3](https://github.com/khiav223577/deep_pluck/compare/v0.1.2...v0.1.3) 2017/03/20
73
+ - [#10](https://github.com/khiav223577/deep_pluck/pull/10) Fix custom foreign_key, custom primary_key issues (@khiav223577)
74
+ - [#9](https://github.com/khiav223577/deep_pluck/pull/9) Fix has_and_belongs_to_many (@khiav223577)
75
+
76
+ ### [v0.1.2](https://github.com/khiav223577/deep_pluck/compare/v0.1.1...v0.1.2) 2017/03/17
77
+ - [#8](https://github.com/khiav223577/deep_pluck/pull/8) Fix that some need columns are missing (@khiav223577)
78
+ - [#7](https://github.com/khiav223577/deep_pluck/pull/7) Raise error message when association not found (@khiav223577)
79
+
80
+ ### [v0.1.1](https://github.com/khiav223577/deep_pluck/compare/v0.1.0...v0.1.1) 2017/03/16
81
+ - [#6](https://github.com/khiav223577/deep_pluck/pull/6) Fix deep_pluck with #joins (@khiav223577)
82
+
83
+ ### [v0.1.0](https://github.com/khiav223577/deep_pluck/compare/v0.0.4...v0.1.0) 2017/03/15
84
+ - [#5](https://github.com/khiav223577/deep_pluck/pull/5) Support pluck many-to-many associations (@khiav223577)
85
+
86
+ ### [v0.0.4](https://github.com/khiav223577/deep_pluck/compare/v0.0.3...v0.0.4) 2017/03/14
87
+ - [#4](https://github.com/khiav223577/deep_pluck/pull/4) Fix use deep_pluck on NullRelation will raise exception and prevent unneeded query. (@khiav223577)
88
+
89
+ ### [v0.0.3](https://github.com/khiav223577/deep_pluck/compare/v0.0.2...v0.0.3) 2017/03/06
90
+ - [#3](https://github.com/khiav223577/deep_pluck/pull/3) Support more than two level (@khiav223577)
91
+
92
+ ### [v0.0.2](https://github.com/khiav223577/deep_pluck/compare/v0.0.1...v0.0.2) 2017/03/06
93
+ - [#2](https://github.com/khiav223577/deep_pluck/pull/2) The result of has_one association should not be array (@khiav223577)
94
+
95
+ ### v0.0.1 2017/03/04
96
+ - [#1](https://github.com/khiav223577/deep_pluck/pull/1) Implement deep_pluck (@khiav223577)
data/CODE_OF_CONDUCT.md CHANGED
File without changes
data/LICENSE.txt CHANGED
File without changes
data/README.md CHANGED
@@ -9,8 +9,8 @@
9
9
  Allow you to pluck deeply into nested associations without loading a bunch of records.
10
10
 
11
11
  ## Supports
12
- - Ruby 2.3 ~ 2.7, 3.0 ~ 3.1
13
- - Rails 3.2, 4.2, 5.0, 5.1, 5.2, 6.0, 7.0, 7.1
12
+ - Ruby 2.3 ~ 2.7, 3.0 ~ 3.2
13
+ - Rails 3.2, 4.2, 5.0, 5.1, 5.2, 6.0, 7.0, 7.1, 7.2
14
14
 
15
15
  ## Installation
16
16
 
data/Rakefile CHANGED
File without changes
data/bin/console CHANGED
File without changes
data/bin/setup CHANGED
File without changes
data/deep_pluck.gemspec CHANGED
File without changes
data/gemfiles/3.2.gemfile CHANGED
File without changes
data/gemfiles/4.2.gemfile CHANGED
File without changes
data/gemfiles/5.0.gemfile CHANGED
File without changes
data/gemfiles/5.1.gemfile CHANGED
File without changes
data/gemfiles/5.2.gemfile CHANGED
File without changes
data/gemfiles/6.0.gemfile CHANGED
File without changes
data/gemfiles/6.1.gemfile CHANGED
File without changes
data/gemfiles/7.0.gemfile CHANGED
File without changes
data/gemfiles/7.1.gemfile CHANGED
@@ -8,7 +8,7 @@ gem 'pluck_all', '~> 2.3.4'
8
8
 
9
9
  group :test do
10
10
  gem 'simplecov', '< 0.18'
11
- gem 'sqlite3', '~> 1.4.1'
11
+ gem 'sqlite3', '~> 1.6.2'
12
12
  end
13
13
 
14
14
  gemspec path: '../'
@@ -0,0 +1,14 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'zeitwerk'
4
+ gem 'activerecord', '~> 7.2.1'
5
+ gem 'pluck_all', '~> 2.3.4'
6
+
7
+ # gem 'globalize', '~> 6.0.1' # TODO: wait for globalize to support Rails 7.
8
+
9
+ group :test do
10
+ gem 'simplecov', '< 0.18'
11
+ gem 'sqlite3', '~> 1.6.2'
12
+ end
13
+
14
+ gemspec path: '../'
File without changes
@@ -70,8 +70,8 @@ module DeepPluck
70
70
  end
71
71
 
72
72
  def get_association_scope(reflect)
73
- owner = reflect.association_class.new(reflect.active_record.new, reflect)
74
- return RailsCompatibility.unscope_where(owner.send(:association_scope))
73
+ owner = reflect.active_record.new
74
+ return RailsCompatibility.unscope_where(reflect.association_class.new(owner, reflect).send(:association_scope))
75
75
  end
76
76
 
77
77
  def use_association_to_query?(reflect)
@@ -141,7 +141,7 @@ module DeepPluck
141
141
  # But get_join_table(reflect) returns `:schools` not :school
142
142
  # No idea how to get the right association, so we try singularize or pluralize it.
143
143
  def backtrace_possible_association(relation, join_table)
144
- return join_table if relation.reflect_on_association(join_table)
144
+ return join_table if join_table and relation.reflect_on_association(join_table)
145
145
  join_table.to_s.singularize.to_sym.tap{|s| return s if relation.reflect_on_association(s) }
146
146
  join_table.to_s.pluralize.to_sym.tap{|s| return s if relation.reflect_on_association(s) }
147
147
  return nil
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeepPluck
4
- VERSION = '1.3.1'
4
+ VERSION = '1.3.2'
5
5
  end
data/lib/deep_pluck.rb CHANGED
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep_pluck
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - khiav reoy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-24 00:00:00.000000000 Z
11
+ date: 2024-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -144,6 +144,7 @@ files:
144
144
  - gemfiles/6.1.gemfile
145
145
  - gemfiles/7.0.gemfile
146
146
  - gemfiles/7.1.gemfile
147
+ - gemfiles/7.2.gemfile
147
148
  - lib/deep_pluck.rb
148
149
  - lib/deep_pluck/data_combiner.rb
149
150
  - lib/deep_pluck/model.rb
@@ -172,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
173
  - !ruby/object:Gem::Version
173
174
  version: '0'
174
175
  requirements: []
175
- rubygems_version: 3.2.14
176
+ rubygems_version: 3.5.18
176
177
  signing_key:
177
178
  specification_version: 4
178
179
  summary: Use deep_pluck as a shortcut to select one or more attributes and include