From a0e2bfb449ee2fce3e46a8e7e4a595eb557761ce Mon Sep 17 00:00:00 2001 From: Jan Graichen Date: Fri, 16 Oct 2026 00:38:49 +0200 Subject: [PATCH 1/3] chore!: Remove support for EOL Ruby and Rails versions --- .github/workflows/test.yml | 2 +- Appraisals | 7 ------- CHANGELOG.md | 2 ++ acfs.gemspec | 8 ++++---- gemfiles/rails_7.2.gemfile | 25 ------------------------- 5 files changed, 7 insertions(+), 37 deletions(-) delete mode 100644 gemfiles/rails_7.2.gemfile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8e948e3..ab0e250 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: ruby: ["4.0", "3.4", "3.3"] - rails: ["8.1", "8.0", "7.2"] + rails: ["8.1", "8.0"] env: BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.gemfile diff --git a/Appraisals b/Appraisals index 377aff4..7f27a63 100644 --- a/Appraisals +++ b/Appraisals @@ -14,13 +14,6 @@ appraise 'rails-8.0' do gem 'railties', '~> 8.0.0', require: 'rails' end -appraise 'rails-7.2' do - gem 'activesupport', '~> 7.2.0' - gem 'activemodel', '~> 7.2.0' - gem 'actionpack', '~> 7.2.0' - gem 'railties', '~> 7.2.0', require: 'rails' -end - appraise 'rails-master' do gem 'activesupport', github: 'rails/rails' gem 'activemodel', github: 'rails/rails' diff --git a/CHANGELOG.md b/CHANGELOG.md index 7727374..cc32af4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ ### Breaks +- Require Ruby 3.3+ and Rails 8.0+ + ## 2.2.1 - (2026-06-20) --- diff --git a/acfs.gemspec b/acfs.gemspec index ee80026..a40f12f 100644 --- a/acfs.gemspec +++ b/acfs.gemspec @@ -26,11 +26,11 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^bin/}) {|f| File.basename(f) } spec.require_paths = %w[lib] - spec.required_ruby_version = '>= 3.1.0' + spec.required_ruby_version = '>= 3.3.0' - spec.add_dependency 'actionpack', '>= 7.0' - spec.add_dependency 'activemodel', '>= 7.0' - spec.add_dependency 'activesupport', '>= 7.0' + spec.add_dependency 'actionpack', '>= 8.0' + spec.add_dependency 'activemodel', '>= 8.0' + spec.add_dependency 'activesupport', '>= 8.0' spec.add_dependency 'multi_json', '~> 1.21' spec.add_dependency 'opentelemetry-api', '~> 1.0' spec.add_dependency 'opentelemetry-common' diff --git a/gemfiles/rails_7.2.gemfile b/gemfiles/rails_7.2.gemfile deleted file mode 100644 index a3d1e17..0000000 --- a/gemfiles/rails_7.2.gemfile +++ /dev/null @@ -1,25 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "appraisal" -gem "rake" -gem "rspec", "~> 3.6" -gem "webmock", "~> 3.0" -gem "rake-release", "~> 1.0" -gem "activesupport", "~> 7.2.0" -gem "activemodel", "~> 7.2.0" -gem "actionpack", "~> 7.2.0" -gem "railties", "~> 7.2.0", require: "rails" - -group :development do - gem "rubocop-config", github: "jgraichen/rubocop-config", tag: "v15" -end - -group :test do - gem "msgpack", "~> 1.1" - gem "simplecov", require: false - gem "simplecov-cobertura", require: false -end - -gemspec path: "../" From dccc958869bc27b4f74b5a17698a4ce0acdf5376 Mon Sep 17 00:00:00 2001 From: Jan Graichen Date: Fri, 16 Oct 2026 00:39:10 +0200 Subject: [PATCH 2/3] chore: Bump and fix rubocop for Ruby 3.3+ Since older Ruby versions are no longer tested and support, we can update some code. --- .rubocop.yml | 2 +- lib/acfs/resource/attributes.rb | 8 ++++---- lib/acfs/resource/locatable.rb | 8 ++++---- lib/acfs/resource/persistence.rb | 14 +++++++------- lib/acfs/resource/service.rb | 4 ++-- spec/acfs/global_spec.rb | 4 ++-- spec/acfs/runner_spec.rb | 4 ++-- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 210ad07..4309bfd 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,7 +5,7 @@ inherit_gem: rubocop-config: default.yml AllCops: - TargetRubyVersion: "3.1" + TargetRubyVersion: "3.3" SuggestExtensions: False Metrics/BlockLength: diff --git a/lib/acfs/resource/attributes.rb b/lib/acfs/resource/attributes.rb index c7aabc9..979d300 100644 --- a/lib/acfs/resource/attributes.rb +++ b/lib/acfs/resource/attributes.rb @@ -200,12 +200,12 @@ module ClassMethods # @param [Symbol, String, Class] type Attribute # type identifier or type class. # - def attribute(name, type, **opts) + def attribute(name, type, **) if type.is_a?(Symbol) || type.is_a?(String) type = "#{ATTR_CLASS_BASE}::#{type.to_s.classify}".constantize end - define_attribute(name.to_sym, type, **opts) + define_attribute(name.to_sym, type, **) end # @api public @@ -243,9 +243,9 @@ def local_attributes @local_attributes ||= {} end - def define_attribute(name, type, **opts) + def define_attribute(name, type, **) name = name.to_s - attribute = type.new(**opts) + attribute = type.new(**) local_attributes[name] = attribute define_attribute_method name diff --git a/lib/acfs/resource/locatable.rb b/lib/acfs/resource/locatable.rb index 30363ce..fa45481 100644 --- a/lib/acfs/resource/locatable.rb +++ b/lib/acfs/resource/locatable.rb @@ -84,8 +84,8 @@ def url(suffix = nil, **opts) # # @return [Location] Location object. # - def location(**opts) - service.location(self, **opts) + def location(**) + service.location(self, **) end # @api private @@ -112,11 +112,11 @@ def location_default_path(action, path) # @return [ String ] Generated URL. # @see ClassMethods#url # - def url(**opts) + def url(**) return nil if need_primary_key? && !primary_key? self.class.service - .location(self.class, **opts, action: :read) + .location(self.class, **, action: :read) .build(attributes).str end diff --git a/lib/acfs/resource/persistence.rb b/lib/acfs/resource/persistence.rb index a035808..10261fc 100644 --- a/lib/acfs/resource/persistence.rb +++ b/lib/acfs/resource/persistence.rb @@ -57,8 +57,8 @@ def new? # false otherwise. # @see #save! See {#save!} for available options. # - def save(**opts) - save!(**opts) + def save(**) + save!(**) true rescue Acfs::Error false @@ -109,11 +109,11 @@ def save!(**opts) # @see #attributes= # @see #update_attributes! # - def update_attributes(attrs, **opts) - check_loaded!(**opts) + def update_attributes(attrs, **) + check_loaded!(**) self.attributes = attrs - save(**opts) + save(**) end # @api public @@ -152,8 +152,8 @@ def update_attributes!(attrs, **opts) # @return [Boolean] # @see #delete! # - def delete(**opts) - delete!(**opts) + def delete(**) + delete!(**) true rescue Acfs::Error false diff --git a/lib/acfs/resource/service.rb b/lib/acfs/resource/service.rb index 7e2e69e..d1e48d5 100644 --- a/lib/acfs/resource/service.rb +++ b/lib/acfs/resource/service.rb @@ -34,8 +34,8 @@ module ClassMethods # @param options [Object] Option delegated to # service class initializer. # - def service(klass = nil, **options) - return (@service = klass.new(**options)) if klass + def service(klass = nil, **) + return (@service = klass.new(**)) if klass @service || superclass.service end diff --git a/spec/acfs/global_spec.rb b/spec/acfs/global_spec.rb index 5b38751..d52b401 100644 --- a/spec/acfs/global_spec.rb +++ b/spec/acfs/global_spec.rb @@ -3,8 +3,8 @@ require 'spec_helper' class NotificationCollector - def call(*args) - events << ActiveSupport::Notifications::Event.new(*args) + def call(*) + events << ActiveSupport::Notifications::Event.new(*) end def events diff --git a/spec/acfs/runner_spec.rb b/spec/acfs/runner_spec.rb index a5eb904..320d3c9 100644 --- a/spec/acfs/runner_spec.rb +++ b/spec/acfs/runner_spec.rb @@ -21,8 +21,8 @@ def queue(_); end end class NotificationCollector - def call(*args) - events << ActiveSupport::Notifications::Event.new(*args) + def call(*) + events << ActiveSupport::Notifications::Event.new(*) end def events From 9ea9025f9e9a6dfc583e88a190c34c29df7e4af5 Mon Sep 17 00:00:00 2001 From: Jan Graichen Date: Fri, 16 Oct 2026 00:40:39 +0200 Subject: [PATCH 3/3] fix: Typhoeus spec failing on Ubuntu 26.04 libcurl on Ubuntu 26 returns different error messages. --- spec/acfs/adapter/typhoeus_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/acfs/adapter/typhoeus_spec.rb b/spec/acfs/adapter/typhoeus_spec.rb index 62fe7cf..07aa374 100644 --- a/spec/acfs/adapter/typhoeus_spec.rb +++ b/spec/acfs/adapter/typhoeus_spec.rb @@ -41,7 +41,8 @@ adapter.queue request expect { adapter.run(request) }.to raise_error(Acfs::RequestError) do |err| - expect(err.message).to eq 'Couldn\'t resolve host name: GET http://should-never-exists.example.org' + # Wording differs between libcurl versions + expect(err.message).to match %r{\ACould(?:n't| not) resolve host ?name: GET http://should-never-exists\.example\.org\z} end end