arel_extensions 1.3.8 → 1.3.10

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: db1001f3712bc329382b77345bde00ff5c1a074a6ea757841b40fcaa230f9c08
4
- data.tar.gz: de6cb9e86796ac091ae148f80888a4093ecbe0df9312ad5cbbcd16f7efc6b8f4
3
+ metadata.gz: 4894bc95053ae6a7c8e12751985e6ae8b0bf0e46fb989c54dfabb96539bfe13f
4
+ data.tar.gz: dfc9e4bacc8ed1000ce83ef49b379794c7c6e9b47b0f87733d92a5e5cce76418
5
5
  SHA512:
6
- metadata.gz: f225335f190b18b56c88e64cea0eef39771f6e937bebd57d814a6c4562c96236e2708f905eef4ec80801c9d6c475aebc717b99c265c2cbccbda46b30e0798786
7
- data.tar.gz: e89e25e2336dee7d1f617f05ceb30df609dfdca52ff65e73e86fc2baaff91c1ae8d51e8d50510ba0981cc8bac9d62327164204957afbf18a1cf1c43728a3bf5d
6
+ metadata.gz: 6f859b1f5d5273e552dbbbc1e11449ec01c56f668017a1886f69259cf7f24f04293fef8239494e02fcb5595edf4e3ee5139cdca935e39410c9c7d590609ffd2b
7
+ data.tar.gz: 39b2a9818b8231695ea48bfb40b30efcb0c801418475623759bbbdf54cde2c55e5859bc59af37f1cc9a837c4a1422dd3e7b2d07c205d14e5dcf4c4a158056e96
@@ -0,0 +1,29 @@
1
+ name: "Publish Gems"
2
+ on:
3
+ release:
4
+ types: [published]
5
+
6
+ jobs:
7
+ publish_gems:
8
+ name: Publish to Rubygems
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+ - name: setup ruby 3.2
13
+ uses: ruby/setup-ruby@v1
14
+ with:
15
+ ruby-version: 3.2
16
+ - name: Fetch Github Release Asset
17
+ uses: dsaltares/fetch-gh-release-asset@master
18
+ with:
19
+ file: "arel_extensions.*.gem"
20
+ regex: true
21
+ token: ${{ secrets.GITHUB_TOKEN }}
22
+ - name: List gems
23
+ run: ls -l *.gem
24
+ - name: Release Gems
25
+ uses: cadwallion/publish-rubygems-action@master
26
+ env:
27
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
28
+ RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
29
+ RELEASE_COMMAND: bin/publish
@@ -0,0 +1,30 @@
1
+ name: Release
2
+ on:
3
+ workflow_run:
4
+ workflows: ["Build and Test"]
5
+ branches: [master]
6
+ types:
7
+ - completed
8
+
9
+ jobs:
10
+ build_gems:
11
+ name: Build Gemfiles
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - name: setup ruby 3.2
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: 3.2
19
+ - name: build gems
20
+ run: |
21
+ bin/build
22
+ - name: release
23
+ uses: softprops/action-gh-release@v1
24
+ with:
25
+ tag_name: ${{ github.ref }}-${{ steps.vars.outputs.sha_short }}
26
+ draft: true
27
+ files: |
28
+ ./arel_extensions-*.gem
29
+ env:
30
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -12,33 +12,39 @@ jobs:
12
12
  strategy:
13
13
  fail-fast: false
14
14
  matrix:
