roo_on_rails 2.0.0.pre.pre.2 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +118 -9
- data/.circleci/config.yml.erb +14 -2
- data/.codecov.yml +3 -0
- data/Appraisals +8 -0
- data/CHANGELOG.md +6 -0
- data/appraise +1 -1
- data/gemfiles/rails_4.gemfile +2 -0
- data/gemfiles/rails_5.gemfile +1 -0
- data/gemfiles/rails_5_1.gemfile +2 -1
- data/gemfiles/rails_5_2.gemfile +2 -1
- data/gemfiles/rails_6.gemfile +15 -0
- data/lib/roo_on_rails.rb +0 -1
- data/lib/roo_on_rails/railties/database.rb +11 -13
- data/lib/roo_on_rails/railties/env.rb +3 -5
- data/lib/roo_on_rails/railties/google_oauth.rb +4 -6
- data/lib/roo_on_rails/railties/http.rb +34 -32
- data/lib/roo_on_rails/railties/roo_identity.rb +12 -8
- data/lib/roo_on_rails/railties/sidekiq_integration.rb +9 -11
- data/lib/roo_on_rails/version.rb +1 -1
- data/roo_on_rails.gemspec +1 -1
- metadata +9 -15
- data/lib/roo_on_rails/railties/logging.rb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2087a16081bf1826323d093e4a69ed2e6242e10
|
4
|
+
data.tar.gz: f48656fe62c5deb2c09cd137eb8cd1b73c94d4a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c10e9b4be3c0a5151595a4e144d8b8a1c2eb4fab4736cb7941e388c59d4ff81722efcb76482c5466c55071e6fd78eeaf306a88cefa45971baa4dd2dadebf7d0e
|
7
|
+
data.tar.gz: 39d2b995f0e7cdd65941e08949bd6b3e54c725829dd7b1e588e4f104c908187529da5cfb704b4ea156dde53ccc2827b1c2650d2ffee407b37a427413148ed46b
|
data/.circleci/config.yml
CHANGED
@@ -10,7 +10,16 @@
|
|
10
10
|
# * GEM_HOME
|
11
11
|
# * BUNDLE_PATH
|
12
12
|
# * BUNDLE_BIN
|
13
|
-
|
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"
|
14
23
|
|
15
24
|
version: 2
|
16
25
|
jobs:
|
@@ -18,10 +27,12 @@ jobs:
|
|
18
27
|
build_2.4.6_rails_4:
|
19
28
|
docker:
|
20
29
|
- image: ruby:2.4.6-alpine
|
30
|
+
<<: *common_ruby_environment
|
21
31
|
- image: postgres:9.6-alpine
|
22
32
|
environment:
|
23
33
|
PGDATA: /dev/shm/pgdata
|
24
|
-
|
34
|
+
<<: *common_pg_environment_vars
|
35
|
+
- image: redis:4-alpine
|
25
36
|
steps:
|
26
37
|
- checkout
|
27
38
|
|
@@ -98,10 +109,12 @@ jobs:
|
|
98
109
|
build_2.4.6_rails_5:
|
99
110
|
docker:
|
100
111
|
- image: ruby:2.4.6-alpine
|
112
|
+
<<: *common_ruby_environment
|
101
113
|
- image: postgres:9.6-alpine
|
102
114
|
environment:
|
103
115
|
PGDATA: /dev/shm/pgdata
|
104
|
-
|
116
|
+
<<: *common_pg_environment_vars
|
117
|
+
- image: redis:4-alpine
|
105
118
|
steps:
|
106
119
|
- checkout
|
107
120
|
|
@@ -178,10 +191,12 @@ jobs:
|
|
178
191
|
build_2.4.6_rails_5_1:
|
179
192
|
docker:
|
180
193
|
- image: ruby:2.4.6-alpine
|
194
|
+
<<: *common_ruby_environment
|
181
195
|
- image: postgres:9.6-alpine
|
182
196
|
environment:
|
183
197
|
PGDATA: /dev/shm/pgdata
|
184
|
-
|
198
|
+
<<: *common_pg_environment_vars
|
199
|
+
- image: redis:4-alpine
|
185
200
|
steps:
|
186
201
|
- checkout
|
187
202
|
|
@@ -258,10 +273,12 @@ jobs:
|
|
258
273
|
build_2.4.6_rails_5_2:
|
259
274
|
docker:
|
260
275
|
- image: ruby:2.4.6-alpine
|
276
|
+
<<: *common_ruby_environment
|
261
277
|
- image: postgres:9.6-alpine
|
262
278
|
environment:
|
263
279
|
PGDATA: /dev/shm/pgdata
|
264
|
-
|
280
|
+
<<: *common_pg_environment_vars
|
281
|
+
- image: redis:4-alpine
|
265
282
|
steps:
|
266
283
|
- checkout
|
267
284
|
|
@@ -338,10 +355,12 @@ jobs:
|
|
338
355
|
build_2.5.5_rails_4:
|
339
356
|
docker:
|
340
357
|
- image: ruby:2.5.5-alpine
|
358
|
+
<<: *common_ruby_environment
|
341
359
|
- image: postgres:9.6-alpine
|
342
360
|
environment:
|
343
361
|
PGDATA: /dev/shm/pgdata
|
344
|
-
|
362
|
+
<<: *common_pg_environment_vars
|
363
|
+
- image: redis:4-alpine
|
345
364
|
steps:
|
346
365
|
- checkout
|
347
366
|
|
@@ -418,10 +437,12 @@ jobs:
|
|
418
437
|
build_2.5.5_rails_5:
|
419
438
|
docker:
|
420
439
|
- image: ruby:2.5.5-alpine
|
440
|
+
<<: *common_ruby_environment
|
421
441
|
- image: postgres:9.6-alpine
|
422
442
|
environment:
|
423
443
|
PGDATA: /dev/shm/pgdata
|
424
|
-
|
444
|
+
<<: *common_pg_environment_vars
|
445
|
+
- image: redis:4-alpine
|
425
446
|
steps:
|
426
447
|
- checkout
|
427
448
|
|
@@ -498,10 +519,12 @@ jobs:
|
|
498
519
|
build_2.5.5_rails_5_1:
|
499
520
|
docker:
|
500
521
|
- image: ruby:2.5.5-alpine
|
522
|
+
<<: *common_ruby_environment
|
501
523
|
- image: postgres:9.6-alpine
|
502
524
|
environment:
|
503
525
|
PGDATA: /dev/shm/pgdata
|
504
|
-
|
526
|
+
<<: *common_pg_environment_vars
|
527
|
+
- image: redis:4-alpine
|
505
528
|
steps:
|
506
529
|
- checkout
|
507
530
|
|
@@ -578,10 +601,12 @@ jobs:
|
|
578
601
|
build_2.5.5_rails_5_2:
|
579
602
|
docker:
|
580
603
|
- image: ruby:2.5.5-alpine
|
604
|
+
<<: *common_ruby_environment
|
581
605
|
- image: postgres:9.6-alpine
|
582
606
|
environment:
|
583
607
|
PGDATA: /dev/shm/pgdata
|
584
|
-
|
608
|
+
<<: *common_pg_environment_vars
|
609
|
+
- image: redis:4-alpine
|
585
610
|
steps:
|
586
611
|
- checkout
|
587
612
|
|
@@ -655,6 +680,88 @@ jobs:
|
|
655
680
|
- ~/project/vendor/bundle
|
656
681
|
- ~/project/vendor/bundle-scaffold
|
657
682
|
|
683
|
+
build_2.6.5_rails_6:
|
684
|
+
docker:
|
685
|
+
- image: ruby:2.6.5-alpine
|
686
|
+
<<: *common_ruby_environment
|
687
|
+
- image: postgres:9.6-alpine
|
688
|
+
environment:
|
689
|
+
PGDATA: /dev/shm/pgdata
|
690
|
+
<<: *common_pg_environment_vars
|
691
|
+
- image: redis:4-alpine
|
692
|
+
steps:
|
693
|
+
- checkout
|
694
|
+
|
695
|
+
- run:
|
696
|
+
name: Setup RAM disk
|
697
|
+
command: |
|
698
|
+
rm -rf ~/project/tmp ;
|
699
|
+
mkdir /dev/shm/tmp ;
|
700
|
+
ln -s /dev/shm/tmp ~/project/tmp
|
701
|
+
|
702
|
+
- run:
|
703
|
+
name: Setup requirements
|
704
|
+
command: |
|
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
|
716
|
+
|
717
|
+
- restore_cache:
|
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
|
722
|
+
|
723
|
+
- run:
|
724
|
+
name: Install bundle
|
725
|
+
command: |
|
726
|
+
unset \
|
727
|
+
BUNDLE_APP_CONFIG \
|
728
|
+
GEM_HOME \
|
729
|
+
BUNDLE_PATH \
|
730
|
+
BUNDLE_BIN
|
731
|
+
bundle install --jobs=3 --retry=3 --path=$PWD/vendor/bundle
|
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
|
737
|
+
- run:
|
738
|
+
name: Run test suite
|
739
|
+
command: |
|
740
|
+
unset \
|
741
|
+
RACK_ENV \
|
742
|
+
RAILS_ENV \
|
743
|
+
BUNDLE_APP_CONFIG \
|
744
|
+
GEM_HOME \
|
745
|
+
BUNDLE_PATH \
|
746
|
+
BUNDLE_BIN
|
747
|
+
bundle exec rspec
|
748
|
+
|
749
|
+
- save_cache:
|
750
|
+
key: v2-bundle-2.6.5-rails_6-{{ .Branch }}
|
751
|
+
paths:
|
752
|
+
- ~/project/vendor/bundle
|
753
|
+
- ~/project/vendor/bundle-scaffold
|
754
|
+
- save_cache:
|
755
|
+
key: v2-bundle-2.6.5-rails_6
|
756
|
+
paths:
|
757
|
+
- ~/project/vendor/bundle
|
758
|
+
- ~/project/vendor/bundle-scaffold
|
759
|
+
- save_cache:
|
760
|
+
key: v2-bundle-2.6.5
|
761
|
+
paths:
|
762
|
+
- ~/project/vendor/bundle
|
763
|
+
- ~/project/vendor/bundle-scaffold
|
764
|
+
|
658
765
|
|
659
766
|
workflows:
|
660
767
|
version: 2
|
@@ -677,3 +784,5 @@ workflows:
|
|
677
784
|
|
678
785
|
- build_2.5.5_rails_5_2
|
679
786
|
|
787
|
+
- build_2.6.5_rails_6
|
788
|
+
|
data/.circleci/config.yml.erb
CHANGED
@@ -10,7 +10,16 @@
|
|
10
10
|
# * GEM_HOME
|
11
11
|
# * BUNDLE_PATH
|
12
12
|
# * BUNDLE_BIN
|
13
|
-
|
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"
|
14
23
|
<%
|
15
24
|
builds = [
|
16
25
|
['2.4.6', 'rails_4'],
|
@@ -20,7 +29,8 @@
|
|
20
29
|
['2.5.5', 'rails_4'],
|
21
30
|
['2.5.5', 'rails_5'],
|
22
31
|
['2.5.5', 'rails_5_1'],
|
23
|
-
['2.5.5', 'rails_5_2']
|
32
|
+
['2.5.5', 'rails_5_2'],
|
33
|
+
['2.6.5', 'rails_6']
|
24
34
|
]
|
25
35
|
%>
|
26
36
|
version: 2
|
@@ -29,9 +39,11 @@ jobs:
|
|
29
39
|
build_<%= ruby %>_<%= variant %>:
|
30
40
|
docker:
|
31
41
|
- image: ruby:<%= ruby %>-alpine
|
42
|
+
<<: *common_ruby_environment
|
32
43
|
- image: postgres:9.6-alpine
|
33
44
|
environment:
|
34
45
|
PGDATA: /dev/shm/pgdata
|
46
|
+
<<: *common_pg_environment_vars
|
35
47
|
- image: redis:4-alpine
|
36
48
|
steps:
|
37
49
|
- checkout
|
data/.codecov.yml
CHANGED
data/Appraisals
CHANGED
@@ -27,3 +27,11 @@ appraise 'rails-5-2' do
|
|
27
27
|
gem 'pg', '~> 0.18'
|
28
28
|
gem 'rake', '13.0.1'
|
29
29
|
end
|
30
|
+
|
31
|
+
appraise 'rails-6' do
|
32
|
+
gem 'rails', '~> 6.0.3'
|
33
|
+
gem 'bootsnap', '>= 1.1.0', require: false
|
34
|
+
gem 'sqlite3', '~> 1.4'
|
35
|
+
gem 'pg', '~> 0.18'
|
36
|
+
gem 'rake', '13.0.1'
|
37
|
+
end
|
data/CHANGELOG.md
CHANGED
data/appraise
CHANGED
data/gemfiles/rails_4.gemfile
CHANGED
data/gemfiles/rails_5.gemfile
CHANGED
data/gemfiles/rails_5_1.gemfile
CHANGED
data/gemfiles/rails_5_2.gemfile
CHANGED
@@ -0,0 +1,15 @@
|
|
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.4"
|
11
|
+
gem "rails", "~> 6.0.3"
|
12
|
+
gem "bootsnap", ">= 1.1.0", require: false
|
13
|
+
gem "rake", "13.0.1"
|
14
|
+
|
15
|
+
gemspec path: "../"
|
data/lib/roo_on_rails.rb
CHANGED
@@ -3,21 +3,19 @@ module RooOnRails
|
|
3
3
|
class Database < Rails::Railtie
|
4
4
|
initializer 'roo_on_rails.database', after: 'active_record.initialize_database' do
|
5
5
|
ActiveSupport.on_load :active_record do
|
6
|
-
Rails.logger.
|
7
|
-
log.debug 'loading'
|
6
|
+
Rails.logger.debug('[roo_on_rails.database] loading')
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
16
|
-
if ENV.key?('DATABASE_REAPING_FREQUENCY')
|
17
|
-
config['reaping_frequency'] = ENV['DATABASE_REAPING_FREQUENCY']
|
18
|
-
end
|
19
|
-
ActiveRecord::Base.establish_connection
|
8
|
+
config = ActiveRecord::Base.configurations[Rails.env]
|
9
|
+
config['variables'] ||= {}
|
10
|
+
statement_timeout = ENV.fetch('DATABASE_STATEMENT_TIMEOUT', 200)
|
11
|
+
# Use -1 to disable setting the statement timeout
|
12
|
+
unless statement_timeout == '-1'
|
13
|
+
config['variables']['statement_timeout'] = statement_timeout
|
20
14
|
end
|
15
|
+
if ENV.key?('DATABASE_REAPING_FREQUENCY')
|
16
|
+
config['reaping_frequency'] = ENV['DATABASE_REAPING_FREQUENCY']
|
17
|
+
end
|
18
|
+
ActiveRecord::Base.establish_connection
|
21
19
|
end
|
22
20
|
end
|
23
21
|
end
|
@@ -1,11 +1,9 @@
|
|
1
1
|
module RooOnRails
|
2
2
|
class Railtie < Rails::Railtie
|
3
3
|
initializer 'roo_on_rails.default_env' do
|
4
|
-
Rails.logger.
|
5
|
-
|
6
|
-
|
7
|
-
RooOnRails::Environment.load
|
8
|
-
end
|
4
|
+
Rails.logger.debug '[roo_on_rails.default_env] loading'
|
5
|
+
require 'roo_on_rails/environment'
|
6
|
+
RooOnRails::Environment.load
|
9
7
|
end
|
10
8
|
end
|
11
9
|
end
|
@@ -4,12 +4,10 @@ module RooOnRails
|
|
4
4
|
module Railties
|
5
5
|
class GoogleOAuth < Rails::Railtie
|
6
6
|
initializer 'roo_on_rails.google_auth.middleware' do |app|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
_add_routes(app)
|
12
|
-
end
|
7
|
+
next unless Config.google_auth_enabled?
|
8
|
+
Rails.logger.debug '[roo_on_rails.google_auth] loading'
|
9
|
+
_add_middleware(app)
|
10
|
+
_add_routes(app)
|
13
11
|
end
|
14
12
|
|
15
13
|
private
|
@@ -2,45 +2,47 @@ module RooOnRails
|
|
2
2
|
module Railties
|
3
3
|
class HTTP < Rails::Railtie
|
4
4
|
initializer 'roo_on_rails.http' do |app|
|
5
|
-
Rails.logger.
|
6
|
-
log.debug 'loading'
|
5
|
+
Rails.logger.debug '[roo_on_rails.http] loading'
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
require 'rack/timeout/base'
|
8
|
+
require 'rack/ssl-enforcer'
|
9
|
+
require 'roo_on_rails/rack/safe_timeouts'
|
11
10
|
|
12
|
-
|
11
|
+
::Rack::Timeout::Logger.level = ::Logger::WARN
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
app.config.middleware.insert_before(
|
14
|
+
::Rack::Runtime,
|
15
|
+
::Rack::Timeout,
|
16
|
+
service_timeout: ENV.fetch('RACK_SERVICE_TIMEOUT', 15).to_i,
|
17
|
+
wait_timeout: ENV.fetch('RACK_WAIT_TIMEOUT', 30).to_i
|
18
|
+
)
|
20
19
|
|
21
|
-
|
20
|
+
if Rails::VERSION::MAJOR < 4
|
21
|
+
middleware_to_insert_before = ::ActionDispatch::Cookies
|
22
|
+
else
|
23
|
+
middleware_to_insert_before = ::Rack::Head
|
24
|
+
end
|
22
25
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
# This needs to be inserted low in the stack, before Rails returns the
|
27
|
+
# thread-current connection to the pool.
|
28
|
+
if defined?(ActiveRecord)
|
29
|
+
app.config.middleware.insert_before(
|
30
|
+
middleware_to_insert_before,
|
31
|
+
RooOnRails::Rack::SafeTimeouts
|
32
|
+
)
|
33
|
+
end
|
31
34
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
+
if ENV.fetch('ROO_ON_RAILS_RACK_DEFLATE', 'YES').to_s =~ /\A(YES|TRUE|ON|1)\Z/i
|
36
|
+
app.config.middleware.use ::Rack::Deflater
|
37
|
+
end
|
35
38
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
end
|
39
|
+
# Don't use SslEnforcer in test environment as it breaks Capybara
|
40
|
+
unless Rails.env.test? ||
|
41
|
+
ENV.fetch('ROO_ON_RAILS_DISABLE_SSL_ENFORCEMENT', '') =~ /\A(YES|TRUE|ON|1)\Z/i
|
42
|
+
app.config.middleware.insert_before(
|
43
|
+
middleware_to_insert_before,
|
44
|
+
::Rack::SslEnforcer
|
45
|
+
)
|
44
46
|
end
|
45
47
|
end
|
46
48
|
end
|
@@ -4,13 +4,14 @@ module RooOnRails
|
|
4
4
|
module Railties
|
5
5
|
class RooIdentity < Rails::Railtie
|
6
6
|
initializer 'roo_on_rails.roo_identity.middleware' do |app|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
7
|
+
if RooOnRails::Rack::PopulateEnvFromJWT.configured?
|
8
|
+
Rails.logger.debug '[roo_on_rails.roo_identity.middleware] loading'
|
9
|
+
_add_middleware(app, Rails.logger)
|
10
|
+
else
|
11
|
+
Rails.logger.warn(
|
12
|
+
'[roo_on_rails.roo_identity.middleware] ' \
|
13
|
+
' not configured, roo.identity will be unavailable'
|
14
|
+
)
|
14
15
|
end
|
15
16
|
end
|
16
17
|
|
@@ -19,7 +20,10 @@ module RooOnRails
|
|
19
20
|
def _add_middleware(app, log)
|
20
21
|
app.config.middleware.use RooOnRails::Rack::PopulateEnvFromJWT, logger: log
|
21
22
|
rescue LoadError
|
22
|
-
log.error
|
23
|
+
log.error(
|
24
|
+
'[roo_on_rails.roo_identity.middleware] ' \
|
25
|
+
'the json-jwt gem is not in the bundle so Roo Identity will not be available'
|
26
|
+
)
|
23
27
|
end
|
24
28
|
end
|
25
29
|
end
|
@@ -8,19 +8,17 @@ module RooOnRails
|
|
8
8
|
module Railties
|
9
9
|
class SidekiqIntegration < Rails::Railtie
|
10
10
|
initializer 'roo_on_rails.sidekiq' do |app|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
11
|
+
unless RooOnRails::Config.sidekiq_enabled?
|
12
|
+
Rails.logger.debug '[roo_on_rails.sidekiq] skipping'
|
13
|
+
next
|
14
|
+
end
|
16
15
|
|
17
|
-
|
18
|
-
|
16
|
+
Rails.logger.debug '[roo_on_rails.sidekiq] loading'
|
17
|
+
require 'hirefire-resource'
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
end
|
19
|
+
config_sidekiq
|
20
|
+
config_sidekiq_metrics
|
21
|
+
config_hirefire(app)
|
24
22
|
end
|
25
23
|
|
26
24
|
def config_hirefire(app)
|
data/lib/roo_on_rails/version.rb
CHANGED
data/roo_on_rails.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
24
|
spec.add_runtime_dependency 'dotenv-rails', '~> 2.1'
|
25
|
-
spec.add_runtime_dependency 'rails', '>= 3.2.22'
|
25
|
+
spec.add_runtime_dependency 'rails', '>= 3.2.22'
|
26
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'
|
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.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Letessier
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv-rails
|
@@ -31,9 +31,6 @@ dependencies:
|
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 3.2.22
|
34
|
-
- - "<"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '5.3'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -41,9 +38,6 @@ dependencies:
|
|
41
38
|
- - ">="
|
42
39
|
- !ruby/object:Gem::Version
|
43
40
|
version: 3.2.22
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '5.3'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: sprockets
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -400,6 +394,7 @@ files:
|
|
400
394
|
- gemfiles/rails_5.gemfile
|
401
395
|
- gemfiles/rails_5_1.gemfile
|
402
396
|
- gemfiles/rails_5_2.gemfile
|
397
|
+
- gemfiles/rails_6.gemfile
|
403
398
|
- lib/roo_on_rails.rb
|
404
399
|
- lib/roo_on_rails/checks.rb
|
405
400
|
- lib/roo_on_rails/checks/base.rb
|
@@ -443,7 +438,6 @@ files:
|
|
443
438
|
- lib/roo_on_rails/railties/env.rb
|
444
439
|
- lib/roo_on_rails/railties/google_oauth.rb
|
445
440
|
- lib/roo_on_rails/railties/http.rb
|
446
|
-
- lib/roo_on_rails/railties/logging.rb
|
447
441
|
- lib/roo_on_rails/railties/rake_tasks.rb
|
448
442
|
- lib/roo_on_rails/railties/roo_identity.rb
|
449
443
|
- lib/roo_on_rails/railties/sidekiq_integration.rb
|
@@ -462,7 +456,7 @@ homepage: https://github.com/deliveroo/roo_on_rails
|
|
462
456
|
licenses:
|
463
457
|
- MIT
|
464
458
|
metadata: {}
|
465
|
-
post_install_message:
|
459
|
+
post_install_message:
|
466
460
|
rdoc_options: []
|
467
461
|
require_paths:
|
468
462
|
- lib
|
@@ -473,13 +467,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
473
467
|
version: '0'
|
474
468
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
475
469
|
requirements:
|
476
|
-
- - "
|
470
|
+
- - ">="
|
477
471
|
- !ruby/object:Gem::Version
|
478
|
-
version:
|
472
|
+
version: '0'
|
479
473
|
requirements: []
|
480
|
-
rubyforge_project:
|
474
|
+
rubyforge_project:
|
481
475
|
rubygems_version: 2.6.11
|
482
|
-
signing_key:
|
476
|
+
signing_key:
|
483
477
|
specification_version: 4
|
484
478
|
summary: Scaffolding for building services
|
485
479
|
test_files: []
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module RooOnRails
|
2
|
-
module Railties
|
3
|
-
class Logging < Rails::Railtie
|
4
|
-
initializer 'roo_on_rails.logging.before', before: :initialize_logger do
|
5
|
-
require 'roo_on_rails/logger'
|
6
|
-
Rails.logger = config.logger = RooOnRails::Logger.new
|
7
|
-
# It is not possible to set log_level to an invalid value without some
|
8
|
-
# deliberate gymnastics (the setter will raise an error), and Rails
|
9
|
-
# defaults this to `debug`, so we don't need to guard against nil /
|
10
|
-
# invalidity
|
11
|
-
log_level = Rails.configuration.log_level
|
12
|
-
|
13
|
-
Rails.logger.set_log_level(default: log_level)
|
14
|
-
Rails.logger.debug 'initializer roo_on_rails.logging.before'
|
15
|
-
end
|
16
|
-
|
17
|
-
initializer 'roo_on_rails.logging.after', after: :initialize_logger do
|
18
|
-
log_level = Rails.configuration.log_level
|
19
|
-
|
20
|
-
Rails.logger.set_log_level(default: log_level)
|
21
|
-
Rails.logger.debug 'initializer roo_on_rails.logging.after'
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|