Skip to content

Commit

Permalink
Merge pull request #900 from Shopify/psych_safe_load_args
Browse files Browse the repository at this point in the history
Update YAML.safe_load call to be compatible with Ruby 3.1
  • Loading branch information
jhoos committed Jul 27, 2022
2 parents c568ef2 + 570a6dd commit ce528ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ jobs:
matrix:
ruby:
# Use unique Ruby versions, or GitHub gets confused when building the rest of the matrix
- '3.1.2' # With k8s 1.23
- '3.0.3' # With k8s 1.23
- '3.0.2' # With k8s 1.22
- '3.0.1' # With k8s 1.21
- '3.0' # With k8s 1.20
- '2.7' # With k8s 1.19
include:
# Match kind images with chosen version https://github.com/kubernetes-sigs/kind/releases
- ruby: '3.1.2'
kind_version: 'v0.11.1'
kubernetes_version: '1.23.0'
kind_image: 'kindest/node:v1.23.0@sha256:49824ab1727c04e56a21a5d8372a402fcd32ea51ac96a2706a12af38934f81ac'
- ruby: '3.0.3'
kind_version: 'v0.11.1'
kubernetes_version: '1.23.0'
Expand Down
3 changes: 2 additions & 1 deletion lib/krane/bindings_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def parse_file(string)
when '.json'
bindings = parse_json(File.read(file_path))
when '.yaml', '.yml'
bindings = YAML.safe_load(File.read(file_path), [], [], true, file_path)
bindings = YAML.safe_load(File.read(file_path), permitted_classes: [], permitted_symbols: [],
aliases: true, filename: file_path)
else
raise ArgumentError, "Supplied file does not appear to be JSON or YAML"
end
Expand Down

0 comments on commit ce528ca

Please sign in to comment.