arel_toolkit 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e85f00fe708ffd879f590ca295d142d1f3cfa600455bd470cb92d167e95bf838
4
- data.tar.gz: 457b2e9b32edc91701ccb18605422581ee2413a53e7552ed77016d4de8f1edf9
3
+ metadata.gz: 8b20aac1b2e004c7d251e7e48aadbacc223df6fae248bbbfc4fba309e8135d66
4
+ data.tar.gz: dcb21b38da506edbcd72caafb15d6e5d911c86049abc5c61479d41d31930f193
5
5
  SHA512:
6
- metadata.gz: 1a6e1f095fda8a0f1c0bdd59996610ea3f4547a9abff88ba716a06dcb4beea86c66e5da6ba824eb3eae2ae9b63a049c45a4ec93e5ef4885039b9bc90651cb4d9
7
- data.tar.gz: ce81c70c0ee865f421cbc3be78fcc3b3fd31464ad836aed8f8f4b67e37b7092c0533cc5e2e899fbcab700fe7fb916c01ec919716c2fcd50f5605d3a148167e2d
6
+ metadata.gz: 572619fe51e9d76cad9a26e58c8205f132996a81f9e7a15dcd2692ef6bfb3d6553c2f6563eb2deaa8589fca7a1d710ea95647f2d5496f180b5a4152e77cffa50
7
+ data.tar.gz: 9aa9885eff763f559225a75f701205b6d6de6d5671bf4203917e7cd4cb420c0dfcdc273cf471309136b971840de458bdc8afd624995966380834280fd5b10f6d
data/.rubocop.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  AllCops:
2
2
  Exclude:
3
3
  - 'gemfiles/active_record_6.gemfile'
4
+ - 'gemfiles/active_record_6_1.gemfile'
4
5
  - 'gemfiles/arel_gems.gemfile'
5
6
  - 'gemfiles/default.gemfile'
6
7
 
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 2.7.3
1
+ ruby 2.7.4
data/Appraisals CHANGED
@@ -11,3 +11,7 @@ end
11
11
  appraise 'active_record_6' do
12
12
  gem 'activerecord', '~> 6.0.0'
13
13
  end