15
- versions: [
16
- {ruby: '3.2', rails: 7_1, arelx: 2},
17
- {ruby: '3.2', rails: 7, arelx: 2},
18
- {ruby: '3.2', rails: 6_1, arelx: 2},
19
- {ruby: '3.1', rails: 7_1, arelx: 2},
20
- {ruby: '3.1', rails: 7, arelx: 2},
21
- {ruby: '3.1', rails: 6_1, arelx: 2},
22
- {ruby: '3.0', rails: 7_1, arelx: 2},
23
- {ruby: '3.0', rails: 7, arelx: 2},
24
- {ruby: '3.0', rails: 6_1, arelx: 2},
25
- {ruby: '2.7', rails: 7_1, arelx: 2},
26
- {ruby: '2.7', rails: 7, arelx: 2},
27
- {ruby: '2.7', rails: 6_1, arelx: 2},
28
- {ruby: '2.7', rails: 6, arelx: 2},
29
- {ruby: '2.7', rails: 5_2, arelx: 1},
30
- {ruby: '2.7', rails: 4_2, arelx: 1},
31
- {ruby: '2.5', rails: 6_1, arelx: 2},
32
- {ruby: '2.5', rails: 6, arelx: 2},
33
- {ruby: '2.5', rails: 5_2, arelx: 1},
34
- {ruby: '2.5', rails: 4_2, arelx: 1},
35
- {ruby: jruby-9.2, rails: 6_1, arelx: 2},
36
- {ruby: jruby-9.2, rails: 6, arelx: 2},
37
- {ruby: jruby-9.2, rails: 5_2, arelx: 1},
38
- {ruby: jruby-9.3, rails: 6_1, arelx: 2},
39
- {ruby: jruby-9.3, rails: 6, arelx: 2},
40
- {ruby: jruby-9.3, rails: 5_2, arelx: 1},
41
- ]
15
+ versions:
16
+ [
17
+ { ruby: "3.3", rails: 7_1, arelx: 2 },
18
+ { ruby: "3.3", rails: 7, arelx: 2 },
19
+ { ruby: "3.3", rails: 6_1, arelx: 2 },
20
+ { ruby: "3.2", rails: 7_1, arelx: 2 },
21
+ { ruby: "3.2", rails: 7, arelx: 2 },
22
+ { ruby: "3.2", rails: 6, arelx: 2 },
23
+ { ruby: "3.2", rails: 6_1, arelx: 2 },
24
+ { ruby: "3.1", rails: 7_1, arelx: 2 },
25
+ { ruby: "3.1", rails: 7, arelx: 2 },
26
+ { ruby: "3.1", rails: 6_1, arelx: 2 },
27
+ { ruby: "3.1", rails: 6, arelx: 2 },
28
+ { ruby: "3.0", rails: 7_1, arelx: 2 },
29
+ { ruby: "3.0", rails: 7, arelx: 2 },
30
+ { ruby: "3.0", rails: 6_1, arelx: 2 },
31
+ { ruby: "2.7", rails: 7_1, arelx: 2 },
32
+ { ruby: "2.7", rails: 7, arelx: 2 },
33
+ { ruby: "2.7", rails: 6_1, arelx: 2 },
34
+ { ruby: "2.7", rails: 6, arelx: 2 },
35
+ { ruby: "2.7", rails: 5_2, arelx: 1 },
36
+ { ruby: "2.7", rails: 4_2, arelx: 1 },
37
+ { ruby: "2.5", rails: 6_1, arelx: 2 },
38
+ { ruby: "2.5", rails: 6, arelx: 2 },
39
+ { ruby: "2.5", rails: 5_2, arelx: 1 },
40
+ { ruby: "2.5", rails: 4_2, arelx: 1 },
41
+ { ruby: jruby-9.2, rails: 6_1, arelx: 2 },
42
+ { ruby: jruby-9.2, rails: 6, arelx: 2 },
43
+ { ruby: jruby-9.2, rails: 5_2, arelx: 1 },
44
+ { ruby: jruby-9.3, rails: 6_1, arelx: 2 },
45
+ { ruby: jruby-9.3, rails: 6, arelx: 2 },
46
+ { ruby: jruby-9.3, rails: 5_2, arelx: 1 },
47
+ ]
42
48
  steps:
43
49
  - uses: actions/checkout@v2
44
50
  - name: Set up Ruby
@@ -49,9 +55,6 @@ jobs:
49
55
  run: |
50
56
  sudo apt-get update -q
51
57
  sudo apt-get install -y freetds-dev
52
- - name: Update system-wide gems
53
- if: ${{ !contains(fromJson('["2.5", "jruby-9.2"]'), matrix.versions.ruby) }}
54
- run: gem update --system --no-document
55
58
  - name: Setup Gemfile for arelx 2.x
56
59
  if: ${{ matrix.versions.arelx == 2 }}
57
60
  run: |
@@ -71,34 +74,40 @@ jobs:
71
74
  strategy:
72
75
  fail-fast: false
73
76
  matrix:
