Skip to content

Commit

Permalink
Rubocop cleanup: Security/Open
Browse files Browse the repository at this point in the history
  • Loading branch information
JPrevost committed Aug 12, 2024
1 parent db8b42b commit 0e91ff5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ Rails/I18nLocaleTexts:
- 'app/controllers/admin/application_controller.rb'
- 'app/controllers/application_controller.rb'

# Offense count: 1
Security/Open:
Exclude:
- 'lib/tasks/journals.rake'

# Offense count: 25
# Configuration parameters: AllowedConstants.
Style/Documentation:
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/journals.rake
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ namespace :journals do
# does the file look like a path or a URI
if URI(args.file).scheme
Rails.logger.info("Loading data from remote file #{args.file}")
data = URI.open(args.file, 'rb', &:read)
data = URI.parse(args.file).open('rb', &:read)
else
Rails.logger.info("Loading data from local file #{args.file}")
data = File.read(args.file)
Expand Down

0 comments on commit 0e91ff5

Please sign in to comment.