arel-extensions 8.0.1 → 8.0.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 +4 -4
- data/.github/workflows/ci.yml +22 -4
- data/lib/active_record/query_methods.rb +2 -0
- data/lib/arel/extensions/version.rb +1 -1
- data/lib/arel/nodes/random.rb +9 -0
- data/lib/arel/nodes/ts_query.rb +11 -0
- data/lib/arel/nodes/ts_rank.rb +11 -0
- data/lib/arel/nodes/ts_rank_cd.rb +12 -0
- data/lib/arel/nodes/ts_vector.rb +11 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f10fd80539653570d9ea7333fa9f9aef21e29ccdb9f9a976fa178e106c1f3c66
|
|
4
|
+
data.tar.gz: 02efc9b543b5325e61899a590982207378482592f13a91ccb121d94a621a1966
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4da172777f5c26a8eafcc82faef85510967381601e67c6d8259229be3097aaa483ad8f57bddb3d42733b95a805ace1f40f84aa2a89777a4fe33f9b2647669e85
|
|
7
|
+
data.tar.gz: 40873247a7c72bd997f424df0ebf1e421f158046967929ef4d11ae932e1d10422b26fe78feb56a86086b2eb261d20e118dbbe848f10a862d04fae8701bb4340f
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -60,6 +60,7 @@ jobs:
|
|
|
60
60
|
runs-on: ubuntu-22.04
|
|
61
61
|
|
|
62
62
|
strategy:
|
|
63
|
+
fail-fast: false
|
|
63
64
|
matrix:
|
|
64
65
|
rails: ['7.1.5.1', '7.2.2.1', '8.0.1']
|
|
65
66
|
ruby-version: ['3.3']
|
|
@@ -94,7 +95,7 @@ jobs:
|
|
|
94
95
|
cat /home/runner/work/_temp/*.sh
|
|
95
96
|
sed -i "s/Gem.ruby, '-w'/Gem.ruby, '-w0'/" ~/rails/activerecord/Rakefile
|
|
96
97
|
sed -i "s/t.warning = true/t.warning = false/g" ~/rails/activerecord/Rakefile
|
|
97
|
-
sed -i "/require
|
|
98
|
+
sed -i "/require \"active_record\"/a \$LOAD_PATH.unshift\(File.expand_path\(ENV['GITHUB_WORKSPACE']\)\)\nrequire 'arel/extensions'" ~/rails/activerecord/test/cases/helper.rb
|
|
98
99
|
rm ~/rails/Gemfile.lock
|
|
99
100
|
sed -i "/# Active Record./a gem 'arel-extensions', require: 'arel/extensions', path: File.expand_path\(ENV['GITHUB_WORKSPACE']\)" ~/rails/Gemfile
|
|
100
101
|
echo "gem 'ostruct'" >> ~/rails/Gemfile
|
|
@@ -102,6 +103,10 @@ jobs:
|
|
|
102
103
|
cat ~/rails/Gemfile
|
|
103
104
|
bundle update --jobs=3 --retry=3
|
|
104
105
|
|
|
106
|
+
- name: Fix Weird Test Cases
|
|
107
|
+
run: |
|
|
108
|
+
sed -i 's|} - \[:|} - \[:distinct_on, :uniq_on, :|' ~/rails/activerecord/test/cases/relation/delegation_test.rb
|
|
109
|
+
|
|
105
110
|
- run: |
|
|
106
111
|
pushd ~/rails/activerecord
|
|
107
112
|
bundle exec rake db:postgresql:rebuild postgresql:test --trace
|
|
@@ -112,6 +117,7 @@ jobs:
|
|
|
112
117
|
runs-on: ubuntu-22.04
|
|
113
118
|
|
|
114
119
|
strategy:
|
|
120
|
+
fail-fast: false
|
|
115
121
|
matrix:
|
|
116
122
|
rails: ['7.1.5.1', '7.2.2.1', '8.0.1']
|
|
117
123
|
ruby-version: ['3.3']
|
|
@@ -132,7 +138,7 @@ jobs:
|
|
|
132
138
|
cat /home/runner/work/_temp/*.sh
|
|
133
139
|
sed -i "s/Gem.ruby, '-w'/Gem.ruby, '-w0'/" ~/rails/activerecord/Rakefile
|
|
134
140
|
sed -i "s/t.warning = true/t.warning = false/g" ~/rails/activerecord/Rakefile
|
|
135
|
-
sed -i "/require
|
|
141
|
+
sed -i "/require \"active_record\"/a \$LOAD_PATH.unshift\(File.expand_path\(ENV['GITHUB_WORKSPACE']\)\)\nrequire 'arel/extensions'" ~/rails/activerecord/test/cases/helper.rb
|
|
136
142
|
rm ~/rails/Gemfile.lock
|
|
137
143
|
sed -i "/# Active Record./a gem 'arel-extensions', require: 'arel/extensions', path: File.expand_path\(ENV['GITHUB_WORKSPACE']\)" ~/rails/Gemfile
|
|
138
144
|
echo "gem 'ostruct'" >> ~/rails/Gemfile
|
|
@@ -140,6 +146,14 @@ jobs:
|
|
|
140
146
|
cat ~/rails/Gemfile
|
|
141
147
|
bundle update --jobs=3 --retry=3
|
|
142
148
|
|
|
149
|
+
- name: Fix Weird Test Cases
|
|
150
|
+
run: |
|
|
151
|
+
sed -i 's|} - \[:|} - \[:distinct_on, :uniq_on, :|' ~/rails/activerecord/test/cases/relation/delegation_test.rb
|
|
152
|
+
|
|
153
|
+
- name: Fix Weird Test Cases
|
|
154
|
+
run: |
|
|
155
|
+
cat ~/rails/activerecord/test/cases/relation/delegation_test.rb
|
|
156
|
+
|
|
143
157
|
- run: |
|
|
144
158
|
pushd ~/rails/activerecord
|
|
145
159
|
bundle exec rake sqlite3:test --trace
|
|
@@ -152,8 +166,8 @@ jobs:
|
|
|
152
166
|
name: ActiveRecord MySQL Test
|
|
153
167
|
runs-on: ubuntu-22.04
|
|
154
168
|
|
|
155
|
-
|
|
156
169
|
strategy:
|
|
170
|
+
fail-fast: false
|
|
157
171
|
matrix:
|
|
158
172
|
rails: ['7.1.5.1', '7.2.2.1', '8.0.1']
|
|
159
173
|
ruby-version: ['3.3']
|
|
@@ -180,7 +194,7 @@ jobs:
|
|
|
180
194
|
cat /home/runner/work/_temp/*.sh
|
|
181
195
|
sed -i "s/Gem.ruby, '-w'/Gem.ruby, '-w0'/" ~/rails/activerecord/Rakefile
|
|
182
196
|
sed -i "s/t.warning = true/t.warning = false/g" ~/rails/activerecord/Rakefile
|
|
183
|
-
sed -i "/require
|
|
197
|
+
sed -i "/require \"active_record\"/a \$LOAD_PATH.unshift\(File.expand_path\(ENV['GITHUB_WORKSPACE']\)\)\nrequire 'arel/extensions'" ~/rails/activerecord/test/cases/helper.rb
|
|
184
198
|
rm ~/rails/Gemfile.lock
|
|
185
199
|
sed -i "/# Active Record./a gem 'arel-extensions', require: 'arel/extensions', path: File.expand_path\(ENV['GITHUB_WORKSPACE']\)" ~/rails/Gemfile
|
|
186
200
|
echo "gem 'ostruct'" >> ~/rails/Gemfile
|
|
@@ -188,6 +202,10 @@ jobs:
|
|
|
188
202
|
cat ~/rails/Gemfile
|
|
189
203
|
bundle update --jobs=3 --retry=3
|
|
190
204
|
|
|
205
|
+
- name: Fix Weird Test Cases
|
|
206
|
+
run: |
|
|
207
|
+
sed -i 's|} - \[:|} - \[:distinct_on, :uniq_on, :|' ~/rails/activerecord/test/cases/relation/delegation_test.rb
|
|
208
|
+
|
|
191
209
|
- run: |
|
|
192
210
|
pushd ~/rails/activerecord
|
|
193
211
|
bundle exec rake db:mysql:rebuild mysql2:test --trace
|
data/lib/arel/nodes/random.rb
CHANGED
data/lib/arel/nodes/ts_query.rb
CHANGED
|
@@ -9,6 +9,17 @@ module Arel
|
|
|
9
9
|
@language = Arel::Nodes.build_quoted(language) if language
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
def hash
|
|
13
|
+
[@expression, @language].hash
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def eql? other
|
|
17
|
+
self.class == other.class &&
|
|
18
|
+
self.expression == other.expression &&
|
|
19
|
+
self.language == other.language
|
|
20
|
+
end
|
|
21
|
+
alias :== :eql?
|
|
22
|
+
|
|
12
23
|
end
|
|
13
24
|
end
|
|
14
25
|
end
|
data/lib/arel/nodes/ts_rank.rb
CHANGED
|
@@ -9,6 +9,17 @@ module Arel
|
|
|
9
9
|
@tsquery = tsquery
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
def hash
|
|
13
|
+
[@tsvector, @tsquery].hash
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def eql? other
|
|
17
|
+
self.class == other.class &&
|
|
18
|
+
self.tsvector == other.tsvector &&
|
|
19
|
+
self.tsquery == other.tsquery
|
|
20
|
+
end
|
|
21
|
+
alias :== :eql?
|
|
22
|
+
|
|
12
23
|
end
|
|
13
24
|
end
|
|
14
25
|
end
|
|
@@ -10,6 +10,18 @@ module Arel
|
|
|
10
10
|
@normalization = normalization
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
def hash
|
|
14
|
+
[@tsvector, @tsquery, @normalization].hash
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def eql? other
|
|
18
|
+
self.class == other.class &&
|
|
19
|
+
self.tsvector == other.tsvector &&
|
|
20
|
+
self.tsquery == other.tsquery &&
|
|
21
|
+
self.normalization == other.normalization
|
|
22
|
+
end
|
|
23
|
+
alias :== :eql?
|
|
24
|
+
|
|
13
25
|
end
|
|
14
26
|
end
|
|
15
27
|
end
|
data/lib/arel/nodes/ts_vector.rb
CHANGED
|
@@ -8,7 +8,17 @@ module Arel
|
|
|
8
8
|
@attribute = attribute
|
|
9
9
|
@language = Arel::Nodes.build_quoted(language) if language
|
|
10
10
|
end
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
def hash
|
|
13
|
+
[@attribute, @language].hash
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def eql? other
|
|
17
|
+
self.class == other.class &&
|
|
18
|
+
self.attribute == other.attribute &&
|
|
19
|
+
self.language == other.language
|
|
20
|
+
end
|
|
21
|
+
alias :== :eql?
|
|
12
22
|
end
|
|
13
23
|
end
|
|
14
24
|
end
|