schema_plus_triggers 0.1.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/prs.yml +313 -0
- data/.gitignore +1 -0
- data/.simplecov +20 -0
- data/README.md +20 -7
- data/gemfiles/Gemfile.base +1 -1
- data/gemfiles/activerecord-5.2/Gemfile.base +2 -1
- data/gemfiles/activerecord-5.2/Gemfile.postgresql +2 -2
- data/gemfiles/activerecord-6.0/Gemfile.base +4 -0
- data/gemfiles/activerecord-6.0/Gemfile.postgresql +10 -0
- data/gemfiles/activerecord-6.1/Gemfile.base +4 -0
- data/gemfiles/activerecord-6.1/Gemfile.postgresql +10 -0
- data/gemfiles/activerecord-7.0/Gemfile.base +4 -0
- data/gemfiles/activerecord-7.0/Gemfile.postgresql +10 -0
- data/lib/schema_plus/triggers/version.rb +1 -1
- data/schema_dev.yml +9 -1
- data/schema_plus_triggers.gemspec +6 -7
- data/spec/schema_dumper_spec.rb +1 -1
- data/spec/spec_helper.rb +3 -5
- metadata +20 -67
- data/.travis.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e42ddcf355675207c78375bd90b6a404b877c10ef67cfaf36c5c2591269b282
|
4
|
+
data.tar.gz: a6ec160196f7d0fb9390158936ad39b37a4c815d54e9a978917994b9774308c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bbd81e135e592ad54e4a45f28e4f8d7ee184c680315c10c645d7490b0432914af92ea1a8f2a678107f0b1ced86988119c8c9a542345170189d8303a6b092b34
|
7
|
+
data.tar.gz: 9062ba7c6f18a05e96d364804816a8d285983a64ad8be2bccead6b30f57c87a4ad6e2c94b0a5d90e6984ca560f7bdedb9e591ba2c35586b9a46c20d1785bf543
|
@@ -0,0 +1,313 @@
|
|
1
|
+
# This file was auto-generated by the schema_dev tool, based on the data in
|
2
|
+
# ./schema_dev.yml
|
3
|
+
# Please do not edit this file; any changes will be overwritten next time
|
4
|
+
# schema_dev gets run.
|
5
|
+
---
|
6
|
+
name: CI PR Builds
|
7
|
+
'on':
|
8
|
+
push:
|
9
|
+
branches:
|
10
|
+
- master
|
11
|
+
pull_request:
|
12
|
+
concurrency:
|
13
|
+
group: ci-${{ github.ref }}
|
14
|
+
cancel-in-progress: true
|
15
|
+
jobs:
|
16
|
+
test:
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
strategy:
|
19
|
+
fail-fast: false
|
20
|
+
matrix:
|
21
|
+
ruby:
|
22
|
+
- '2.5'
|
23
|
+
- '2.7'
|
24
|
+
- '3.0'
|
25
|
+
- '3.1'
|
26
|
+
activerecord:
|
27
|
+
- '5.2'
|
28
|
+
- '6.0'
|
29
|
+
- '6.1'
|
30
|
+
- '7.0'
|
31
|
+
db:
|
32
|
+
- skip
|
33
|
+
dbversion:
|
34
|
+
- skip
|
35
|
+
exclude:
|
36
|
+
- ruby: '3.0'
|
37
|
+
activerecord: '5.2'
|
38
|
+
- ruby: '3.1'
|
39
|
+
activerecord: '5.2'
|
40
|
+
- ruby: '2.5'
|
41
|
+
activerecord: '7.0'
|
42
|
+
- db: skip
|
43
|
+
dbversion: skip
|
44
|
+
include:
|
45
|
+
- ruby: '2.5'
|
46
|
+
activerecord: '5.2'
|
47
|
+
db: postgresql
|
48
|
+
dbversion: '9.6'
|
49
|
+
- ruby: '2.5'
|
50
|
+
activerecord: '5.2'
|
51
|
+
db: postgresql
|
52
|
+
dbversion: '10'
|
53
|
+
- ruby: '2.5'
|
54
|
+
activerecord: '5.2'
|
55
|
+
db: postgresql
|
56
|
+
dbversion: '11'
|
57
|
+
- ruby: '2.5'
|
58
|
+
activerecord: '5.2'
|
59
|
+
db: postgresql
|
60
|
+
dbversion: '12'
|
61
|
+
- ruby: '2.5'
|
62
|
+
activerecord: '6.0'
|
63
|
+
db: postgresql
|
64
|
+
dbversion: '9.6'
|
65
|
+
- ruby: '2.5'
|
66
|
+
activerecord: '6.0'
|
67
|
+
db: postgresql
|
68
|
+
dbversion: '10'
|
69
|
+
- ruby: '2.5'
|
70
|
+
activerecord: '6.0'
|
71
|
+
db: postgresql
|
72
|
+
dbversion: '11'
|
73
|
+
- ruby: '2.5'
|
74
|
+
activerecord: '6.0'
|
75
|
+
db: postgresql
|
76
|
+
dbversion: '12'
|
77
|
+
- ruby: '2.5'
|
78
|
+
activerecord: '6.1'
|
79
|
+
db: postgresql
|
80
|
+
dbversion: '9.6'
|
81
|
+
- ruby: '2.5'
|
82
|
+
activerecord: '6.1'
|
83
|
+
db: postgresql
|
84
|
+
dbversion: '10'
|
85
|
+
- ruby: '2.5'
|
86
|
+
activerecord: '6.1'
|
87
|
+
db: postgresql
|
88
|
+
dbversion: '11'
|
89
|
+
- ruby: '2.5'
|
90
|
+
activerecord: '6.1'
|
91
|
+
db: postgresql
|
92
|
+
dbversion: '12'
|
93
|
+
- ruby: '2.7'
|
94
|
+
activerecord: '5.2'
|
95
|
+
db: postgresql
|
96
|
+
dbversion: '9.6'
|
97
|
+
- ruby: '2.7'
|
98
|
+
activerecord: '5.2'
|
99
|
+
db: postgresql
|
100
|
+
dbversion: '10'
|
101
|
+
- ruby: '2.7'
|
102
|
+
activerecord: '5.2'
|
103
|
+
db: postgresql
|
104
|
+
dbversion: '11'
|
105
|
+
- ruby: '2.7'
|
106
|
+
activerecord: '5.2'
|
107
|
+
db: postgresql
|
108
|
+
dbversion: '12'
|
109
|
+
- ruby: '2.7'
|
110
|
+
activerecord: '6.0'
|
111
|
+
db: postgresql
|
112
|
+
dbversion: '9.6'
|
113
|
+
- ruby: '2.7'
|
114
|
+
activerecord: '6.0'
|
115
|
+
db: postgresql
|
116
|
+
dbversion: '10'
|
117
|
+
- ruby: '2.7'
|
118
|
+
activerecord: '6.0'
|
119
|
+
db: postgresql
|
120
|
+
dbversion: '11'
|
121
|
+
- ruby: '2.7'
|
122
|
+
activerecord: '6.0'
|
123
|
+
db: postgresql
|
124
|
+
dbversion: '12'
|
125
|
+
- ruby: '2.7'
|
126
|
+
activerecord: '6.1'
|
127
|
+
db: postgresql
|
128
|
+
dbversion: '9.6'
|
129
|
+
- ruby: '2.7'
|
130
|
+
activerecord: '6.1'
|
131
|
+
db: postgresql
|
132
|
+
dbversion: '10'
|
133
|
+
- ruby: '2.7'
|
134
|
+
activerecord: '6.1'
|
135
|
+
db: postgresql
|
136
|
+
dbversion: '11'
|
137
|
+
- ruby: '2.7'
|
138
|
+
activerecord: '6.1'
|
139
|
+
db: postgresql
|
140
|
+
dbversion: '12'
|
141
|
+
- ruby: '2.7'
|
142
|
+
activerecord: '7.0'
|
143
|
+
db: postgresql
|
144
|
+
dbversion: '9.6'
|
145
|
+
- ruby: '2.7'
|
146
|
+
activerecord: '7.0'
|
147
|
+
db: postgresql
|
148
|
+
dbversion: '10'
|
149
|
+
- ruby: '2.7'
|
150
|
+
activerecord: '7.0'
|
151
|
+
db: postgresql
|
152
|
+
dbversion: '11'
|
153
|
+
- ruby: '2.7'
|
154
|
+
activerecord: '7.0'
|
155
|
+
db: postgresql
|
156
|
+
dbversion: '12'
|
157
|
+
- ruby: '3.0'
|
158
|
+
activerecord: '6.0'
|
159
|
+
db: postgresql
|
160
|
+
dbversion: '9.6'
|
161
|
+
- ruby: '3.0'
|
162
|
+
activerecord: '6.0'
|
163
|
+
db: postgresql
|
164
|
+
dbversion: '10'
|
165
|
+
- ruby: '3.0'
|
166
|
+
activerecord: '6.0'
|
167
|
+
db: postgresql
|
168
|
+
dbversion: '11'
|
169
|
+
- ruby: '3.0'
|
170
|
+
activerecord: '6.0'
|
171
|
+
db: postgresql
|
172
|
+
dbversion: '12'
|
173
|
+
- ruby: '3.0'
|
174
|
+
activerecord: '6.1'
|
175
|
+
db: postgresql
|
176
|
+
dbversion: '9.6'
|
177
|
+
- ruby: '3.0'
|
178
|
+
activerecord: '6.1'
|
179
|
+
db: postgresql
|
180
|
+
dbversion: '10'
|
181
|
+
- ruby: '3.0'
|
182
|
+
activerecord: '6.1'
|
183
|
+
db: postgresql
|
184
|
+
dbversion: '11'
|
185
|
+
- ruby: '3.0'
|
186
|
+
activerecord: '6.1'
|
187
|
+
db: postgresql
|
188
|
+
dbversion: '12'
|
189
|
+
- ruby: '3.0'
|
190
|
+
activerecord: '7.0'
|
191
|
+
db: postgresql
|
192
|
+
dbversion: '9.6'
|
193
|
+
- ruby: '3.0'
|
194
|
+
activerecord: '7.0'
|
195
|
+
db: postgresql
|
196
|
+
dbversion: '10'
|
197
|
+
- ruby: '3.0'
|
198
|
+
activerecord: '7.0'
|
199
|
+
db: postgresql
|
200
|
+
dbversion: '11'
|
201
|
+
- ruby: '3.0'
|
202
|
+
activerecord: '7.0'
|
203
|
+
db: postgresql
|
204
|
+
dbversion: '12'
|
205
|
+
- ruby: '3.1'
|
206
|
+
activerecord: '6.0'
|
207
|
+
db: postgresql
|
208
|
+
dbversion: '9.6'
|
209
|
+
- ruby: '3.1'
|
210
|
+
activerecord: '6.0'
|
211
|
+
db: postgresql
|
212
|
+
dbversion: '10'
|
213
|
+
- ruby: '3.1'
|
214
|
+
activerecord: '6.0'
|
215
|
+
db: postgresql
|
216
|
+
dbversion: '11'
|
217
|
+
- ruby: '3.1'
|
218
|
+
activerecord: '6.0'
|
219
|
+
db: postgresql
|
220
|
+
dbversion: '12'
|
221
|
+
- ruby: '3.1'
|
222
|
+
activerecord: '6.1'
|
223
|
+
db: postgresql
|
224
|
+
dbversion: '9.6'
|
225
|
+
- ruby: '3.1'
|
226
|
+
activerecord: '6.1'
|
227
|
+
db: postgresql
|
228
|
+
dbversion: '10'
|
229
|
+
- ruby: '3.1'
|
230
|
+
activerecord: '6.1'
|
231
|
+
db: postgresql
|
232
|
+
dbversion: '11'
|
233
|
+
- ruby: '3.1'
|
234
|
+
activerecord: '6.1'
|
235
|
+
db: postgresql
|
236
|
+
dbversion: '12'
|
237
|
+
- ruby: '3.1'
|
238
|
+
activerecord: '7.0'
|
239
|
+
db: postgresql
|
240
|
+
dbversion: '9.6'
|
241
|
+
- ruby: '3.1'
|
242
|
+
activerecord: '7.0'
|
243
|
+
db: postgresql
|
244
|
+
dbversion: '10'
|
245
|
+
- ruby: '3.1'
|
246
|
+
activerecord: '7.0'
|
247
|
+
db: postgresql
|
248
|
+
dbversion: '11'
|
249
|
+
- ruby: '3.1'
|
250
|
+
activerecord: '7.0'
|
251
|
+
db: postgresql
|
252
|
+
dbversion: '12'
|
253
|
+
env:
|
254
|
+
BUNDLE_GEMFILE: "${{ github.workspace }}/gemfiles/activerecord-${{ matrix.activerecord }}/Gemfile.${{ matrix.db }}"
|
255
|
+
POSTGRESQL_DB_HOST: 127.0.0.1
|
256
|
+
POSTGRESQL_DB_USER: schema_plus_test
|
257
|
+
POSTGRESQL_DB_PASS: database
|
258
|
+
steps:
|
259
|
+
- uses: actions/checkout@v2
|
260
|
+
- name: Set up Ruby
|
261
|
+
uses: ruby/setup-ruby@v1
|
262
|
+
with:
|
263
|
+
ruby-version: "${{ matrix.ruby }}"
|
264
|
+
bundler-cache: true
|
265
|
+
- name: Run bundle update
|
266
|
+
run: bundle update
|
267
|
+
- name: Start Postgresql
|
268
|
+
if: matrix.db == 'postgresql'
|
269
|
+
run: |
|
270
|
+
docker run --rm --detach \
|
271
|
+
-e POSTGRES_USER=$POSTGRESQL_DB_USER \
|
272
|
+
-e POSTGRES_PASSWORD=$POSTGRESQL_DB_PASS \
|
273
|
+
-p 5432:5432 \
|
274
|
+
--health-cmd "pg_isready -q" \
|
275
|
+
--health-interval 5s \
|
276
|
+
--health-timeout 5s \
|
277
|
+
--health-retries 5 \
|
278
|
+
--name database postgres:${{ matrix.dbversion }}
|
279
|
+
- name: Wait for database to start
|
280
|
+
if: "(matrix.db == 'postgresql' || matrix.db == 'mysql2')"
|
281
|
+
run: |
|
282
|
+
COUNT=0
|
283
|
+
ATTEMPTS=20
|
284
|
+
until [[ $COUNT -eq $ATTEMPTS ]]; do
|
285
|
+
[ "$(docker inspect -f {{.State.Health.Status}} database)" == "healthy" ] && break
|
286
|
+
echo $(( COUNT++ )) > /dev/null
|
287
|
+
sleep 2
|
288
|
+
done
|
289
|
+
- name: Create testing database
|
290
|
+
if: "(matrix.db == 'postgresql' || matrix.db == 'mysql2')"
|
291
|
+
run: bundle exec rake create_ci_database
|
292
|
+
- name: Run tests
|
293
|
+
run: bundle exec rake spec
|
294
|
+
- name: Shutdown database
|
295
|
+
if: always() && (matrix.db == 'postgresql' || matrix.db == 'mysql2')
|
296
|
+
run: docker stop database
|
297
|
+
- name: Coveralls Parallel
|
298
|
+
if: "${{ !env.ACT }}"
|
299
|
+
uses: coverallsapp/github-action@master
|
300
|
+
with:
|
301
|
+
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
302
|
+
flag-name: run-${{ matrix.ruby }}-${{ matrix.activerecord }}-${{ matrix.db }}-${{ matrix.dbversion }}
|
303
|
+
parallel: true
|
304
|
+
finish:
|
305
|
+
needs: test
|
306
|
+
runs-on: ubuntu-latest
|
307
|
+
steps:
|
308
|
+
- name: Coveralls Finished
|
309
|
+
if: "${{ !env.ACT }}"
|
310
|
+
uses: coverallsapp/github-action@master
|
311
|
+
with:
|
312
|
+
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
313
|
+
parallel-finished: true
|
data/.gitignore
CHANGED
data/.simplecov
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
SimpleCov.configure do
|
4
|
+
enable_coverage :branch
|
5
|
+
add_filter '/spec/'
|
6
|
+
|
7
|
+
add_group 'Binaries', '/bin/'
|
8
|
+
add_group 'Libraries', '/lib/'
|
9
|
+
|
10
|
+
if ENV['CI']
|
11
|
+
require 'simplecov-lcov'
|
12
|
+
|
13
|
+
SimpleCov::Formatter::LcovFormatter.config do |c|
|
14
|
+
c.report_with_single_file = true
|
15
|
+
c.single_report_path = 'coverage/lcov.info'
|
16
|
+
end
|
17
|
+
|
18
|
+
formatter SimpleCov::Formatter::LcovFormatter
|
19
|
+
end
|
20
|
+
end
|
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/schema_plus_triggers.svg)](http://badge.fury.io/rb/schema_plus_triggers)
|
2
|
-
[![Build Status](https://
|
3
|
-
[![Coverage Status](https://
|
4
|
-
[![Dependency Status](https://gemnasium.com/SchemaPlus/schema_plus_triggers.svg)](https://gemnasium.com/SchemaPlus/schema_plus_triggers)
|
2
|
+
[![Build Status](https://github.com/SchemaPlus/schema_plus_triggers/actions/workflows/prs.yml/badge.svg)](http://github.com/SchemaPlus/schema_plus_triggers/actions)
|
3
|
+
[![Coverage Status](https://coveralls.io/repos/github/SchemaPlus/schema_plus_triggers/badge.svg)](https://coveralls.io/github/SchemaPlus/schema_plus_triggers)
|
5
4
|
|
6
5
|
# SchemaPlus::Triggers
|
7
6
|
|
@@ -28,7 +27,19 @@ SchemaPlus::Triggers is tested on:
|
|
28
27
|
|
29
28
|
<!-- SCHEMA_DEV: MATRIX - begin -->
|
30
29
|
<!-- These lines are auto-generated by schema_dev based on schema_dev.yml -->
|
31
|
-
* ruby **2.
|
30
|
+
* ruby **2.5** with activerecord **5.2**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
31
|
+
* ruby **2.5** with activerecord **6.0**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
32
|
+
* ruby **2.5** with activerecord **6.1**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
33
|
+
* ruby **2.7** with activerecord **5.2**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
34
|
+
* ruby **2.7** with activerecord **6.0**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
35
|
+
* ruby **2.7** with activerecord **6.1**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
36
|
+
* ruby **2.7** with activerecord **7.0**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
37
|
+
* ruby **3.0** with activerecord **6.0**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
38
|
+
* ruby **3.0** with activerecord **6.1**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
39
|
+
* ruby **3.0** with activerecord **7.0**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
40
|
+
* ruby **3.1** with activerecord **6.0**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
41
|
+
* ruby **3.1** with activerecord **6.1**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
42
|
+
* ruby **3.1** with activerecord **7.0**, using **postgresql:9.6**, **postgresql:10**, **postgresql:11** or **postgresql:12**
|
32
43
|
|
33
44
|
<!-- SCHEMA_DEV: MATRIX - end -->
|
34
45
|
|
@@ -76,7 +87,10 @@ This will return an array of arrays. The inner array containing the table name a
|
|
76
87
|
|
77
88
|
## History
|
78
89
|
|
79
|
-
* 0.1.0
|
90
|
+
* **1.0.1** - Add AR 6.1 and 7.0, as well as Ruby 3.1 support
|
91
|
+
* **1.0.0** - Drop ruby < 2.5, and add Rails 6.0
|
92
|
+
* **0.2.0** - Add testing for multiple PostgreSQL versions
|
93
|
+
* **0.1.0** - Initial release
|
80
94
|
|
81
95
|
## Development & Testing
|
82
96
|
|
@@ -91,7 +105,7 @@ Some things to know about to help you develop and test:
|
|
91
105
|
* **schema_dev**: SchemaPlus::Triggers uses [schema_dev](https://github.com/SchemaPlus/schema_dev) to
|
92
106
|
facilitate running rspec tests on the matrix of ruby, activerecord, and database
|
93
107
|
versions that the gem supports, both locally and on
|
94
|
-
[
|
108
|
+
[github actions](https://github.com/SchemaPlus/schema_plus_triggers/actions)
|
95
109
|
|
96
110
|
To to run rspec locally on the full matrix, do:
|
97
111
|
|
@@ -103,7 +117,6 @@ Some things to know about to help you develop and test:
|
|
103
117
|
The matrix of configurations is specified in `schema_dev.yml` in
|
104
118
|
the project root.
|
105
119
|
|
106
|
-
|
107
120
|
<!-- SCHEMA_DEV: TEMPLATE USES SCHEMA_DEV - end -->
|
108
121
|
|
109
122
|
<!-- SCHEMA_DEV: TEMPLATE USES SCHEMA_PLUS_CORE - begin -->
|
data/gemfiles/Gemfile.base
CHANGED
data/schema_dev.yml
CHANGED
@@ -19,14 +19,13 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
20
20
|
gem.require_paths = ["lib"]
|
21
21
|
|
22
|
-
gem.
|
23
|
-
|
22
|
+
gem.required_ruby_version = ">= 2.5.0"
|
23
|
+
|
24
|
+
gem.add_dependency "activerecord", ">= 5.2", '< 7.1'
|
25
|
+
gem.add_dependency "schema_plus_core", "~> 3.1.0"
|
24
26
|
|
25
27
|
gem.add_development_dependency "bundler"
|
26
|
-
gem.add_development_dependency "rake", "~>
|
28
|
+
gem.add_development_dependency "rake", "~> 13.0"
|
27
29
|
gem.add_development_dependency "rspec", "~> 3.0"
|
28
|
-
gem.add_development_dependency "schema_dev", "~>
|
29
|
-
gem.add_development_dependency "schema_plus_compatibility", "~> 0.2"
|
30
|
-
gem.add_development_dependency "simplecov"
|
31
|
-
gem.add_development_dependency "simplecov-gem-profile"
|
30
|
+
gem.add_development_dependency "schema_dev", "~> 4.2.0"
|
32
31
|
end
|
data/spec/schema_dumper_spec.rb
CHANGED
@@ -45,7 +45,7 @@ $$
|
|
45
45
|
dump_schema.tap do |dump|
|
46
46
|
expect(dump).to match(/create_trigger.+user.+log_trigger.+after insert/i)
|
47
47
|
|
48
|
-
expect(dump).to match(/for each row.+my_trigger_func/i)
|
48
|
+
expect(dump).to match(/for each row execute (function|procedure).+my_trigger_func/i)
|
49
49
|
end
|
50
50
|
|
51
51
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'simplecov'
|
4
|
-
|
5
|
-
SimpleCov.start "gem"
|
4
|
+
SimpleCov.start unless SimpleCov.running
|
6
5
|
|
7
6
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
8
7
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
@@ -10,7 +9,6 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
10
9
|
require 'rspec'
|
11
10
|
require 'active_record'
|
12
11
|
require 'schema_plus_triggers'
|
13
|
-
require 'schema_plus_compatibility'
|
14
12
|
require 'schema_dev/rspec'
|
15
13
|
|
16
14
|
SchemaDev::Rspec.setup
|
@@ -24,7 +22,7 @@ RSpec.configure do |config|
|
|
24
22
|
begin
|
25
23
|
example.run
|
26
24
|
ensure
|
27
|
-
ActiveRecord::Base.connection.
|
25
|
+
ActiveRecord::Base.connection.tables.each do |table|
|
28
26
|
ActiveRecord::Migration.drop_table table, force: :cascade
|
29
27
|
end
|
30
28
|
end
|
@@ -35,7 +33,7 @@ end
|
|
35
33
|
def define_schema(config = {}, &block)
|
36
34
|
ActiveRecord::Migration.suppress_messages do
|
37
35
|
ActiveRecord::Schema.define do
|
38
|
-
ActiveRecord::Base.connection.
|
36
|
+
ActiveRecord::Base.connection.tables.each do |table|
|
39
37
|
ActiveRecord::Migration.drop_table table, force: :cascade
|
40
38
|
end
|
41
39
|
instance_eval &block
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema_plus_triggers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Edward Rudd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '5.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '7.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,27 +29,21 @@ dependencies:
|
|
29
29
|
version: '5.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '7.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: schema_plus_core
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: 2.2.3
|
39
|
+
version: 3.1.0
|
43
40
|
type: :runtime
|
44
41
|
prerelease: false
|
45
42
|
version_requirements: !ruby/object:Gem::Requirement
|
46
43
|
requirements:
|
47
44
|
- - "~>"
|
48
45
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
50
|
-
- - ">="
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: 2.2.3
|
46
|
+
version: 3.1.0
|
53
47
|
- !ruby/object:Gem::Dependency
|
54
48
|
name: bundler
|
55
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,14 +64,14 @@ dependencies:
|
|
70
64
|
requirements:
|
71
65
|
- - "~>"
|
72
66
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
67
|
+
version: '13.0'
|
74
68
|
type: :development
|
75
69
|
prerelease: false
|
76
70
|
version_requirements: !ruby/object:Gem::Requirement
|
77
71
|
requirements:
|
78
72
|
- - "~>"
|
79
73
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
74
|
+
version: '13.0'
|
81
75
|
- !ruby/object:Gem::Dependency
|
82
76
|
name: rspec
|
83
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,62 +92,14 @@ dependencies:
|
|
98
92
|
requirements:
|
99
93
|
- - "~>"
|
100
94
|
- !ruby/object:Gem::Version
|
101
|
-
version:
|
102
|
-
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: 3.11.1
|
95
|
+
version: 4.2.0
|
105
96
|
type: :development
|
106
97
|
prerelease: false
|
107
98
|
version_requirements: !ruby/object:Gem::Requirement
|
108
99
|
requirements:
|
109
100
|
- - "~>"
|
110
101
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
112
|
-
- - ">="
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version: 3.11.1
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
name: schema_plus_compatibility
|
117
|
-
requirement: !ruby/object:Gem::Requirement
|
118
|
-
requirements:
|
119
|
-
- - "~>"
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: '0.2'
|
122
|
-
type: :development
|
123
|
-
prerelease: false
|
124
|
-
version_requirements: !ruby/object:Gem::Requirement
|
125
|
-
requirements:
|
126
|
-
- - "~>"
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version: '0.2'
|
129
|
-
- !ruby/object:Gem::Dependency
|
130
|
-
name: simplecov
|
131
|
-
requirement: !ruby/object:Gem::Requirement
|
132
|
-
requirements:
|
133
|
-
- - ">="
|
134
|
-
- !ruby/object:Gem::Version
|
135
|
-
version: '0'
|
136
|
-
type: :development
|
137
|
-
prerelease: false
|
138
|
-
version_requirements: !ruby/object:Gem::Requirement
|
139
|
-
requirements:
|
140
|
-
- - ">="
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: '0'
|
143
|
-
- !ruby/object:Gem::Dependency
|
144
|
-
name: simplecov-gem-profile
|
145
|
-
requirement: !ruby/object:Gem::Requirement
|
146
|
-
requirements:
|
147
|
-
- - ">="
|
148
|
-
- !ruby/object:Gem::Version
|
149
|
-
version: '0'
|
150
|
-
type: :development
|
151
|
-
prerelease: false
|
152
|
-
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
requirements:
|
154
|
-
- - ">="
|
155
|
-
- !ruby/object:Gem::Version
|
156
|
-
version: '0'
|
102
|
+
version: 4.2.0
|
157
103
|
description: Adds support for triggers in ActiveRecord
|
158
104
|
email:
|
159
105
|
- urkle@outoforder.cc
|
@@ -161,8 +107,9 @@ executables: []
|
|
161
107
|
extensions: []
|
162
108
|
extra_rdoc_files: []
|
163
109
|
files:
|
110
|
+
- ".github/workflows/prs.yml"
|
164
111
|
- ".gitignore"
|
165
|
-
- ".
|
112
|
+
- ".simplecov"
|
166
113
|
- Gemfile
|
167
114
|
- LICENSE.txt
|
168
115
|
- README.md
|
@@ -170,6 +117,12 @@ files:
|
|
170
117
|
- gemfiles/Gemfile.base
|
171
118
|
- gemfiles/activerecord-5.2/Gemfile.base
|
172
119
|
- gemfiles/activerecord-5.2/Gemfile.postgresql
|
120
|
+
- gemfiles/activerecord-6.0/Gemfile.base
|
121
|
+
- gemfiles/activerecord-6.0/Gemfile.postgresql
|
122
|
+
- gemfiles/activerecord-6.1/Gemfile.base
|
123
|
+
- gemfiles/activerecord-6.1/Gemfile.postgresql
|
124
|
+
- gemfiles/activerecord-7.0/Gemfile.base
|
125
|
+
- gemfiles/activerecord-7.0/Gemfile.postgresql
|
173
126
|
- lib/schema_plus/triggers.rb
|
174
127
|
- lib/schema_plus/triggers/active_record/connection_adapters/abstract_adapter.rb
|
175
128
|
- lib/schema_plus/triggers/active_record/connection_adapters/postgresql_adapter.rb
|
@@ -194,14 +147,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
194
147
|
requirements:
|
195
148
|
- - ">="
|
196
149
|
- !ruby/object:Gem::Version
|
197
|
-
version:
|
150
|
+
version: 2.5.0
|
198
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
199
152
|
requirements:
|
200
153
|
- - ">="
|
201
154
|
- !ruby/object:Gem::Version
|
202
155
|
version: '0'
|
203
156
|
requirements: []
|
204
|
-
rubygems_version: 3.0.
|
157
|
+
rubygems_version: 3.0.8
|
205
158
|
signing_key:
|
206
159
|
specification_version: 4
|
207
160
|
summary: Adds support for triggers in ActiveRecord
|
data/.travis.yml
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# This file was auto-generated by the schema_dev tool, based on the data in
|
2
|
-
# ./schema_dev.yml
|
3
|
-
# Please do not edit this file; any changes will be overwritten next time
|
4
|
-
# schema_dev gets run.
|
5
|
-
---
|
6
|
-
sudo: false
|
7
|
-
rvm:
|
8
|
-
- 2.3.1
|
9
|
-
gemfile:
|
10
|
-
- gemfiles/activerecord-5.2/Gemfile.postgresql
|
11
|
-
env: POSTGRESQL_DB_USER=postgres
|
12
|
-
addons:
|
13
|
-
postgresql: '9.4'
|
14
|
-
before_script: bundle exec rake create_databases
|
15
|
-
after_script: bundle exec rake drop_databases
|
16
|
-
script: bundle exec rake travis
|