Module: Scrab
- Defined in:
- lib/scrab.rb,
lib/scrab/version.rb
Defined Under Namespace
Classes: CommandSet, FeatureParser, Rally, Scenario, StandardError, Step, Story
Constant Summary
collapse
- Commands =
Module.new
- VERSION =
"0.0.4"
Class Method Summary
collapse
Class Method Details
.command(command, out) ⇒ Object
19
20
21
22
|
# File 'lib/scrab.rb', line 19
def self.command(command, out)
@command_factory ||= CommandSet.new(Commands, self.commands_path)
@command_factory.get(command, out)
end
|
.commands_path ⇒ Object
15
16
17
|
# File 'lib/scrab.rb', line 15
def self.commands_path
@commands_path ||= lib_path.join('commands')
end
|
.lib_path ⇒ Object
11
12
13
|
# File 'lib/scrab.rb', line 11
def self.lib_path
@lib_path ||= Pathname.new(File.dirname(__FILE__) + "/scrab")
end
|
.logger ⇒ Object
46
47
48
|
# File 'lib/scrab.rb', line 46
def self.logger
@logger ||= Logger.new(File.dirname(__FILE__) + "/../logs/rally.log")
end
|
.rally ⇒ Object
42
43
44
|
# File 'lib/scrab.rb', line 42
def self.rally
@rally ||= Rally.new(rally_config)
end
|
.rally_config ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/scrab.rb', line 28
def self.rally_config
@rally_config ||= begin
config = {}
self.rally_config_paths.each do |path|
if config_path = File.join(path, '.rally') and File.exist?(config_path)
config = config.merge(YAML.load(File.read(config_path)))
end
end
config
end
end
|
.rally_config_paths ⇒ Object
24
25
26
|
# File 'lib/scrab.rb', line 24
def self.rally_config_paths
[ENV['PWD'], ENV['HOME']]
end
|