roo_on_rails 1.20.0 → 2.1.0

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.
Files changed (39) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +398 -282
  3. data/.circleci/config.yml.erb +63 -21
  4. data/.codecov.yml +3 -0
  5. data/Appraisals +24 -11
  6. data/CHANGELOG.md +39 -0
  7. data/README.md +20 -31
  8. data/appraise +1 -1
  9. data/exe/roo_on_rails +5 -0
  10. data/gemfiles/rails_4.gemfile +3 -1
  11. data/gemfiles/rails_5.gemfile +2 -1
  12. data/gemfiles/rails_5_1.gemfile +3 -2
  13. data/gemfiles/rails_5_2.gemfile +15 -0
  14. data/gemfiles/{rails_3.gemfile → rails_6.gemfile} +5 -4
  15. data/lib/roo_on_rails.rb +1 -4
  16. data/lib/roo_on_rails/checks/documentation/playbook_template.md +0 -4
  17. data/lib/roo_on_rails/concerns/require_api_key.rb +0 -1
  18. data/lib/roo_on_rails/config.rb +0 -8
  19. data/lib/roo_on_rails/default.env +0 -13
  20. data/lib/roo_on_rails/rack/populate_env_from_jwt.rb +25 -4
  21. data/lib/roo_on_rails/railties/database.rb +11 -10
  22. data/lib/roo_on_rails/railties/env.rb +3 -5
  23. data/lib/roo_on_rails/railties/google_oauth.rb +4 -6
  24. data/lib/roo_on_rails/railties/http.rb +34 -32
  25. data/lib/roo_on_rails/railties/roo_identity.rb +12 -8
  26. data/lib/roo_on_rails/railties/{sidekiq.rb → sidekiq_integration.rb} +18 -18
  27. data/lib/roo_on_rails/version.rb +1 -1
  28. data/roo_on_rails.gemspec +5 -6
  29. metadata +28 -57
  30. data/.travis.yml +0 -34
  31. data/README.routemaster_client.md +0 -103
  32. data/lib/roo_on_rails/railties/logging.rb +0 -25
  33. data/lib/roo_on_rails/railties/new_relic.rb +0 -32
  34. data/lib/roo_on_rails/railties/routemaster.rb +0 -42
  35. data/lib/roo_on_rails/routemaster/lifecycle_events.rb +0 -64
  36. data/lib/roo_on_rails/routemaster/publish_lifecycle_events.rb +0 -13
  37. data/lib/roo_on_rails/routemaster/publisher.rb +0 -74
  38. data/lib/roo_on_rails/routemaster/publishers.rb +0 -27
  39. data/lib/roo_on_rails/tasks/newrelic.rake +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: b4613e4f2d71a1b6105071d8a1c283f97d89e0bb740165bc87088c26b403881b
4
- data.tar.gz: c13b32bd6d0bbe8fc47858352becf81ac684ba7f7f082e33145c54284a6f9b5c
2
+ SHA1:
3
+ metadata.gz: d2087a16081bf1826323d093e4a69ed2e6242e10
4
+ data.tar.gz: f48656fe62c5deb2c09cd137eb8cd1b73c94d4a6
5
5
  SHA512:
6
- metadata.gz: 05dad7f1435d8d051d80df90b54dce24c447a468dbcb35090ddac4f962c1026d0059b1364f8a9219834e4e4f2c5b4cf5e3054a63061a950e3f433c44dfedb772
7
- data.tar.gz: 2f9304451d8320f02e59d80febff8a1f3065dc688f4f56d99ed502588004338341855b8aa5218eb82e2cc75ab4506d4578454ff00e8dc1345e5e47074208e9f7
6
+ metadata.gz: c10e9b4be3c0a5151595a4e144d8b8a1c2eb4fab4736cb7941e388c59d4ff81722efcb76482c5466c55071e6fd78eeaf306a88cefa45971baa4dd2dadebf7d0e
7
+ data.tar.gz: 39d2b995f0e7cdd65941e08949bd6b3e54c725829dd7b1e588e4f104c908187529da5cfb704b4ea156dde53ccc2827b1c2650d2ffee407b37a427413148ed46b
@@ -1,16 +1,38 @@
1
1
  # To update the build configuration, edit the "builds" array below and run:
2
2
  # erb .circleci/config.yml.erb > .circleci/config.yml
3
3
 
4
+
5
+ # The default Ruby containers modify the behaviour of Bundler in a way that breaks
6
+ # the CI since it makes it harder to run multiple apps in a single container
7
+ # See https://github.com/docker-library/docs/pull/1221/files for a summary
8
+ # Unsettting these variables restores the default behaviour:-
9
+ # * BUNDLE_APP_CONFIG
10
+ # * GEM_HOME
11
+ # * BUNDLE_PATH
12
+ # * BUNDLE_BIN
13
+ common_ruby_environment: &common_ruby_environment
14
+ environment:
15
+ RAILS_ENV: test
16
+ PGHOST: 127.0.0.1
17
+ PGUSER: postgres
18
+ POSTGRES_HOST_AUTH_METHOD: "trust"
19
+ common_pg_environment_vars: &common_pg_environment_vars
20
+ POSTGRES_USER: postgres
21
+ POSTGRES_DB: ror_testapp_test
22
+ POSTGRES_HOST_AUTH_METHOD: "trust"
23
+
4
24
  version: 2
5
25
  jobs:
6
26
 
7
- build_2.2.6_rails_3:
27
+ build_2.4.6_rails_4:
8
28
  docker:
9
- - image: deliveroo/multiruby
29
+ - image: ruby:2.4.6-alpine
30
+ <<: *common_ruby_environment
10
31
  - image: postgres:9.6-alpine
