Skip to content

Support through Rails 8 with Green CI #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,24 @@ jobs:
test_matrix:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version: ['2.6.9', '2.7.6', 'jruby-9.3.0.0']
ruby-version: ['2.7.6', 'jruby-9.4.11.0']
gemfile:
- rails_52
- rails_60
- rails_61
include:
- ruby-version: 2.7.6
gemfile: rails_70
exclude:
- ruby-version: 2.7.6
gemfile: rails_52
- ruby-version: 3.1.5
gemfile: rails_71
- ruby-version: 3.2.7
gemfile: rails_72
- ruby-version: 3.3.7
gemfile: rails_80




env:
RAILS_ENV: test
Expand Down
37 changes: 33 additions & 4 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,17 +1,46 @@
# https://github.com/thoughtbot/appraisal

appraise "rails-52" do
gem 'activerecord', '~> 5.2.0'
end

appraise "rails-60" do
gem 'activerecord', '~> 6.0.0'

# https://github.com/rails/rails/issues/54271
gem "concurrent-ruby", "< 1.3.5"

gem 'sqlite3', ">= 1.4.0", "< 2", :platform => [:ruby, :mswin]
end

appraise "rails-61" do
gem 'activerecord', '~> 6.1.0'

# https://github.com/rails/rails/issues/54271
gem "concurrent-ruby", "< 1.3.5"

gem 'sqlite3', ">= 1.4.0", "< 2", :platform => [:ruby, :mswin]
end

appraise "rails-70" do
gem 'activerecord', '~> 7.0.0'

# https://github.com/rails/rails/issues/54271
gem "concurrent-ruby", "< 1.3.5"

gem 'sqlite3', ">= 1.4.0", "< 2", :platform => [:ruby, :mswin]
end

appraise "rails-71" do
gem 'activerecord', '~> 7.1.0'

gem 'sqlite3', ">= 1.4.0", "< 3.0", :platform => [:ruby, :mswin]
end

appraise "rails-72" do
gem 'activerecord', '~> 7.2.0'

gem 'sqlite3', ">= 1.4.0", "< 3.0", :platform => [:ruby, :mswin]
end

appraise "rails-80" do
gem 'activerecord', '~> 8.0.0'

gem 'sqlite3', ">= 1.4.0", "< 3.0", :platform => [:ruby, :mswin]
end
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ group :test do
gem 'redcarpet', :platform => :ruby # For fast, Github-like Markdown
gem 'kramdown', :platform => :jruby # For Markdown without a C compiler
gem 'test-unit'

# This version of sqlite3 oughta be good for activerecord 5.1+ hopefully
gem 'sqlite3', ">= 1.4.0", "< 2.0", :platform => [:ruby, :mswin]
end
3 changes: 2 additions & 1 deletion gemfiles/rails_60.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ source "http://rubygems.org"

gem "jruby-openssl", platform: :jruby
gem "activerecord", "~> 6.0.0"
gem "concurrent-ruby", "< 1.3.5"
gem "sqlite3", ">= 1.4.0", "< 2", platform: [:ruby, :mswin]

group :test do
gem "activerecord-jdbcsqlite3-adapter", platform: [:jruby]
Expand All @@ -13,7 +15,6 @@ group :test do
gem "redcarpet", platform: :ruby
gem "kramdown", platform: :jruby
gem "test-unit"
gem "sqlite3", ">= 1.4.0", "< 2.0", platform: [:ruby, :mswin]
end

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails_61.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ source "http://rubygems.org"

gem "jruby-openssl", platform: :jruby
gem "activerecord", "~> 6.1.0"
gem "concurrent-ruby", "< 1.3.5"
gem "sqlite3", ">= 1.4.0", "< 2", platform: [:ruby, :mswin]

group :test do
gem "activerecord-jdbcsqlite3-adapter", platform: [:jruby]
Expand All @@ -13,7 +15,6 @@ group :test do
gem "redcarpet", platform: :ruby
gem "kramdown", platform: :jruby
gem "test-unit"
gem "sqlite3", ">= 1.4.0", "< 2.0", platform: [:ruby, :mswin]
end

gemspec path: "../"
3 changes: 2 additions & 1 deletion gemfiles/rails_70.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ source "http://rubygems.org"

