diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 57b9fa11a..3da2d5e94 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: ruby_version: - - '3.1' + - '3.2' services: db: @@ -67,7 +67,7 @@ jobs: fail-fast: false matrix: ruby_version: - - '3.1' + - '3.2' services: db: @@ -106,7 +106,6 @@ jobs: fail-fast: false matrix: ruby_version: - - '3.1' - '3.2' - '3.3' @@ -146,7 +145,7 @@ jobs: export SHIPIT_GEM_PATH="${PWD}" mkdir /tmp/new-app cd /tmp/new-app - gem install rails -v '~> 7.2.1' --no-document + gem install rails -v '~> 8.0.1' --no-document rails new shipit --skip-action-cable --skip-turbolinks --skip-action-mailer --skip-active-storage --skip-webpack-install --skip-action-mailbox --skip-action-text -m "${SHIPIT_GEM_PATH}/template.rb" env: SHIPIT_EDGE: "1" diff --git a/.rubocop.yml b/.rubocop.yml index 5800ac789..16261d45e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,5 @@ AllCops: - TargetRubyVersion: 3.1 + TargetRubyVersion: 3.2 Exclude: - tmp/* - bin/* diff --git a/.ruby-version b/.ruby-version index 9cec7165a..944880fa1 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.6 +3.2.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index cf5ccfd9f..21f2dde92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ # Unreleased * Pass `Shipit::Stack` to `DeploySpec::FileSystem.new` and make it accessible through an accessor. (#1356) -* Upgrade Rubocop to 1.48.0 +* Upgraded Rubocop to 1.48.0 +* Upgraded to Rails 8.0.1 +* Upgraded to Sqlite3 2.6.0 +* Minimum Ruby version is now Ruby 3.2 # 0.39.0 diff --git a/Gemfile b/Gemfile index 377200e65..faec84d72 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' gemspec -gem 'sqlite3' +gem 'sqlite3', '>= 2.1' gem 'ejson-rails', require: 'ejson/rails/skip_secrets' group :ci do diff --git a/Gemfile.lock b/Gemfile.lock index 6fd78b317..b833b0d3e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,7 +16,7 @@ PATH omniauth-github (~> 1.4) paquito pubsubstub (~> 0.2.0) - rails (~> 7.2.1) + rails (~> 8.0.1) rails-timeago (~> 2.13.0) rails_autolink (~> 1.1.6) rake @@ -33,46 +33,45 @@ PATH GEM remote: https://rubygems.org/ specs: - actioncable (7.2.1.1) - actionpack (= 7.2.1.1) - activesupport (= 7.2.1.1) + actioncable (8.0.2) + actionpack (= 8.0.2) + activesupport (= 8.0.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.1.1) - actionpack (= 7.2.1.1) - activejob (= 7.2.1.1) - activerecord (= 7.2.1.1) - activestorage (= 7.2.1.1) - activesupport (= 7.2.1.1) + actionmailbox (8.0.2) + actionpack (= 8.0.2) + activejob (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) mail (>= 2.8.0) - actionmailer (7.2.1.1) - actionpack (= 7.2.1.1) - actionview (= 7.2.1.1) - activejob (= 7.2.1.1) - activesupport (= 7.2.1.1) + actionmailer (8.0.2) + actionpack (= 8.0.2) + actionview (= 8.0.2) + activejob (= 8.0.2) + activesupport (= 8.0.2) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.1.1) - actionview (= 7.2.1.1) - activesupport (= 7.2.1.1) + actionpack (8.0.2) + actionview (= 8.0.2) + activesupport (= 8.0.2) nokogiri (>= 1.8.5) - racc - rack (>= 2.2.4, < 3.2) + rack (>= 2.2.4) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (7.2.1.1) - actionpack (= 7.2.1.1) - activerecord (= 7.2.1.1) - activestorage (= 7.2.1.1) - activesupport (= 7.2.1.1) + actiontext (8.0.2) + actionpack (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.1.1) - activesupport (= 7.2.1.1) + actionview (8.0.2) + activesupport (= 8.0.2) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) @@ -80,23 +79,24 @@ GEM active_model_serializers (0.9.13) activemodel (>= 3.2) concurrent-ruby (~> 1.0) - activejob (7.2.1.1) - activesupport (= 7.2.1.1) + activejob (8.0.2) + activesupport (= 8.0.2) globalid (>= 0.3.6) - activemodel (7.2.1.1) - activesupport (= 7.2.1.1) - activerecord (7.2.1.1) - activemodel (= 7.2.1.1) - activesupport (= 7.2.1.1) + activemodel (8.0.2) + activesupport (= 8.0.2) + activerecord (8.0.2) + activemodel (= 8.0.2) + activesupport (= 8.0.2) timeout (>= 0.4.0) - activestorage (7.2.1.1) - actionpack (= 7.2.1.1) - activejob (= 7.2.1.1) - activerecord (= 7.2.1.1) - activesupport (= 7.2.1.1) + activestorage (8.0.2) + actionpack (= 8.0.2) + activejob (= 8.0.2) + activerecord (= 8.0.2) + activesupport (= 8.0.2) marcel (~> 1.0) - activesupport (7.2.1.1) + activesupport (8.0.2) base64 + benchmark (>= 0.3) bigdecimal concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) @@ -106,6 +106,7 @@ GEM minitest (>= 5.1) securerandom (>= 0.3) tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) ansi_stream (0.0.6) @@ -117,6 +118,7 @@ GEM ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) base64 (0.2.0) + benchmark (0.4.0) bigdecimal (3.1.8) builder (3.3.0) byebug (11.1.3) @@ -277,20 +279,20 @@ GEM rackup (1.0.0) rack (< 3) webrick - rails (7.2.1.1) - actioncable (= 7.2.1.1) - actionmailbox (= 7.2.1.1) - actionmailer (= 7.2.1.1) - actionpack (= 7.2.1.1) - actiontext (= 7.2.1.1) - actionview (= 7.2.1.1) - activejob (= 7.2.1.1) - activemodel (= 7.2.1.1) - activerecord (= 7.2.1.1) - activestorage (= 7.2.1.1) - activesupport (= 7.2.1.1) + rails (8.0.2) + actioncable (= 8.0.2) + actionmailbox (= 8.0.2) + actionmailer (= 8.0.2) + actionpack (= 8.0.2) + actiontext (= 8.0.2) + actionview (= 8.0.2) + activejob (= 8.0.2) + activemodel (= 8.0.2) + activerecord (= 8.0.2) + activestorage (= 8.0.2) + activesupport (= 8.0.2) bundler (>= 1.15.0) - railties (= 7.2.1.1) + railties (= 8.0.2) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -305,9 +307,9 @@ GEM actionview (> 3.1) activesupport (> 3.1) railties (> 3.1) - railties (7.2.1.1) - actionpack (= 7.2.1.1) - activesupport (= 7.2.1.1) + railties (8.0.2) + actionpack (= 8.0.2) + activesupport (= 8.0.2) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) @@ -376,8 +378,8 @@ GEM activesupport (>= 5.2) sprockets (>= 3.0.0) spy (1.0.2) - sqlite3 (2.0.4-arm64-darwin) - sqlite3 (2.0.4-x86_64-linux-gnu) + sqlite3 (2.6.0-arm64-darwin) + sqlite3 (2.6.0-x86_64-linux-gnu) state_machines (0.5.0) state_machines-activemodel (0.8.0) activemodel (>= 5.1) @@ -393,6 +395,7 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.6.0) + uri (1.0.3) useragent (0.16.10) validate_url (1.0.15) activemodel (>= 3.0.0) @@ -429,7 +432,7 @@ DEPENDENCIES shipit-engine! simplecov spy - sqlite3 + sqlite3 (>= 2.1) webmock BUNDLED WITH diff --git a/shipit-engine.gemspec b/shipit-engine.gemspec index 8a641800e..938f7b825 100644 --- a/shipit-engine.gemspec +++ b/shipit-engine.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,db,lib,vendor}/**/*", "LICENSE", "Rakefile", "README.md"] s.test_files = Dir["test/**/*"] - Dir["test/dummy/tmp/**/*"] - Dir["test/dummy/log/**/*"] - s.required_ruby_version = '>= 3.1.0' + s.required_ruby_version = '>= 3.2.0' s.add_dependency('active_model_serializers', '~> 0.9.3') s.add_dependency('ansi_stream', '~> 0.0.6') @@ -34,7 +34,7 @@ Gem::Specification.new do |s| s.add_dependency('omniauth-github', '~> 1.4') s.add_dependency('paquito') s.add_dependency('pubsubstub', '~> 0.2.0') - s.add_dependency('rails', '~> 7.2.1') + s.add_dependency('rails', '~> 8.0.1') s.add_dependency('rails_autolink', '~> 1.1.6') s.add_dependency('rails-timeago', '~> 2.13.0') s.add_dependency('rake') diff --git a/template.rb b/template.rb index dd2fa735f..a81969a7f 100644 --- a/template.rb +++ b/template.rb @@ -3,8 +3,8 @@ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.1') raise Thor::Error, "You need at least Ruby 3.1 to install shipit" end -if Gem::Version.new(Rails::VERSION::STRING) < Gem::Version.new('7.2') - raise Thor::Error, "You need Rails 7.2 to install shipit" +if Gem::Version.new(Rails::VERSION::STRING) < Gem::Version.new('8.0') + raise Thor::Error, "You need Rails 8.0 to install shipit" end route %(mount Shipit::Engine, at: '/') @@ -124,7 +124,7 @@ end CODE -inject_into_file 'config/application.rb', after: "load_defaults 7.2\n" do +inject_into_file 'config/application.rb', after: "load_defaults 8.0\n" do "\n config.active_job.queue_adapter = :sidekiq\n" end diff --git a/test/dummy/config/application.rb b/test/dummy/config/application.rb index e97da196a..7a77a61e6 100644 --- a/test/dummy/config/application.rb +++ b/test/dummy/config/application.rb @@ -17,7 +17,7 @@ module Shipit class Application < Rails::Application - config.load_defaults 7.2 + config.load_defaults 8.0 config.active_record.encryption.support_sha1_for_non_deterministic_encryption = true end end