Skip to content

Commit 9b4d42b

Browse files
committed
add Rails 7.0 and older Rubies to test suite
1 parent bcc3a0a commit 9b4d42b

5 files changed

Lines changed: 55 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@ jobs:
88
gemfile:
99
- Gemfile
1010
- gemfiles/Gemfile-rails-main
11+
- gemfiles/Gemfile-rails-7-0
1112
- gemfiles/Gemfile-rails-7-1
1213
- gemfiles/Gemfile-rails-7-2
1314
- gemfiles/Gemfile-rails-8-0
1415
ruby:
1516
- '3.3'
1617
- '3.2'
18+
- '3.1'
19+
- '3.0'
20+
- '2.7'
1721
env:
1822
- DEVISE_ORM=active_record
1923
- DEVISE_ORM=mongoid
@@ -22,6 +26,28 @@ jobs:
2226
env: DEVISE_ORM=mongoid
2327
- gemfile: gemfiles/Gemfile-rails-main
2428
env: DEVISE_ORM=mongoid
29+
- gemfile: Gemfile
30+
ruby: '3.1'
31+
- gemfile: Gemfile
32+
ruby: '3.0'
33+
- gemfile: Gemfile
34+
ruby: '2.7'
35+
- gemfile: gemfiles/Gemfile-rails-main
36+
ruby: '3.1'
37+
- gemfile: gemfiles/Gemfile-rails-main
38+
ruby: '3.0'
39+
- gemfile: gemfiles/Gemfile-rails-main
40+
ruby: '2.7'
41+
- gemfile: gemfiles/Gemfile-rails-8-0
42+
ruby: '3.1'
43+
- gemfile: gemfiles/Gemfile-rails-8-0
44+
ruby: '3.0'
45+
- gemfile: gemfiles/Gemfile-rails-8-0
46+
ruby: '2.7'
47+
- gemfile: gemfiles/Gemfile-rails-7-2
48+
ruby: '3.0'
49+
- gemfile: gemfiles/Gemfile-rails-7-2
50+
ruby: '2.7'
2551
runs-on: ubuntu-latest
2652
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
2753
BUNDLE_GEMFILE: ${{ matrix.gemfile }}

gemfiles/Gemfile-rails-7-0

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
source "https://rubygems.org"
2+
3+
gemspec path: ".."
4+
5+
gem "rails", "~> 7.0.0"
6+
gem "omniauth"
7+
gem "omniauth-oauth2"
8+
gem "rdoc"
9+
10+
gem "rails-controller-testing", github: "rails/rails-controller-testing"
11+
12+
gem "responders", "~> 3.1"
13+
14+
group :test do
15+
gem "omniauth-facebook"
16+
gem "omniauth-openid"
17+
gem "rexml"
18+
gem "timecop"
19+
gem "webrat", "0.7.3", require: false
20+
gem "mocha", "~> 2.1", require: false
21+
end
22+
23+
platforms :ruby do
24+
gem "sqlite3", "~> 1.4"
25+
end

gemfiles/Gemfile-rails-7-1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ group :test do
1616
gem "omniauth-openid"
1717
gem "rexml"
1818
gem "timecop"
19-
gem 'webrat'
19+
gem "webrat"
2020
gem "mocha", "~> 2.1", require: false
2121
end
2222

2323
platforms :ruby do
24-
gem "sqlite3", "~> 2.1"
24+
gem "sqlite3", "~> 1.4"
2525
end

test/rails_app/config/application.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
require File.expand_path('../boot', __FILE__)
44

5+
require "logger"
56
require "action_controller/railtie"
67
require "action_mailer/railtie"
78
require "rails/test_unit/railtie"

test/support/webrat/matchers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Matchers
44
class HaveSelector
55
def query
66
Nokogiri::CSS.parse(@expected.to_s).map do |ast|
7-
if ::Gem::Version.new(Nokogiri::VERSION) < ::Gem::Version.new('1.18')
7+
if ::Gem::Version.new(Nokogiri::VERSION) < ::Gem::Version.new('1.17.2')
88
ast.to_xpath('//', Nokogiri::CSS::XPathVisitor.new)
99
else
1010
ast.to_xpath(Nokogiri::CSS::XPathVisitor.new)

0 commit comments

Comments
 (0)