roo_on_rails 2.1.2 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +350 -99
- data/.circleci/config.yml.erb +16 -9
- data/.ruby-version +1 -1
- data/Appraisals +30 -23
- data/CHANGELOG.md +17 -0
- data/appraise +2 -3
- data/gemfiles/rails_5_2.gemfile +1 -0
- data/gemfiles/{rails_6.gemfile → rails_6_0.gemfile} +1 -0
- data/gemfiles/rails_6_1.gemfile +21 -0
- data/gemfiles/rails_7_0.gemfile +20 -0
- data/lib/roo_on_rails/logger.rb +2 -15
- data/lib/roo_on_rails/railties/database.rb +37 -9
- data/lib/roo_on_rails/railties/http.rb +1 -5
- data/lib/roo_on_rails/tasks/db.rake +27 -2
- data/lib/roo_on_rails/version.rb +1 -1
- data/roo_on_rails.gemspec +6 -3
- metadata +54 -14
- data/gemfiles/rails_4.gemfile +0 -15
- data/gemfiles/rails_5.gemfile +0 -14
- data/gemfiles/rails_5_1.gemfile +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d14955d3bf35c0fb4277d434994c4971d684e674abd389d0f4eaa0fea7cd751e
|
4
|
+
data.tar.gz: 02c6e300e34af9d73d14d6160ec8cc0839739931e8d08724b1809e66d02fab59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57daba840c0c4503a6c57d36c5be1f0ac82b2884f1e9f7a0bb798d2911b4cb59c245278ae92cbddb4abb01870fbd242fc6875fb2a41a62705c1886aceb1e4a23
|
7
|
+
data.tar.gz: 1968747460540a729f7c85a46f0632a398522491ddf8a48784bf1343568155aaea89b951e7a005b0b919eac18776a49d585d7bdec6f1790535c89b987f1e7cd4
|
data/.circleci/config.yml
CHANGED
@@ -24,9 +24,9 @@ common_pg_environment_vars: &common_pg_environment_vars
|
|
24
24
|
version: 2
|
25
25
|
jobs:
|
26
26
|
|
27
|
-
build_2.
|
27
|
+
build_2.5.9_rails_5_2:
|
28
28
|
docker:
|
29
|
-
- image: ruby:2.
|
29
|
+
- image: ruby:2.5.9-alpine
|
30
30
|
<<: *common_ruby_environment
|
31
31
|
- image: postgres:9.6-alpine
|
32
32
|
environment:
|
@@ -56,13 +56,13 @@ jobs:
|
|
56
56
|
GEM_HOME \
|
57
57
|
BUNDLE_PATH \
|
58
58
|
BUNDLE_BIN
|
59
|
-
bundle config --local gemfile $PWD/gemfiles/
|
59
|
+
bundle config --local gemfile $PWD/gemfiles/rails_5_2.gemfile
|
60
60
|
|
61
61
|
- restore_cache:
|
62
62
|
keys:
|
63
|
-
- v2-bundle-2.
|
64
|
-
- v2-bundle-2.
|
65
|
-
- v2-bundle-2.
|
63
|
+
- v2-bundle-2.5.9-rails_5_2-{{ .Branch }}
|
64
|
+
- v2-bundle-2.5.9-rails_5_2
|
65
|
+
- v2-bundle-2.5.9
|
66
66
|
|
67
67
|
- run:
|
68
68
|
name: Install bundle
|
@@ -91,24 +91,24 @@ jobs:
|
|
91
91
|
bundle exec rspec
|
92
92
|
|
93
93
|
- save_cache:
|
94
|
-
key: v2-bundle-2.
|
94
|
+
key: v2-bundle-2.5.9-rails_5_2-{{ .Branch }}
|
95
95
|
paths:
|
96
96
|
- ~/project/vendor/bundle
|
97
97
|
- ~/project/vendor/bundle-scaffold
|
98
98
|
- save_cache:
|
99
|
-
key: v2-bundle-2.
|
99
|
+
key: v2-bundle-2.5.9-rails_5_2
|
100
100
|
paths:
|
101
101
|
- ~/project/vendor/bundle
|
102
102
|
- ~/project/vendor/bundle-scaffold
|
103
103
|
- save_cache:
|
104
|
-
key: v2-bundle-2.
|
104
|
+
key: v2-bundle-2.5.9
|
105
105
|
paths:
|
106
106
|
- ~/project/vendor/bundle
|
107
107
|
- ~/project/vendor/bundle-scaffold
|
108
108
|
|
109
|
-
build_2.
|
109
|
+
build_2.5.9_rails_6_0:
|
110
110
|
docker:
|
111
|
-
- image: ruby:2.
|
111
|
+
- image: ruby:2.5.9-alpine
|
112
112
|
<<: *common_ruby_environment
|
113
113
|
- image: postgres:9.6-alpine
|
114
114
|
environment:
|
@@ -138,13 +138,13 @@ jobs:
|
|
138
138
|
GEM_HOME \
|
139
139
|
BUNDLE_PATH \
|
140
140
|
BUNDLE_BIN
|
141
|
-
bundle config --local gemfile $PWD/gemfiles/
|
141
|
+
bundle config --local gemfile $PWD/gemfiles/rails_6_0.gemfile
|
142
142
|
|
143
143
|
- restore_cache:
|
144
144
|
keys:
|
145
|
-
- v2-bundle-2.
|
146
|
-
- v2-bundle-2.
|
147
|
-
- v2-bundle-2.
|
145
|
+
- v2-bundle-2.5.9-rails_6_0-{{ .Branch }}
|
146
|
+
- v2-bundle-2.5.9-rails_6_0
|
147
|
+
- v2-bundle-2.5.9
|
148
148
|
|
149
149
|
- run:
|
150
150
|
name: Install bundle
|
@@ -173,24 +173,24 @@ jobs:
|
|
173
173
|
bundle exec rspec
|
174
174
|
|
175
175
|
- save_cache:
|
176
|
-
key: v2-bundle-2.
|
176
|
+
key: v2-bundle-2.5.9-rails_6_0-{{ .Branch }}
|
177
177
|
paths:
|
178
178
|
- ~/project/vendor/bundle
|
179
179
|
- ~/project/vendor/bundle-scaffold
|
180
180
|
- save_cache:
|
181
|
-
key: v2-bundle-2.
|
181
|
+
key: v2-bundle-2.5.9-rails_6_0
|
182
182
|
paths:
|
183
183
|
- ~/project/vendor/bundle
|
184
184
|
- ~/project/vendor/bundle-scaffold
|
185
185
|
- save_cache:
|
186
|
-
key: v2-bundle-2.
|
186
|
+
key: v2-bundle-2.5.9
|
187
187
|
paths:
|
188
188
|
- ~/project/vendor/bundle
|
189
189
|
- ~/project/vendor/bundle-scaffold
|
190
190
|
|
191
|
-
build_2.
|
191
|
+
build_2.5.9_rails_6_1:
|
192
192
|
docker:
|
193
|
-
- image: ruby:2.
|
193
|
+
- image: ruby:2.5.9-alpine
|
194
194
|
<<: *common_ruby_environment
|
195
195
|
- image: postgres:9.6-alpine
|
196
196
|
environment:
|
@@ -220,13 +220,13 @@ jobs:
|
|
220
220
|
GEM_HOME \
|
221
221
|
BUNDLE_PATH \
|
222
222
|
BUNDLE_BIN
|
223
|
-
bundle config --local gemfile $PWD/gemfiles/
|
223
|
+
bundle config --local gemfile $PWD/gemfiles/rails_6_1.gemfile
|
224
224
|
|
225
225
|
- restore_cache:
|
226
226
|
keys:
|
227
|
-
- v2-bundle-2.
|
228
|
-
- v2-bundle-2.
|
229
|
-
- v2-bundle-2.
|
227
|
+
- v2-bundle-2.5.9-rails_6_1-{{ .Branch }}
|
228
|
+
- v2-bundle-2.5.9-rails_6_1
|
229
|
+
- v2-bundle-2.5.9
|
230
230
|
|
231
231
|
- run:
|
232
232
|
name: Install bundle
|
@@ -255,24 +255,24 @@ jobs:
|
|
255
255
|
bundle exec rspec
|
256
256
|
|
257
257
|
- save_cache:
|
258
|
-
key: v2-bundle-2.
|
258
|
+
key: v2-bundle-2.5.9-rails_6_1-{{ .Branch }}
|
259
259
|
paths:
|
260
260
|
- ~/project/vendor/bundle
|
261
261
|
- ~/project/vendor/bundle-scaffold
|
262
262
|
- save_cache:
|
263
|
-
key: v2-bundle-2.
|
263
|
+
key: v2-bundle-2.5.9-rails_6_1
|
264
264
|
paths:
|
265
265
|
- ~/project/vendor/bundle
|
266
266
|
- ~/project/vendor/bundle-scaffold
|
267
267
|
- save_cache:
|
268
|
-
key: v2-bundle-2.
|
268
|
+
key: v2-bundle-2.5.9
|
269
269
|
paths:
|
270
270
|
- ~/project/vendor/bundle
|
271
271
|
- ~/project/vendor/bundle-scaffold
|
272
272
|
|
273
|
-
build_2.
|
273
|
+
build_2.6.10_rails_5_2:
|
274
274
|
docker:
|
275
|
-
- image: ruby:2.
|
275
|
+
- image: ruby:2.6.10-alpine
|
276
276
|
<<: *common_ruby_environment
|
277
277
|
- image: postgres:9.6-alpine
|
278
278
|
environment:
|
@@ -306,9 +306,9 @@ jobs:
|
|
306
306
|
|
307
307
|
- restore_cache:
|
308
308
|
keys:
|
309
|
-
- v2-bundle-2.
|
310
|
-
- v2-bundle-2.
|
311
|
-
- v2-bundle-2.
|
309
|
+
- v2-bundle-2.6.10-rails_5_2-{{ .Branch }}
|
310
|
+
- v2-bundle-2.6.10-rails_5_2
|
311
|
+
- v2-bundle-2.6.10
|
312
312
|
|
313
313
|
- run:
|
314
314
|
name: Install bundle
|
@@ -337,24 +337,24 @@ jobs:
|
|
337
337
|
bundle exec rspec
|
338
338
|
|
339
339
|
- save_cache:
|
340
|
-
key: v2-bundle-2.
|
340
|
+
key: v2-bundle-2.6.10-rails_5_2-{{ .Branch }}
|
341
341
|
paths:
|
342
342
|
- ~/project/vendor/bundle
|
343
343
|
- ~/project/vendor/bundle-scaffold
|
344
344
|
- save_cache:
|
345
|
-
key: v2-bundle-2.
|
345
|
+
key: v2-bundle-2.6.10-rails_5_2
|
346
346
|
paths:
|
347
347
|
- ~/project/vendor/bundle
|
348
348
|
- ~/project/vendor/bundle-scaffold
|
349
349
|
- save_cache:
|
350
|
-
key: v2-bundle-2.
|
350
|
+
key: v2-bundle-2.6.10
|
351
351
|
paths:
|
352
352
|
- ~/project/vendor/bundle
|
353
353
|
- ~/project/vendor/bundle-scaffold
|
354
354
|
|
355
|
-
build_2.
|
355
|
+
build_2.6.10_rails_6_0:
|
356
356
|
docker:
|
357
|
-
- image: ruby:2.
|
357
|
+
- image: ruby:2.6.10-alpine
|
358
358
|
<<: *common_ruby_environment
|
359
359
|
- image: postgres:9.6-alpine
|
360
360
|
environment:
|
@@ -384,13 +384,13 @@ jobs:
|
|
384
384
|
GEM_HOME \
|
385
385
|
BUNDLE_PATH \
|
386
386
|
BUNDLE_BIN
|
387
|
-
bundle config --local gemfile $PWD/gemfiles/
|
387
|
+
bundle config --local gemfile $PWD/gemfiles/rails_6_0.gemfile
|
388
388
|
|
389
389
|
- restore_cache:
|
390
390
|
keys:
|
391
|
-
- v2-bundle-2.
|
392
|
-
- v2-bundle-2.
|
393
|
-
- v2-bundle-2.
|
391
|
+
- v2-bundle-2.6.10-rails_6_0-{{ .Branch }}
|
392
|
+
- v2-bundle-2.6.10-rails_6_0
|
393
|
+
- v2-bundle-2.6.10
|
394
394
|
|
395
395
|
- run:
|
396
396
|
name: Install bundle
|
@@ -419,24 +419,24 @@ jobs:
|
|
419
419
|
bundle exec rspec
|
420
420
|
|
421
421
|
- save_cache:
|
422
|
-
key: v2-bundle-2.
|
422
|
+
key: v2-bundle-2.6.10-rails_6_0-{{ .Branch }}
|
423
423
|
paths:
|
424
424
|
- ~/project/vendor/bundle
|
425
425
|
- ~/project/vendor/bundle-scaffold
|
426
426
|
- save_cache:
|
427
|
-
key: v2-bundle-2.
|
427
|
+
key: v2-bundle-2.6.10-rails_6_0
|
428
428
|
paths:
|
429
429
|
- ~/project/vendor/bundle
|
430
430
|
- ~/project/vendor/bundle-scaffold
|
431
431
|
- save_cache:
|
432
|
-
key: v2-bundle-2.
|
432
|
+
key: v2-bundle-2.6.10
|
433
433
|
paths:
|
434
434
|
- ~/project/vendor/bundle
|
435
435
|
- ~/project/vendor/bundle-scaffold
|
436
436
|
|
437
|
-
build_2.
|
437
|
+
build_2.6.10_rails_6_1:
|
438
438
|
docker:
|
439
|
-
- image: ruby:2.
|
439
|
+
- image: ruby:2.6.10-alpine
|
440
440
|
<<: *common_ruby_environment
|
441
441
|
- image: postgres:9.6-alpine
|
442
442
|
environment:
|
@@ -466,13 +466,13 @@ jobs:
|
|
466
466
|
GEM_HOME \
|
467
467
|
BUNDLE_PATH \
|
468
468
|
BUNDLE_BIN
|
469
|
-
bundle config --local gemfile $PWD/gemfiles/
|
469
|
+
bundle config --local gemfile $PWD/gemfiles/rails_6_1.gemfile
|
470
470
|
|
471
471
|
- restore_cache:
|
472
472
|
keys:
|
473
|
-
- v2-bundle-2.
|
474
|
-
- v2-bundle-2.
|
475
|
-
- v2-bundle-2.
|
473
|
+
- v2-bundle-2.6.10-rails_6_1-{{ .Branch }}
|
474
|
+
- v2-bundle-2.6.10-rails_6_1
|
475
|
+
- v2-bundle-2.6.10
|
476
476
|
|
477
477
|
- run:
|
478
478
|
name: Install bundle
|
@@ -501,24 +501,24 @@ jobs:
|
|
501
501
|
bundle exec rspec
|
502
502
|
|
503
503
|
- save_cache:
|
504
|
-
key: v2-bundle-2.
|
504
|
+
key: v2-bundle-2.6.10-rails_6_1-{{ .Branch }}
|
505
505
|
paths:
|
506
506
|
- ~/project/vendor/bundle
|
507
507
|
- ~/project/vendor/bundle-scaffold
|
508
508
|
- save_cache:
|
509
|
-
key: v2-bundle-2.
|
509
|
+
key: v2-bundle-2.6.10-rails_6_1
|
510
510
|
paths:
|
511
511
|
- ~/project/vendor/bundle
|
512
512
|
- ~/project/vendor/bundle-scaffold
|
513
513
|
- save_cache:
|
514
|
-
key: v2-bundle-2.
|
514
|
+
key: v2-bundle-2.6.10
|
515
515
|
paths:
|
516
516
|
- ~/project/vendor/bundle
|
517
517
|
- ~/project/vendor/bundle-scaffold
|
518
518
|
|
519
|
-
build_2.
|
519
|
+
build_2.7.6_rails_6_0:
|
520
520
|
docker:
|
521
|
-
- image: ruby:2.
|
521
|
+
- image: ruby:2.7.6-alpine
|
522
522
|
<<: *common_ruby_environment
|
523
523
|
- image: postgres:9.6-alpine
|
524
524
|
environment:
|
@@ -548,13 +548,13 @@ jobs:
|
|
548
548
|
GEM_HOME \
|
549
549
|
BUNDLE_PATH \
|
550
550
|
BUNDLE_BIN
|
551
|
-
bundle config --local gemfile $PWD/gemfiles/
|
551
|
+
bundle config --local gemfile $PWD/gemfiles/rails_6_0.gemfile
|
552
552
|
|
553
553
|
- restore_cache:
|
554
554
|
keys:
|
555
|
-
- v2-bundle-2.
|
556
|
-
- v2-bundle-2.
|
557
|
-
- v2-bundle-2.
|
555
|
+
- v2-bundle-2.7.6-rails_6_0-{{ .Branch }}
|
556
|
+
- v2-bundle-2.7.6-rails_6_0
|
557
|
+
- v2-bundle-2.7.6
|
558
558
|
|
559
559
|
- run:
|
560
560
|
name: Install bundle
|
@@ -583,24 +583,24 @@ jobs:
|
|
583
583
|
bundle exec rspec
|
584
584
|
|
585
585
|
- save_cache:
|
586
|
-
key: v2-bundle-2.
|
586
|
+
key: v2-bundle-2.7.6-rails_6_0-{{ .Branch }}
|
587
587
|
paths:
|
588
588
|
- ~/project/vendor/bundle
|
589
589
|
- ~/project/vendor/bundle-scaffold
|
590
590
|
- save_cache:
|
591
|
-
key: v2-bundle-2.
|
591
|
+
key: v2-bundle-2.7.6-rails_6_0
|
592
592
|
paths:
|
593
593
|
- ~/project/vendor/bundle
|
594
594
|
- ~/project/vendor/bundle-scaffold
|
595
595
|
- save_cache:
|
596
|
-
key: v2-bundle-2.
|
596
|
+
key: v2-bundle-2.7.6
|
597
597
|
paths:
|
598
598
|
- ~/project/vendor/bundle
|
599
599
|
- ~/project/vendor/bundle-scaffold
|
600
600
|
|
601
|
-
build_2.
|
601
|
+
build_2.7.6_rails_6_1:
|
602
602
|
docker:
|
603
|
-
- image: ruby:2.
|
603
|
+
- image: ruby:2.7.6-alpine
|
604
604
|
<<: *common_ruby_environment
|
605
605
|
- image: postgres:9.6-alpine
|
606
606
|
environment:
|
@@ -630,13 +630,13 @@ jobs:
|
|
630
630
|
GEM_HOME \
|
631
631
|
BUNDLE_PATH \
|
632
632
|
BUNDLE_BIN
|
633
|
-
bundle config --local gemfile $PWD/gemfiles/
|
633
|
+
bundle config --local gemfile $PWD/gemfiles/rails_6_1.gemfile
|
634
634
|
|
635
635
|
- restore_cache:
|
636
636
|
keys:
|
637
|
-
- v2-bundle-2.
|
638
|
-
- v2-bundle-2.
|
639
|
-
- v2-bundle-2.
|
637
|
+
- v2-bundle-2.7.6-rails_6_1-{{ .Branch }}
|
638
|
+
- v2-bundle-2.7.6-rails_6_1
|
639
|
+
- v2-bundle-2.7.6
|
640
640
|
|
641
641
|
- run:
|
642
642
|
name: Install bundle
|
@@ -665,24 +665,24 @@ jobs:
|
|
665
665
|
bundle exec rspec
|
666
666
|
|
667
667
|
- save_cache:
|
668
|
-
key: v2-bundle-2.
|
668
|
+
key: v2-bundle-2.7.6-rails_6_1-{{ .Branch }}
|
669
669
|
paths:
|
670
670
|
- ~/project/vendor/bundle
|
671
671
|
- ~/project/vendor/bundle-scaffold
|
672
672
|
- save_cache:
|
673
|
-
key: v2-bundle-2.
|
673
|
+
key: v2-bundle-2.7.6-rails_6_1
|
674
674
|
paths:
|
675
675
|
- ~/project/vendor/bundle
|
676
676
|
- ~/project/vendor/bundle-scaffold
|
677
677
|
- save_cache:
|
678
|
-
key: v2-bundle-2.
|
678
|
+
key: v2-bundle-2.7.6
|
679
679
|
paths:
|
680
680
|
- ~/project/vendor/bundle
|
681
681
|
- ~/project/vendor/bundle-scaffold
|
682
682
|
|
683
|
-
|
683
|
+
build_3.0.4_rails_6_0:
|
684
684
|
docker:
|
685
|
-
- image: ruby:
|
685
|
+
- image: ruby:3.0.4-alpine
|
686
686
|
<<: *common_ruby_environment
|
687
687
|
- image: postgres:9.6-alpine
|
688
688
|
environment:
|
@@ -712,13 +712,13 @@ jobs:
|
|
712
712
|
GEM_HOME \
|
713
713
|
BUNDLE_PATH \
|
714
714
|
BUNDLE_BIN
|
715
|
-
bundle config --local gemfile $PWD/gemfiles/
|
715
|
+
bundle config --local gemfile $PWD/gemfiles/rails_6_0.gemfile
|
716
716
|
|
717
717
|
- restore_cache:
|
718
718
|
keys:
|
719
|
-
- v2-bundle-
|
720
|
-
- v2-bundle-
|
721
|
-
- v2-bundle-
|
719
|
+
- v2-bundle-3.0.4-rails_6_0-{{ .Branch }}
|
720
|
+
- v2-bundle-3.0.4-rails_6_0
|
721
|
+
- v2-bundle-3.0.4
|
722
722
|
|
723
723
|
- run:
|
724
724
|
name: Install bundle
|
@@ -747,17 +747,263 @@ jobs:
|
|
747
747
|
bundle exec rspec
|
748
748
|
|
749
749
|
- save_cache:
|
750
|
-
key: v2-bundle-
|
750
|
+
key: v2-bundle-3.0.4-rails_6_0-{{ .Branch }}
|
751
751
|
paths:
|
752
752
|
- ~/project/vendor/bundle
|
753
753
|
- ~/project/vendor/bundle-scaffold
|
754
754
|
- save_cache:
|
755
|
-
key: v2-bundle-
|
755
|
+
key: v2-bundle-3.0.4-rails_6_0
|
756
756
|
paths:
|
757
757
|
- ~/project/vendor/bundle
|
758
758
|
- ~/project/vendor/bundle-scaffold
|
759
759
|
- save_cache:
|
760
|
-
key: v2-bundle-
|
760
|
+
key: v2-bundle-3.0.4
|
761
|
+
paths:
|
762
|
+
- ~/project/vendor/bundle
|
763
|
+
- ~/project/vendor/bundle-scaffold
|
764
|
+
|
765
|
+
build_3.0.4_rails_6_1:
|
766
|
+
docker:
|
767
|
+
- image: ruby:3.0.4-alpine
|
768
|
+
<<: *common_ruby_environment
|
769
|
+
- image: postgres:9.6-alpine
|
770
|
+
environment:
|
771
|
+
PGDATA: /dev/shm/pgdata
|
772
|
+
<<: *common_pg_environment_vars
|
773
|
+
- image: redis:4-alpine
|
774
|
+
steps:
|
775
|
+
- checkout
|
776
|
+
|
777
|
+
- run:
|
778
|
+
name: Setup RAM disk
|
779
|
+
command: |
|
780
|
+
rm -rf ~/project/tmp ;
|
781
|
+
mkdir /dev/shm/tmp ;
|
782
|
+
ln -s /dev/shm/tmp ~/project/tmp
|
783
|
+
|
784
|
+
- run:
|
785
|
+
name: Setup requirements
|
786
|
+
command: |
|
787
|
+
apk add --update git bash build-base postgresql-dev sqlite-dev tzdata nodejs
|
788
|
+
|
789
|
+
- run:
|
790
|
+
name: Configure bundler
|
791
|
+
command: |
|
792
|
+
unset \
|
793
|
+
BUNDLE_APP_CONFIG \
|
794
|
+
GEM_HOME \
|
795
|
+
BUNDLE_PATH \
|
796
|
+
BUNDLE_BIN
|
797
|
+
bundle config --local gemfile $PWD/gemfiles/rails_6_1.gemfile
|
798
|
+
|
799
|
+
- restore_cache:
|
800
|
+
keys:
|
801
|
+
- v2-bundle-3.0.4-rails_6_1-{{ .Branch }}
|
802
|
+
- v2-bundle-3.0.4-rails_6_1
|
803
|
+
- v2-bundle-3.0.4
|
804
|
+
|
805
|
+
- run:
|
806
|
+
name: Install bundle
|
807
|
+
command: |
|
808
|
+
unset \
|
809
|
+
BUNDLE_APP_CONFIG \
|
810
|
+
GEM_HOME \
|
811
|
+
BUNDLE_PATH \
|
812
|
+
BUNDLE_BIN
|
813
|
+
bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
|
814
|
+
|
815
|
+
# The default Ruby containers modify the behaviour of Bundler in a way that breaks
|
816
|
+
# the CI since it makes it harder to run multiple apps in a single container
|
817
|
+
# See https://github.com/docker-library/docs/pull/1221/files for a summary
|
818
|
+
# Unsettting the variables restores the default behaviour
|
819
|
+
- run:
|
820
|
+
name: Run test suite
|
821
|
+
command: |
|
822
|
+
unset \
|
823
|
+
RACK_ENV \
|
824
|
+
RAILS_ENV \
|
825
|
+
BUNDLE_APP_CONFIG \
|
826
|
+
GEM_HOME \
|
827
|
+
BUNDLE_PATH \
|
828
|
+
BUNDLE_BIN
|
829
|
+
bundle exec rspec
|
830
|
+
|
831
|
+
- save_cache:
|
832
|
+
key: v2-bundle-3.0.4-rails_6_1-{{ .Branch }}
|
833
|
+
paths:
|
834
|
+
- ~/project/vendor/bundle
|
835
|
+
- ~/project/vendor/bundle-scaffold
|
836
|
+
- save_cache:
|
837
|
+
key: v2-bundle-3.0.4-rails_6_1
|
838
|
+
paths:
|
839
|
+
- ~/project/vendor/bundle
|
840
|
+
- ~/project/vendor/bundle-scaffold
|
841
|
+
- save_cache:
|
842
|
+
key: v2-bundle-3.0.4
|
843
|
+
paths:
|
844
|
+
- ~/project/vendor/bundle
|
845
|
+
- ~/project/vendor/bundle-scaffold
|
846
|
+
|
847
|
+
build_3.1.2_rails_6_1:
|
848
|
+
docker:
|
849
|
+
- image: ruby:3.1.2-alpine
|
850
|
+
<<: *common_ruby_environment
|
851
|
+
- image: postgres:9.6-alpine
|
852
|
+
environment:
|
853
|
+
PGDATA: /dev/shm/pgdata
|
854
|
+
<<: *common_pg_environment_vars
|
855
|
+
- image: redis:4-alpine
|
856
|
+
steps:
|
857
|
+
- checkout
|
858
|
+
|
859
|
+
- run:
|
860
|
+
name: Setup RAM disk
|
861
|
+
command: |
|
862
|
+
rm -rf ~/project/tmp ;
|
863
|
+
mkdir /dev/shm/tmp ;
|
864
|
+
ln -s /dev/shm/tmp ~/project/tmp
|
865
|
+
|
866
|
+
- run:
|
867
|
+
name: Setup requirements
|
868
|
+
command: |
|
869
|
+
apk add --update git bash build-base postgresql-dev sqlite-dev tzdata nodejs
|
870
|
+
|
871
|
+
- run:
|
872
|
+
name: Configure bundler
|
873
|
+
command: |
|
874
|
+
unset \
|
875
|
+
BUNDLE_APP_CONFIG \
|
876
|
+
GEM_HOME \
|
877
|
+
BUNDLE_PATH \
|
878
|
+
BUNDLE_BIN
|
879
|
+
bundle config --local gemfile $PWD/gemfiles/rails_6_1.gemfile
|
880
|
+
|
881
|
+
- restore_cache:
|
882
|
+
keys:
|
883
|
+
- v2-bundle-3.1.2-rails_6_1-{{ .Branch }}
|
884
|
+
- v2-bundle-3.1.2-rails_6_1
|
885
|
+
- v2-bundle-3.1.2
|
886
|
+
|
887
|
+
- run:
|
888
|
+
name: Install bundle
|
889
|
+
command: |
|
890
|
+
unset \
|
891
|
+
BUNDLE_APP_CONFIG \
|
892
|
+
GEM_HOME \
|
893
|
+
BUNDLE_PATH \
|
894
|
+
BUNDLE_BIN
|
895
|
+
bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
|
896
|
+
|
897
|
+
# The default Ruby containers modify the behaviour of Bundler in a way that breaks
|
898
|
+
# the CI since it makes it harder to run multiple apps in a single container
|
899
|
+
# See https://github.com/docker-library/docs/pull/1221/files for a summary
|
900
|
+
# Unsettting the variables restores the default behaviour
|
901
|
+
- run:
|
902
|
+
name: Run test suite
|
903
|
+
command: |
|
904
|
+
unset \
|
905
|
+
RACK_ENV \
|
906
|
+
RAILS_ENV \
|
907
|
+
BUNDLE_APP_CONFIG \
|
908
|
+
GEM_HOME \
|
909
|
+
BUNDLE_PATH \
|
910
|
+
BUNDLE_BIN
|
911
|
+
bundle exec rspec
|
912
|
+
|
913
|
+
- save_cache:
|
914
|
+
key: v2-bundle-3.1.2-rails_6_1-{{ .Branch }}
|
915
|
+
paths:
|
916
|
+
- ~/project/vendor/bundle
|
917
|
+
- ~/project/vendor/bundle-scaffold
|
918
|
+
- save_cache:
|
919
|
+
key: v2-bundle-3.1.2-rails_6_1
|
920
|
+
paths:
|
921
|
+
- ~/project/vendor/bundle
|
922
|
+
- ~/project/vendor/bundle-scaffold
|
923
|
+
- save_cache:
|
924
|
+
key: v2-bundle-3.1.2
|
925
|
+
paths:
|
926
|
+
- ~/project/vendor/bundle
|
927
|
+
- ~/project/vendor/bundle-scaffold
|
928
|
+
|
929
|
+
build_3.1.2_rails_7_0:
|
930
|
+
docker:
|
931
|
+
- image: ruby:3.1.2-alpine
|
932
|
+
<<: *common_ruby_environment
|
933
|
+
- image: postgres:9.6-alpine
|
934
|
+
environment:
|
935
|
+
PGDATA: /dev/shm/pgdata
|
936
|
+
<<: *common_pg_environment_vars
|
937
|
+
- image: redis:4-alpine
|
938
|
+
steps:
|
939
|
+
- checkout
|
940
|
+
|
941
|
+
- run:
|
942
|
+
name: Setup RAM disk
|
943
|
+
command: |
|
944
|
+
rm -rf ~/project/tmp ;
|
945
|
+
mkdir /dev/shm/tmp ;
|
946
|
+
ln -s /dev/shm/tmp ~/project/tmp
|
947
|
+
|
948
|
+
- run:
|
949
|
+
name: Setup requirements
|
950
|
+
command: |
|
951
|
+
apk add --update git bash build-base postgresql-dev sqlite-dev tzdata nodejs
|
952
|
+
|
953
|
+
- run:
|
954
|
+
name: Configure bundler
|
955
|
+
command: |
|
956
|
+
unset \
|
957
|
+
BUNDLE_APP_CONFIG \
|
958
|
+
GEM_HOME \
|
959
|
+
BUNDLE_PATH \
|
960
|
+
BUNDLE_BIN
|
961
|
+
bundle config --local gemfile $PWD/gemfiles/rails_7_0.gemfile
|
962
|
+
|
963
|
+
- restore_cache:
|
964
|
+
keys:
|
965
|
+
- v2-bundle-3.1.2-rails_7_0-{{ .Branch }}
|
966
|
+
- v2-bundle-3.1.2-rails_7_0
|
967
|
+
- v2-bundle-3.1.2
|
968
|
+
|
969
|
+
- run:
|
970
|
+
name: Install bundle
|
971
|
+
command: |
|
972
|
+
unset \
|
973
|
+
BUNDLE_APP_CONFIG \
|
974
|
+
GEM_HOME \
|
975
|
+
BUNDLE_PATH \
|
976
|
+
BUNDLE_BIN
|
977
|
+
bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
|
978
|
+
|
979
|
+
# The default Ruby containers modify the behaviour of Bundler in a way that breaks
|
980
|
+
# the CI since it makes it harder to run multiple apps in a single container
|
981
|
+
# See https://github.com/docker-library/docs/pull/1221/files for a summary
|
982
|
+
# Unsettting the variables restores the default behaviour
|
983
|
+
- run:
|
984
|
+
name: Run test suite
|
985
|
+
command: |
|
986
|
+
unset \
|
987
|
+
RACK_ENV \
|
988
|
+
RAILS_ENV \
|
989
|
+
BUNDLE_APP_CONFIG \
|
990
|
+
GEM_HOME \
|
991
|
+
BUNDLE_PATH \
|
992
|
+
BUNDLE_BIN
|
993
|
+
bundle exec rspec
|
994
|
+
|
995
|
+
- save_cache:
|
996
|
+
key: v2-bundle-3.1.2-rails_7_0-{{ .Branch }}
|
997
|
+
paths:
|
998
|
+
- ~/project/vendor/bundle
|
999
|
+
- ~/project/vendor/bundle-scaffold
|
1000
|
+
- save_cache:
|
1001
|
+
key: v2-bundle-3.1.2-rails_7_0
|
1002
|
+
paths:
|
1003
|
+
- ~/project/vendor/bundle
|
1004
|
+
- ~/project/vendor/bundle-scaffold
|
1005
|
+
- save_cache:
|
1006
|
+
key: v2-bundle-3.1.2
|
761
1007
|
paths:
|
762
1008
|
- ~/project/vendor/bundle
|
763
1009
|
- ~/project/vendor/bundle-scaffold
|
@@ -767,22 +1013,27 @@ workflows:
|
|
767
1013
|
version: 2
|
768
1014
|
test:
|
769
1015
|
jobs:
|
770
|
-
|
771
|
-
- build_2.
|
772
|
-
|
773
|
-
- build_2.
|
774
|
-
|
775
|
-
- build_2.
|
776
|
-
|
777
|
-
- build_2.
|
778
|
-
|
779
|
-
- build_2.
|
780
|
-
|
781
|
-
- build_2.
|
782
|
-
|
783
|
-
- build_2.
|
784
|
-
|
785
|
-
- build_2.
|
786
|
-
|
787
|
-
-
|
788
|
-
|
1016
|
+
|
1017
|
+
- build_2.5.9_rails_5_2
|
1018
|
+
|
1019
|
+
- build_2.5.9_rails_6_0
|
1020
|
+
|
1021
|
+
- build_2.5.9_rails_6_1
|
1022
|
+
|
1023
|
+
- build_2.6.10_rails_5_2
|
1024
|
+
|
1025
|
+
- build_2.6.10_rails_6_0
|
1026
|
+
|
1027
|
+
- build_2.6.10_rails_6_1
|
1028
|
+
|
1029
|
+
- build_2.7.6_rails_6_0
|
1030
|
+
|
1031
|
+
- build_2.7.6_rails_6_1
|
1032
|
+
|
1033
|
+
- build_3.0.4_rails_6_0
|
1034
|
+
|
1035
|
+
- build_3.0.4_rails_6_1
|
1036
|
+
|
1037
|
+
- build_3.1.2_rails_6_1
|
1038
|
+
|
1039
|
+
- build_3.1.2_rails_7_0
|
data/.circleci/config.yml.erb
CHANGED
@@ -22,15 +22,22 @@ common_pg_environment_vars: &common_pg_environment_vars
|
|
22
22
|
POSTGRES_HOST_AUTH_METHOD: "trust"
|
23
23
|
<%
|
24
24
|
builds = [
|
25
|
-
['2.
|
26
|
-
['2.
|
27
|
-
['2.
|
28
|
-
|
29
|
-
['2.
|
30
|
-
['2.
|
31
|
-
['2.
|
32
|
-
|
33
|
-
['2.6
|
25
|
+
['2.5.9', 'rails_5_2'],
|
26
|
+
['2.5.9', 'rails_6_0'],
|
27
|
+
['2.5.9', 'rails_6_1'],
|
28
|
+
|
29
|
+
['2.6.10', 'rails_5_2'],
|
30
|
+
['2.6.10', 'rails_6_0'],
|
31
|
+
['2.6.10', 'rails_6_1'],
|
32
|
+
|
33
|
+
['2.7.6', 'rails_6_0'],
|
34
|
+
['2.7.6', 'rails_6_1'],
|
35
|
+
|
36
|
+
['3.0.4', 'rails_6_0'],
|
37
|
+
['3.0.4', 'rails_6_1'],
|
38
|
+
|
39
|
+
['3.1.2', 'rails_6_1'],
|
40
|
+
['3.1.2', 'rails_7_0']
|
34
41
|
]
|
35
42
|
%>
|
36
43
|
version: 2
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.5.9
|
data/Appraisals
CHANGED
@@ -1,37 +1,44 @@
|
|
1
|
-
appraise 'rails-4' do
|
2
|
-
gem 'rails', '~> 4.2'
|
3
|
-
gem 'sqlite3', '~> 1.3.6'
|
4
|
-
gem 'pg', '~> 0.11'
|
5
|
-
gem 'sprockets', '~>3.0'
|
6
|
-
gem 'rake', '13.0.1'
|
7
|
-
end
|
8
|
-
|
9
|
-
appraise 'rails-5' do
|
10
|
-
gem 'rails', '~> 5.0.0'
|
11
|
-
gem 'sqlite3', '~> 1.3.6'
|
12
|
-
gem 'pg', '~> 0.18'
|
13
|
-
gem 'rake', '13.0.1'
|
14
|
-
end
|
15
|
-
|
16
|
-
appraise 'rails-5-1' do
|
17
|
-
gem 'rails', '~> 5.1.0'
|
18
|
-
gem 'sqlite3', '~> 1.3.6'
|
19
|
-
gem 'pg', '~> 0.18'
|
20
|
-
gem 'rake', '13.0.1'
|
21
|
-
end
|
22
|
-
|
23
1
|
appraise 'rails-5-2' do
|
24
2
|
gem 'rails', '~> 5.2.0'
|
25
3
|
gem 'bootsnap', '>= 1.1.0', require: false
|
26
4
|
gem 'sqlite3', '~> 1.3.6'
|
27
5
|
gem 'pg', '~> 0.18'
|
28
6
|
gem 'rake', '13.0.1'
|
7
|
+
gem 'dotenv', '~> 2.7.6'
|
29
8
|
end
|
30
9
|
|
31
|
-
appraise 'rails-6' do
|
10
|
+
appraise 'rails-6-0' do
|
32
11
|
gem 'rails', '~> 6.0.3'
|
33
12
|
gem 'bootsnap', '>= 1.1.0', require: false
|
34
13
|
gem 'sqlite3', '~> 1.4'
|
35
14
|
gem 'pg', '~> 0.18'
|
36
15
|
gem 'rake', '13.0.1'
|
16
|
+
gem 'dotenv', '~> 2.7.6'
|
17
|
+
end
|
18
|
+
|
19
|
+
appraise 'rails-6-1' do
|
20
|
+
gem 'rails', '~> 6.1.5'
|
21
|
+
gem 'bootsnap', require: false
|
22
|
+
gem 'sqlite3'
|
23
|
+
gem 'pg'
|
24
|
+
gem 'rake'
|
25
|
+
gem 'net-smtp', require: false
|
26
|
+
gem 'net-pop', require: false
|
27
|
+
gem 'net-imap', require: false
|
28
|
+
gem 'webpacker', '~>3.0'
|
29
|
+
gem 'psych', '< 4'
|
30
|
+
gem 'dotenv', '~> 2.7.6'
|
31
|
+
end
|
32
|
+
|
33
|
+
appraise 'rails-7-0' do
|
34
|
+
gem 'rails', '~> 7.0.3'
|
35
|
+
gem 'bootsnap', require: false
|
36
|
+
gem 'sqlite3'
|
37
|
+
gem 'pg'
|
38
|
+
gem 'rake'
|
39
|
+
gem 'net-smtp', require: false
|
40
|
+
gem 'net-pop', require: false
|
41
|
+
gem 'net-imap', require: false
|
42
|
+
gem 'webpacker', '~>3.0'
|
43
|
+
gem 'psych', '< 4'
|
37
44
|
end
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
# v2.2.0
|
2
|
+
|
3
|
+
Breaking changes:
|
4
|
+
|
5
|
+
- Drops Rails 4 support
|
6
|
+
- Drops Rails 5.0 support
|
7
|
+
- Drops Rails 5.1 support
|
8
|
+
- Drops Ruby 2.4 support
|
9
|
+
|
10
|
+
Features:
|
11
|
+
|
12
|
+
- Adds Rails 6.1 support
|
13
|
+
- Adds Rails 7.0 support
|
14
|
+
- Adds Ruby 2.7 support
|
15
|
+
- Adds Ruby 3.0 support
|
16
|
+
- Adds Ruby 3.1 support
|
17
|
+
|
1
18
|
# v2.1.2
|
2
19
|
|
3
20
|
Bug fix:
|
data/appraise
CHANGED
@@ -4,8 +4,7 @@
|
|
4
4
|
#
|
5
5
|
require 'yaml'
|
6
6
|
|
7
|
-
|
8
|
-
RUBIES = ['2.4.5', '2.5.5', '2.6.5']
|
7
|
+
RUBIES = ['2.5.9', '2.6.10', '2.7.6', '3.0.4', '3.1.2'].freeze
|
9
8
|
APPRAISALS = `appraisal list`.strip.split(/\s+/)
|
10
9
|
|
11
10
|
# setup
|
@@ -14,7 +13,7 @@ RUBIES.each do |ruby|
|
|
14
13
|
system 'rbenv version'
|
15
14
|
system 'rbenv exec ruby -v'
|
16
15
|
system 'rbenv exec bundle check || rbenv exec bundle install'
|
17
|
-
system
|
16
|
+
system 'rbenv exec appraisal install'
|
18
17
|
end
|
19
18
|
|
20
19
|
# tests
|
data/gemfiles/rails_5_2.gemfile
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "guard"
|
6
|
+
gem "guard-rspec"
|
7
|
+
gem "appraisal"
|
8
|
+
gem "webmock"
|
9
|
+
gem "pg"
|
10
|
+
gem "sqlite3"
|
11
|
+
gem "rails", "~> 6.1.5"
|
12
|
+
gem "bootsnap", require: false
|
13
|
+
gem "rake"
|
14
|
+
gem "net-smtp", require: false
|
15
|
+
gem "net-pop", require: false
|
16
|
+
gem "net-imap", require: false
|
17
|
+
gem "webpacker", "~>3.0"
|
18
|
+
gem "psych", "< 4"
|
19
|
+
gem "dotenv", "~> 2.7.6"
|
20
|
+
|
21
|
+
gemspec path: "../"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "guard"
|
6
|
+
gem "guard-rspec"
|
7
|
+
gem "appraisal"
|
8
|
+
gem "webmock"
|
9
|
+
gem "pg"
|
10
|
+
gem "sqlite3"
|
11
|
+
gem "rails", "~> 6.1.5"
|
12
|
+
gem "bootsnap", require: false
|
13
|
+
gem "rake"
|
14
|
+
gem "net-smtp", require: false
|
15
|
+
gem "net-pop", require: false
|
16
|
+
gem "net-imap", require: false
|
17
|
+
gem "webpacker", "~>3.0"
|
18
|
+
gem "psych", "< 4"
|
19
|
+
|
20
|
+
gemspec path: "../"
|
data/lib/roo_on_rails/logger.rb
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
require 'delegate'
|
2
2
|
require 'roo_on_rails/logfmt'
|
3
3
|
require 'rails/version'
|
4
|
-
|
5
|
-
if Rails::VERSION::MAJOR < 4
|
6
|
-
require 'logger'
|
7
|
-
else
|
8
|
-
require 'active_support/logger'
|
9
|
-
end
|
4
|
+
require 'active_support/logger'
|
10
5
|
|
11
6
|
module RooOnRails
|
12
7
|
# A compatible replacement for the standard Logger to provide context, similar
|
@@ -36,7 +31,7 @@ module RooOnRails
|
|
36
31
|
class Logger < SimpleDelegator
|
37
32
|
def initialize(io = STDOUT)
|
38
33
|
@show_timestamp = io.tty?
|
39
|
-
logger =
|
34
|
+
logger = ActiveSupport::Logger.new(io).tap do |l|
|
40
35
|
l.formatter = method(:_formatter)
|
41
36
|
end
|
42
37
|
super(logger)
|
@@ -113,13 +108,5 @@ module RooOnRails
|
|
113
108
|
thread_key = @_context_stack_key ||= "roo_on_rails:logging_context:#{object_id}".freeze
|
114
109
|
Thread.current[thread_key] ||= [{}]
|
115
110
|
end
|
116
|
-
|
117
|
-
def _default_logger_class
|
118
|
-
if Rails::VERSION::MAJOR < 4
|
119
|
-
::Logger
|
120
|
-
else
|
121
|
-
ActiveSupport::Logger
|
122
|
-
end
|
123
|
-
end
|
124
111
|
end
|
125
112
|
end
|
@@ -5,16 +5,44 @@ module RooOnRails
|
|
5
5
|
ActiveSupport.on_load :active_record do
|
6
6
|
Rails.logger.debug('[roo_on_rails.database] loading')
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
8
|
+
if Gem::Version.new(Rails.version) >= Gem::Version.new('6.1')
|
9
|
+
configs = ActiveRecord::Base.configurations.configurations
|
10
|
+
old_url_config = ActiveRecord::Base.configurations.configs_for(env_name: Rails.env, name: 'primary')
|
11
|
+
new_config_hash = old_url_config.configuration_hash.deep_dup
|
12
|
+
new_config_hash[:variables] ||= {}
|
13
|
+
statement_timeout = ENV.fetch('DATABASE_STATEMENT_TIMEOUT', 200)
|
14
|
+
# Use -1 to disable setting the statement timeout
|
15
|
+
new_config_hash[:variables][:statement_timeout] = statement_timeout unless statement_timeout == '-1'
|
16
|
+
new_config_hash[:reaping_frequency] = ENV['DATABASE_REAPING_FREQUENCY'] if ENV.key?('DATABASE_REAPING_FREQUENCY')
|
17
|
+
if old_url_config.respond_to?(:url)
|
18
|
+
new_url_config = ActiveRecord::DatabaseConfigurations::UrlConfig.new(
|
19
|
+
old_url_config.env_name,
|
20
|
+
old_url_config.name,
|
21
|
+
old_url_config.url,
|
22
|
+
new_config_hash
|
23
|
+
)
|
24
|
+
else
|
25
|
+
new_url_config = ActiveRecord::DatabaseConfigurations::HashConfig.new(
|
26
|
+
old_url_config.env_name,
|
27
|
+
old_url_config.name,
|
28
|
+
new_config_hash
|
29
|
+
)
|
30
|
+
end
|
31
|
+
configs.delete(old_url_config)
|
32
|
+
configs << new_url_config
|
33
|
+
else
|
34
|
+
config = ActiveRecord::Base.configurations[Rails.env]
|
35
|
+
config['variables'] ||= {}
|
36
|
+
statement_timeout = ENV.fetch('DATABASE_STATEMENT_TIMEOUT', 200)
|
37
|
+
# Use -1 to disable setting the statement timeout
|
38
|
+
unless statement_timeout == '-1'
|
39
|
+
config['variables']['statement_timeout'] = statement_timeout
|
40
|
+
end
|
41
|
+
if ENV.key?('DATABASE_REAPING_FREQUENCY')
|
42
|
+
config['reaping_frequency'] = ENV['DATABASE_REAPING_FREQUENCY']
|
43
|
+
end
|
17
44
|
end
|
45
|
+
|
18
46
|
ActiveRecord::Base.establish_connection
|
19
47
|
end
|
20
48
|
end
|
@@ -17,11 +17,7 @@ module RooOnRails
|
|
17
17
|
wait_timeout: ENV.fetch('RACK_WAIT_TIMEOUT', 30).to_i
|
18
18
|
)
|
19
19
|
|
20
|
-
|
21
|
-
middleware_to_insert_before = ::ActionDispatch::Cookies
|
22
|
-
else
|
23
|
-
middleware_to_insert_before = ::Rack::Head
|
24
|
-
end
|
20
|
+
middleware_to_insert_before = ::Rack::Head
|
25
21
|
|
26
22
|
# This needs to be inserted low in the stack, before Rails returns the
|
27
23
|
# thread-current connection to the pool.
|
@@ -8,12 +8,37 @@ if defined?(ActiveRecord)
|
|
8
8
|
|
9
9
|
namespace :migrate do
|
10
10
|
task extend_statement_timeout: :environment do
|
11
|
-
|
11
|
+
rails_version = Gem::Version.new(Rails.version)
|
12
|
+
|
13
|
+
if rails_version < Gem::Version.new('6.1')
|
12
14
|
config = ActiveRecord::Base.configurations[Rails.env]
|
13
15
|
config['variables'] ||= {}
|
14
16
|
config['variables']['statement_timeout'] = ENV.fetch('MIGRATION_STATEMENT_TIMEOUT', 10_000)
|
15
|
-
|
17
|
+
else
|
18
|
+
configs = ActiveRecord::Base.configurations.configurations
|
19
|
+
old_url_config = ActiveRecord::Base.configurations.configs_for(env_name: Rails.env, name: 'primary')
|
20
|
+
new_config_hash = old_url_config.configuration_hash.deep_dup
|
21
|
+
new_config_hash[:variables] ||= {}
|
22
|
+
new_config_hash[:variables][:statement_timeout] = ENV.fetch('MIGRATION_STATEMENT_TIMEOUT', 10_000)
|
23
|
+
if old_url_config.respond_to?(:url)
|
24
|
+
new_url_config = ActiveRecord::DatabaseConfigurations::UrlConfig.new(
|
25
|
+
old_url_config.env_name,
|
26
|
+
old_url_config.name,
|
27
|
+
old_url_config.url,
|
28
|
+
new_config_hash
|
29
|
+
)
|
30
|
+
else
|
31
|
+
new_url_config = ActiveRecord::DatabaseConfigurations::HashConfig.new(
|
32
|
+
old_url_config.env_name,
|
33
|
+
old_url_config.name,
|
34
|
+
new_config_hash
|
35
|
+
)
|
36
|
+
end
|
37
|
+
configs.delete(old_url_config)
|
38
|
+
configs << new_url_config
|
16
39
|
end
|
40
|
+
|
41
|
+
ActiveRecord::Base.establish_connection
|
17
42
|
end
|
18
43
|
end
|
19
44
|
end
|
data/lib/roo_on_rails/version.rb
CHANGED
data/roo_on_rails.gemspec
CHANGED
@@ -21,9 +21,9 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
|
-
spec.add_runtime_dependency 'dotenv-rails', '~> 2.
|
24
|
+
spec.add_runtime_dependency 'dotenv-rails', '~> 2.7.6'
|
25
25
|
spec.add_runtime_dependency 'rails', '>= 3.2.22'
|
26
|
-
spec.add_runtime_dependency 'sprockets', '~>3.0'
|
26
|
+
spec.add_runtime_dependency 'sprockets', '~> 3.0'
|
27
27
|
spec.add_runtime_dependency 'platform-api', '~> 2.0'
|
28
28
|
spec.add_runtime_dependency 'hashie', '~> 3.4'
|
29
29
|
spec.add_runtime_dependency 'rack-timeout', '>= 0.4.0'
|
@@ -35,11 +35,14 @@ Gem::Specification.new do |spec|
|
|
35
35
|
spec.add_runtime_dependency 'faraday'
|
36
36
|
spec.add_runtime_dependency 'faraday_middleware'
|
37
37
|
spec.add_runtime_dependency 'json-jwt', '~> 1.8'
|
38
|
+
spec.add_runtime_dependency 'net-smtp'
|
39
|
+
spec.add_runtime_dependency 'net-pop'
|
40
|
+
spec.add_runtime_dependency 'net-imap'
|
38
41
|
|
39
42
|
spec.add_development_dependency 'bundler'
|
40
43
|
spec.add_development_dependency 'rake', '~> 10.0'
|
41
44
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
42
|
-
spec.add_development_dependency 'thor'
|
45
|
+
spec.add_development_dependency 'thor'
|
43
46
|
spec.add_development_dependency 'pry-byebug'
|
44
47
|
spec.add_development_dependency 'memfs'
|
45
48
|
spec.add_development_dependency 'simplecov'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roo_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Letessier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv-rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.7.6
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.7.6
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,6 +206,48 @@ dependencies:
|
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '1.8'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: net-smtp
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :runtime
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: net-pop
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :runtime
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: net-imap
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - ">="
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '0'
|
244
|
+
type: :runtime
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0'
|
209
251
|
- !ruby/object:Gem::Dependency
|
210
252
|
name: bundler
|
211
253
|
requirement: !ruby/object:Gem::Requirement
|
@@ -252,16 +294,16 @@ dependencies:
|
|
252
294
|
name: thor
|
253
295
|
requirement: !ruby/object:Gem::Requirement
|
254
296
|
requirements:
|
255
|
-
- - "
|
297
|
+
- - ">="
|
256
298
|
- !ruby/object:Gem::Version
|
257
|
-
version: '0
|
299
|
+
version: '0'
|
258
300
|
type: :development
|
259
301
|
prerelease: false
|
260
302
|
version_requirements: !ruby/object:Gem::Requirement
|
261
303
|
requirements:
|
262
|
-
- - "
|
304
|
+
- - ">="
|
263
305
|
- !ruby/object:Gem::Version
|
264
|
-
version: '0
|
306
|
+
version: '0'
|
265
307
|
- !ruby/object:Gem::Dependency
|
266
308
|
name: pry-byebug
|
267
309
|
requirement: !ruby/object:Gem::Requirement
|
@@ -376,11 +418,10 @@ files:
|
|
376
418
|
- bin/setup
|
377
419
|
- exe/roo_on_rails
|
378
420
|
- gemfiles/.bundle/config
|
379
|
-
- gemfiles/rails_4.gemfile
|
380
|
-
- gemfiles/rails_5.gemfile
|
381
|
-
- gemfiles/rails_5_1.gemfile
|
382
421
|
- gemfiles/rails_5_2.gemfile
|
383
|
-
- gemfiles/
|
422
|
+
- gemfiles/rails_6_0.gemfile
|
423
|
+
- gemfiles/rails_6_1.gemfile
|
424
|
+
- gemfiles/rails_7_0.gemfile
|
384
425
|
- lib/roo_on_rails.rb
|
385
426
|
- lib/roo_on_rails/checks.rb
|
386
427
|
- lib/roo_on_rails/checks/base.rb
|
@@ -457,8 +498,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
457
498
|
- !ruby/object:Gem::Version
|
458
499
|
version: '0'
|
459
500
|
requirements: []
|
460
|
-
|
461
|
-
rubygems_version: 2.6.11
|
501
|
+
rubygems_version: 3.1.4
|
462
502
|
signing_key:
|
463
503
|
specification_version: 4
|
464
504
|
summary: Scaffolding for building services
|
data/gemfiles/rails_4.gemfile
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "guard"
|
6
|
-
gem "guard-rspec"
|
7
|
-
gem "appraisal"
|
8
|
-
gem "webmock"
|
9
|
-
gem "pg", "~> 0.11"
|
10
|
-
gem "sqlite3", "~> 1.3.6"
|
11
|
-
gem "rails", "~> 4.2"
|
12
|
-
gem "sprockets", "~>3.0"
|
13
|
-
gem "rake", "13.0.1"
|
14
|
-
|
15
|
-
gemspec path: "../"
|
data/gemfiles/rails_5.gemfile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "guard"
|
6
|
-
gem "guard-rspec"
|
7
|
-
gem "appraisal"
|
8
|
-
gem "webmock"
|
9
|
-
gem "pg", "~> 0.18"
|
10
|
-
gem "sqlite3", "~> 1.3.6"
|
11
|
-
gem "rails", "~> 5.0.0"
|
12
|
-
gem "rake", "13.0.1"
|
13
|
-
|
14
|
-
gemspec path: "../"
|
data/gemfiles/rails_5_1.gemfile
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "guard"
|
6
|
-
gem "guard-rspec"
|
7
|
-
gem "appraisal"
|
8
|
-
gem "webmock"
|
9
|
-
gem "pg", "~> 0.18"
|
10
|
-
gem "sqlite3", "~> 1.3.6"
|
11
|
-
gem "rails", "~> 5.1.0"
|
12
|
-
gem "rake", "13.0.1"
|
13
|
-
|
14
|
-
gemspec path: "../"
|