74
- versions: [
75
- {ruby: '3.2', rails: 7_1, arelx: 2},
76
- {ruby: '3.2', rails: 7, arelx: 2},
77
- {ruby: '3.2', rails: 6_1, arelx: 2},
78
- {ruby: '3.1', rails: 7_1, arelx: 2},
79
- {ruby: '3.1', rails: 7, arelx: 2},
80
- {ruby: '3.1', rails: 6_1, arelx: 2},
81
- {ruby: '3.0', rails: 7_1, arelx: 2},
82
- {ruby: '3.0', rails: 7, arelx: 2},
83
- {ruby: '3.0', rails: 6_1, arelx: 2},
84
- {ruby: '2.7', rails: 7_1, arelx: 2},
85
- {ruby: '2.7', rails: 7, arelx: 2},
86
- {ruby: '2.7', rails: 6_1, arelx: 2},
87
- {ruby: '2.7', rails: 6, arelx: 2},
88
- {ruby: '2.7', rails: 5_2, arelx: 1},
89
- {ruby: '2.7', rails: 4_2, arelx: 1},
90
- {ruby: '2.5', rails: 6_1, arelx: 2},
91
- {ruby: '2.5', rails: 6, arelx: 2},
92
- {ruby: '2.5', rails: 5_2, arelx: 1},
93
- {ruby: '2.5', rails: 4_2, arelx: 1},
94
- {ruby: jruby-9.2, rails: 6_1, arelx: 2},
95
- {ruby: jruby-9.2, rails: 6, arelx: 2},
96
- {ruby: jruby-9.2, rails: 5_2, arelx: 1},
97
- {ruby: jruby-9.2, rails: 4_2, arelx: 1},
98
- {ruby: jruby-9.3, rails: 6_1, arelx: 2},
99
- {ruby: jruby-9.3, rails: 6, arelx: 2},
100
- {ruby: jruby-9.3, rails: 5_2, arelx: 1},
101
- ]
77
+ versions:
78
+ [
79
+ { ruby: "3.3", rails: 7_1, arelx: 2 },
80
+ { ruby: "3.3", rails: 7, arelx: 2 },
81
+ { ruby: "3.3", rails: 6_1, arelx: 2 },
82
+ { ruby: "3.2", rails: 7_1, arelx: 2 },
83
+ { ruby: "3.2", rails: 7, arelx: 2 },
84
+ { ruby: "3.2", rails: 6_1, arelx: 2 },
85
+ { ruby: "3.2", rails: 6, arelx: 2 },
86
+ { ruby: "3.1", rails: 7_1, arelx: 2 },
87
+ { ruby: "3.1", rails: 7, arelx: 2 },
88
+ { ruby: "3.1", rails: 6, arelx: 2 },
89
+ { ruby: "3.1", rails: 6_1, arelx: 2 },
90
+ { ruby: "3.0", rails: 7_1, arelx: 2 },
91
+ { ruby: "3.0", rails: 7, arelx: 2 },
92
+ { ruby: "3.0", rails: 6_1, arelx: 2 },
93
+ { ruby: "2.7", rails: 7_1, arelx: 2 },
94
+ { ruby: "2.7", rails: 7, arelx: 2 },
95
+ { ruby: "2.7", rails: 6_1, arelx: 2 },
96
+ { ruby: "2.7", rails: 6, arelx: 2 },
97
+ { ruby: "2.7", rails: 5_2, arelx: 1 },
98
+ { ruby: "2.7", rails: 4_2, arelx: 1 },
99
+ { ruby: "2.5", rails: 6_1, arelx: 2 },
100
+ { ruby: "2.5", rails: 6, arelx: 2 },
101
+ { ruby: "2.5", rails: 5_2, arelx: 1 },
102
+ { ruby: "2.5", rails: 4_2, arelx: 1 },
103
+ { ruby: jruby-9.2, rails: 6_1, arelx: 2 },
104
+ { ruby: jruby-9.2, rails: 6, arelx: 2 },
105
+ { ruby: jruby-9.2, rails: 5_2, arelx: 1 },
106
+ { ruby: jruby-9.2, rails: 4_2, arelx: 1 },
107
+ { ruby: jruby-9.3, rails: 6_1, arelx: 2 },
108
+ { ruby: jruby-9.3, rails: 6, arelx: 2 },
109
+ { ruby: jruby-9.3, rails: 5_2, arelx: 1 },
110
+ ]
102
111
  steps:
103
112
  - uses: actions/checkout@v2
104
113
  - name: Set up Ruby
@@ -109,9 +118,6 @@ jobs:
109
118
  run: |
110
119
  sudo apt-get update -q
111
120
  sudo apt-get install -y freetds-dev
112
- - name: Update system-wide gems
113
- if: ${{ !contains(fromJson('["2.5", "jruby-9.2"]'), matrix.versions.ruby) }}
114
- run: gem update --system --no-document
115
121
  - name: Setup Gemfile
116
122
  if: ${{ matrix.versions.arelx == 2 }}
117
123
  run: |
@@ -132,33 +138,38 @@ jobs:
132
138
  fail-fast: false
133
139
  matrix:
