File tree Expand file tree Collapse file tree 8 files changed +26
-48
lines changed
lib/rails_semantic_logger/rack Expand file tree Collapse file tree 8 files changed +26
-48
lines changed Original file line number Diff line number Diff line change @@ -12,37 +12,26 @@ jobs:
1212 fail-fast : false
1313 matrix :
1414 include :
15- - rails : " 6.0"
16- ruby : " 2.7"
17-
18- - rails : " 6.1"
19- ruby : " 2.7"
20- - rails : " 6.1"
21- ruby : " 3.0"
22- - rails : " 6.1"
23- ruby : " 3.1"
2415 - rails : " 6.1"
2516 ruby : " 3.2"
2617
2718 - rails : " 7.0"
28- ruby : " 3.1 "
19+ ruby : " 3.2 "
2920 - rails : " 7.0b"
3021 ruby : " 3.2"
3122
3223 - rails : " 7.1"
33- ruby : " 3.1 "
24+ ruby : " 3.2 "
3425 - rails : " 7.1b"
35- ruby : " 3.1"
36- - rails : " 7.1.1"
3726 ruby : " 3.2"
38- - rails : " 7.1"
27+ - rails : " 7.1.1 "
3928 ruby : " 3.2"
4029
4130 - rails : " 7.2"
4231 ruby : " 3.3"
4332
4433 - rails : " 8.0"
45- ruby : " 3.3 "
34+ ruby : " 3.4 "
4635
4736 env :
4837 BUNDLE_GEMFILE : gemfiles/rails_${{ matrix.rails }}.gemfile
Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ TODO.md
1717
1818.tool-versions
1919test /dummy /db /test.sqlite3
20+ mise.toml
Original file line number Diff line number Diff line change 1- appraise "rails_6.0" do
2- gem "rails" , "~> 6.0.0"
3- gem "sidekiq" , "~> 4.2"
4- gem "sqlite3" , "~> 1.4"
5- end
6-
71appraise "rails_6.1" do
82 gem "rails" , "~> 6.1.0"
93 gem "sidekiq" , "~> 5.2"
@@ -41,6 +35,11 @@ appraise "rails_7.1b" do
4135end
4236
4337appraise "rails_7.2" do
44- gem "rails" , "~> 7.2.0.beta2"
38+ gem "rails" , "~> 7.2.0"
39+ gem "sidekiq" , "~> 7.2.4"
40+ end
41+
42+ appraise "rails_8.0" do
43+ gem "rails" , "~> 8.0.0"
4544 gem "sidekiq" , "~> 7.2.4"
4645end
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ gem "minitest-rails"
1212gem "rake"
1313gem "sprockets" , "< 4.0"
1414
15- gem "rails" , "~> 7.2.0.beta2 "
15+ gem "rails" , "~> 8.0.0 "
1616gem "sidekiq" , "~> 7.2.4"
1717gem "sqlite3"
1818
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ gem "minitest"
1010gem "minitest-rails"
1111gem "rake"
1212gem "sprockets", "< 4.0"
13- gem "rails", "~> 7.2.0.beta2 "
13+ gem "rails", "~> 7.2.0"
1414gem "sidekiq", "~> 7.2.4"
1515gem "sqlite3"
1616gem "rubocop"
Original file line number Diff line number Diff line change @@ -36,11 +36,18 @@ def call(env)
3636
3737 def call_app ( request , env )
3838 instrumenter = ActiveSupport ::Notifications . instrumenter
39- handle = instrumenter . build_handle "request.action_dispatch" , request : request
40- instrumenter_finish = lambda {
41- handle . finish
42- }
43- handle . start
39+ if ( Rails ::VERSION ::MAJOR == 7 && Rails ::VERSION ::MINOR >= 1 ) || Rails ::VERSION ::MAJOR > 7
40+ handle = instrumenter . build_handle "request.action_dispatch" , request : request
41+ instrumenter_finish = lambda {
42+ handle . finish
43+ }
44+ handle . start
45+ else
46+ instrumenter_state = instrumenter . start "request.action_dispatch" , request : request
47+ instrumenter_finish = lambda {
48+ instrumenter . finish_with_state ( instrumenter_state , "request.action_dispatch" , request : request )
49+ }
50+ end
4451
4552 logger . send ( self . class . started_request_log_level ) { started_request_message ( request ) }
4653 status , headers , body = @app . call ( env )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class Application < Rails::Application
1111 # Configure sensitive parameters which will be filtered from the log file.
1212 config . filter_parameters += [ :password ]
1313 config . active_record . sqlite3 . represent_boolean_as_integer = true if config . active_record . sqlite3
14- config . active_record . async_query_executor = :global_thread_pool
14+ config . active_record . async_query_executor = :global_thread_pool if Rails :: VERSION :: MAJOR >= 7 && Rails :: VERSION :: MINOR >= 1
1515
1616 # Settings in config/environments/* take precedence over those specified here.
1717 # Application configuration should go into files in config/initializers
You can’t perform that action at this time.
0 commit comments