Skip to content

Commit

Permalink
Merge pull request #2809 from rspec/rails-8
Browse files Browse the repository at this point in the history
Add Rails 8 to build
  • Loading branch information
JonRowe authored Nov 9, 2024
2 parents b819663 + 92db634 commit 8fe818e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 21 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
ruby-version: '3.3'
- run: script/update_rubygems_and_install_bundler
- run: bundle install --standalone
- run: bundle binstubs --all
Expand All @@ -44,6 +44,14 @@ jobs:
env:
RAILS_VERSION: 'main'

# Rails 8.0 builds >= 3.2
- ruby: 3.3
env:
RAILS_VERSION: '~> 8.0.0'
- ruby: 3.2
env:
RAILS_VERSION: '~> 8.0.0'

# Rails 7.2 builds >= 3.1
- ruby: 3.3
env:
Expand Down
10 changes: 9 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
### Development
[Full Changelog](https://github.com/rspec/rspec-rails/compare/v7.0.1...main)
[Full Changelog](https://github.com/rspec/rspec-rails/compare/v7.1.0...main)

### 7.1.0 / 2024-11-08
[Full Changelog](https://github.com/rspec/rspec-rails/compare/v7.0.1...v7.0.2)

Enhancements:

* Improve implicit description for ActionCable matchers `have_broadcasted_to` /
`have_broadcast`. (Simon Fish, #2795)
* Comment out `infer_spec_type_from_file_location!` in newly generated
`rails_helper.rb` files. (Jon Rowe, #2804)
* Allow turning off active job / mailer argument validation.
(Oli Peate, #2808)

### 7.0.2 / 2024-11-08
[Full Changelog](https://github.com/rspec/rspec-rails/compare/v7.0.1...v7.0.2)

Bug Fixes:

Expand Down
23 changes: 8 additions & 15 deletions Gemfile-rails-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ def add_net_gems_dependency
end
end

def add_sqlite3_gem_dependency
# sqlite3 is an optional, unspecified, dependency and Rails 6.0 only supports `~> 1.4`
def add_sqlite3_gem_dependency(rails_version)
# sqlite3 is an optional, unspecified, dependency and Rails 8.0 only supports `~> 2.0`
if RUBY_VERSION.to_f < 3
# sqlite3 1.7.x doesn't work on all platforms for Ruby 2.x
gem 'sqlite3', '~> 1.4', '< 1.7', platforms: [:ruby]
elsif rails_version.to_f >= 8
gem 'sqlite3', '~> 2.0', platforms: [:ruby]
else
gem 'sqlite3', '~> 1.4', platforms: [:ruby]
gem 'sqlite3', '~> 1.7', platforms: [:ruby]
end
end

Expand All @@ -29,21 +31,12 @@ when /main/
gem 'activerecord-jdbcsqlite3-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', platforms: [:jruby]
gem 'selenium-webdriver', require: false

# Rails 8 requires 2.0.0
gem 'sqlite3', '~> 2.0', platforms: [:ruby]
when /stable$/
gem_list = %w[rails railties actionmailer actionpack activerecord activesupport activejob actionview]
gem 'activerecord-jdbcsqlite3-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter', platforms: [:jruby]

gem_list.each do |rails_gem|
gem rails_gem, :git => "https://github.com/rails/rails.git", :branch => version
end
add_sqlite3_gem_dependency
when nil, false, ""
gem "rails", "~> 7.0.0"
gem "rails", "~> 8.0.0"
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
gem 'selenium-webdriver', require: false
add_sqlite3_gem_dependency
gem 'sqlite3', '~> 2.0', platforms: [:ruby]
else
version_number = version.split(' ').last
add_net_gems_dependency if version_number < '7.0'
Expand All @@ -58,5 +51,5 @@ else
else
gem 'selenium-webdriver', require: false
end
add_sqlite3_gem_dependency
add_sqlite3_gem_dependency(version_number)
end
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ According to [RSpec Rails new versioning strategy][] use:

## Installation

**IMPORTANT** This README / branch refers to the current development build.
See the [`7-0-maintenance` branch on Github](https://github.com/rspec/rspec-rails/tree/7-0-maintenance) if you want or require the latest stable release.
**IMPORTANT** This README / branch refers to the 7.1.x stable release series, only bugfixes from this series will
be added here. See the [`main` branch on Github](https://github.com/rspec/rspec-rails/tree/main) if you want or
require the latest unstable features.

1. Add `rspec-rails` to **both** the `:development` and `:test` groups
of your app’s `Gemfile`:
Expand Down
2 changes: 1 addition & 1 deletion example_app_generator/generate_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
elsif Rails::VERSION::STRING > '8'
gsub_file "Gemfile", /.*gem..sqlite3.*/, "gem 'sqlite3', '~> 2.0'"
else
gsub_file "Gemfile", /.*gem..sqlite3.*/, "gem 'sqlite3', '~> 1.4'"
gsub_file "Gemfile", /.*gem..sqlite3.*/, "gem 'sqlite3', '~> 1.7'"
end

# remove webdrivers
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec/rails/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Rails
# Version information for RSpec Rails.
module Version
# Current version of RSpec Rails, in semantic versioning format.
STRING = '7.1.0.pre'
STRING = '7.2.0.pre'
end
end
end

0 comments on commit 8fe818e

Please sign in to comment.