Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inherit_gem:
rubocop-config: default.yml

AllCops:
TargetRubyVersion: "3.1"
TargetRubyVersion: "3.3"
SuggestExtensions: False

Metrics/BlockLength:
Expand Down
7 changes: 0 additions & 7 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

### Breaks

- Require Ruby 3.3+ and Rails 8.0+

## 2.2.1 - (2026-06-20)

---
Expand Down
8 changes: 4 additions & 4 deletions acfs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
25 changes: 0 additions & 25 deletions gemfiles/rails_7.2.gemfile

This file was deleted.

8 changes: 4 additions & 4 deletions lib/acfs/resource/attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions lib/acfs/resource/locatable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
14 changes: 7 additions & 7 deletions lib/acfs/resource/persistence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/acfs/resource/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion spec/acfs/adapter/typhoeus_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions spec/acfs/global_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/acfs/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down