gem "jruby-openssl", platform: :jruby
gem "activerecord", "~> 7.0.0"
gem "concurrent-ruby", "< 1.3.5"
gem "sqlite3", ">= 1.4.0", "< 2", platform: [:ruby, :mswin]

group :test do
gem "activerecord-jdbcsqlite3-adapter", platform: [:jruby]
Expand All @@ -13,7 +15,6 @@ group :test do
gem "redcarpet", platform: :ruby
gem "kramdown", platform: :jruby
gem "test-unit"
gem "sqlite3", ">= 1.4.0", "< 2.0", platform: [:ruby, :mswin]
end

gemspec path: "../"
4 changes: 2 additions & 2 deletions gemfiles/rails_52.gemfile → gemfiles/rails_71.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
source "http://rubygems.org"

gem "jruby-openssl", platform: :jruby
gem "activerecord", "~> 5.2.0"
gem "activerecord", "~> 7.1.0"
gem "sqlite3", ">= 1.4.0", "< 3.0", platform: [:ruby, :mswin]

group :test do
gem "activerecord-jdbcsqlite3-adapter", platform: [:jruby]
Expand All @@ -13,7 +14,6 @@ group :test do
gem "redcarpet", platform: :ruby
gem "kramdown", platform: :jruby
gem "test-unit"
gem "sqlite3", ">= 1.4.0", "< 2.0", platform: [:ruby, :mswin]
end

gemspec path: "../"
19 changes: 19 additions & 0 deletions gemfiles/rails_72.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "jruby-openssl", platform: :jruby
gem "activerecord", "~> 7.2.0"
gem "sqlite3", ">= 1.4.0", "< 3.0", platform: [:ruby, :mswin]

group :test do
gem "activerecord-jdbcsqlite3-adapter", platform: [:jruby]
gem "libxml-ruby", platform: [:ruby, :mswin]
gem "rake"
gem "yard"
gem "redcarpet", platform: :ruby
gem "kramdown", platform: :jruby
gem "test-unit"
end

gemspec path: "../"
19 changes: 19 additions & 0 deletions gemfiles/rails_80.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file was generated by Appraisal

source "http://rubygems.org"

gem "jruby-openssl", platform: :jruby
gem "activerecord", "~> 8.0.0"
gem "sqlite3", ">= 1.4.0", "< 3.0", platform: [:ruby, :mswin]

group :test do
gem "activerecord-jdbcsqlite3-adapter", platform: [:jruby]
gem "libxml-ruby", platform: [:ruby, :mswin]
gem "rake"
gem "yard"
gem "redcarpet", platform: :ruby
gem "kramdown", platform: :jruby
gem "test-unit"
end

gemspec path: "../"
4 changes: 3 additions & 1 deletion ruby-oai.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ Gem::Specification.new do |s|
s.add_dependency('builder', '>=3.1.0')
s.add_dependency('faraday', "< 3")
s.add_dependency("faraday-follow_redirects", ">= 0.3.0", "< 2")
s.add_dependency("rexml") # rexml becomes bundled gem in ruby 3.0


s.add_development_dependency "activerecord", ">= 5.2.0", "< 7.1"
s.add_development_dependency "activerecord", ">= 5.2.0", "< 8.1"
s.add_development_dependency "appraisal"
s.add_development_dependency "webrick"


s.files = %w(README.md Rakefile) +
Expand Down
6 changes: 5 additions & 1 deletion test/activerecord_provider/config/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@
ActiveRecord::MigrationContext.new(
File.join(File.dirname(__FILE__), '..', 'database')
).migrate
else
elsif ActiveRecord.version < Gem::Version.new("7.2.0")
ActiveRecord::MigrationContext.new(
File.join(File.dirname(__FILE__), '..', 'database'),
ActiveRecord::Base.connection.schema_migration
).migrate
else
ActiveRecord::MigrationContext.new(
File.join(File.dirname(__FILE__), '..', 'database')
).migrate
end

2 changes: 1 addition & 1 deletion test/client/tc_low_resolution_dates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class LowResolutionDatesTest < Test::Unit::TestCase

def test_low_res_date_parsing
client = OAI::Client.new 'http://authors.library.caltech.edu/cgi/oai2'
client = OAI::Client.new 'http://localhost:3333/oai'

date = Date.new 2003, 1, 1

Expand Down