Skip to content

Commit

Permalink
Set minimum Ruby version to 3.1
Browse files Browse the repository at this point in the history
Rails 7.2 needs Ruby 3.1 as minimum. It is out of support anyway.
  • Loading branch information
tvdeyen committed Aug 29, 2024
1 parent 823849a commit 2a3b709
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
ruby-version: "3.1"
bundler-cache: true
rubygems: "latest"
- name: Lint Ruby files
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require: standard

AllCops:
TargetRubyVersion: 3.0
TargetRubyVersion: 3.1

inherit_gem:
standard: config/base.yml
2 changes: 1 addition & 1 deletion .standard.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parallel: true
ruby_version: 3.0
ruby_version: 3.1
ignore:
- "spec/dummy/**/*"
2 changes: 1 addition & 1 deletion alchemy_cms.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
gem.summary = "A powerful, userfriendly and flexible CMS for Rails"
gem.description = "Alchemy is a powerful, userfriendly and flexible Rails CMS."
gem.requirements << "ImageMagick (libmagick), v6.6 or greater."
gem.required_ruby_version = ">= 3.0.0"
gem.required_ruby_version = ">= 3.1.0"
gem.license = "BSD-3-Clause"
gem.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^spec/|bun\.lockdb|package\.json|^\.}) }
gem.require_paths = ["lib"]
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/alchemy/base_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def render_icon(icon_name, options = {})
# <p>Caution! This is a warning!</p>
# <% end %>
#
def render_message(type = :info, msg = nil, &blk)
render Alchemy::Admin::Message.new(msg || capture(&blk), type: type)
def render_message(type = :info, msg = nil, &)
render Alchemy::Admin::Message.new(msg || capture(&), type: type)
end

# Checks if the given argument is a String or a Page object.
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/alchemy/pages_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def render_page_layout
#
# renders +app/views/alchemy/site_layouts/_default_site.html.erb+ for the site named "Default Site".
#
def render_site_layout(&block)
render current_alchemy_site, &block
def render_site_layout(&)
render(current_alchemy_site, &)
rescue ActionView::MissingTemplate => error
error_or_warning(error, "Site layout for #{current_alchemy_site.try(:name)} not found. Please run `rails g alchemy:site_layouts`")
end
Expand Down
4 changes: 2 additions & 2 deletions app/models/alchemy/elements_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def children_of(parent)
self.class.new(select { |e| e.parent_element_id == parent.id })
end

def each(&blk)
elements.each(&blk)
def each(&)
elements.each(&)
end

private
Expand Down
4 changes: 2 additions & 2 deletions lib/alchemy/test_support/capybara_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def click_icon(name)

private

def within_entire_page(&block)
within(:xpath, "//body", &block)
def within_entire_page(&)
within(:xpath, "//body", &)
end

def find_label_by_text(text)
Expand Down

0 comments on commit 2a3b709

Please sign in to comment.