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

Use Ruby 3.1.1 #2799

Merged
merged 4 commits into from Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
ruby: ["3.0"]
ruby: ["3.1"]
os: [ubuntu-latest]
fail-fast: false

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
@@ -1,6 +1,6 @@
source "https://rubygems.org"

ruby "~> 3.0.2"
ruby "~> 3.1.1"

gem "rake"
gem "jekyll", "~> 4.0"
Expand Down
20 changes: 10 additions & 10 deletions Gemfile.lock
Expand Up @@ -10,10 +10,10 @@ GEM
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.15.4)
ffi (1.15.5)
forwardable-extended (2.6.0)
http_parser.rb (0.8.0)
i18n (1.8.11)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
jekyll (4.2.1)
addressable (~> 2.4)
Expand Down Expand Up @@ -44,14 +44,14 @@ GEM
jekyll (>= 2.0)
rack (>= 1.6, < 3.0)
liquid (4.0.3)
listen (3.7.0)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
mini_portile2 (2.6.1)
mini_portile2 (2.7.1)
minitest (5.15.0)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
nokogiri (1.13.1)
mini_portile2 (~> 2.7.0)
racc (~> 1.4)
nokogumbo (2.0.5)
nokogiri (~> 1.8, >= 1.8.4)
Expand All @@ -61,18 +61,18 @@ GEM
public_suffix (4.0.6)
racc (1.6.0)
rack (2.2.3)
rack-protection (2.1.0)
rack-protection (2.2.0)
rack
rack-rewrite (1.5.1)
rack-ssl (1.4.1)
rack
raindrops (0.20.0)
rake (13.0.6)
rb-fsevent (0.11.0)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.27.0)
rouge (3.28.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
Expand Down Expand Up @@ -119,7 +119,7 @@ DEPENDENCIES
validate-website (~> 1.6)

RUBY VERSION
ruby 3.0.2p107
ruby 3.1.1p18

BUNDLED WITH
2.2.31
3 changes: 2 additions & 1 deletion lib/linter.rb
Expand Up @@ -3,6 +3,7 @@
require "bundler/setup"
require "pathname"
require "yaml"
require "date"

require_relative "linter/document"
require_relative "linter/release"
Expand Down Expand Up @@ -69,7 +70,7 @@ def load_files

def load_releases
releases_yaml = if Pathname.new(RELEASES_FILE).exist?
YAML.load_file(RELEASES_FILE, fallback: [])
YAML.load_file(RELEASES_FILE, fallback: [], permitted_classes: [Date])
else
[]
end
Expand Down
2 changes: 1 addition & 1 deletion lib/linter/document.rb
Expand Up @@ -137,7 +137,7 @@ def read_yaml_and_content(filename)
content = File.read(filename)

matchdata = content.match(/\A(---\s*\n.*?\n?)^(---\s*$\n?)/m)
yaml = YAML.load(matchdata[1]) if matchdata
yaml = YAML.load(matchdata[1], permitted_classes: [Date, Time]) if matchdata

[yaml || {}, content || ""]
end
Expand Down