Skip to content

Commit c985181

Browse files
committed
Lint
1 parent 1d5a63d commit c985181

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/nvar.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module Nvar
1212

1313
# Comments in .env files must have a leading '#' symbol. This cannot be
1414
# followed by a space.
15-
ENV_COMMENT = <<~'COMMENT'
15+
ENV_COMMENT = <<~COMMENT
1616
#Environment variables are managed through this file (.env). The Scripts to
1717
#Rule Them All (in script/) load the environment from here, and the app warns
1818
#on startup if any required environment variables are missing. You can see the
@@ -93,7 +93,7 @@ def all_required_env_variables_set?
9393
end
9494

9595
def variables
96-
(YAML.safe_load(File.read(config_file_path)) || {}).deep_symbolize_keys
96+
(YAML.safe_load_file(config_file_path) || {}).deep_symbolize_keys
9797
end
9898
end
9999
end

lib/nvar/engine.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
require "rails"
4-
require_relative "./environment_variable"
4+
require_relative "environment_variable"
55

66
module Nvar
77
class Engine < Rails::Engine # :nodoc:

lib/nvar/environment_variable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def typecast_value
7676
end
7777

7878
def fetch_value(passthrough: false, default_value: nil)
79-
return (default_value || name) if ENV["RAILS_ENV"] == "test" && !passthrough
79+
return default_value || name if ENV["RAILS_ENV"] == "test" && !passthrough
8080

8181
required ? ENV.fetch(name.to_s) : ENV[name.to_s]
8282
end

0 commit comments

Comments
 (0)