134
140
  versions: [
135
- {ruby: '3.2', rails: 7_1, arelx: 2},
136
- {ruby: '3.2', rails: 7, arelx: 2},
137
- {ruby: '3.2', rails: 6_1, arelx: 2},
138
- {ruby: '3.1', rails: 7_1, arelx: 2},
139
- {ruby: '3.1', rails: 7, arelx: 2},
140
- {ruby: '3.1', rails: 6_1, arelx: 2},
141
- {ruby: '3.0', rails: 7_1, arelx: 2},
142
- {ruby: '3.0', rails: 7, arelx: 2},
143
- {ruby: '3.0', rails: 6_1, arelx: 2},
144
- {ruby: '2.7', rails: 7_1, arelx: 2},
145
- {ruby: '2.7', rails: 7, arelx: 2},
146
- {ruby: '2.7', rails: 6_1, arelx: 2},
147
- {ruby: '2.7', rails: 6, arelx: 2},
148
- {ruby: '2.7', rails: 5_2, arelx: 1},
149
- {ruby: '2.7', rails: 4_2, arelx: 1},
150
- {ruby: '2.5', rails: 6_1, arelx: 2},
151
- {ruby: '2.5', rails: 6, arelx: 2},
152
- {ruby: '2.5', rails: 5_2, arelx: 1},
153
- {ruby: '2.5', rails: 4_2, arelx: 1},
154
- {ruby: jruby-9.2, rails: 6_1, arelx: 2},
155
- {ruby: jruby-9.2, rails: 6, arelx: 2},
156
- {ruby: jruby-9.2, rails: 5_2, arelx: 1},
157
- {ruby: jruby-9.2, rails: 4_2, arelx: 1},
158
- {ruby: jruby-9.3, rails: 6_1, arelx: 2},
159
- {ruby: jruby-9.3, rails: 6, arelx: 2},
160
- {ruby: jruby-9.3, rails: 5_2, arelx: 1},
161
- ]
141
+ { ruby: "3.3", rails: 7_1, arelx: 2 },
142
+ { ruby: "3.3", rails: 7, arelx: 2 },
143
+ { ruby: "3.3", rails: 6_1, arelx: 2 },
144
+ { ruby: "3.2", rails: 7_1, arelx: 2 },
145
+ { ruby: "3.2", rails: 7, arelx: 2 },
146
+ { ruby: "3.2", rails: 6_1, arelx: 2 },
147
+ # { ruby: "3.2", rails: 6, arelx: 2 }, # cannot test > undefined symbol: rb_tainted_str_new2
148
+ { ruby: "3.1", rails: 7_1, arelx: 2 },
149
+ { ruby: "3.1", rails: 7, arelx: 2 },
150
+ { ruby: "3.1", rails: 6_1, arelx: 2 },
151
+ { ruby: "3.1", rails: 6, arelx: 2 },
152
+ { ruby: "3.0", rails: 7_1, arelx: 2 },
153
+ { ruby: "3.0", rails: 7, arelx: 2 },
154
+ { ruby: "3.0", rails: 6_1, arelx: 2 },
155
+ { ruby: "2.7", rails: 7_1, arelx: 2 },
156
+ { ruby: "2.7", rails: 7, arelx: 2 },
157
+ { ruby: "2.7", rails: 6_1, arelx: 2 },
158
+ { ruby: "2.7", rails: 6, arelx: 2 },
159
+ { ruby: "2.7", rails: 5_2, arelx: 1 },
160
+ { ruby: "2.7", rails: 4_2, arelx: 1 },
161
+ { ruby: "2.5", rails: 6_1, arelx: 2 },
162
+ { ruby: "2.5", rails: 6, arelx: 2 },
163
+ { ruby: "2.5", rails: 5_2, arelx: 1 },
164
+ { ruby: "2.5", rails: 4_2, arelx: 1 },
165
+ { ruby: jruby-9.2, rails: 6_1, arelx: 2 },
166
+ { ruby: jruby-9.2, rails: 6, arelx: 2 },
167
+ { ruby: jruby-9.2, rails: 5_2, arelx: 1 },
168
+ { ruby: jruby-9.2, rails: 4_2, arelx: 1 },
169
+ { ruby: jruby-9.3, rails: 6_1, arelx: 2 },
170
+ { ruby: jruby-9.3, rails: 6, arelx: 2 },
171
+ { ruby: jruby-9.3, rails: 5_2, arelx: 1 },
172
+ ]
162
173
  steps:
163
174
  - uses: actions/checkout@v2
164
175
  # PostgreSQL requires locales to be installed on the system to be able
@@ -191,9 +202,6 @@ jobs:
191
202
  run: |
192
203
  sudo apt-get update -q
193
204
  sudo apt-get install -y freetds-dev
194
- - name: Update system-wide gems
195
- if: ${{ !contains(fromJson('["2.5", "jruby-9.2"]'), matrix.versions.ruby) }}
196
- run: gem update --system --no-document
197
205
  - name: Setup Gemfile
198
206
  if: ${{ matrix.versions.arelx == 2 }}
199
207
  run: |
