Skip to content

Commit

Permalink
Require Ruby 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
elektronaut committed Oct 16, 2024
1 parent 9f3d9d4 commit bd7e1be
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
ruby: ["3.1", "3.2", "3.3"]
ruby: ["3.2", "3.3"]
services:
postgres:
image: postgres:latest
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inherit_mode:

AllCops:
NewCops: enable
TargetRubyVersion: 3.1
TargetRubyVersion: 3.2
Exclude:
- "spec/internal/db/schema.rb"
- "node_modules/**/*"
Expand Down
4 changes: 2 additions & 2 deletions app/models/page_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class PageBuilder
attr_reader :user, :locale, :parent

class << self
def build(user, locale: nil, parent: nil, &block)
def build(user, locale: nil, parent: nil, &)
new(user, locale:, parent:)
.run(&block)
.run(&)
end
end

Expand Down
4 changes: 2 additions & 2 deletions lib/pages_core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ def configure(_options = {}, &)
yield configuration if block_given?
end

def configuration(key = nil, *args)
def configuration(key = nil, *)
@configuration ||= PagesCore::Configuration::Pages.new
if key
@configuration.send(key, *args)
@configuration.send(key, *)
else
@configuration
end
Expand Down
6 changes: 3 additions & 3 deletions lib/pages_core/templates/configuration_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ def initialize(callback, parent = nil)
@parent = parent
end

def method_missing(method_name, *args, &block)
def method_missing(method_name, *, &block)
if @parent && block
@callback.call(@parent, method_name, block)
elsif @parent
@callback.call(@parent, method_name, *args)
@callback.call(@parent, method_name, *)
elsif block
@callback.call(method_name, block)
else
@callback.call(method_name, *args)
@callback.call(method_name, *)
end
end

Expand Down
2 changes: 1 addition & 1 deletion pages_core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |s|
s.summary = "Pages Core"
s.description = "Pages Core"

s.required_ruby_version = ">= 3.1.0"
s.required_ruby_version = ">= 3.2.0"

s.files = Dir[
"{app,config,db,lib,vendor}/**/*",
Expand Down

0 comments on commit bd7e1be

Please sign in to comment.