Class: Crosstest::Psychic::Factories::TravisTaskFactory

Inherits:
MagicTaskFactory show all
Defined in:
lib/crosstest/psychic/factories/travis_factories.rb

Constant Summary collapse

TASK_PRIORITY =
2

Instance Attribute Summary

Attributes inherited from MagicTaskFactory

#hints, #known_tasks, #priority, #psychic, #tasks

Instance Method Summary collapse

Methods inherited from MagicTaskFactory

#command_for_task, #initialize, #known_task?, known_tasks, magic_env_var, magic_env_vars, magic_file, magic_file_patterns, #priority_for_task, register_task_factory, task, tasks

Constructor Details

This class inherits a constructor from Crosstest::Psychic::MagicTaskFactory

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)

9
10
11
# File 'lib/crosstest/psychic/factories/travis_factories.rb', line 9

def active?
  super && travis_build_installed?
end

#travis_build_installed?Boolean

Returns:

  • (Boolean)

13
14
15
16
17
# File 'lib/crosstest/psychic/factories/travis_factories.rb', line 13

def travis_build_installed?
  # check that the travis-build extension is installed
  # HACK: use the MixlibShellOutExecutor
  Bundler.with_clean_env { `travis help --skip-version-check`.match(/run/) }
end