Class: Crosstest::Psychic::Factories::PowerShellScriptFactory

Inherits:
ScriptFactory show all
Defined in:
lib/crosstest/psychic/factories/powershell_factories.rb

Constant Summary

Constants inherited from ScriptFactory

ScriptFactory::TASK_PRIORITY

Constants inherited from Crosstest::Psychic::FactoryManager

Crosstest::Psychic::FactoryManager::BUILT_IN_DIR

Instance Attribute Summary

Attributes inherited from ScriptFactory

#priority, #psychic, #run_patterns

Attributes inherited from Crosstest::Psychic::FactoryManager

#factories

Instance Method Summary collapse

Methods inherited from ScriptFactory

#cwd, #initialize, #known_script?, #known_scripts, priority_for_script, #priority_for_script, register_script_factory, run_patterns, runs

Methods inherited from Crosstest::Psychic::FactoryManager

#active_factories, autoload_factories!, clear, factory_classes, #initialize, register_factory

Constructor Details

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

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)

38
39
40
# File 'lib/crosstest/psychic/factories/powershell_factories.rb', line 38

def active?
  true if psychic.os_family == :windows
end

#command_for_script(script) ⇒ Object


42
43
44
45
46
47
48
49
# File 'lib/crosstest/psychic/factories/powershell_factories.rb', line 42

def command_for_script(script)
  script = psychic.task('run_script')
  if script
    "#{script} #{script.source_file}"
  else
    relativize_cmd(script.absolute_source_file)
  end
end