File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -11,17 +11,7 @@ class EnvDetails
1111
1212
1313 def initialize
14- @info = { 'Application root' => Dir . pwd , 'Environment' => 'development' }
15- @request_details = { }
16- @app_name = app_name
17- app_location = Stackify . configuration . app_location || @info [ 'Application root' ]
18- @details = {
19- 'DeviceName' => Socket . gethostname ,
20- 'AppLocation' => app_location ,
21- 'AppName' => @app_name ,
22- 'ConfiguredAppName' => @app_name ,
23- 'ConfiguredEnvironmentName' => @info [ 'Environment' ]
24- }
14+ set_env_properties
2515 end
2616
2717 def set_rails_info
@@ -32,7 +22,10 @@ def set_rails_info
3222 rescue NameError => exception
3323 return
3424 end
35- rails_info = defined? ( Rails ) ? Rails ::Info . properties . to_h : nil
25+ set_env_properties ( defined? ( Rails ) ? Rails ::Info . properties . to_h : nil )
26+ end
27+
28+ def set_env_properties ( rails_info = nil )
3629 @info = rails_info || { 'Application root' => Dir . pwd , 'Environment' => 'development' }
3730 @request_details = { }
3831 @app_name = app_name
You can’t perform that action at this time.
0 commit comments