Skip to content

Commit a545d6e

Browse files
authored
Merge pull request #107 from publify/test-with-supported-rails-versions
Test with all supported Rails versions
2 parents 49160f2 + 8b9d2f7 commit a545d6e

File tree

9 files changed

+67
-3
lines changed

9 files changed

+67
-3
lines changed

.github/workflows/ruby.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ jobs:
2626
strategy:
2727
matrix:
2828
ruby: ["3.0", "3.1", "3.2", "3.3"]
29+
gemfile:
30+
- rails_61
31+
- rails_70
32+
- rails_71
33+
34+
env:
35+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
2936

3037
steps:
3138
- uses: actions/checkout@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.bundle/
22
Gemfile.lock
3+
gemfiles/*.lock
34
coverage/
45
log/*.log
56
pkg/

Appraisals

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# frozen_string_literal: true
2+
3+
# HACK: This uses odd syntax to make appraisal customization work on newer Rubies.
4+
# See https://github.com/thoughtbot/appraisal/pull/214. Once that one has been
5+
# released, we should use customize_gemfiles instead.
6+
Customize.new heading: <<~HEADING.chomp
7+
frozen_string_literal: true
8+
9+
This file was generated by Appraisal
10+
HEADING
11+
12+
appraise "rails_61" do
13+
gem "rails", "~> 6.1.0"
14+
end
15+
16+
appraise "rails_70" do
17+
gem "rails", "~> 7.0.0"
18+
end
19+
20+
appraise "rails_71" do
21+
gem "rails", "~> 7.1.0"
22+
end

gemfiles/rails_61.gemfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# frozen_string_literal: true
2+
3+
# This file was generated by Appraisal
4+
5+
source "https://rubygems.org"
6+
7+
gem "publify_core", git: "https://github.com/publify/publify_core.git"
8+
gem "rails", "~> 6.1.0"
9+
10+
gemspec path: "../"

gemfiles/rails_70.gemfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# frozen_string_literal: true
2+
3+
# This file was generated by Appraisal
4+
5+
source "https://rubygems.org"
6+
7+
gem "publify_core", git: "https://github.com/publify/publify_core.git"
8+
gem "rails", "~> 7.0.0"
9+
10+
gemspec path: "../"

gemfiles/rails_71.gemfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# frozen_string_literal: true
2+
3+
# This file was generated by Appraisal
4+
5+
source "https://rubygems.org"
6+
7+
gem "publify_core", git: "https://github.com/publify/publify_core.git"
8+
gem "rails", "~> 7.1.0"
9+
10+
gemspec path: "../"

lib/tasks/manifest.rake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
namespace :manifest do
44
def gemmable_files
55
`git ls-files -z`.split("\x0").reject do |file|
6-
file.match(%r{^(bin|spec)/}) ||
6+
file.match(%r{^(bin|spec|gemfiles)/}) ||
77
file.end_with?("/.keep") ||
88
file.start_with?(".") ||
9-
%w(Manifest.txt Gemfile Rakefile publify_textfilter_code.gemspec).include?(file)
9+
%w(Manifest.txt Gemfile Rakefile Appraisals publify_textfilter_code.gemspec)
10+
.include?(file)
1011
end
1112
end
1213

publify_textfilter_code.gemspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ Gem::Specification.new do |s|
2222
s.add_dependency "htmlentities", "~> 4.3"
2323
s.add_dependency "publify_core", "~> 10.0.0"
2424

25-
s.add_development_dependency "rspec-rails", "~> 7.1"
25+
s.add_development_dependency "appraisal", "~> 2.3"
26+
s.add_development_dependency "rspec-rails", "~> 6.0"
2627
s.add_development_dependency "rubocop", "~> 1.77.0"
2728
s.add_development_dependency "rubocop-performance", "~> 1.25.0"
2829
s.add_development_dependency "rubocop-rails", "~> 2.32.0"

spec/dummy/config/application.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
require_relative "boot"
44

5+
# FIXME: Remove after support for Rails < 7.1 is dropped
6+
require "logger"
57
require "rails"
68
# Pick the frameworks you want:
79
require "active_model/railtie"

0 commit comments

Comments
 (0)