Skip to content

Commit

Permalink
Merge pull request #154 from eagletmt/rails70
Browse files Browse the repository at this point in the history
Upgrade Rails to 7.0
  • Loading branch information
eagletmt committed Oct 6, 2023
2 parents 64037df + 66d04b0 commit c81f4b9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
name: Run test with Ruby ${{ matrix.ruby }}
services:
mysql:
Expand Down Expand Up @@ -51,6 +52,7 @@ jobs:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
name: Run assets:precompile with Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions kuroko2.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ Gem::Specification.new do |s|
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md", "bin/*.rb"]
s.test_files = Dir["spec/**/*"]

s.add_dependency "rails", ">= 6.1.7.6", '< 7.0'
s.add_dependency "rails", ">= 7.0.8", '< 7.1'
s.add_dependency "kaminari"
s.add_dependency "chrono"
s.add_dependency "hashie"
s.add_dependency "addressable"
s.add_dependency 'aws-sdk-cloudwatchlogs', '>= 1.0.0'
s.add_dependency 'retryable'
s.add_dependency 'faraday'
s.add_dependency 'sprockets'
s.add_dependency 'sprockets-rails'
s.add_dependency 'slim-rails'
s.add_dependency 'uglifier', '>= 4'
s.add_dependency 'jbuilder'
Expand Down
1 change: 1 addition & 0 deletions lib/kuroko2/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Engine < ::Rails::Engine
isolate_namespace Kuroko2

config.before_configuration do
require 'sprockets/rails'
require 'kaminari'
require 'slim'
require 'jbuilder'
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

module Dummy
class Application < Rails::Application
config.load_defaults 6.1
config.load_defaults 7.0
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
Expand Down
12 changes: 6 additions & 6 deletions spec/features/workers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,24 @@
have_selector('h1', text: /Kuroko Workers/)

expect(page).to have_selector('#workers table tbody tr', count: 2)
expect(page).to have_selector('#workers table tbody tr td .btn[value=Suspend]', count: 1)
expect(page).to have_selector('#workers table tbody tr td .btn[value=Unsuspend]', count: 0)
expect(page).to have_selector('#workers table tbody tr td .btn', text: 'Suspend', count: 1)
expect(page).to have_selector('#workers table tbody tr td .btn', text: 'Unsuspend', count: 0)
expect(page).to have_selector('#workers table tbody tr td .label', text: 'WORKING', count: 1)
expect(page).to have_selector('#workers table tbody tr td .label', text: 'SUSPENDED', count: 0)

click_on 'Suspend'

expect(page).to have_selector('#workers table tbody tr', count: 2)
expect(page).to have_selector('#workers table tbody tr td .btn[value=Suspend]', count: 0)
expect(page).to have_selector('#workers table tbody tr td .btn[value=Unsuspend]', count: 1)
expect(page).to have_selector('#workers table tbody tr td .btn', text: 'Suspend', count: 0)
expect(page).to have_selector('#workers table tbody tr td .btn', text: 'Unsuspend', count: 1)
expect(page).to have_selector('#workers table tbody tr td .label', text: 'WORKING', count: 0)
expect(page).to have_selector('#workers table tbody tr td .label', text: 'SUSPENDED', count: 1)

click_on 'Unsuspend'

expect(page).to have_selector('#workers table tbody tr', count: 2)
expect(page).to have_selector('#workers table tbody tr td .btn[value=Suspend]', count: 1)
expect(page).to have_selector('#workers table tbody tr td .btn[value=Unsuspend]', count: 0)
expect(page).to have_selector('#workers table tbody tr td .btn', text: 'Suspend', count: 1)
expect(page).to have_selector('#workers table tbody tr td .btn', text: 'Unsuspend', count: 0)
expect(page).to have_selector('#workers table tbody tr td .label', text: 'WORKING', count: 1)
expect(page).to have_selector('#workers table tbody tr td .label', text: 'SUSPENDED', count: 0)
end
Expand Down

0 comments on commit c81f4b9

Please sign in to comment.