Skip to content

Commit f106e54

Browse files
authored
Merge pull request #109 from publify/test-with-supported-rails-versions
Test with all supported Rails versions
2 parents 4ffabf4 + 4022a86 commit f106e54

File tree

9 files changed

+71
-2
lines changed

9 files changed

+71
-2
lines changed

.github/workflows/ruby.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ jobs:
2626
strategy:
2727
matrix:
2828
ruby: ["3.2", "3.3", "3.4"]
29+
gemfile:
30+
- rails_61
31+
- rails_70
32+
- rails_71
33+
exclude:
34+
- ruby: "3.4"
35+
gemfile: rails_61
36+
- ruby: "3.4"
37+
gemfile: rails_70
38+
39+
env:
40+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
2941

3042
steps:
3143
- 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_amazon_sidebar.gemspec).include?(file)
9+
%w(Manifest.txt Gemfile Rakefile Appraisals publify_amazon_sidebar.gemspec)
10+
.include?(file)
1011
end
1112
end
1213

publify_amazon_sidebar.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
2222

2323
spec.add_dependency "publify_core", "~> 10.0.0"
2424

25+
spec.add_development_dependency "appraisal", "~> 2.5"
2526
spec.add_development_dependency "rspec-rails", "~> 6.0"
2627
spec.add_development_dependency "rubocop", "~> 1.77.0"
2728
spec.add_development_dependency "rubocop-capybara", "~> 2.21.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)