Module: Luffa::Environment
- Defined in:
- lib/luffa/environment.rb
Class Method Summary collapse
- .ci? ⇒ Boolean
-
.debug? ⇒ Boolean
Returns true if debugging is enabled.
- .developer_dir ⇒ Object
- .jenkins_ci? ⇒ Boolean
- .travis_ci? ⇒ Boolean
Class Method Details
.ci? ⇒ Boolean
13 14 15 |
# File 'lib/luffa/environment.rb', line 13 def self.ci? self.travis_ci? || self.jenkins_ci? end |
.debug? ⇒ Boolean
Returns true if debugging is enabled.
27 28 29 |
# File 'lib/luffa/environment.rb', line 27 def self.debug? ENV['DEBUG'] == '1' end |
.developer_dir ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/luffa/environment.rb', line 17 def self.developer_dir value = ENV['DEVELOPER_DIR'] if value && value != '' value else nil end end |
.jenkins_ci? ⇒ Boolean
8 9 10 11 |
# File 'lib/luffa/environment.rb', line 8 def self.jenkins_ci? value = ENV['JENKINS_HOME'] !value.nil? && value != '' end |
.travis_ci? ⇒ Boolean
3 4 5 6 |
# File 'lib/luffa/environment.rb', line 3 def self.travis_ci? value = ENV['TRAVIS'] !value.nil? && value != '' end |