Module: DeltaTest

Defined in:
lib/delta_test.rb,
lib/delta_test/cli.rb,
lib/delta_test/git.rb,
lib/delta_test/stats.rb,
lib/delta_test/utils.rb,
lib/delta_test/errors.rb,
lib/delta_test/version.rb,
lib/delta_test/profiler.rb,
lib/delta_test/generator.rb,
lib/delta_test/spec_helpers.rb,
lib/delta_test/configuration.rb,
lib/delta_test/cli/command_base.rb,
lib/delta_test/cli/exec_command.rb,
lib/delta_test/cli/help_command.rb,
lib/delta_test/cli/specs_command.rb,
lib/delta_test/related_spec_list.rb,
lib/delta_test/dependencies_table.rb,
lib/delta_test/cli/version_command.rb,
lib/delta_test/cli/stats_save_command.rb,
lib/delta_test/cli/stats_show_command.rb,
lib/delta_test/cli/stats_clean_command.rb,
ext/delta_test/delta_test_native.c

Defined Under Namespace

Modules: Profiler, SpecHelpers, Utils Classes: CLI, Configuration, DependenciesTable, Generator, GeneratorSingleton, Git, InvalidOptionError, NoConfigurationFileFoundError, NotInGitRepositoryError, RelatedSpecList, Stats, StatsNotFoundError, StatsRepositorySyncError, TableFileStageError, TableNotFoundError, ValidationError

Constant Summary collapse

ACTIVE_FLAG =
'DELTA_TEST_ACTIVE'
VERBOSE_FLAG =
'DELTA_TEST_VERBOSE'
MAJOR =
1
MINOR =
0
REVISION =
1
VERSION =
[MAJOR, MINOR, REVISION].compact.join('.')

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject (readonly)

Returns the value of attribute config.



20
21
22
# File 'lib/delta_test.rb', line 20

def config
  @config
end

Class Method Details

.active?Boolean

Returns:

  • (Boolean)


37
38
39
40
# File 'lib/delta_test.rb', line 37

def active?
  return !!@active unless @active.nil?
  @active = (!ENV[ACTIVE_FLAG].nil? && ENV[ACTIVE_FLAG] !~ /0|false/i)
end

.configure(&block) ⇒ Object



33
34
35
# File 'lib/delta_test.rb', line 33

def configure(&block)
  config.update(&block)
end

.log(*args) ⇒ Object



47
48
49
# File 'lib/delta_test.rb', line 47

def log(*args)
  puts(*args) if verbose?
end

.tester_idObject



51
52
53
54
55
# File 'lib/delta_test.rb', line 51

def tester_id
  return @tester_id if @tester_id
  t = Time.now
  @tester_id = '%d-%d-%d' % [t.to_i, t.nsec, $$]
end

.verbose?Boolean

Returns:

  • (Boolean)


42
43
44
45
# File 'lib/delta_test.rb', line 42

def verbose?
  return !!@verbose unless @verbose.nil?
  @verbose = (!ENV[VERBOSE_FLAG].nil? && ENV[VERBOSE_FLAG] !~ /0|false/i)
end