14
+
15
+ appraise 'active_record_6_1' do
16
+ gem 'activerecord', '~> 6.1.0'
17
+ end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.4.7](https://github.com/mvgijssel/arel_toolkit/tree/v0.4.7) (2022-02-01)
4
+
5
+ [Full Changelog](https://github.com/mvgijssel/arel_toolkit/compare/v0.4.6...v0.4.7)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Bump google-protobuf from 3.17.3 to 3.19.2 [\#190](https://github.com/mvgijssel/arel_toolkit/pull/190) ([dependabot[bot]](https://github.com/apps/dependabot))
10
+ - Bump nokogiri from 1.11.7 to 1.12.5 [\#189](https://github.com/mvgijssel/arel_toolkit/pull/189) ([dependabot[bot]](https://github.com/apps/dependabot))
11
+ - Add Rails 6.1 support [\#188](https://github.com/mvgijssel/arel_toolkit/pull/188) ([Willianvdv](https://github.com/Willianvdv))
12
+
3
13
  ## [v0.4.6](https://github.com/mvgijssel/arel_toolkit/tree/v0.4.6) (2021-07-29)
4
14
 
5
15
  [Full Changelog](https://github.com/mvgijssel/arel_toolkit/compare/v0.4.5...v0.4.6)
data/Gemfile.lock CHANGED
@@ -1,25 +1,25 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- arel_toolkit (0.4.6)
5
- activerecord (>= 5.0.0, < 6.0.4)
4
+ arel_toolkit (0.4.7)
5
+ activerecord (>= 5.0.0)
6
6
  pg (~> 1.1.4)
7
7
  pg_query (~> 2.1)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (6.0.3.7)
13
- activesupport (= 6.0.3.7)
14
- activerecord (6.0.3.7)
15
- activemodel (= 6.0.3.7)
16
- activesupport (= 6.0.3.7)
17
- activesupport (6.0.3.7)
12
+ activemodel (6.1.4.1)
13
+ activesupport (= 6.1.4.1)
14
+ activerecord (6.1.4.1)
15
+ activemodel (= 6.1.4.1)
16
+ activesupport (= 6.1.4.1)
17
+ activesupport (6.1.4.1)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
- i18n (>= 0.7, < 2)
20
- minitest (~> 5.1)
21
- tzinfo (~> 1.1)
22
- zeitwerk (~> 2.2, >= 2.2.2)
19
+ i18n (>= 1.6, < 2)
20
+ minitest (>= 5.1)
21
+ tzinfo (~> 2.0)
22
+ zeitwerk (~> 2.3)
23
23
  addressable (2.8.0)
24
24
  public_suffix (>= 2.0.2, < 5.0)
25
25
  ansi (1.5.0)
@@ -31,24 +31,24 @@ GEM
31
31
  nokogiri (~> 1.8)
32
32
  thor (~> 1.0)
33
33
  ast (2.4.2)
34
- async (1.29.1)
34
+ async (1.30.1)
35
35
  console (~> 1.10)
36
36
  nio4r (~> 2.3)
37
37
  timers (~> 4.1)
38
- async-http (0.56.3)
39
- async (~> 1.25)
40
- async-io (~> 1.28)
41
- async-pool (~> 0.2)
38
+ async-http (0.56.5)
39
+ async (>= 1.25)
40
+ async-io (>= 1.28)
41
+ async-pool (>= 0.2)
42
42
  protocol-http (~> 0.22.0)
43
43
  protocol-http1 (~> 0.14.0)
44
44
  protocol-http2 (~> 0.14.0)
45
45
  async-http-faraday (0.11.0)
46
46
  async-http (~> 0.42)
47
47
  faraday
48
- async-io (1.32.1)
49
- async (~> 1.14)
50
- async-pool (0.3.7)
51
- async (~> 1.25)
48
+ async-io (1.32.2)
49
+ async
50
+ async-pool (0.3.8)
51
+ async (>= 1.25)
52
52
  binding_of_caller (1.0.0)
53
53
  debug_inspector (>= 0.0.1)
54
54
  coderay (1.1.3)
@@ -60,7 +60,7 @@ GEM
60
60
  diff-lcs (1.4.4)
61
61
  docile (1.4.0)
62
62
  dpl (1.10.16)
63
- faraday (1.5.1)
63
+ faraday (1.8.0)
64
64
  faraday-em_http (~> 1.0)
65
65
  faraday-em_synchrony (~> 1.0)
66
66
  faraday-excon (~> 1.1)
@@ -68,6 +68,7 @@ GEM
68
68
  faraday-net_http (~> 1.0)
69
69
  faraday-net_http_persistent (~> 1.1)
70
70
  faraday-patron (~> 1.0)
71
+ faraday-rack (~> 1.0)
71
72
  multipart-post (>= 1.2, < 3)
72
73
  ruby2_keywords (>= 0.0.4)
73
74
  faraday-em_http (1.0.0)
@@ -79,7 +80,8 @@ GEM
79
80
  faraday-net_http (1.0.1)
80
81
  faraday-net_http_persistent (1.2.0)
81
82
  faraday-patron (1.0.0)
82
- ffi (1.15.3)
83
+ faraday-rack (1.0.0)
84
+ ffi (1.15.4)
83
85
  fiber-local (1.0.0)
84
86
  formatador (0.3.0)
85
87
  github_changelog_generator (1.16.4)
@@ -91,7 +93,7 @@ GEM
91
93
  octokit (~> 4.6)
92
94
  rainbow (>= 2.2.1)
93
95
  rake (>= 10.0)
94
- google-protobuf (3.17.3)
96
+ google-protobuf (3.19.4)
95
97
  guard (2.17.0)
96
98
  formatador (>= 0.2.4)
97
99
  listen (>= 2.7, < 4.0)
@@ -118,20 +120,20 @@ GEM
118
120
  interception (0.5)
119
121
  jaro_winkler (1.5.4)
120
122
  json (2.5.1)
121
- listen (3.5.1)
123
+ listen (3.7.0)
122
124
  rb-fsevent (~> 0.10, >= 0.10.3)
123
125
  rb-inotify (~> 0.9, >= 0.9.10)
124
126
  lumberjack (1.2.8)
125
127
  memory_profiler (0.9.14)
126
128
  method_source (0.9.2)
127
- mini_portile2 (2.5.3)
129
+ mini_portile2 (2.6.1)
128
130
  minitest (5.14.4)
129
131
  multi_json (1.15.0)
130
132
  multipart-post (2.1.1)
131
133
  nenv (0.3.0)
132
- nio4r (2.5.7)
133
- nokogiri (1.11.7)
134
- mini_portile2 (~> 2.5.0)
134
+ nio4r (2.5.8)
135
+ nokogiri (1.12.5)
136
+ mini_portile2 (~> 2.6.1)
135
137
  racc (~> 1.4)
136
138
  notiffany (0.1.3)
137
139
  nenv (~> 0.1)
@@ -139,15 +141,15 @@ GEM
139
141
  octokit (4.21.0)
140
142
  faraday (>= 0.9)
141
143
  sawyer (~> 0.8.0, >= 0.5.3)
142
- parallel (1.20.1)
144
+ parallel (1.21.0)
143
145
  parser (3.0.2.0)
144
146
  ast (~> 2.4.1)
145
147
  pg (1.1.4)
146
- pg_query (2.1.0)
147
- google-protobuf (>= 3.17.1)
148
+ pg_query (2.1.3)
149
+ google-protobuf (>= 3.19.2)
148
150
  protocol-hpack (1.4.2)
149
151
  protocol-http (0.22.5)
150
- protocol-http1 (0.14.1)
152
+ protocol-http1 (0.14.2)
151
153
  protocol-http (~> 0.22)
152
154
  protocol-http2 (0.14.2)
153
155
  protocol-hpack (~> 1.4)
@@ -158,7 +160,7 @@ GEM
158
160
  pry-alias (0.0.1)
159
161
  binding_of_caller
160
162
  pry
161
- pry-doc (1.1.0)
163
+ pry-doc (1.2.0)
162
164
  pry (~> 0.11)
163
165
  yard (~> 0.9.11)
164
166
  pry-nav (0.3.0)
@@ -199,7 +201,7 @@ GEM
199
201
  ruby-progressbar (~> 1.7)
200
202
  unicode-display_width (>= 1.4.0, < 1.7)
201
203
  ruby-progressbar (1.11.0)
202
- ruby2_keywords (0.0.4)
204
+ ruby2_keywords (0.0.5)
203
205
  sawyer (0.8.2)
204
206
  addressable (>= 2.3.5)
205
207
  faraday (> 0.8, < 2.0)
@@ -215,10 +217,9 @@ GEM
215
217
  simplecov-html (0.10.2)
216
218
  stackprof (0.2.17)
217
219
  thor (1.1.0)
218
- thread_safe (0.3.6)
219
220
  timers (4.3.3)
220
- tzinfo (1.2.9)
221
- thread_safe (~> 0.1)
221
+ tzinfo (2.0.4)
222
+ concurrent-ruby (~> 1.0)
222
223
  unicode-display_width (1.6.1)
223
224
  yard (0.9.26)
224
225
  zeitwerk (2.4.2)
@@ -254,4 +255,4 @@ DEPENDENCIES
254
255
  stackprof (~> 0.2)
255
256
 
256
257
  BUNDLED WITH
257
- 2.2.23
258
+ 2.3.6
data/arel_toolkit.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.require_paths = ['lib']
26
26
  spec.extensions = ['ext/pg_result_init/extconf.rb']
27
27
 
28
- spec.add_dependency 'activerecord', '>= 5.0.0', '< 6.0.4'
28
+ spec.add_dependency 'activerecord', '>= 5.0.0'
29
29
  spec.add_dependency 'pg', '~> 1.1.4'
30
30
  spec.add_dependency 'pg_query', '~> 2.1'
31
31
 
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- arel_toolkit (0.4.6)
5
- activerecord (>= 5.0.0, < 6.0.4)
4
+ arel_toolkit (0.4.7)
5
+ activerecord (>= 5.0.0)
6
6
  pg (~> 1.1.4)
7
7
  pg_query (~> 2.1)
8
8
 
@@ -55,7 +55,7 @@ GEM
55
55
  rainbow (>= 2.2.1)
56
56
  rake (>= 10.0)
57
57
  retriable (~> 3.0)
58
- google-protobuf (3.17.3)
58
+ google-protobuf (3.19.4-x86_64-darwin)
59
59
  guard (2.16.2)
60
60
  formatador (>= 0.2.4)
61
61
  listen (>= 2.7, < 4.0)
@@ -105,8 +105,8 @@ GEM
105
105
  parser (2.7.2.0)
106
106
  ast (~> 2.4.1)
107
107
  pg (1.1.4)
108
- pg_query (2.1.0)
109
- google-protobuf (>= 3.17.1)
108
+ pg_query (2.1.3)
109
+ google-protobuf (>= 3.19.2)
110
110
  pry (0.12.2)
111
111
  coderay (~> 1.1.0)
112
112
  method_source (~> 0.9.0)
@@ -209,4 +209,4 @@ DEPENDENCIES
209
209
  stackprof (~> 0.2)
210
210
 
211
211
  BUNDLED WITH
212
- 2.2.23
212
+ 2.3.6
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 6.1.0"
6
+
7
+ gemspec path: "../"
@@ -0,0 +1,263 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ arel_toolkit (0.4.7)
5
+ activerecord (>= 5.0.0)
6
+ pg (~> 1.1.4)
7
+ pg_query (~> 2.1)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ activemodel (6.1.4.1)
13
+ activesupport (= 6.1.4.1)
14
+ activerecord (6.1.4.1)
15
+ activemodel (= 6.1.4.1)
16
+ activesupport (= 6.1.4.1)
17
+ activesupport (6.1.4.1)
18
+ concurrent-ruby (~> 1.0, >= 1.0.2)
19
+ i18n (>= 1.6, < 2)
20
+ minitest (>= 5.1)
21
+ tzinfo (~> 2.0)
22
+ zeitwerk (~> 2.3)
23
+ addressable (2.8.0)
24
+ public_suffix (>= 2.0.2, < 5.0)
25
+ ansi (1.5.0)
26
+ appraisal (2.4.1)
27
+ bundler
28
+ rake
29
+ thor (>= 0.14.0)
30
+ approvals (0.0.25)
31
+ nokogiri (~> 1.8)
32
+ thor (~> 1.0)
33
+ ast (2.4.2)
34
+ async (1.30.1)
35
+ console (~> 1.10)
36
+ nio4r (~> 2.3)
37
+ timers (~> 4.1)
38
+ async-http (0.56.5)
39
+ async (>= 1.25)
40
+ async-io (>= 1.28)
41
+ async-pool (>= 0.2)
42
+ protocol-http (~> 0.22.0)
43
+ protocol-http1 (~> 0.14.0)
44
+ protocol-http2 (~> 0.14.0)
45
+ async-http-faraday (0.11.0)
46
+ async-http (~> 0.42)
47
+ faraday
48
+ async-io (1.32.2)
49
+ async
50
+ async-pool (0.3.8)
51
+ async (>= 1.25)
52
+ binding_of_caller (1.0.0)
53
+ debug_inspector (>= 0.0.1)
54
+ coderay (1.1.3)
55
+ concurrent-ruby (1.1.9)
56
+ console (1.13.1)
57
+ fiber-local
58
+ database_cleaner (1.7.0)
59
+ debug_inspector (1.1.0)
60
+ diff-lcs (1.4.4)
61
+ docile (1.4.0)
62
+ dpl (1.10.16)
63
+ faraday (1.8.0)
64
+ faraday-em_http (~> 1.0)
65
+ faraday-em_synchrony (~> 1.0)
66
+ faraday-excon (~> 1.1)
67
+ faraday-httpclient (~> 1.0.1)
68
+ faraday-net_http (~> 1.0)
69
+ faraday-net_http_persistent (~> 1.1)
70
+ faraday-patron (~> 1.0)
71
+ faraday-rack (~> 1.0)
72
+ multipart-post (>= 1.2, < 3)
73
+ ruby2_keywords (>= 0.0.4)
74
+ faraday-em_http (1.0.0)
75
+ faraday-em_synchrony (1.0.0)
76
+ faraday-excon (1.1.0)
77
+ faraday-http-cache (2.2.0)
78
+ faraday (>= 0.8)
79
+ faraday-httpclient (1.0.1)
80
+ faraday-net_http (1.0.1)
81
+ faraday-net_http_persistent (1.2.0)
82
+ faraday-patron (1.0.0)
83
+ faraday-rack (1.0.0)
84
+ ffi (1.15.4)
85
+ fiber-local (1.0.0)
86
+ formatador (0.3.0)
87
+ github_changelog_generator (1.16.4)
88
+ activesupport
89
+ async (>= 1.25.0)
90
+ async-http-faraday
91
+ faraday-http-cache
92
+ multi_json
93
+ octokit (~> 4.6)
94
+ rainbow (>= 2.2.1)
95
+ rake (>= 10.0)
96
+ google-protobuf (3.19.4-x86_64-darwin)
97
+ guard (2.17.0)
98
+ formatador (>= 0.2.4)
99
+ listen (>= 2.7, < 4.0)
100
+ lumberjack (>= 1.0.12, < 2.0)
101
+ nenv (~> 0.1)
102
+ notiffany (~> 0.0)
103
+ pry (>= 0.9.12)
104
+ shellany (~> 0.0)
105
+ thor (>= 0.18.1)
106
+ guard-compat (1.2.1)
107
+ guard-rake (1.0.0)
108
+ guard
109
+ rake
110
+ guard-rspec (4.7.3)
111
+ guard (~> 2.1)
112
+ guard-compat (~> 1.1)
113
+ rspec (>= 2.99.0, < 4.0)
114
+ guard-rubocop (1.3.0)
115
+ guard (~> 2.0)
116
+ rubocop (~> 0.20)
117
+ hirb (0.7.3)
118
+ i18n (1.8.10)
119
+ concurrent-ruby (~> 1.0)
120
+ interception (0.5)
121
+ jaro_winkler (1.5.4)
122
+ json (2.5.1)
123
+ listen (3.7.0)
124
+ rb-fsevent (~> 0.10, >= 0.10.3)
125
+ rb-inotify (~> 0.9, >= 0.9.10)
126
+ lumberjack (1.2.8)
127
+ memory_profiler (0.9.14)
128
+ method_source (0.9.2)
129
+ mini_portile2 (2.6.1)
130
+ minitest (5.14.4)
131
+ multi_json (1.15.0)
132
+ multipart-post (2.1.1)
133
+ nenv (0.3.0)
134
+ nio4r (2.5.8)
135
+ nokogiri (1.12.4)
136
+ mini_portile2 (~> 2.6.1)
137
+ racc (~> 1.4)
138
+ nokogiri (1.12.4-x86_64-darwin)
139
+ racc (~> 1.4)
140
+ notiffany (0.1.3)
141
+ nenv (~> 0.1)
142
+ shellany (~> 0.0)
143
+ octokit (4.21.0)
144
+ faraday (>= 0.9)
145
+ sawyer (~> 0.8.0, >= 0.5.3)
146
+ parallel (1.21.0)
147
+ parser (3.0.2.0)
148
+ ast (~> 2.4.1)
149
+ pg (1.1.4)
150
+ pg_query (2.1.3)
151
+ google-protobuf (>= 3.19.2)
152
+ protocol-hpack (1.4.2)
153
+ protocol-http (0.22.5)
154
+ protocol-http1 (0.14.2)
155
+ protocol-http (~> 0.22)
156
+ protocol-http2 (0.14.2)
157
+ protocol-hpack (~> 1.4)
158
+ protocol-http (~> 0.18)
159
+ pry (0.12.2)
160
+ coderay (~> 1.1.0)
161
+ method_source (~> 0.9.0)
162
+ pry-alias (0.0.1)
163
+ binding_of_caller
164
+ pry
165
+ pry-doc (1.2.0)
166
+ pry (~> 0.11)
167
+ yard (~> 0.9.11)
168
+ pry-nav (0.3.0)
169
+ pry (>= 0.9.10, < 0.13.0)
170
+ pry-rescue (1.5.2)
171
+ interception (>= 0.5)
172
+ pry (>= 0.12.0)
173
+ pry-stack_explorer (0.4.9.3)
174
+ binding_of_caller (>= 0.7)
175
+ pry (>= 0.9.11)
176
+ public_suffix (4.0.6)
177
+ racc (1.5.2)
178
+ rainbow (3.0.0)
179
+ rake (13.0.6)
180
+ rake-compiler (1.1.1)
181
+ rake
182
+ rb-fsevent (0.11.0)
183
+ rb-inotify (0.10.1)
184
+ ffi (~> 1.0)
185
+ rspec (3.10.0)
186
+ rspec-core (~> 3.10.0)
187
+ rspec-expectations (~> 3.10.0)
188
+ rspec-mocks (~> 3.10.0)
189
+ rspec-core (3.10.1)
190
+ rspec-support (~> 3.10.0)
191
+ rspec-expectations (3.10.1)
192
+ diff-lcs (>= 1.2.0, < 2.0)
193
+ rspec-support (~> 3.10.0)
194
+ rspec-mocks (3.10.2)
195
+ diff-lcs (>= 1.2.0, < 2.0)
196
+ rspec-support (~> 3.10.0)
197
+ rspec-support (3.10.2)
198
+ rubocop (0.71.0)
199
+ jaro_winkler (~> 1.5.1)
200
+ parallel (~> 1.10)
201
+ parser (>= 2.6)
202
+ rainbow (>= 2.2.2, < 4.0)
203
+ ruby-progressbar (~> 1.7)
204
+ unicode-display_width (>= 1.4.0, < 1.7)
205
+ ruby-progressbar (1.11.0)
206
+ ruby2_keywords (0.0.5)
207
+ sawyer (0.8.2)
208
+ addressable (>= 2.3.5)
209
+ faraday (> 0.8, < 2.0)
210
+ shellany (0.0.1)
211
+ simplecov (0.16.1)
212
+ docile (~> 1.1)
213
+ json (>= 1.8, < 3)
214
+ simplecov-html (~> 0.10.0)
215
+ simplecov-console (0.4.2)
216
+ ansi
217
+ hirb
218
+ simplecov
219
+ simplecov-html (0.10.2)
220
+ stackprof (0.2.17)
221
+ thor (1.1.0)
222
+ timers (4.3.3)
223
+ tzinfo (2.0.4)
224
+ concurrent-ruby (~> 1.0)
225
+ unicode-display_width (1.6.1)
226
+ yard (0.9.26)
227
+ zeitwerk (2.4.2)
228
+
229
+ PLATFORMS
230
+ aarch64-linux
231
+ x86_64-darwin-20
232
+ x86_64-darwin-21
233
+
234
+ DEPENDENCIES
235
+ activerecord (~> 6.1.0)
236
+ appraisal (~> 2.4.1)
237
+ approvals (~> 0.0.24)
238
+ arel_toolkit!
239
+ bundler (~> 2.0)
240
+ database_cleaner (~> 1.7.0)
241
+ dpl (~> 1.10.11)
242
+ github_changelog_generator (~> 1.15)
243
+ guard (~> 2.15)
244
+ guard-rake (~> 1.0.0)
245
+ guard-rspec (~> 4.7)
246
+ guard-rubocop (~> 1.3.0)
247
+ memory_profiler (~> 0.9)
248
+ pry
249
+ pry-alias
250
+ pry-doc
251
+ pry-nav
252
+ pry-rescue
253
+ pry-stack_explorer
254
+ rake (~> 13.0)
255
+ rake-compiler (~> 1.0)
256
+ rspec (~> 3.8)
257
+ rubocop (= 0.71.0)
258
+ simplecov (~> 0.16.1)
259
+ simplecov-console (~> 0.4.2)
260
+ stackprof (~> 0.2)
261
+
262
+ BUNDLED WITH
263
+ 2.3.6
@@ -31,8 +31,8 @@ GIT
31
31
  PATH
32
32
  remote: ..
33
33
  specs:
34
- arel_toolkit (0.4.6)
35
- activerecord (>= 5.0.0, < 6.0.4)
34
+ arel_toolkit (0.4.7)
35
+ activerecord (>= 5.0.0)
36
36
  pg (~> 1.1.4)
37
37
  pg_query (~> 2.1)
38
38
 
@@ -101,7 +101,7 @@ GEM
101
101
  rainbow (>= 2.2.1)
102
102
  rake (>= 10.0)
103
103
  retriable (~> 3.0)
104
- google-protobuf (3.17.3)
104
+ google-protobuf (3.19.4-x86_64-darwin)
105
105
  guard (2.15.0)
106
106
  formatador (>= 0.2.4)
107
107
  listen (>= 2.7, < 4.0)
@@ -155,8 +155,8 @@ GEM
155
155
  ast (~> 2.4.0)
156
156
  pg (1.1.4)
157
157
  pg_array_parser (0.0.9)
158
- pg_query (2.1.0)
159
- google-protobuf (>= 3.17.1)
158
+ pg_query (2.1.3)
159
+ google-protobuf (>= 3.19.2)
160
160
  pry (0.12.2)
161
161
  coderay (~> 1.1.0)
162
162
  method_source (~> 0.9.0)
@@ -283,4 +283,4 @@ DEPENDENCIES
283
283
  stackprof (~> 0.2)
284
284
 
285
285
  BUNDLED WITH
286
- 2.2.23
286
+ 2.3.6
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- arel_toolkit (0.4.6)
5
- activerecord (>= 5.0.0, < 6.0.4)
4
+ arel_toolkit (0.4.7)
5
+ activerecord (>= 5.0.0)
6
6
  pg (~> 1.1.4)
7
7
  pg_query (~> 2.1)
8
8
 
@@ -55,7 +55,7 @@ GEM
55
55
  rainbow (>= 2.2.1)
56
56
  rake (>= 10.0)
57
57
  retriable (~> 3.0)
58
- google-protobuf (3.17.3)
58
+ google-protobuf (3.19.4-x86_64-darwin)
59
59
  guard (2.15.0)
60
60
  formatador (>= 0.2.4)
61
61
  listen (>= 2.7, < 4.0)
@@ -105,8 +105,8 @@ GEM
105
105
  parser (2.6.3.0)
106
106
  ast (~> 2.4.0)
107
107
  pg (1.1.4)
108
- pg_query (2.1.0)
109
- google-protobuf (>= 3.17.1)
108
+ pg_query (2.1.3)
109
+ google-protobuf (>= 3.19.2)
110
110
  pry (0.12.2)
111
111
  coderay (~> 1.1.0)
112
112
  method_source (~> 0.9.0)
@@ -207,4 +207,4 @@ DEPENDENCIES
207
207
  stackprof (~> 0.2)
208
208
 
209
209
  BUNDLED WITH
210
- 2.2.23
210
+ 2.3.6
@@ -22,6 +22,10 @@ module Arel
22
22
  node.parent.parent.object.is_a?(Arel::Nodes::JoinSource)
23
23
  context[:range_variable] = true
24
24
 
25
+ elsif parent_object.is_a?(Arel::Nodes::TableAlias) &&
26
+ node.parent.parent.parent.object.is_a?(Arel::Nodes::JoinSource)
27
+ context[:range_variable] = true
28
+
25
29
  # Using Arel::Table as SELECT ... FROM [<table>]
26
30
  elsif parent_object.is_a?(Array) &&
27
31
  node.parent.parent.object.is_a?(Arel::Nodes::JoinSource)
@@ -35,10 +39,26 @@ module Arel
35
39
  node.parent.parent.parent.object.is_a?(Arel::Nodes::JoinSource)
36
40
  context[:range_variable] = true
37
41
 
42
+ elsif parent_object.is_a?(Arel::Nodes::TableAlias) &&
43
+ node.parent.parent.object.is_a?(Arel::Attributes::Attribute)
44
+ context[:column_reference] = true
45
+
46
+ elsif parent_object.is_a?(Arel::Nodes::TableAlias) &&
47
+ node.parent.parent.parent.object.is_a?(Arel::Attributes::Attribute)
48
+ context[:column_reference] = true
49
+
38
50
  # Using Arel::Table as SELECT ... INNER JOIN <table> ON TRUE
39
51
  elsif parent_object.is_a?(Arel::Nodes::Join)
40
52
  context[:range_variable] = true
41
53
 
54
+ elsif parent_object.is_a?(Arel::Nodes::TableAlias) &&
55
+ node.parent.parent.object.is_a?(Arel::Nodes::Join)
56
+ context[:range_variable] = true
57
+
58
+ elsif parent_object.is_a?(Arel::Nodes::TableAlias) &&
59
+ node.parent.parent.parent.object.is_a?(Arel::Nodes::Join)
60
+ context[:range_variable] = true
61
+
42
62
  # Using Arel::Table as an attribute SELECT <table>.id ...
43
63
  elsif parent_object.is_a?(Arel::Attributes::Attribute)
44
64
  context[:column_reference] = true
@@ -217,6 +217,8 @@ module Arel
217
217
  else
218
218
  parent_object[local_path.value] = new_arel_node
219
219
  end
220
+ elsif parent_object.is_a?(Arel::Nodes::TableAlias) && local_path.value == 'relation'
221
+ parent_object.instance_variable_set('@left', new_arel_node)
220
222
  else
221
223
  raise "Don't know how to replace `#{local_path.value}` in #{parent_object.inspect}"
222
224
  end
@@ -14,7 +14,7 @@ module Arel
14
14
  @context_enhancers = context_enhancers
15
15
 
16
16
  root_node = Arel::Enhance::Node.new(object)
17
- accept_with_root(object, root_node)
17
+ accept_with_root(object, root_node, context_enhancers)
18
18
  end
19
19
 
20
20
  def accept_with_root(object, root_node, context_enhancers = DEFAULT_CONTEXT_ENHANCERS)
data/lib/arel/enhance.rb CHANGED
@@ -9,9 +9,9 @@ module Arel
9
9
  module Enhance
10
10
  end
11
11
 
12
- def self.enhance(object)
12
+ def self.enhance(object, context_enhancers = Arel::Enhance::Visitor::DEFAULT_CONTEXT_ENHANCERS)
13
13
  return object if object.is_a?(Arel::Enhance::Node)
14
14
 
15
- Arel::Enhance::Visitor.new.accept(object)
15
+ Arel::Enhance::Visitor.new.accept(object, context_enhancers)
16
16
  end
17
17
  end
@@ -4,7 +4,13 @@
4
4
  module Arel
5
5
  module Nodes
6
6
  # https://www.postgresql.org/docs/10/functions-string.html
7
- class Overlaps < Arel::Nodes::Node
7
+ inheritance_class = if Gem.loaded_specs['activerecord'].version < Gem::Version.new('6.1.0')
8
+ Arel::Nodes::Node
9
+ else
10
+ Arel::Nodes::InfixOperation
11
+ end
12
+
13
+ class Overlaps < inheritance_class
8
14
  attr_reader :start1
9
15
  attr_reader :end1
10
16
  attr_reader :start2
@@ -15,7 +15,8 @@ module Arel
15
15
  def initialize(
16
16
  name,
17
17
  as: nil,
18
- type_caster: nil,
18
+ klass: nil,
19
+ type_caster: klass&.type_caster,
19
20
  only: false,
20
21
  schema_name: nil,
21
22
  relpersistence: 'p'
@@ -24,7 +25,11 @@ module Arel
24
25
  @schema_name = schema_name
25
26
  @relpersistence = relpersistence
26
27
 
27
- super(name, as: as, type_caster: type_caster)
28
+ if Gem.loaded_specs['activerecord'].version < Gem::Version.new('6.1.0')
29
+ super(name, as: as, type_caster: type_caster)
30
+ else
31
+ super(name, klass: klass, as: as, type_caster: type_caster)
32
+ end
28
33
  end
29
34
  end
30
35
 
@@ -1,11 +1,6 @@
1
1
  module Arel
2
2
  class TreeManager
3
3
  # Iterate through AST, nodes will be yielded depth-first
4
- def each(&block)
5
- return enum_for(:each) unless block_given?
6
-
7
- ::Arel::Visitors::DepthFirst.new(block).accept ast
8
- end
9
4
 
10
5
  def to_sql_and_binds(engine = Arel::Table.engine)
11
6
  collector = engine.connection.send(:collector)
@@ -630,7 +630,7 @@ module Arel
630
630
  select_core.projections = visit(attribute.target_list, :select) if attribute.target_list
631
631
 
632
632
  if attribute.where_clause
633
- where_clause = visit(attribute.where_clause)
633
+ where_clause = visit(attribute.where_clause, :select)
634
634
  where_clause = if where_clause.is_a?(Arel::Nodes::And)
635
635
  where_clause
636
636
  else
@@ -1,6 +1,5 @@
1
1
  require_relative './transformer/prefix_schema_name'
2
2
  require_relative './transformer/replace_table_with_subquery'
3
- require_relative './transformer/remove_active_record_info'
4
3
 
5
4
  module Arel
6
5
  module Transformer
@@ -1,3 +1,3 @@
1
1
  module ArelToolkit
2
- VERSION = '0.4.6'.freeze
2
+ VERSION = '0.4.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arel_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - maarten
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-29 00:00:00.000000000 Z
11
+ date: 2022-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -17,9 +17,6 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 5.0.0
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: 6.0.4
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,9 +24,6 @@ dependencies:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: 5.0.0
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: 6.0.4
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: pg
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -433,6 +427,8 @@ files:
433
427
  - gemfiles/.bundle/config
434
428
  - gemfiles/active_record_6.gemfile
435
429
  - gemfiles/active_record_6.gemfile.lock
430
+ - gemfiles/active_record_6_1.gemfile
431
+ - gemfiles/active_record_6_1.gemfile.lock
436
432
  - gemfiles/arel_gems.gemfile
437
433
  - gemfiles/arel_gems.gemfile.lock
438
434
  - gemfiles/default.gemfile
@@ -578,7 +574,6 @@ files:
578
574
  - lib/arel/sql_to_arel/result.rb
579
575
  - lib/arel/transformer.rb
580
576
  - lib/arel/transformer/prefix_schema_name.rb
581
- - lib/arel/transformer/remove_active_record_info.rb
582
577
  - lib/arel/transformer/replace_table_with_subquery.rb
583
578
  - lib/arel_toolkit.rb
584
579
  - lib/arel_toolkit/version.rb
@@ -1,40 +0,0 @@
1
- module Arel
2
- module Transformer
3
- class RemoveActiveRecordInfo
4
- class << self
5
- def call(arel, next_middleware)
6
- tree = Arel.enhance(arel)
7
-
8
- tree.query(class: Arel::Table).each do |node|
9
- node['type_caster'].remove
10
- end
11
-
12
- tree.query(class: Arel::Nodes::BindParam).each do |node|
13
- node.replace(
14
- cast_for_database(node.object.value.value_for_database),
15
- )
16
- end
17
-
18
- next_middleware.call tree.object
19
- end
20
-
21
- private
22
-
23
- def cast_for_database(value)
24
- case value
25
- when String
26
- Arel::Nodes.build_quoted(value)
27
- when Integer
28
- value
29
- when TrueClass
30
- Arel::Nodes::TypeCast.new(Arel::Nodes::Quoted.new('t'), 'bool')
31
- when FalseClass
32
- Arel::Nodes::TypeCast.new(Arel::Nodes::Quoted.new('f'), 'bool')
33
- else
34
- raise "Unknown value cast `#{value}` with class `#{value.class}`"
35
- end
36
- end
37
- end
38
- end
39
- end
40
- end