@@ -217,33 +225,38 @@ jobs:
217
225
  fail-fast: false
218
226
  matrix:
219
227
  versions: [
220
- {ruby: '3.2', rails: 7_1, arelx: 2},
221
- {ruby: '3.2', rails: 7, arelx: 2},
222
- {ruby: '3.2', rails: 6_1, arelx: 2},
223
- {ruby: '3.1', rails: 7_1, arelx: 2},
224
- {ruby: '3.1', rails: 7, arelx: 2},
225
- {ruby: '3.1', rails: 6_1, arelx: 2},
226
- {ruby: '3.0', rails: 7_1, arelx: 2},
227
- {ruby: '3.0', rails: 7, arelx: 2},
228
- {ruby: '3.0', rails: 6_1, arelx: 2},
229
- {ruby: '2.7', rails: 7_1, arelx: 2},
230
- {ruby: '2.7', rails: 7, arelx: 2},
231
- {ruby: '2.7', rails: 6_1, arelx: 2},
232
- {ruby: '2.7', rails: 6, arelx: 2},
233
- {ruby: '2.7', rails: 5_2, arelx: 1},
234
- {ruby: '2.7', rails: 4_2, arelx: 1},
235
- {ruby: '2.5', rails: 6_1, arelx: 2},
236
- {ruby: '2.5', rails: 6, arelx: 2},
237
- {ruby: '2.5', rails: 5_2, arelx: 1},
238
- {ruby: '2.5', rails: 4_2, arelx: 1},
239
- {ruby: jruby-9.2, rails: 6_1, arelx: 2},
240
- {ruby: jruby-9.2, rails: 6, arelx: 2},
241
- {ruby: jruby-9.2, rails: 5_2, arelx: 1},
242
- {ruby: jruby-9.2, rails: 4_2, arelx: 1},
243
- {ruby: jruby-9.3, rails: 6_1, arelx: 2},
244
- {ruby: jruby-9.3, rails: 6, arelx: 2},
245
- {ruby: jruby-9.3, rails: 5_2, arelx: 1},
246
- ]
228
+ { ruby: "3.3", rails: 7_1, arelx: 2 },
229
+ { ruby: "3.3", rails: 7, arelx: 2 },
230
+ { ruby: "3.3", rails: 6_1, arelx: 2 },
231
+ { ruby: "3.2", rails: 7_1, arelx: 2 },
232
+ { ruby: "3.2", rails: 7, arelx: 2 },
233
+ { ruby: "3.2", rails: 6_1, arelx: 2 },
234
+ # { ruby: "3.2", rails: 6, arelx: 2 }, # cannot test > undefined symbol: rb_tainted_str_new2
235
+ { ruby: "3.1", rails: 7_1, arelx: 2 },
236
+ { ruby: "3.1", rails: 7, arelx: 2 },
237
+ { ruby: "3.1", rails: 6_1, arelx: 2 },
238
+ { ruby: "3.1", rails: 6, arelx: 2 },
239
+ { ruby: "3.0", rails: 7_1, arelx: 2 },
240
+ { ruby: "3.0", rails: 7, arelx: 2 },
241
+ { ruby: "3.0", rails: 6_1, arelx: 2 },
242
+ { ruby: "2.7", rails: 7_1, arelx: 2 },
243
+ { ruby: "2.7", rails: 7, arelx: 2 },
244
+ { ruby: "2.7", rails: 6_1, arelx: 2 },
245
+ { ruby: "2.7", rails: 6, arelx: 2 },
246
+ { ruby: "2.7", rails: 5_2, arelx: 1 },
247
+ { ruby: "2.7", rails: 4_2, arelx: 1 },
248
+ { ruby: "2.5", rails: 6_1, arelx: 2 },
249
+ { ruby: "2.5", rails: 6, arelx: 2 },
250
+ { ruby: "2.5", rails: 5_2, arelx: 1 },
251
+ { ruby: "2.5", rails: 4_2, arelx: 1 },
252
+ { ruby: jruby-9.2, rails: 6_1, arelx: 2 },
253
+ { ruby: jruby-9.2, rails: 6, arelx: 2 },
254
+ { ruby: jruby-9.2, rails: 5_2, arelx: 1 },
255
+ { ruby: jruby-9.2, rails: 4_2, arelx: 1 },
256
+ { ruby: jruby-9.3, rails: 6_1, arelx: 2 },
257
+ { ruby: jruby-9.3, rails: 6, arelx: 2 },
258
+ { ruby: jruby-9.3, rails: 5_2, arelx: 1 },
259
+ ]
247
260
  services:
248
261
  mysql:
249
262
  image: mysql:5.7
