Skip to content

Commit

Permalink
Style/YAMLFileRead
Browse files Browse the repository at this point in the history
  • Loading branch information
mlinksva authored Dec 18, 2023
1 parent d8d7c2c commit e561ac1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/licensee/rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def file_path
end

def raw_rules
YAML.safe_load File.read(Rule.file_path)
YAML.safe_load_file(Rule.file_path)
end

def groups
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def format_percent(float)
def meta_fields
path = 'vendor/choosealicense.com/_data/meta.yml'
path = File.expand_path(path, project_root)
YAML.safe_load(File.read(path))
YAML.safe_load_file(path)
end

RSpec::Matchers.define :be_an_existing_file do
Expand Down

0 comments on commit e561ac1

Please sign in to comment.