File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ module Nvar
12
12
13
13
# Comments in .env files must have a leading '#' symbol. This cannot be
14
14
# followed by a space.
15
- ENV_COMMENT = <<~' COMMENT'
15
+ ENV_COMMENT = <<~COMMENT
16
16
#Environment variables are managed through this file (.env). The Scripts to
17
17
#Rule Them All (in script/) load the environment from here, and the app warns
18
18
#on startup if any required environment variables are missing. You can see the
@@ -93,7 +93,7 @@ def all_required_env_variables_set?
93
93
end
94
94
95
95
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
97
97
end
98
98
end
99
99
end
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
require "rails"
4
- require_relative "./ environment_variable"
4
+ require_relative "environment_variable"
5
5
6
6
module Nvar
7
7
class Engine < Rails ::Engine # :nodoc:
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ def typecast_value
76
76
end
77
77
78
78
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
80
80
81
81
required ? ENV . fetch ( name . to_s ) : ENV [ name . to_s ]
82
82
end
You can’t perform that action at this time.
0 commit comments