Skip to content

Commit ee1f243

Browse files
Update to allow for rails 8 compatibility
1 parent f86162e commit ee1f243

File tree

3 files changed

+37
-23
lines changed

3 files changed

+37
-23
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
gemfile:
17-
- Gemfile.rails-6.1-stable
18-
- Gemfile.rails-7.0-stable
19-
- Gemfile.rails-7.2-stable
20-
ruby-version: ['3.1', '3.0']
21-
exclude:
22-
- gemfile: Gemfile.rails-7.2-stable
23-
ruby-version: "3.0"
17+
- { gemfile: Gemfile.rails-6.1-stable, ruby-version: '3.0' }
18+
- { gemfile: Gemfile.rails-6.1-stable, ruby-version: '3.1' }
19+
- { gemfile: Gemfile.rails-7.0-stable, ruby-version: '3.1' }
20+
- { gemfile: Gemfile.rails-7.0-stable, ruby-version: '3.2' }
21+
# Rails 7.2 with Ruby 3.1+
22+
- { gemfile: Gemfile.rails-7.2-stable, ruby-version: '3.1' }
23+
- { gemfile: Gemfile.rails-7.2-stable, ruby-version: '3.2' }
24+
- { gemfile: Gemfile.rails-7.2-stable, ruby-version: '3.3' }
25+
# Rails 8.0 with Ruby 3.2+
26+
- { gemfile: Gemfile.rails-8.0-stable, ruby-version: '3.2' }
27+
- { gemfile: Gemfile.rails-8.0-stable, ruby-version: '3.3' }
2428
env:
2529
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}
2630
steps:

gemfiles/Gemfile.rails-8.0-stable

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
4+
5+
gemspec path: ".."
6+
7+
gem "activerecord", github: "rails/rails", branch: "8-0-stable"

polymorphic_integer_type.gemspec

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
1-
# coding: utf-8
2-
lib = File.expand_path('../lib', __FILE__)
1+
# frozen_string_literal: true
2+
3+
lib = File.expand_path('lib', __dir__)
34
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
45
require 'polymorphic_integer_type/version'
56

67
Gem::Specification.new do |spec|
7-
spec.name = "polymorphic_integer_type"
8+
spec.name = 'polymorphic_integer_type'
89
spec.version = PolymorphicIntegerType::VERSION
9-
spec.authors = ["Kyle d'Oliveira"]
10-
spec.email = ["[email protected]"]
11-
spec.description = %q{Allows the *_type field in the DB to be an integer rather than a string}
12-
spec.summary = %q{Use integers rather than strings for the _type field}
13-
spec.homepage = ""
14-
spec.license = "MIT"
10+
spec.authors = ['Kyle d\'Oliveira']
11+
spec.email = ['[email protected]']
12+
spec.description = 'Allows the *_type field in the DB to be an integer rather than a string'
13+
spec.summary = 'Use integers rather than strings for the _type field'
14+
spec.homepage = ''
15+
spec.license = 'MIT'
16+
17+
spec.required_ruby_version = '>= 3.0'
1518

1619
spec.files = `git ls-files -- . ':!.github/'`.split($/)
1720
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
1821
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19-
spec.require_paths = ["lib"]
22+
spec.require_paths = ['lib']
2023

21-
spec.add_dependency "activerecord", "< 8"
22-
spec.add_development_dependency "bundler"
23-
spec.add_development_dependency "rake"
24-
spec.add_development_dependency "rspec"
25-
spec.add_development_dependency "sqlite3"
26-
spec.add_development_dependency "pry-byebug"
24+
spec.add_dependency 'activerecord', '< 9.0'
25+
spec.add_development_dependency 'bundler'
26+
spec.add_development_dependency 'pry-byebug'
27+
spec.add_development_dependency 'rake'
28+
spec.add_development_dependency 'rspec'
29+
spec.add_development_dependency 'sqlite3'
2730
end

0 commit comments

Comments
 (0)