Module: Roby::App

Defined in:
lib/roby/app/base.rb,
lib/roby/app/rake.rb,
lib/roby/app/debug.rb,
lib/roby/app/scripts.rb,
lib/roby/app/vagrant.rb,
lib/roby/app/robot_names.rb,
lib/roby/app/test_server.rb,
lib/roby/app/robot_config.rb,
lib/roby/app/test_reporter.rb,
lib/roby/app/cucumber/world.rb,
lib/roby/app/cucumber/helpers.rb,
lib/roby/app/cucumber/controller.rb,
lib/roby/app/autotest_console_reporter.rb

Defined Under Namespace

Modules: Cucumber, CucumberHelpers, Rake, Scripts, Vagrant Classes: AutotestConsoleReporter, Debug, RobotConfig, RobotNames, TestReporter, TestServer

Constant Summary collapse

DEFAULT_ROBOT_NAME =
"default"
DEFAULT_ROBOT_TYPE =
"default"

Class Method Summary collapse

Class Method Details

.resolve_robot_in_path(path, robot_name = Roby.app.robot_name) ⇒ String

Resolves the ROBOT keyword in the given path

Parameters:

  • path (String)
  • robot_name (String) (defaults to: Roby.app.robot_name)

Returns:

  • (String)


13
14
15
16
17
18
19
20
21
# File 'lib/roby/app/base.rb', line 13

def self.resolve_robot_in_path(path, robot_name = Roby.app.robot_name)
    if robot_name == DEFAULT_ROBOT_NAME
        robot_name = ""
    end
    robot_name ||= ""

    path.gsub(/ROBOT/, robot_name)
        .gsub(/\/\//, "/")
end