module Rake::TeamCity

Constants

RUBY19_SDK_MINITEST_RUNNER_PATH_KEY

Test::Unit

TC_EXCLUDED_DEFAULT_TEST_CASES
TEAMCITY_RAKERUNNER_DEBUG_OPTIONS_KEY
TEAMCITY_RAKERUNNER_SUPPORTED_FRAMEWORKS
TEAMCITY_RAKERUNNER_USED_FRAMEWORKS_KEY

TODO: remove TEAMCITY_* prefix

TEAMCITY_VERSION_KEY

Mode

Public Class Methods

is_fake_error_msg_enabled?() click to toggle source
# File lib/rspec/teamcity/rakerunner_consts.rb, line 117
def self.is_fake_error_msg_enabled?
  self.is_enabled_in_debug_options(:fake_error_msg)
end
is_fake_location_url_enabled?() click to toggle source
# File lib/rspec/teamcity/rakerunner_consts.rb, line 121
def self.is_fake_location_url_enabled?
  self.is_enabled_in_debug_options(:fake_location_url)
end
is_fake_stacktrace_enabled?() click to toggle source
# File lib/rspec/teamcity/rakerunner_consts.rb, line 113
def self.is_fake_stacktrace_enabled?
  self.is_enabled_in_debug_options(:fake_stacktrace)
end
is_fake_time_enabled?() click to toggle source
# File lib/rspec/teamcity/rakerunner_consts.rb, line 109
def self.is_fake_time_enabled?
  self.is_enabled_in_debug_options(:fake_time)
end
is_framework_used(symbol) click to toggle source

Supported frameworks :rspec :test_spec :test_unit

# File lib/rspec/teamcity/rakerunner_consts.rb, line 97
def self.is_framework_used(symbol)
  value = ENV[TEAMCITY_RAKERUNNER_USED_FRAMEWORKS_KEY]
  # check that symbol is name of supported framework
  # and that supported frameworks env variable is set
  return false if value.nil?
  if TEAMCITY_RAKERUNNER_SUPPORTED_FRAMEWORKS.index(symbol).nil?
    raise ArgumentError, "Unsupported framework: #{symbol}", caller
  end

  return !value.index(":#{symbol.to_s}").nil?
end
is_in_buildserver_mode() click to toggle source
# File lib/rspec/teamcity/rakerunner_consts.rb, line 85
def self.is_in_buildserver_mode
  version = ENV[TEAMCITY_VERSION_KEY]
  # version must be set and not empty
  if !version.nil? && !version.empty?
    return true
  end
end
is_in_idea_mode() click to toggle source
# File lib/rspec/teamcity/rakerunner_consts.rb, line 81
def self.is_in_idea_mode
  !is_in_buildserver_mode
end

Private Class Methods

is_enabled_in_debug_options(symbol) click to toggle source
# File lib/rspec/teamcity/rakerunner_consts.rb, line 126
def self.is_enabled_in_debug_options(symbol)
  debug_options = ENV[TEAMCITY_RAKERUNNER_DEBUG_OPTIONS_KEY]
  !debug_options.nil? && !debug_options[symbol.to_s].nil?
end