File tree Expand file tree Collapse file tree
lib/console/adapter/rails Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ jobs:
1414 runs-on : ubuntu-latest
1515
1616 steps :
17- - uses : actions/checkout@v4
17+ - uses : actions/checkout@v6
1818 - uses : ruby/setup-ruby@v1
1919 with :
20- ruby-version : " 3.3 "
20+ ruby-version : " 3.4 "
2121 bundler-cache : true
2222
2323 - name : Validate coverage
Original file line number Diff line number Diff line change @@ -25,11 +25,11 @@ jobs:
2525 runs-on : ubuntu-latest
2626
2727 steps :
28- - uses : actions/checkout@v4
28+ - uses : actions/checkout@v6
2929
3030 - uses : ruby/setup-ruby@v1
3131 with :
32- ruby-version : " 3.3 "
32+ ruby-version : " 3.4 "
3333 bundler-cache : true
3434
3535 - name : Installing packages
4040 run : bundle exec bake utopia:project:static --force no
4141
4242 - name : Upload documentation artifact
43- uses : actions/upload-pages-artifact@v3
43+ uses : actions/upload-pages-artifact@v4
4444 with :
4545 path : docs
4646
Original file line number Diff line number Diff line change 1313 runs-on : ubuntu-latest
1414
1515 steps :
16- - uses : actions/checkout@v4
16+ - uses : actions/checkout@v6
1717 - uses : ruby/setup-ruby@v1
1818 with :
1919 ruby-version : ruby
Original file line number Diff line number Diff line change 2222
2323 ruby :
2424 - " 3.3"
25+ - " 3.4"
2526
2627 steps :
27- - uses : actions/checkout@v4
28+ - uses : actions/checkout@v6
2829 - uses : ruby/setup-ruby@v1
2930 with :
3031 ruby-version : ${{matrix.ruby}}
3435 timeout-minutes : 5
3536 run : bundle exec bake test
3637
37- - uses : actions/upload-artifact@v3
38+ - uses : actions/upload-artifact@v5
3839 with :
3940 name : coverage-${{matrix.os}}-${{matrix.ruby}}
4041 path : .covered.db
@@ -44,13 +45,13 @@ jobs:
4445 runs-on : ubuntu-latest
4546
4647 steps :
47- - uses : actions/checkout@v4
48+ - uses : actions/checkout@v6
4849 - uses : ruby/setup-ruby@v1
4950 with :
50- ruby-version : " 3.3 "
51+ ruby-version : " 3.4 "
5152 bundler-cache : true
5253
53- - uses : actions/download-artifact@v3
54+ - uses : actions/download-artifact@v5
5455
5556 - name : Validate coverage
5657 timeout-minutes : 5
Original file line number Diff line number Diff line change @@ -20,12 +20,10 @@ jobs:
2020 - macos
2121
2222 ruby :
23- - " 3.1"
24- - " 3.2"
25- - " 3.3"
23+ - " 3.4"
2624
2725 steps :
28- - uses : actions/checkout@v4
26+ - uses : actions/checkout@v6
2927 - uses : ruby/setup-ruby@v1
3028 with :
3129 ruby-version : ${{matrix.ruby}}
Original file line number Diff line number Diff line change @@ -21,13 +21,12 @@ jobs:
2121 - macos
2222
2323 ruby :
24- - " 3.1"
25- - " 3.2"
2624 - " 3.3"
25+ - " 3.4"
2726
2827 gemfile :
29- - gems/rails-v6.rb
3028 - gems/rails-v7.rb
29+ - gems/rails-v8.rb
3130
3231 experimental : [false]
3332
4645 BUNDLE_GEMFILE : ${{matrix.gemfile}}
4746
4847 steps :
49- - uses : actions/checkout@v4
48+ - uses : actions/checkout@v6
5049 - uses : ruby/setup-ruby@v1
5150 with :
5251 ruby-version : ${{matrix.ruby}}
Original file line number Diff line number Diff line change @@ -26,5 +26,5 @@ Gem::Specification.new do |spec|
2626
2727 spec . add_dependency "console" , "~> 1.21"
2828 spec . add_dependency "fiber-storage" , "~> 1.0"
29- spec . add_dependency "rails" , ">= 6.1 "
29+ spec . add_dependency "rails" , ">= 7.0 "
3030end
Original file line number Diff line number Diff line change 2323 gem "bake-test"
2424 gem "bake-test-external"
2525
26- gem "sqlite3" , "~> 1.4"
26+ gem "sqlite3" , ">= 1.4"
2727end
Original file line number Diff line number Diff line change 55
66eval_gemfile ( '../gems.rb' )
77
8- gem 'rails' , '~> 6 .0'
8+ gem 'rails' , '~> 8 .0'
Original file line number Diff line number Diff line change @@ -15,23 +15,31 @@ class Railtie < ::Rails::Railtie
1515 initializer 'console.adapter.rails' , before : :initialize_logger do |app |
1616 # 1. Set up Console to be used as the Rails logger
1717 Logger . apply! ( configuration : app . config )
18-
18+
1919 # 2. Remove the Rails::Rack::Logger middleware as it also doubles up on request logs
2020 app . middleware . delete ::Rails ::Rack ::Logger
2121 end
22-
22+
2323 # 3. Remove existing log subscribers for ActionController and ActionView
2424 config . after_initialize do
25- ::ActionController ::LogSubscriber . detach_from :action_controller
26-
25+ if ::ActionController ::LogSubscriber < ::ActiveSupport ::LogSubscriber
26+ ::ActionController ::LogSubscriber . detach_from :action_controller
27+ else
28+ ::ActiveSupport . event_reporter . unsubscribe ( ::ActionController ::LogSubscriber )
29+ end
30+
2731 # Silence the default action view logs, e.g. "Rendering text template" etc
28- ::ActionView ::LogSubscriber . detach_from :action_view
32+ if ::ActionView ::LogSubscriber < ::ActiveSupport ::LogSubscriber
33+ ::ActionView ::LogSubscriber . detach_from :action_view
34+ else
35+ ::ActiveSupport . event_reporter . unsubscribe ( ::ActionView ::LogSubscriber )
36+ end
2937 end
30-
38+
3139 config . after_initialize do
3240 # 4. Add a new log subscriber for ActionController
3341 ActionController . apply!
34-
42+
3543 # 5. (optionally) Add a new log subscriber for ActiveRecord
3644 # ActiveRecord.apply!
3745 end
You can’t perform that action at this time.
0 commit comments