Skip to content

Commit a7e3db3

Browse files
committed
change all YAML.load_file to YAML.properly_load_file
1 parent a67b52f commit a7e3db3

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

helpers/example.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def initialize(dir)
2121
end
2222

2323
def config
24-
@config ||= YAML.load_file(yaml_path)
24+
@config ||= YAML.properly_load_file(yaml_path)
2525
end
2626

2727
def yaml

lib/bashly/library.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def exist?(name)
66
end
77

88
def config
9-
@config ||= YAML.load_file(config_path)
9+
@config ||= YAML.properly_load_file(config_path)
1010
end
1111

1212
def config_path

lib/bashly/message_strings.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def values
1313
private
1414

1515
def values!
16-
defaults = YAML.load_file asset("templates/strings.yml")
16+
defaults = YAML.properly_load_file asset("templates/strings.yml")
1717
defaults.merge project_strings
1818
end
1919

@@ -23,7 +23,7 @@ def project_strings
2323

2424
def project_strings!
2525
if File.exist? project_strings_path
26-
YAML.load_file project_strings_path
26+
YAML.properly_load_file project_strings_path
2727
else
2828
{}
2929
end

lib/bashly/refinements/compose_refinements.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def compose(keyword = 'import')
2222
end
2323

2424
def safe_load_yaml(path)
25-
loaded = YAML.load_file path
25+
loaded = YAML.properly_load_file path
2626
return loaded if loaded.is_a? Array or loaded.is_a? Hash
2727
raise Bashly::ConfigurationError, "Cannot find a valid YAML in !txtgrn!#{path}"
2828

spec/spec_mixin.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ def reset_tmp_dir(create_src: false, copy_from: nil)
88

99
def load_fixture(filename)
1010
@loaded_fixtures ||= {}
11-
@loaded_fixtures[filename] ||= YAML.load_file("spec/fixtures/#{filename}.yml")
11+
@loaded_fixtures[filename] ||= YAML.properly_load_file("spec/fixtures/#{filename}.yml")
1212
end
1313
end

0 commit comments

Comments
 (0)