11
32
  environment:
12
33
  PGDATA: /dev/shm/pgdata
13
- - image: redis:3-alpine
34
+ <<: *common_pg_environment_vars
35
+ - image: redis:4-alpine
14
36
  steps:
15
37
  - checkout
16
38
 
@@ -22,53 +44,77 @@ jobs:
22
44
  ln -s /dev/shm/tmp ~/project/tmp
23
45
 
24
46
  - run:
25
- name: Select build variant (Ruby 2.2.6, rails_3)
47
+ name: Setup requirements
48
+ command: |
49
+ apk add --update git bash build-base postgresql-dev sqlite-dev tzdata nodejs
50
+
51
+ - run:
52
+ name: Configure bundler
26
53
  command: |
27
- rbenv local 2.2.6 ;
28
- gem install bundler ;
29
- bundle config --local gemfile $PWD/gemfiles/rails_3.gemfile
54
+ unset \
55
+ BUNDLE_APP_CONFIG \
56
+ GEM_HOME \
57
+ BUNDLE_PATH \
58
+ BUNDLE_BIN
59
+ bundle config --local gemfile $PWD/gemfiles/rails_4.gemfile
30
60
 
31
61
  - restore_cache:
32
- keys:
33
- - v2-bundle-2.2.6-rails_3-{{ .Branch }}
34
- - v2-bundle-2.2.6-rails_3
35
- - v2-bundle-2.2.6
62
+ keys:
63
+ - v2-bundle-2.4.6-rails_4-{{ .Branch }}
64
+ - v2-bundle-2.4.6-rails_4
65
+ - v2-bundle-2.4.6
36
66
 
37
- - run:
38
- name: Install dependencies
67
+ - run:
68
+ name: Install bundle
39
69
  command: |
70
+ unset \
71
+ BUNDLE_APP_CONFIG \
72
+ GEM_HOME \
73
+ BUNDLE_PATH \
74
+ BUNDLE_BIN
40
75
  bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
41
76
 
77
+ # The default Ruby containers modify the behaviour of Bundler in a way that breaks
78
+ # the CI since it makes it harder to run multiple apps in a single container
79
+ # See https://github.com/docker-library/docs/pull/1221/files for a summary
80
+ # Unsettting the variables restores the default behaviour
42
81
  - run:
43
82
  name: Run test suite
44
83
  command: |
45
- unset RACK_ENV &&
46
- unset RAILS_ENV &&
84
+ unset \
85
+ RACK_ENV \
86
+ RAILS_ENV \
87
+ BUNDLE_APP_CONFIG \
88
+ GEM_HOME \
89
+ BUNDLE_PATH \
90
+ BUNDLE_BIN
47
91
  bundle exec rspec
48
92
 
49
93
  - save_cache:
50
- key: v2-bundle-2.2.6-rails_3-{{ .Branch }}
94
+ key: v2-bundle-2.4.6-rails_4-{{ .Branch }}
51
95
  paths:
52
96
  - ~/project/vendor/bundle
53
97
  - ~/project/vendor/bundle-scaffold
54
98
  - save_cache:
55
- key: v2-bundle-2.2.6-rails_3
99
+ key: v2-bundle-2.4.6-rails_4
56
100
  paths:
57
101
  - ~/project/vendor/bundle
58
102
  - ~/project/vendor/bundle-scaffold
59
103
  - save_cache:
60
- key: v2-bundle-2.2.6
104
+ key: v2-bundle-2.4.6
61
105
  paths:
62
106
  - ~/project/vendor/bundle
63
107
  - ~/project/vendor/bundle-scaffold
64
108
 
65
- build_2.3.3_rails_3:
109
+ build_2.4.6_rails_5:
66
110
  docker:
67
- - image: deliveroo/multiruby
111
+ - image: ruby:2.4.6-alpine
112
+ <<: *common_ruby_environment
68
113
  - image: postgres:9.6-alpine
69
114
  environment:
70
115
  PGDATA: /dev/shm/pgdata
71
- - image: redis:3-alpine
116
+ <<: *common_pg_environment_vars
117
+ - image: redis:4-alpine
72
118
  steps:
73
119
  - checkout
74
120
 
@@ -80,53 +126,77 @@ jobs:
80
126
  ln -s /dev/shm/tmp ~/project/tmp
81
127
 
82
128
  - run:
83
- name: Select build variant (Ruby 2.3.3, rails_3)
129
+ name: Setup requirements
84
130
  command: |
85
- rbenv local 2.3.3 ;
86
- gem install bundler ;
87
- bundle config --local gemfile $PWD/gemfiles/rails_3.gemfile
131
+ apk add --update git bash build-base postgresql-dev sqlite-dev tzdata nodejs
132
+
133
+ - run:
134
+ name: Configure bundler
135
+ command: |
136
+ unset \
137
+ BUNDLE_APP_CONFIG \
138
+ GEM_HOME \
139
+ BUNDLE_PATH \
140
+ BUNDLE_BIN
141
+ bundle config --local gemfile $PWD/gemfiles/rails_5.gemfile
88
142
 
89
143
  - restore_cache:
90
- keys:
91
- - v2-bundle-2.3.3-rails_3-{{ .Branch }}
92
- - v2-bundle-2.3.3-rails_3
93
- - v2-bundle-2.3.3
144
+ keys:
145
+ - v2-bundle-2.4.6-rails_5-{{ .Branch }}
146
+ - v2-bundle-2.4.6-rails_5
147
+ - v2-bundle-2.4.6
94
148
 
95
- - run:
96
- name: Install dependencies
149
+ - run:
150
+ name: Install bundle
97
151
  command: |
