Skip to content

Commit b6a9c2b

Browse files
authored
Merge pull request #115 from n-rodriguez/wip/rails8
2 parents e5ca108 + b74426a commit b6a9c2b

16 files changed

+189
-101
lines changed

.github/workflows/ruby.yml

+56-37
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,82 @@
11
name: Ruby
22

33
on:
4-
# Trigger the workflow on push or pull request,
5-
# but only for the master branch
64
push:
75
branches:
8-
- master
6+
- '**'
97
pull_request:
108
branches:
11-
- master
9+
- '**'
1210

1311
jobs:
1412
build:
15-
env:
16-
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
13+
runs-on: ubuntu-latest
14+
1715
strategy:
1816
fail-fast: false
1917
matrix:
20-
ruby_version: [3.1, "3.0", 2.7, 2.6, jruby]
21-
gemfile:
22-
[
23-
Gemfile,
24-
gemfiles/rails_5.gemfile,
25-
gemfiles/rails_6.gemfile,
26-
gemfiles/rails_7.gemfile,
27-
]
28-
exclude:
29-
# Ruby 3.1 is not supported by Rails 5.2.x
30-
- ruby_version: 3.1
31-
gemfile: gemfiles/rails_5.gemfile,
18+
ruby:
19+
- '3.3'
20+
- '3.2'
21+
- '3.1'
22+
- '3.0'
23+
- '2.7'
24+
- jruby
25+
rails:
26+
- rails_7.2
27+
- rails_7.1
28+
- rails_7.0
29+
- rails_6.1
30+
- rails_6.0
31+
- rails_5.2
32+
- rails_5.1
33+
- rails_5.0
3234

33-
# Ruby 3.x is not supported by Rails 5.2.x
34-
- ruby_version: 3.0
35-
gemfile: gemfiles/rails_5.gemfile,
35+
exclude:
36+
- ruby: '2.7'
37+
rails: 'rails_7.2'
3638

37-
# Ruby 2.6.x is not supported by Rails 7.0.x
38-
- ruby_version: 2.6
39-
gemfile: gemfiles/rails_7.gemfile
39+
- ruby: '3.0'
40+
rails: 'rails_5.0'
41+
- ruby: '3.0'
42+
rails: 'rails_5.1'
43+
- ruby: '3.0'
44+
rails: 'rails_5.2'
45+
- ruby: '3.0'
46+
rails: 'rails_7.2'
4047

41-
# Ruby 2.6.x is not supported by this Gemfile
42-
- ruby_version: 2.6
43-
gemfile: Gemfile
48+
- ruby: '3.1'
49+
rails: 'rails_5.0'
50+
- ruby: '3.1'
51+
rails: 'rails_5.1'
52+
- ruby: '3.1'
53+
rails: 'rails_5.2'
4454

45-
# JRuby is not supported by Rails 7.0.x
46-
- ruby_version: jruby
47-
gemfile: gemfiles/rails_7.gemfile
55+
- ruby: '3.2'
56+
rails: 'rails_5.0'
57+
- ruby: '3.2'
58+
rails: 'rails_5.1'
59+
- ruby: '3.2'
60+
rails: 'rails_5.2'
4861

49-
# JRuby is not supported by this Gemfile
50-
- ruby_version: jruby
51-
gemfile: Gemfile
62+
- ruby: '3.3'
63+
rails: 'rails_5.0'
64+
- ruby: '3.3'
65+
rails: 'rails_5.1'
66+
- ruby: '3.3'
67+
rails: 'rails_5.2'
5268

53-
runs-on: ubuntu-latest
69+
env:
70+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.rails }}.gemfile
5471