@@ -268,9 +281,6 @@ jobs:
268
281
  run: |
269
282
  sudo apt-get update -q
270
283
  sudo apt-get install -y freetds-dev
271
- - name: Update system-wide gems
272
- if: ${{ !contains(fromJson('["2.5", "jruby-9.2"]'), matrix.versions.ruby) }}
273
- run: gem update --system --no-document
274
284
  - name: Setup Gemfile
275
285
  if: ${{ matrix.versions.arelx == 2 }}
276
286
  run: |
@@ -297,29 +307,48 @@ jobs:
297
307
  fail-fast: false
298
308
  matrix:
299
309
  versions: [
300
- # {ruby: '3.2', rails: 7, arelx: 2},
301
- {ruby: '3.2', rails: 6_1, arelx: 2},
302
- # {ruby: '3.1', rails: 7, arelx: 2},
303
- {ruby: '3.1', rails: 6_1, arelx: 2},
304
- # {ruby: '3.0', rails: 7, arelx: 2},
305
- {ruby: '3.0', rails: 6_1, arelx: 2},
306
- # {ruby: '2.7', rails: 7, arelx: 2},
307
- {ruby: '2.7', rails: 6_1, arelx: 2},
308
- {ruby: '2.7', rails: 6, arelx: 2},
309
- {ruby: '2.7', rails: 5_2, arelx: 1},
310
- {ruby: '2.7', rails: 4_2, arelx: 1},
311
- {ruby: '2.5', rails: 6_1, arelx: 2},
312
- {ruby: '2.5', rails: 6, arelx: 2},
313
- {ruby: '2.5', rails: 5_2, arelx: 1},
314
- {ruby: '2.5', rails: 4_2, arelx: 1},
315
- # {ruby: jruby-9.2, rails: 6_1, arelx: 2},
316
- # {ruby: jruby-9.2, rails: 6, arelx: 2},
317
- {ruby: jruby-9.2, rails: 5_2, arelx: 1},
318
- {ruby: jruby-9.2, rails: 4_2, arelx: 1},
319
- # {ruby: jruby-9.3, rails: 6_1, arelx: 2},
320
- # {ruby: jruby-9.3, rails: 6, arelx: 2},
321
- {ruby: jruby-9.3, rails: 5_2, arelx: 1},
322
- ]
310
+ { ruby: "3.3", rails: 7_1, arelx: 2 },
311
+ { ruby: "3.3", rails: 7, arelx: 2 },
312
+ { ruby: "3.3", rails: 6_1, arelx: 2 },
313
+ { ruby: "3.3", rails: 6, arelx: 2 },
314
+ { ruby: "3.2", rails: 7_1, arelx: 2 },
315
+ { ruby: "3.2", rails: 7, arelx: 2 },
316
+ { ruby: "3.2", rails: 6_1, arelx: 2 },
317
+ { ruby: "3.2", rails: 6, arelx: 2 },
318
+ { ruby: "3.1", rails: 7_1, arelx: 2 },
319
+ { ruby: "3.1", rails: 7, arelx: 2 },
320
+ { ruby: "3.1", rails: 6_1, arelx: 2 },
321
+ { ruby: "3.1", rails: 6, arelx: 2 },
322
+ { ruby: "3.0", rails: 7, arelx: 2 },
323
+ { ruby: "3.0", rails: 6_1, arelx: 2 },
324
+ { ruby: "3.0", rails: 6, arelx: 2 },
325
+ { ruby: "2.7", rails: 6_1, arelx: 2 },
326
+ { ruby: "2.7", rails: 6, arelx: 2 },
327
+ { ruby: "2.7", rails: 5_2, arelx: 1 },
328
+ { ruby: "2.7", rails: 4_2, arelx: 1 },
329
+ { ruby: "2.5", rails: 6_1, arelx: 2 },
330
+ { ruby: "2.5", rails: 6, arelx: 2 },
331
+ { ruby: "2.5", rails: 5_2, arelx: 1 },
332
+ { ruby: "2.5", rails: 4_2, arelx: 1 },
333
+ # {ruby: jruby-9.2, rails: 6_1, arelx: 2},
334
+ # {ruby: jruby-9.2, rails: 6, arelx: 2},
335
+ { ruby: jruby-9.2, rails: 5_2, arelx: 1 },
336
+ { ruby: jruby-9.2, rails: 4_2, arelx: 1 },
337
+ # See comments on 9.4 to understand why these are disabled for now.
338
+ # {ruby: jruby-9.3, rails: 6_1, arelx: 2},
339
+ # {ruby: jruby-9.3, rails: 6, arelx: 2},
340
+ # {ruby: jruby-9.3, rails: 5_2, arelx: 1},
341
+ { ruby: jruby-9.4, rails: 7_1, arelx: 2 },
342
+ { ruby: jruby-9.4, rails: 7, arelx: 2 },
343
+ #
344
+ # 6 and 6.1 don't work because of a bug in the alt adapter
345
+ # https://github.com/JesseChavez/activerecord-jdbc-adapter/issues/16
346
+ # {ruby: jruby-9.4, rails: 6_1, arelx: 2},
347
+ # {ruby: jruby-9.4, rails: 6, arelx: 2},
348
+ #
349
+ # < 5.2 don't work because of a deeper issue.
350
+ # {ruby: jruby-9.4, rails: 5_2, arelx: 1},
351
+ ]
323
352
  mssql: [2017, 2019]