152
+ unset \
153
+ BUNDLE_APP_CONFIG \
154
+ GEM_HOME \
155
+ BUNDLE_PATH \
156
+ BUNDLE_BIN
98
157
  bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
99
158
 
159
+ # The default Ruby containers modify the behaviour of Bundler in a way that breaks
160
+ # the CI since it makes it harder to run multiple apps in a single container
161
+ # See https://github.com/docker-library/docs/pull/1221/files for a summary
162
+ # Unsettting the variables restores the default behaviour
100
163
  - run:
101
164
  name: Run test suite
102
165
  command: |
103
- unset RACK_ENV &&
104
- unset RAILS_ENV &&
166
+ unset \
167
+ RACK_ENV \
168
+ RAILS_ENV \
169
+ BUNDLE_APP_CONFIG \
170
+ GEM_HOME \
171
+ BUNDLE_PATH \
172
+ BUNDLE_BIN
105
173
  bundle exec rspec
106
174
 
107
175
  - save_cache:
108
- key: v2-bundle-2.3.3-rails_3-{{ .Branch }}
176
+ key: v2-bundle-2.4.6-rails_5-{{ .Branch }}
109
177
  paths:
110
178
  - ~/project/vendor/bundle
111
179
  - ~/project/vendor/bundle-scaffold
112
180
  - save_cache:
113
- key: v2-bundle-2.3.3-rails_3
181
+ key: v2-bundle-2.4.6-rails_5
114
182
  paths:
115
183
  - ~/project/vendor/bundle
116
184
  - ~/project/vendor/bundle-scaffold
117
185
  - save_cache:
118
- key: v2-bundle-2.3.3
186
+ key: v2-bundle-2.4.6
119
187
  paths:
120
188
  - ~/project/vendor/bundle
121
189
  - ~/project/vendor/bundle-scaffold
122
190
 
123
- build_2.2.6_rails_4:
191
+ build_2.4.6_rails_5_1:
124
192
  docker:
125
- - image: deliveroo/multiruby
193
+ - image: ruby:2.4.6-alpine
194
+ <<: *common_ruby_environment
126
195
  - image: postgres:9.6-alpine
127
196
  environment:
128
197
  PGDATA: /dev/shm/pgdata
129
- - image: redis:3-alpine
198
+ <<: *common_pg_environment_vars
199
+ - image: redis:4-alpine
130
200
  steps:
131
201
  - checkout
132
202
 
@@ -138,53 +208,77 @@ jobs:
138
208
  ln -s /dev/shm/tmp ~/project/tmp
139
209
 
140
210
  - run:
141
- name: Select build variant (Ruby 2.2.6, rails_4)
211
+ name: Setup requirements
142
212
  command: |
143
- rbenv local 2.2.6 ;
144
- gem install bundler ;
145
- bundle config --local gemfile $PWD/gemfiles/rails_4.gemfile
213
+ apk add --update git bash build-base postgresql-dev sqlite-dev tzdata nodejs
214
+
215
+ - run:
216
+ name: Configure bundler
217
+ command: |
218
+ unset \
219
+ BUNDLE_APP_CONFIG \
220
+ GEM_HOME \
221
+ BUNDLE_PATH \
222
+ BUNDLE_BIN
223
+ bundle config --local gemfile $PWD/gemfiles/rails_5_1.gemfile
146
224
 
147
225
  - restore_cache:
148
- keys:
149
- - v2-bundle-2.2.6-rails_4-{{ .Branch }}
150
- - v2-bundle-2.2.6-rails_4
151
- - v2-bundle-2.2.6
226
+ keys:
227
+ - v2-bundle-2.4.6-rails_5_1-{{ .Branch }}
228
+ - v2-bundle-2.4.6-rails_5_1
229
+ - v2-bundle-2.4.6
152
230
 
153
- - run:
154
- name: Install dependencies
231
+ - run:
232
+ name: Install bundle
155
233
  command: |
234
+ unset \
235
+ BUNDLE_APP_CONFIG \
236
+ GEM_HOME \
237
+ BUNDLE_PATH \
238
+ BUNDLE_BIN
156
239
  bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
157
240
 
241
+ # The default Ruby containers modify the behaviour of Bundler in a way that breaks
242
+ # the CI since it makes it harder to run multiple apps in a single container
243
+ # See https://github.com/docker-library/docs/pull/1221/files for a summary
244
+ # Unsettting the variables restores the default behaviour
158
245
  - run:
159
246
  name: Run test suite
160
247
  command: |
161
- unset RACK_ENV &&
162
- unset RAILS_ENV &&
248
+ unset \
249
+ RACK_ENV \
250
+ RAILS_ENV \
251
+ BUNDLE_APP_CONFIG \
252
+ GEM_HOME \
253
+ BUNDLE_PATH \
254
+ BUNDLE_BIN
163
255
  bundle exec rspec
164
256
 
165
257
  - save_cache:
166
- key: v2-bundle-2.2.6-rails_4-{{ .Branch }}
258
+ key: v2-bundle-2.4.6-rails_5_1-{{ .Branch }}
167
259
  paths:
168
260
  - ~/project/vendor/bundle
169
261
  - ~/project/vendor/bundle-scaffold
170
262
  - save_cache:
171
- key: v2-bundle-2.2.6-rails_4
263
+ key: v2-bundle-2.4.6-rails_5_1
172
264
  paths:
173
265
  - ~/project/vendor/bundle
174
266
  - ~/project/vendor/bundle-scaffold
175
267
  - save_cache:
176
- key: v2-bundle-2.2.6
268
+ key: v2-bundle-2.4.6
177
269
  paths:
178
270
  - ~/project/vendor/bundle
