Skip to content
Closed
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/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,26 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
ruby-version: "3.2"
bundler-cache: true
- run: bundle exec standardrb --parallel --format github
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [3.1, 3.2, head, debug, jruby-head, truffleruby-head]
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
ruby: ["3.2", "3.3", "3.4", "4.0", head]
gemfile: [rails-7.2, rails-8.0, rails-8.1]
include:
- { ruby: jruby-10.0, gemfile: rails-8.0 }
- { ruby: jruby-10.0, gemfile: rails-8.1 }
continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- run: bundle install
- run: bundle exec rspec
bundler-cache: true
- run: bundle exec appraisal generate
- run: bundle exec appraisal ${{ matrix.gemfile }} bundle install
- run: bundle exec appraisal ${{ matrix.gemfile }} rspec
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/Gemfile.lock
gemfiles/*.gemfile
gemfiles/*.gemfile.lock
/.DS_Store
/.bundle/
/.ruby-*
Expand Down
16 changes: 16 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

appraise "rails-7.2" do
gem "activemodel", "~> 7.2.0"
gem "activesupport", "~> 7.2.0"
end

appraise "rails-8.0" do
gem "activemodel", "~> 8.0.0"
gem "activesupport", "~> 8.0.0"
end

appraise "rails-8.1" do
gem "activemodel", "~> 8.1.0"
gem "activesupport", "~> 8.1.0"
end
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ since Active Remote depends on specific Rails versions.

## [Unreleased]

### Added

- Support ActiveModel/ActiveSupport 8.0 and 8.1 (now allows `>= 7.2, < 8.2`)
- Test against Rails 7.2, 8.0, and 8.1 via Appraisal, including a JRuby 10.0 leg for the 8.x line

### Changed

- Require Ruby 3.2 (to match Rails 8)
- Fix Standard violations

## [7.2.0] – 2026-02-13
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ source "https://rubygems.org"
# Specify your gem's dependencies in active_remote.gemspec
gemspec

gem "appraisal"

gem "benchmark-ips"

gem "protobuf-rspec", ">= 1.1.2"
Expand Down
6 changes: 3 additions & 3 deletions active_remote.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.description = "Active Remote provides Active Record-like object-relational mapping over RPC. It was written for use with Google Protocol Buffers, but could be extended to use any RPC data format."
spec.homepage = "https://github.com/liveh2o/active_remote"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.1.0"
spec.required_ruby_version = ">= 3.2.0"

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
Expand All @@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
##
# Dependencies
#
spec.add_dependency "activemodel", "~> 7.2.0"
spec.add_dependency "activesupport", "~> 7.2.0"
spec.add_dependency "activemodel", ">= 7.2", "< 8.2"
spec.add_dependency "activesupport", ">= 7.2", "< 8.2"
spec.add_dependency "protobuf", ">= 3.0"
end
8 changes: 4 additions & 4 deletions spec/lib/active_remote/association_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@
end

context "when user_guid doesnt exist on model " do
before { allow(subject.class).to receive_message_chain(:public_instance_methods, :include?).with(:user_guid).and_return(false) }
before { allow(subject.class).to receive(:public_method_defined?).with(:user_guid).and_return(false) }

it "raises an error" do
expect { subject.user }.to raise_error(::RuntimeError, /Could not find attribute/)
end
end

context "when user_guid doesnt exist on associated model " do
before { allow(Author).to receive_message_chain(:public_instance_methods, :include?).with(:user_guid).and_return(false) }
before { allow(Author).to receive(:public_method_defined?).with(:user_guid).and_return(false) }

it "raises an error" do
expect { subject.user }.to raise_error(::RuntimeError, /Could not find attribute/)
Expand Down Expand Up @@ -158,7 +158,7 @@
end

context "when user_guid doesnt exist on associated model " do
before { allow(Post).to receive_message_chain(:public_instance_methods, :include?).with(:user_guid).and_return(false) }
before { allow(Post).to receive(:public_method_defined?).with(:user_guid).and_return(false) }

it "raises an error" do
expect { subject.user_posts }.to raise_error(::RuntimeError, /Could not find attribute/)
Expand Down Expand Up @@ -246,7 +246,7 @@
end

context "when user_guid doesnt exist on associated model " do
before { allow(Author).to receive_message_chain(:public_instance_methods, :include?).with(:user_guid).and_return(false) }
before { allow(Author).to receive(:public_method_defined?).with(:user_guid).and_return(false) }

it "raises an error" do
expect { subject.chief_editor }.to raise_error(::RuntimeError, /Could not find attribute/)
Expand Down
Loading