5572
steps:
56-
- uses: actions/checkout@v2
73+
- uses: actions/checkout@v4
74+
5775
- name: Set up Ruby
5876
uses: ruby/setup-ruby@v1
5977
with:
60-
ruby-version: ${{ matrix.ruby_version }}
61-
bundler-cache: true # 'bundle install' and cache
78+
ruby-version: ${{ matrix.ruby }}
79+
bundler-cache: true
80+
6281
- name: Build and test with Rake
6382
run: bundle exec rake

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ tmp/
44
gemfiles/*.lock
55
gemfiles/vendor
66
stdout
7+
.DS_Store

Appraisals

+28-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
1-
appraise 'rails-4' do
2-
gem 'rails', '~> 4'
1+
appraise 'rails_5.0' do
2+
gem 'rails', '~> 5.0.0'
33
end
44

5-
appraise 'rails-5' do
6-
gem 'rails', '~> 5'
5+
appraise 'rails_5.1' do
6+
gem 'rails', '~> 5.1.0'
7+
end
8+
9+
appraise 'rails_5.2' do
10+
gem 'rails', '~> 5.2.0'
11+
end
12+
13+
appraise 'rails_6.0' do
14+
gem 'rails', '~> 6.0.0'
15+
end
16+
17+
appraise 'rails_6.1' do
18+
gem 'rails', '~> 6.1.0'
19+
end
20+
21+
appraise 'rails_7.0' do
22+
gem 'rails', '~> 7.0.0'
23+
end
24+
25+
appraise 'rails_7.1' do
26+
gem 'rails', '~> 7.1.0'
27+
end
28+
29+
appraise 'rails_7.2' do
30+
gem 'rails', '~> 7.2.0'
731
end

Gemfile

+5-26
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,8 @@
11
source "https://rubygems.org"
22
gemspec
33

4-
# if ::File.directory?(gem_path = "../redis-store")
5-
# gem "redis-store", [">= 1.2.0", "< 1.4"], path: gem_path
6-
# end
7-
8-
# if ::File.directory?(gem_path = "../redis-rack")
9-
# gem "redis-rack", "~> 2.0.0.pre", path: gem_path
10-
# end
11-
12-
# if ::File.directory?(gem_path = "../redis-activesupport")
13-
# gem "redis-activesupport", '>= 4.0.0', '< 5.1', path: gem_path
14-
# end
15-
16-
# if ::File.directory?(gem_path = "../redis-actionpack")
17-
# gem "redis-actionpack", ">= 4.0.0", '< 5.1', path: gem_path
18-
# end
19-
20-
version = ENV["RAILS_VERSION"] || '7'
21-
22-
rails = case version
23-
when "master"
24-
{:github => "rails/rails"}
25-
else
26-
"~> #{version}.0"
27-
end
28-
29-
gem "rails", rails
4+
gem 'appraisal', git: 'https://github.com/thoughtbot/appraisal.git'
5+
gem "minitest", [">= 4.2", "< 6"]
6+
gem "mocha", "~> 0.14.0"
7+
gem 'rake', '>= 12.3.3'
8+
gem "redis-store-testing"

gemfiles/rails_5.0.gemfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6+
gem "minitest", [">= 4.2", "< 6"]
7+
gem "mocha", "~> 0.14.0"
8+
gem "rake", ">= 12.3.3"
9+
gem "redis-store-testing"
10+
gem "rails", "~> 5.0.0"
11+
12+
gemspec path: "../"

gemfiles/rails_5.1.gemfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6+
gem "minitest", [">= 4.2", "< 6"]
7+
gem "mocha", "~> 0.14.0"
8+
gem "rake", ">= 12.3.3"
9+
gem "redis-store-testing"
10+
gem "rails", "~> 5.1.0"
11+
12+
gemspec path: "../"

gemfiles/rails_5.2.gemfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6+
gem "minitest", [">= 4.2", "< 6"]
7+
gem "mocha", "~> 0.14.0"
8+
gem "rake", ">= 12.3.3"
9+
gem "redis-store-testing"
10+
gem "rails", "~> 5.2.0"
11+
12+
gemspec path: "../"

gemfiles/rails_5.gemfile

-7
This file was deleted.

gemfiles/rails_6.0.gemfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6+
gem "minitest", [">= 4.2", "< 6"]
7+
gem "mocha", "~> 0.14.0"
8+
gem "rake", ">= 12.3.3"
9+
gem "redis-store-testing"
10+
gem "rails", "~> 6.0.0"
11+
12+
gemspec path: "../"

gemfiles/rails_6.1.gemfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6+
gem "minitest", [">= 4.2", "< 6"]
7+
gem "mocha", "~> 0.14.0"
8+
gem "rake", ">= 12.3.3"
9+
gem "redis-store-testing"
10+
gem "rails", "~> 6.1.0"
11+
12+
gemspec path: "../"

gemfiles/rails_6.gemfile

-7
This file was deleted.

gemfiles/rails_7.0.gemfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6+
gem "minitest", [">= 4.2", "< 6"]
7+
gem "mocha", "~> 0.14.0"
8+
gem "rake", ">= 12.3.3"
9+
gem "redis-store-testing"
10+
gem "rails", "~> 7.0.0"
11+
12+
gemspec path: "../"

gemfiles/rails_7.1.gemfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6+
gem "minitest", [">= 4.2", "< 6"]
7+
gem "mocha", "~> 0.14.0"
8+
gem "rake", ">= 12.3.3"
9+
gem "redis-store-testing"
10+
gem "rails", "~> 7.1.0"
11+
12+
gemspec path: "../"

gemfiles/rails_7.2.gemfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was generated by Appraisal
2+
3+
source "https://rubygems.org"
4+
5+
gem "appraisal", git: "https://github.com/thoughtbot/appraisal.git"
6+
gem "minitest", [">= 4.2", "< 6"]
7+
gem "mocha", "~> 0.14.0"
8+
gem "rake", ">= 12.3.3"
9+
gem "redis-store-testing"
10+
gem "rails", "~> 7.2.0"
11+
12+
gemspec path: "../"

gemfiles/rails_7.gemfile

-7
This file was deleted.

redis-rails.gemspec

+3-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- encoding: utf-8 -*-
2-
$:.push File.expand_path("../lib", __FILE__)
3-
require "redis-rails/version"
2+
3+
require_relative "lib/redis-rails/version"
44

55
Gem::Specification.new do |s|
66
s.name = "redis-rails"
@@ -12,18 +12,8 @@ Gem::Specification.new do |s|
1212
s.description = %q{Redis for Ruby on Rails}
1313
s.license = 'MIT'
1414

15-
s.files = `git ls-files`.split("\n")
16-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18-
s.require_paths = ["lib"]
15+
s.files = `git ls-files`.split("\n")
1916

2017
s.add_dependency "redis-activesupport", [">= 3.0", "< 8"]
2118
s.add_dependency "redis-actionpack", [">= 3.0", "< 8"]
22-
23-
s.add_development_dependency 'rake', '>= 12.3.3'
24-
s.add_development_dependency "bundler", "~> 2"
25-
s.add_development_dependency "mocha", "~> 0.14.0"
26-
s.add_development_dependency "minitest", [">= 4.2", "< 6"]
27-
s.add_development_dependency "redis-store-testing"
28-
s.add_development_dependency 'appraisal'
2919
end

0 commit comments

Comments
 (0)