Skip to content

Commit 87d144c

Browse files
committed
Patch up nanoc 3.8.0 to work with ruby 3.2.x
1 parent 0fb390d commit 87d144c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/setup.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@ sudo apt install ruby pandoc
77
sudo gem install cri
88
sudo gem install nanoc --version 3.8.0
99
sudo gem install pandoc-ruby nokogiri
10+
11+
# Latest versions of ruby do not allow Date class to be parsed by default, and
12+
# spit out lots of warnings from the nanoc 3.8.0 use of ERB, so until we have
13+
# enough time to do a full upgrade, just patch it up.
14+
sudo sed -i -e 's/YAML.load(pieces\[2\])/YAML.load(pieces[2], permitted_classes: [Date])/' /var/lib/gems/*/gems/nanoc-3.8.0/lib/nanoc/data_sources/filesystem.rb
15+
sudo sed -i -e '/ERB.new/s/(content, safe_level, trim_mode)/(content, trim_mode: trim_mode)/' /var/lib/gems/*/gems/nanoc-3.8.0/lib/nanoc/filters/erb.rb

0 commit comments

Comments
 (0)