179
271
  - ~/project/vendor/bundle-scaffold
180
272
 
181
- build_2.3.3_rails_4:
273
+ build_2.4.6_rails_5_2:
182
274
  docker:
183
- - image: deliveroo/multiruby
275
+ - image: ruby:2.4.6-alpine
276
+ <<: *common_ruby_environment
184
277
  - image: postgres:9.6-alpine
185
278
  environment:
186
279
  PGDATA: /dev/shm/pgdata
187
- - image: redis:3-alpine
280
+ <<: *common_pg_environment_vars
281
+ - image: redis:4-alpine
188
282
  steps:
189
283
  - checkout
190
284
 
@@ -196,53 +290,77 @@ jobs:
196
290
  ln -s /dev/shm/tmp ~/project/tmp
197
291
 
198
292
  - run:
199
- name: Select build variant (Ruby 2.3.3, rails_4)
293
+ name: Setup requirements
200
294
  command: |
201
- rbenv local 2.3.3 ;
202
- gem install bundler ;
203
- bundle config --local gemfile $PWD/gemfiles/rails_4.gemfile
295
+ apk add --update git bash build-base postgresql-dev sqlite-dev tzdata nodejs
296
+
297
+ - run:
298
+ name: Configure bundler
299
+ command: |
300
+ unset \
301
+ BUNDLE_APP_CONFIG \
302
+ GEM_HOME \
303
+ BUNDLE_PATH \
304
+ BUNDLE_BIN
305
+ bundle config --local gemfile $PWD/gemfiles/rails_5_2.gemfile
204
306
 
205
307
  - restore_cache:
206
- keys:
207
- - v2-bundle-2.3.3-rails_4-{{ .Branch }}
208
- - v2-bundle-2.3.3-rails_4
209
- - v2-bundle-2.3.3
308
+ keys:
309
+ - v2-bundle-2.4.6-rails_5_2-{{ .Branch }}
310
+ - v2-bundle-2.4.6-rails_5_2
311
+ - v2-bundle-2.4.6
210
312
 
211
- - run:
212
- name: Install dependencies
313
+ - run:
314
+ name: Install bundle
213
315
  command: |
316
+ unset \
317
+ BUNDLE_APP_CONFIG \
318
+ GEM_HOME \
319
+ BUNDLE_PATH \
320
+ BUNDLE_BIN
214
321
  bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
215
322
 
323
+ # The default Ruby containers modify the behaviour of Bundler in a way that breaks
324
+ # the CI since it makes it harder to run multiple apps in a single container
325
+ # See https://github.com/docker-library/docs/pull/1221/files for a summary
326
+ # Unsettting the variables restores the default behaviour
216
327
  - run:
217
328
  name: Run test suite
218
329
  command: |
219
- unset RACK_ENV &&
220
- unset RAILS_ENV &&
330
+ unset \
331
+ RACK_ENV \
332
+ RAILS_ENV \
333
+ BUNDLE_APP_CONFIG \
334
+ GEM_HOME \
335
+ BUNDLE_PATH \
336
+ BUNDLE_BIN
221
337
  bundle exec rspec
222
338
 
223
339
  - save_cache:
224
- key: v2-bundle-2.3.3-rails_4-{{ .Branch }}
340
+ key: v2-bundle-2.4.6-rails_5_2-{{ .Branch }}
225
341
  paths:
226
342
  - ~/project/vendor/bundle
227
343
  - ~/project/vendor/bundle-scaffold
228
344
  - save_cache:
229
- key: v2-bundle-2.3.3-rails_4
345
+ key: v2-bundle-2.4.6-rails_5_2
230
346
  paths:
231
347
  - ~/project/vendor/bundle
232
348
  - ~/project/vendor/bundle-scaffold
233
349
  - save_cache:
234
- key: v2-bundle-2.3.3
350
+ key: v2-bundle-2.4.6
235
351
  paths:
236
352
  - ~/project/vendor/bundle
237
353
  - ~/project/vendor/bundle-scaffold
238
354
 
239
- build_2.4.0_rails_4:
355
+ build_2.5.5_rails_4:
240
356
  docker:
241
- - image: deliveroo/multiruby
357
+ - image: ruby:2.5.5-alpine
358
+ <<: *common_ruby_environment
242
359
  - image: postgres:9.6-alpine
243
360
  environment:
244
361
  PGDATA: /dev/shm/pgdata
245
- - image: redis:3-alpine
362
+ <<: *common_pg_environment_vars
363
+ - image: redis:4-alpine
246
364
  steps:
247
365
  - checkout
248
366
 
@@ -254,53 +372,77 @@ jobs:
254
372
  ln -s /dev/shm/tmp ~/project/tmp
255
373
 
256
374
  - run:
257
- name: Select build variant (Ruby 2.4.0, rails_4)
375
+ name: Setup requirements
258
376
  command: |
259
- rbenv local 2.4.0 ;
260
- gem install bundler ;
377
+ apk add --update git bash build-base postgresql-dev sqlite-dev tzdata nodejs
378
+
379
+ - run:
380
+ name: Configure bundler
381
+ command: |
382
+ unset \
383
+ BUNDLE_APP_CONFIG \
384
+ GEM_HOME \
385
+ BUNDLE_PATH \
386
+ BUNDLE_BIN
261
387
  bundle config --local gemfile $PWD/gemfiles/rails_4.gemfile
262
388
 
263
389
  - restore_cache:
264
- keys:
265
- - v2-bundle-2.4.0-rails_4-{{ .Branch }}
266
- - v2-bundle-2.4.0-rails_4
267
- - v2-bundle-2.4.0
390
+ keys:
391
+ - v2-bundle-2.5.5-rails_4-{{ .Branch }}
392
+ - v2-bundle-2.5.5-rails_4
393
+ - v2-bundle-2.5.5
268
394
 