324
353
  steps:
325
354
  - uses: actions/checkout@v2
@@ -337,9 +366,6 @@ jobs:
337
366
  version: ${{ matrix.mssql }}
338
367
  install: sqlengine, sqlclient, sqlpackage, localdb
339
368
  sa-password: Password12!
340
- - name: Update system-wide gems
341
- if: ${{ !contains(fromJson('["2.5", "jruby-9.2"]'), matrix.versions.ruby) }}
342
- run: gem update --system --no-document
343
369
  - name: Setup Gemfile
344
370
  if: ${{ matrix.versions.arelx == 2 }}
345
371
  run: |
data/NEWS.md CHANGED
@@ -1,6 +1,40 @@
1
1
  # News
2
2
 
3
- ## Current Release
3
+ ## Release v2.1.10/v1.3.10
4
+
5
+ - MS SQL: add support for jruby 9.4 via [activerecord-jdbc-alt-adapter](https://rubygems.org/gems/activerecord-jdbc-alt-adapter/)
6
+
7
+ ## Release v2.1.9/v1.3.9
8
+
9
+ ### Bug Fixes
10
+
11
+ - Postgres:
12
+ - Datetime formatting in postgres now behaves like mysql: if the target
13
+ timezone is a string, we automatically consider that you're trying to
14
+ convert from `UTC`.
15
+ - Datetime casting will now automatically ask for a
16
+ `timestamp without timezone`, also aligning with the expected befavior
17
+ in mysql. This also makes casting work better with timezone conversion,
18
+ especially if you don't pass the timezone from which you're converting
19
+ to.
20
+ ```ruby
21
+ scope
22
+ .select(Arel.quoted('2022-02-01 10:42:00')
23
+ .cast(:datetime)
24
+ .format_date('%Y/%m/%d %H:%M:%S', 'Europe/Paris')
25
+ .as('res'))
26
+ ```
27
+ Will produce:
28
+ ```sql
29
+ SELECT TO_CHAR(
30
+ CAST('2022-02-01 10:42:00' AS timestamp without time zone) AT TIME ZONE 'UTC' AT TIME ZONE 'Europe/Paris',
31
+ 'YYYY/MM/DD HH24:MI:SS'
32
+ )
33
+ AS "res"
34
+ -- …
35
+ ```
36
+
37
+ ## Release v2.1.7/v1.3.7
4
38
 
5
39
  ### New Features
6
40
 
@@ -8,11 +42,11 @@
8
42
  The actual behavior of `format` is inconsistent across DB vendors: in mysql we
9
43
  can format dates and numbers with it, and in the other ones we only format
10
44
  dates.
11
-
45
+
12
46
  We're planning on normalizing this behavior. We want `format` to "cleverly"
13
47
  format dates or numbers, and `format_date` / `format_number` to strictly
14
48
  format dates / numbers.
15
-
49
+
16
50
  The introduction of `format_date` is the first step in this direction.
17
51
 
18
52
  ## Release v2.1.6/v1.3.6
data/README.md CHANGED
@@ -173,9 +173,9 @@ The second form accepts 2 kinds of values:
173
173
 
174
174
  ```ruby
175
175
  t[:birthdate].format('%Y/%m/%d %H:%M:%S', 'posix/Pacific/Tahiti')
176
- # => DATE_FORMAT(CONVERT_TZ(CAST(my_table.birthdate AS datetime), 'UTC', 'posix/Pacific/Tahiti'), '%Y/%m/%d %H:%i:%S') ## MySQL
177
- # => TO_CHAR(CAST(my_table.birthdate AS timestamp with time zone) AT TIME ZONE 'posix/Pacific/Tahiti', 'YYYY/MM/DD HH24:MI:SS') ## PostgreSQL
178
- # => CONVERT(datetime, my_table.birthdate) AT TIME ZONE 'UTC' AT TIME ZONE N'posix/Pacific/Tahiti' ## SQL Server (& truncated for clarity)
176
+ # => DATE_FORMAT(CONVERT_TZ(CAST(my_table.birthdate AS datetime), 'UTC', 'posix/Pacific/Tahiti'), '%Y/%m/%d %H:%i:%S') ## MySQL
177
+ # => TO_CHAR(CAST(my_table.birthdate AS timestamp with time zone) AT TIME ZONE 'UTC' AT TIME ZONE 'posix/Pacific/Tahiti', 'YYYY/MM/DD HH24:MI:SS') ## PostgreSQL
178
+ # => CONVERT(datetime, my_table.birthdate) AT TIME ZONE 'UTC' AT TIME ZONE N'posix/Pacific/Tahiti' ## SQL Server (& truncated for clarity)
179
179
  # ^^^^^^^^^^^^^^^^^^^^ 🚨 Invalid timezone for SQL Server. Explanation below.
180
180
  ```
181
181
 
@@ -772,7 +772,7 @@ bundle exec rake test:to_sql
772
772
  Refer to the [Version Compatibility](#version-compatibility) section to correctly
773
773
  set your gemfile.
774
774
 
775
- ### MariaDB and Postgres
775
+ ### Testing databases locally
776
776
 
777
777
  We provide a `docker compose` to set up some databases for testing:
778
778
 
data/bin/build ADDED
@@ -0,0 +1,15 @@
1
+ #! /usr/bin/env sh
2
+ set -e
3
+
4
+ # VERSION ~> 1
5
+ echo "Packaging v1"
6
+ cp ./version_v1.rb lib/arel_extensions/version.rb
7
+ cp ./gemspecs/arel_extensions-v1.gemspec ./arel_extensions.gemspec
8
+ gem build ./arel_extensions.gemspec
9
+
10
+ # VERSION ~> 2
11
+ echo "Packaging v2"
12
+ cp ./version_v2.rb lib/arel_extensions/version.rb
13
+ cp ./gemspecs/arel_extensions-v2.gemspec ./arel_extensions.gemspec
14
+ gem build ./arel_extensions.gemspec
15
+
data/bin/publish ADDED
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env sh
2
+ set -e
3
+
4
+ find . -name "arel_extensions*.gem" | while read packaged_gem ; do
5
+ echo "Publishing $packaged_gem"
6
+ gem push "$packaged_gem"
7
+ done
8
+
data/dev/compose.yaml CHANGED
@@ -27,3 +27,11 @@ services:
27
27
  interval: 10s
28
28
  timeout: 5s
29
29
  retries: 3
30
+ mssql:
31
+ image: mcr.microsoft.com/mssql/server:2019-latest
32
+ container_name: mssql
33
+ environment:
34
+ MSSQL_SA_PASSWORD: Password12!
35
+ ACCEPT_EULA: Y
36
+ ports:
37
+ - "1433:1433"
@@ -20,11 +20,12 @@ group :development, :test do
20
20
  gem 'activerecord-oracle_enhanced-adapter', '~> 6.0.0' if ENV.has_key? 'ORACLE_HOME'
21
21
 
22
22
  # for JRuby
23
- gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', tag: 'v60.4', platforms: :jruby
24
- gem 'jdbc-sqlite3', platforms: :jruby
25
- gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
23
+ gem 'activerecord-jdbc-alt-adapter', '~> 60.0', platform: :jruby, require: true
26
24
  gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
27
25
  gem 'activerecord-jdbcpostgresql-adapter', platforms: :jruby
26
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
27
+ gem 'jdbc-mssql', platforms: :jruby, require: true
28
+ gem 'jdbc-sqlite3', platforms: :jruby
28
29
  end
29
30
 
30
31
  gemspec path: Dir.pwd
@@ -20,11 +20,12 @@ group :development, :test do
20
20
  gem 'activerecord-oracle_enhanced-adapter', '~> 6.0.0' if ENV.has_key? 'ORACLE_HOME'
21
21
 
22
22
  # for JRuby
23
- gem 'activerecord-jdbc-adapter', github: 'jruby/activerecord-jdbc-adapter', tag: 'v61.1', platforms: :jruby
24
- gem 'jdbc-sqlite3', platforms: :jruby
25
- gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
23
+ gem 'activerecord-jdbc-alt-adapter', '~> 61.0', platform: :jruby, require: true
26
24
  gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
27
25
  gem 'activerecord-jdbcpostgresql-adapter', platforms: :jruby
26
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
27
+ gem 'jdbc-mssql', platforms: :jruby, require: true
28
+ gem 'jdbc-sqlite3', platforms: :jruby
28
29
  end
29
30
 
30
31
  gemspec path: Dir.pwd