yaml-lint 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yaml-lint.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6baf527d2ca2e57849d69f231fd1ad4fef4984632430ec8bb601b5212c7e4236
|
4
|
+
data.tar.gz: 28ecee0ab0300f6c1883cdc20b5cbe99caf1f81fff223a125ad530b713e18dda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b66bfa93ff0913b5e4b739ea7f93149567688f99f5db773570416da35a6eda4193c28a381ebfd3058e1ab5fa2a3e8c9f84cd147b3903ec2fc97d4dfdef40c5bc
|
7
|
+
data.tar.gz: 28d080fa4fb7cc4c29cb51aec330f83c0b058999acd508053bb32b13f803994be5347cad77e68841f14d9011ca935bf6e6839e596147aaf0528223e34a05027c
|
data/lib/yaml-lint.rb
CHANGED
@@ -75,7 +75,13 @@ class YamlLint
|
|
75
75
|
return 1
|
76
76
|
end
|
77
77
|
begin
|
78
|
-
::YAML.respond_to?(:unsafe_load)
|
78
|
+
if ::YAML.respond_to?(:unsafe_load)
|
79
|
+
# Specific to psych 4.0+
|
80
|
+
payload = ::File.read(file)
|
81
|
+
::YAML.unsafe_load(payload)
|
82
|
+
else
|
83
|
+
::YAML.load_file(file)
|
84
|
+
end
|
79
85
|
rescue Exception => err
|
80
86
|
error "File : #{file}, error: #{err}"
|
81
87
|
return 1
|