Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Rails 7.2 #2999

Merged
merged 10 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Set minimum Ruby version to 3.1
Rails 7.2 needs Ruby 3.1 as minimum. It is out of support anyway.
  • Loading branch information
tvdeyen committed Sep 3, 2024
commit 9122ddb8c42c555e51e27bb4e6dcd7a1614e1817
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