Module: Gitlab::Environment
- Defined in:
- lib/gitlab/environment.rb
Class Method Summary collapse
- .hostname ⇒ Object
-
.static_verification? ⇒ Boolean
Check whether codebase is going through static verification in order to skip executing parts of the codebase.
Class Method Details
.hostname ⇒ Object
5 6 7 |
# File 'lib/gitlab/environment.rb', line 5 def self.hostname @hostname ||= ENV['HOSTNAME'] || Socket.gethostname end |
.static_verification? ⇒ Boolean
Check whether codebase is going through static verification in order to skip executing parts of the codebase
13 14 15 16 17 18 19 20 |
# File 'lib/gitlab/environment.rb', line 13 def self.static_verification? static_verification = Gitlab::Utils.to_boolean(ENV['STATIC_VERIFICATION'], default: false) env_production = ENV['RAILS_ENV'] == 'production' warn '[WARNING] Static Verification bypass is enabled in Production.' if static_verification && env_production static_verification end |