class Aruba::Runtime
API.
‘#root_directory` and `#config` are considered to be part of the public
attribute descriptions. Only a few like `#current_directory`,
Most methods are considered private. Please look for `(private)` in the
Runtime of aruba
def fixtures_directory
-
(ArubaPath)
-
def fixtures_directory @fixtures_directory ||= begin candidates = config.fixtures_directories.map { |dir| File.join(root_directory, dir) } directory = candidates.find { |d| Aruba.platform.directory? d } unless directory canditates_display = candidates.map { |d| format('"%s"', d) }.join(", ") raise "No existing fixtures directory found in #{canditates_display}." end directory end unless Aruba.platform.directory?(@fixtures_directory) raise %(Fixtures directory "#{@fixtures_directory}" is not a directory) end ArubaPath.new(@fixtures_directory) end
def initialize(opts = {})
def initialize(opts = {}) @event_bus = EventBus.new(EventBus::NameResolver.new(Aruba::Events)) @announcer = opts.fetch(:announcer, Aruba.platform.announcer.new) @config = opts.fetch(:config, ConfigWrapper.new(Aruba.config.make_copy, @event_bus)) @environment = opts.fetch(:environment, Aruba.platform.environment_variables.new) @current_directory = ArubaPath.new(@config.working_directory) @root_directory = ArubaPath.new(@config.root_directory) @environment.update(@config.command_runtime_environment) @command_monitor = opts.fetch(:command_monitor, Aruba.platform.command_monitor.new(announcer: @announcer)) @logger = opts.fetch(:logger, Aruba.platform.logger.new) @logger.mode = @config.log_level @setup_done = false end
def setup_already_done?
- Private: -
def setup_already_done? @setup_done == true end
def setup_done
- Private: -
def setup_done @setup_done = true end