269
- - run:
270
- name: Install dependencies
395
+ - run:
396
+ name: Install bundle
271
397
  command: |
398
+ unset \
399
+ BUNDLE_APP_CONFIG \
400
+ GEM_HOME \
401
+ BUNDLE_PATH \
402
+ BUNDLE_BIN
272
403
  bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
273
404
 
405
+ # The default Ruby containers modify the behaviour of Bundler in a way that breaks
406
+ # the CI since it makes it harder to run multiple apps in a single container
407
+ # See https://github.com/docker-library/docs/pull/1221/files for a summary
408
+ # Unsettting the variables restores the default behaviour
274
409
  - run:
275
410
  name: Run test suite
276
411
  command: |
277
- unset RACK_ENV &&
278
- unset RAILS_ENV &&
412
+ unset \
413
+ RACK_ENV \
414
+ RAILS_ENV \
415
+ BUNDLE_APP_CONFIG \
416
+ GEM_HOME \
417
+ BUNDLE_PATH \
418
+ BUNDLE_BIN
279
419
  bundle exec rspec
280
420
 
281
421
  - save_cache:
282
- key: v2-bundle-2.4.0-rails_4-{{ .Branch }}
422
+ key: v2-bundle-2.5.5-rails_4-{{ .Branch }}
283
423
  paths:
284
424
  - ~/project/vendor/bundle
285
425
  - ~/project/vendor/bundle-scaffold
286
426
  - save_cache:
287
- key: v2-bundle-2.4.0-rails_4
427
+ key: v2-bundle-2.5.5-rails_4
288
428
  paths:
289
429
  - ~/project/vendor/bundle
290
430
  - ~/project/vendor/bundle-scaffold
291
431
  - save_cache:
292
- key: v2-bundle-2.4.0
432
+ key: v2-bundle-2.5.5
293
433
  paths:
294
434
  - ~/project/vendor/bundle
295
435
  - ~/project/vendor/bundle-scaffold
296
436
 
297
- build_2.2.6_rails_5:
437
+ build_2.5.5_rails_5:
298
438
  docker:
299
- - image: deliveroo/multiruby
439
+ - image: ruby:2.5.5-alpine
440
+ <<: *common_ruby_environment
300
441
  - image: postgres:9.6-alpine
301
442
  environment:
302
443
  PGDATA: /dev/shm/pgdata
303
- - image: redis:3-alpine
444
+ <<: *common_pg_environment_vars
445
+ - image: redis:4-alpine
304
446
  steps:
305
447
  - checkout
306
448
 
@@ -312,111 +454,77 @@ jobs:
312
454
  ln -s /dev/shm/tmp ~/project/tmp
313
455
 
314
456
  - run:
315
- name: Select build variant (Ruby 2.2.6, rails_5)
457
+ name: Setup requirements
316
458
  command: |
317
- rbenv local 2.2.6 ;
318
- gem install bundler ;
319
- bundle config --local gemfile $PWD/gemfiles/rails_5.gemfile
320
-
321
- - restore_cache:
322
- keys:
323
- - v2-bundle-2.2.6-rails_5-{{ .Branch }}
324
- - v2-bundle-2.2.6-rails_5
325
- - v2-bundle-2.2.6
326
-
327
- - run:
328
- name: Install dependencies
329
- command: |
330
- bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
459
+ apk add --update git bash build-base postgresql-dev sqlite-dev tzdata nodejs
331
460
 
332
461
  - run:
333
- name: Run test suite
334
- command: |
335
- unset RACK_ENV &&
336
- unset RAILS_ENV &&
337
- bundle exec rspec
338
-
339
- - save_cache:
340
- key: v2-bundle-2.2.6-rails_5-{{ .Branch }}
341
- paths:
342
- - ~/project/vendor/bundle
343
- - ~/project/vendor/bundle-scaffold
344
- - save_cache:
345
- key: v2-bundle-2.2.6-rails_5
346
- paths:
347
- - ~/project/vendor/bundle
348
- - ~/project/vendor/bundle-scaffold
349
- - save_cache:
350
- key: v2-bundle-2.2.6
351
- paths:
352
- - ~/project/vendor/bundle
353
- - ~/project/vendor/bundle-scaffold
354
-
355
- build_2.3.3_rails_5:
356
- docker:
357
- - image: deliveroo/multiruby
358
- - image: postgres:9.6-alpine
359
- environment:
360
- PGDATA: /dev/shm/pgdata
361
- - image: redis:3-alpine
362
- steps:
363
- - checkout
364
-
365
- - run:
366
- name: Setup RAM disk
462
+ name: Configure bundler
367
463
  command: |
368
- rm -rf ~/project/tmp ;
369
- mkdir /dev/shm/tmp ;
370
- ln -s /dev/shm/tmp ~/project/tmp
371
-
372
- - run:
373
- name: Select build variant (Ruby 2.3.3, rails_5)
374
- command: |
375
- rbenv local 2.3.3 ;
376
- gem install bundler ;
464
+ unset \
465
+ BUNDLE_APP_CONFIG \
466
+ GEM_HOME \
467
+ BUNDLE_PATH \
468
+ BUNDLE_BIN
377
469
  bundle config --local gemfile $PWD/gemfiles/rails_5.gemfile
378
470
 
379
471
  - restore_cache:
380
- keys:
381
- - v2-bundle-2.3.3-rails_5-{{ .Branch }}
382
- - v2-bundle-2.3.3-rails_5
383
- - v2-bundle-2.3.3
472
+ keys:
473
+ - v2-bundle-2.5.5-rails_5-{{ .Branch }}
474
+ - v2-bundle-2.5.5-rails_5
475
+ - v2-bundle-2.5.5
384
476
 
385
- - run:
386
- name: Install dependencies
477
+ - run:
478
+ name: Install bundle
387
479
  command: |
480
+ unset \
481
+ BUNDLE_APP_CONFIG \
482
+ GEM_HOME \
483
+ BUNDLE_PATH \
484
+ BUNDLE_BIN
388
485
  bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
389
486
 
487
+ # The default Ruby containers modify the behaviour of Bundler in a way that breaks
488
+ # the CI since it makes it harder to run multiple apps in a single container
489
+ # See https://github.com/docker-library/docs/pull/1221/files for a summary
490
+ # Unsettting the variables restores the default behaviour
390
491
  - run:
391
492
  name: Run test suite
392
493
  command: |
393
- unset RACK_ENV &&
394
- unset RAILS_ENV &&
494
+ unset \
495
+ RACK_ENV \
496
+ RAILS_ENV \
497
+ BUNDLE_APP_CONFIG \
498
+ GEM_HOME \
499
+ BUNDLE_PATH \
500
+ BUNDLE_BIN
395
501
  bundle exec rspec
396
502
 
397
503
  - save_cache:
398
- key: v2-bundle-2.3.3-rails_5-{{ .Branch }}
504
+ key: v2-bundle-2.5.5-rails_5-{{ .Branch }}
399
505
  paths:
400
506
  - ~/project/vendor/bundle
401
507
  - ~/project/vendor/bundle-scaffold
402
508
  - save_cache:
403
- key: v2-bundle-2.3.3-rails_5
509
+ key: v2-bundle-2.5.5-rails_5
404
510
  paths:
405
511
  - ~/project/vendor/bundle
406
512
  - ~/project/vendor/bundle-scaffold
407
513
  - save_cache:
408
- key: v2-bundle-2.3.3
514
+ key: v2-bundle-2.5.5
409
515
  paths:
410
516
  - ~/project/vendor/bundle
411
517
  - ~/project/vendor/bundle-scaffold
412
518
 
413
- build_2.4.0_rails_5:
519
+ build_2.5.5_rails_5_1:
414
520
  docker:
415
- - image: deliveroo/multiruby
521
+ - image: ruby:2.5.5-alpine
522
+ <<: *common_ruby_environment
416
523
  - image: postgres:9.6-alpine
417
524
  environment:
418
525
  PGDATA: /dev/shm/pgdata
419
- - image: redis:3-alpine
526
+ <<: *common_pg_environment_vars
527
+ - image: redis:4-alpine
420
528
  steps:
421
529
  - checkout
422
530
 
@@ -428,111 +536,77 @@ jobs:
428
536
  ln -s /dev/shm/tmp ~/project/tmp
429
537
 
430
538
  - run:
431
- name: Select build variant (Ruby 2.4.0, rails_5)
432
- command: |
433
- rbenv local 2.4.0 ;
434
- gem install bundler ;
435
- bundle config --local gemfile $PWD/gemfiles/rails_5.gemfile
436
-
437
- - restore_cache:
438
- keys:
439
- - v2-bundle-2.4.0-rails_5-{{ .Branch }}
440
- - v2-bundle-2.4.0-rails_5
441
- - v2-bundle-2.4.0
442
-
443
- - run:
444
- name: Install dependencies
445
- command: |
446
- bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
447
-
448
- - run:
449
- name: Run test suite
450
- command: |
451
- unset RACK_ENV &&
452
- unset RAILS_ENV &&
453
- bundle exec rspec
454
-
455
- - save_cache:
456
- key: v2-bundle-2.4.0-rails_5-{{ .Branch }}
457
- paths:
458
- - ~/project/vendor/bundle
459
- - ~/project/vendor/bundle-scaffold
460
- - save_cache:
461
- key: v2-bundle-2.4.0-rails_5
462
- paths:
463
- - ~/project/vendor/bundle
464
- - ~/project/vendor/bundle-scaffold
465
- - save_cache:
466
- key: v2-bundle-2.4.0
467
- paths:
468
- - ~/project/vendor/bundle
469
- - ~/project/vendor/bundle-scaffold
470
-
471
- build_2.2.6_rails_5_1:
472
- docker:
473
- - image: deliveroo/multiruby
474
- - image: postgres:9.6-alpine
475
- environment:
476
- PGDATA: /dev/shm/pgdata
477
- - image: redis:3-alpine
478
- steps:
479
- - checkout
480
-
481
- - run:
482
- name: Setup RAM disk
539
+ name: Setup requirements
483
540
  command: |
484
- rm -rf ~/project/tmp ;
485
- mkdir /dev/shm/tmp ;
486
- ln -s /dev/shm/tmp ~/project/tmp
541
+ apk add --update git bash build-base postgresql-dev sqlite-dev tzdata nodejs
487
542
 
488
543
  - run:
489
- name: Select build variant (Ruby 2.2.6, rails_5_1)
544
+ name: Configure bundler
490
545
  command: |
491
- rbenv local 2.2.6 ;
492
- gem install bundler ;
546
+ unset \
547
+ BUNDLE_APP_CONFIG \
548
+ GEM_HOME \
549
+ BUNDLE_PATH \
550
+ BUNDLE_BIN
493
551
  bundle config --local gemfile $PWD/gemfiles/rails_5_1.gemfile
494
552
 
495
553
  - restore_cache:
496
- keys:
497
- - v2-bundle-2.2.6-rails_5_1-{{ .Branch }}
498
- - v2-bundle-2.2.6-rails_5_1
499
- - v2-bundle-2.2.6
554
+ keys:
555
+ - v2-bundle-2.5.5-rails_5_1-{{ .Branch }}
556
+ - v2-bundle-2.5.5-rails_5_1
557
+ - v2-bundle-2.5.5
500
558
 
501
- - run:
502
- name: Install dependencies
559
+ - run:
560
+ name: Install bundle
503
561
  command: |
562
+ unset \
563
+ BUNDLE_APP_CONFIG \
564
+ GEM_HOME \
565
+ BUNDLE_PATH \
566
+ BUNDLE_BIN
504
567
  bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
505
568
 
569
+ # The default Ruby containers modify the behaviour of Bundler in a way that breaks
570
+ # the CI since it makes it harder to run multiple apps in a single container
571
+ # See https://github.com/docker-library/docs/pull/1221/files for a summary
572
+ # Unsettting the variables restores the default behaviour
506
573
  - run:
507
574
  name: Run test suite
508
575
  command: |
509
- unset RACK_ENV &&
510
- unset RAILS_ENV &&
576
+ unset \
577
+ RACK_ENV \
578
+ RAILS_ENV \
579
+ BUNDLE_APP_CONFIG \
580
+ GEM_HOME \
581
+ BUNDLE_PATH \
582
+ BUNDLE_BIN
511
583
  bundle exec rspec
512
584
 
513
585
  - save_cache:
514
- key: v2-bundle-2.2.6-rails_5_1-{{ .Branch }}
586
+ key: v2-bundle-2.5.5-rails_5_1-{{ .Branch }}
515
587
  paths:
516
588
  - ~/project/vendor/bundle
517
589
  - ~/project/vendor/bundle-scaffold
518
590
  - save_cache:
519
- key: v2-bundle-2.2.6-rails_5_1
591
+ key: v2-bundle-2.5.5-rails_5_1
520
592
  paths:
521
593
  - ~/project/vendor/bundle
522
594
  - ~/project/vendor/bundle-scaffold
523
595
  - save_cache:
524
- key: v2-bundle-2.2.6
596
+ key: v2-bundle-2.5.5
525
597
  paths:
526
598
  - ~/project/vendor/bundle
527
599
  - ~/project/vendor/bundle-scaffold
528
600
 
529
- build_2.3.3_rails_5_1:
601
+ build_2.5.5_rails_5_2:
530
602
  docker:
531
- - image: deliveroo/multiruby
603
+ - image: ruby:2.5.5-alpine
604
+ <<: *common_ruby_environment
532
605
  - image: postgres:9.6-alpine
533
606
  environment:
534
607
  PGDATA: /dev/shm/pgdata
535
- - image: redis:3-alpine
608
+ <<: *common_pg_environment_vars
609
+ - image: redis:4-alpine
536
610
  steps:
537
611
  - checkout
538
612
 
@@ -544,53 +618,77 @@ jobs:
544
618
  ln -s /dev/shm/tmp ~/project/tmp
545
619
 
546
620
  - run:
547
- name: Select build variant (Ruby 2.3.3, rails_5_1)
621
+ name: Setup requirements
548
622
  command: |
549
- rbenv local 2.3.3 ;
550
- gem install bundler ;
551
- bundle config --local gemfile $PWD/gemfiles/rails_5_1.gemfile
623
+ apk add --update git bash build-base postgresql-dev sqlite-dev tzdata nodejs
624
+
625
+ - run:
626
+ name: Configure bundler
627
+ command: |
628
+ unset \
629
+ BUNDLE_APP_CONFIG \
630
+ GEM_HOME \
631
+ BUNDLE_PATH \
632
+ BUNDLE_BIN
633
+ bundle config --local gemfile $PWD/gemfiles/rails_5_2.gemfile
552
634
 
553
635
  - restore_cache:
554
- keys:
555
- - v2-bundle-2.3.3-rails_5_1-{{ .Branch }}
556
- - v2-bundle-2.3.3-rails_5_1
557
- - v2-bundle-2.3.3
636
+ keys:
637
+ - v2-bundle-2.5.5-rails_5_2-{{ .Branch }}
638
+ - v2-bundle-2.5.5-rails_5_2
639
+ - v2-bundle-2.5.5
558
640
 
559
- - run:
560
- name: Install dependencies
641
+ - run:
642
+ name: Install bundle
561
643
  command: |
644
+ unset \
645
+ BUNDLE_APP_CONFIG \
646
+ GEM_HOME \
647
+ BUNDLE_PATH \
648
+ BUNDLE_BIN
562
649
  bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
563
650
 
651
+ # The default Ruby containers modify the behaviour of Bundler in a way that breaks
652
+ # the CI since it makes it harder to run multiple apps in a single container
653
+ # See https://github.com/docker-library/docs/pull/1221/files for a summary
654
+ # Unsettting the variables restores the default behaviour
564
655
  - run:
565
656
  name: Run test suite
566
657
  command: |
567
- unset RACK_ENV &&
568
- unset RAILS_ENV &&
658
+ unset \
659
+ RACK_ENV \
660
+ RAILS_ENV \
661
+ BUNDLE_APP_CONFIG \
662
+ GEM_HOME \
663
+ BUNDLE_PATH \
664
+ BUNDLE_BIN
569
665
  bundle exec rspec
570
666
 
571
667
  - save_cache:
572
- key: v2-bundle-2.3.3-rails_5_1-{{ .Branch }}
668
+ key: v2-bundle-2.5.5-rails_5_2-{{ .Branch }}
573
669
  paths:
574
670
  - ~/project/vendor/bundle
575
671
  - ~/project/vendor/bundle-scaffold
