Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
Fix ruby 3.3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
joseluis-fw committed Mar 11, 2024
1 parent af89228 commit e114819
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: '3.1'
ruby-version: '3.3'
- name: Install ruby dependencies
run: BUNDLE_WITHOUT=development bundle install
- name: Build site
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ bundle
/tmp
/output
/.tool-versions
/crash.log
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ GEM
zeitwerk (2.6.13)

PLATFORMS
arm64-darwin-23
x86_64-linux

DEPENDENCIES
Expand Down
14 changes: 7 additions & 7 deletions Rules
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@
# end
# end

compile '/**/*.haml' do
compile "/**/*.haml" do
filter :haml
layout '/default.*'
write item.identifier.without_ext + '.html'
layout "/default.*"
write item.identifier.without_ext + ".html"
end

compile '/**/stylesheets/*.scss' do
next if item.identifier.to_s.split("/").last =~ /^_/ # pass partials nested in folders
compile "/**/stylesheets/*.scss" do
next if /^_/.match?(item.identifier.to_s.split("/").last) # pass partials nested in folders

filter :sass, syntax: :scss
write item.identifier.without_ext
end

passthrough '/**/*'
passthrough "/**/*"

layout '/**/*', :haml, format: :html5
layout "/**/*", :haml, format: :html5
2 changes: 1 addition & 1 deletion content/past.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ title: Los eventos anteriores
%section{:class => "#{m[:type]}"}
- m[:talks].each do |f|
%article
%h3= f[:title]
%h3!= f[:title]
- f[:author].each do |t|
%p
= t[:name]
Expand Down
6 changes: 3 additions & 3 deletions lib/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
use_helper Nanoc::Helpers::Rendering

def is_page_selected(page)
@item.identifier.without_ext == page ? "selected" : ""
(@item.identifier.without_ext == page) ? "selected" : ""
end

class Data
class YamlData
def method_missing(method_name, *arguments, &block)
YAML.safe_load_file(File.join(File.expand_path("..", __dir__), "data", "#{method_name}.yml"), symbolize_names: true)
end
Expand All @@ -18,5 +18,5 @@ def respond_to_missing?(method_name, include_private = false)
end

def data
Data.new
YamlData.new
end

0 comments on commit e114819

Please sign in to comment.