576
672
  - save_cache:
577
- key: v2-bundle-2.3.3-rails_5_1
673
+ key: v2-bundle-2.5.5-rails_5_2
578
674
  paths:
579
675
  - ~/project/vendor/bundle
580
676
  - ~/project/vendor/bundle-scaffold
581
677
  - save_cache:
582
- key: v2-bundle-2.3.3
678
+ key: v2-bundle-2.5.5
583
679
  paths:
584
680
  - ~/project/vendor/bundle
585
681
  - ~/project/vendor/bundle-scaffold
586
682
 
587
- build_2.4.0_rails_5_1:
683
+ build_2.6.5_rails_6:
588
684
  docker:
589
- - image: deliveroo/multiruby
685
+ - image: ruby:2.6.5-alpine
686
+ <<: *common_ruby_environment
590
687
  - image: postgres:9.6-alpine
591
688
  environment:
592
689
  PGDATA: /dev/shm/pgdata
593
- - image: redis:3-alpine
690
+ <<: *common_pg_environment_vars
691
+ - image: redis:4-alpine
594
692
  steps:
595
693
  - checkout
596
694
 
@@ -602,42 +700,64 @@ jobs:
602
700
  ln -s /dev/shm/tmp ~/project/tmp
603
701
 
604
702
  - run:
605
- name: Select build variant (Ruby 2.4.0, rails_5_1)
703
+ name: Setup requirements
606
704
  command: |
607
- rbenv local 2.4.0 ;
608
- gem install bundler ;
609
- bundle config --local gemfile $PWD/gemfiles/rails_5_1.gemfile
705
+ apk add --update git bash build-base postgresql-dev sqlite-dev tzdata nodejs
706
+
707
+ - run:
708
+ name: Configure bundler
709
+ command: |
710
+ unset \
711
+ BUNDLE_APP_CONFIG \
712
+ GEM_HOME \
713
+ BUNDLE_PATH \
714
+ BUNDLE_BIN
715
+ bundle config --local gemfile $PWD/gemfiles/rails_6.gemfile
610
716
 
611
717
  - restore_cache:
612
- keys:
613
- - v2-bundle-2.4.0-rails_5_1-{{ .Branch }}
614
- - v2-bundle-2.4.0-rails_5_1
615
- - v2-bundle-2.4.0
718
+ keys:
719
+ - v2-bundle-2.6.5-rails_6-{{ .Branch }}
720
+ - v2-bundle-2.6.5-rails_6
721
+ - v2-bundle-2.6.5
616
722
 
617
- - run:
618
- name: Install dependencies
723
+ - run:
724
+ name: Install bundle
619
725
  command: |
726
+ unset \
727
+ BUNDLE_APP_CONFIG \
728
+ GEM_HOME \
729
+ BUNDLE_PATH \
730
+ BUNDLE_BIN
620
731
  bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
621
732
 
733
+ # The default Ruby containers modify the behaviour of Bundler in a way that breaks
734
+ # the CI since it makes it harder to run multiple apps in a single container
735
+ # See https://github.com/docker-library/docs/pull/1221/files for a summary
736
+ # Unsettting the variables restores the default behaviour
622
737
  - run:
623
738
  name: Run test suite
624
739
  command: |
625
- unset RACK_ENV &&
626
- unset RAILS_ENV &&
740
+ unset \
741
+ RACK_ENV \
742
+ RAILS_ENV \
743
+ BUNDLE_APP_CONFIG \
744
+ GEM_HOME \
745
+ BUNDLE_PATH \
746
+ BUNDLE_BIN
627
747
  bundle exec rspec
628
748
 
629
749
  - save_cache:
630
- key: v2-bundle-2.4.0-rails_5_1-{{ .Branch }}
750
+ key: v2-bundle-2.6.5-rails_6-{{ .Branch }}
631
751
  paths:
632
752
  - ~/project/vendor/bundle
633
753
  - ~/project/vendor/bundle-scaffold
634
754
  - save_cache:
635
- key: v2-bundle-2.4.0-rails_5_1
755
+ key: v2-bundle-2.6.5-rails_6
636
756
  paths:
637
757
  - ~/project/vendor/bundle
638
758
  - ~/project/vendor/bundle-scaffold
639
759
  - save_cache:
640
- key: v2-bundle-2.4.0
760
+ key: v2-bundle-2.6.5
641
761
  paths:
642
762
  - ~/project/vendor/bundle
643
763
  - ~/project/vendor/bundle-scaffold
@@ -648,25 +768,21 @@ workflows:
648
768
  test:
649
769
  jobs:
650
770
 
651
- - build_2.2.6_rails_3
652
-
653
- - build_2.3.3_rails_3
654
-
655
- - build_2.2.6_rails_4
771
+ - build_2.4.6_rails_4
656
772
 
657
- - build_2.3.3_rails_4
773
+ - build_2.4.6_rails_5
658
774
 
659
- - build_2.4.0_rails_4
775
+ - build_2.4.6_rails_5_1
660
776
 
661
- - build_2.2.6_rails_5
777
+ - build_2.4.6_rails_5_2
662
778
 
663
- - build_2.3.3_rails_5
779
+ - build_2.5.5_rails_4
664
780
 
665
- - build_2.4.0_rails_5
781
+ - build_2.5.5_rails_5
666
782
 
667
- - build_2.2.6_rails_5_1
783
+ - build_2.5.5_rails_5_1
668
784
 
669
- - build_2.3.3_rails_5_1
785
+ - build_2.5.5_rails_5_2
670
786
 
671
- - build_2.4.0_rails_5_1
787
+ - build_2.6.5_rails_6
672
788