Module: Specjour
- Defined in:
- lib/specjour.rb,
lib/specjour/cli.rb,
lib/specjour/cpu.rb,
lib/specjour/rspec.rb,
lib/specjour/loader.rb,
lib/specjour/worker.rb,
lib/specjour/manager.rb,
lib/specjour/printer.rb,
lib/specjour/cucumber.rb,
lib/specjour/db_scrub.rb,
lib/specjour/protocol.rb,
lib/specjour/connection.rb,
lib/specjour/dispatcher.rb,
lib/specjour/rsync_daemon.rb,
lib/specjour/configuration.rb,
lib/specjour/socket_helper.rb,
lib/specjour/cucumber/runner.rb,
lib/specjour/cucumber/preloader.rb,
lib/specjour/cucumber/final_report.rb
Defined Under Namespace
Modules: CPU, Configuration, Cucumber, DbScrub, Fork, Protocol, RSpec, SocketHelper
Classes: CLI, Connection, Dispatcher, Loader, Manager, Printer, RsyncDaemon, Worker
Constant Summary
collapse
- VERSION =
"0.5.0"
- HOOKS_PATH =
"./.specjour/hooks.rb"
- Error =
Class.new(StandardError)
- PROGRAM_NAME =
keep a reference of the original program name
$PROGRAM_NAME
Class Method Summary
collapse
Class Method Details
.interrupted=(bool) ⇒ Object
39
40
41
42
43
44
45
|
# File 'lib/specjour.rb', line 39
def self.interrupted=(bool)
@interrupted = bool
if bool
will_quit(:RSpec)
will_quit(:Cucumber)
end
end
|
.interrupted? ⇒ Boolean
35
36
37
|
# File 'lib/specjour.rb', line 35
def self.interrupted?
@interrupted
end
|
.load_custom_hooks ⇒ Object
68
69
70
|
# File 'lib/specjour.rb', line 68
def self.load_custom_hooks
require HOOKS_PATH if File.exists?(HOOKS_PATH)
end
|
.log? ⇒ Boolean
64
65
66
|
# File 'lib/specjour.rb', line 64
def self.log?
logger.level != Logger::UNKNOWN
end
|
.logger ⇒ Object
54
55
56
|
# File 'lib/specjour.rb', line 54
def self.logger
@logger ||= new_logger
end
|
.new_logger(level = Logger::UNKNOWN) ⇒ Object
58
59
60
61
62
|
# File 'lib/specjour.rb', line 58
def self.new_logger(level = Logger::UNKNOWN)
@logger = Logger.new $stderr
@logger.level = level
@logger
end
|
.trap_interrupt ⇒ Object
72
73
74
75
76
77
|
# File 'lib/specjour.rb', line 72
def self.trap_interrupt
Signal.trap('INT') do
self.interrupted = true
abort("\n")
end
end
|
.will_quit(framework) ⇒ Object
47
48
49
50
51
52
|
# File 'lib/specjour.rb', line 47
def self.will_quit(framework)
if Object.const_defined?(framework)
framework = Object.const_get(framework)
framework.wants_to_quit = true if framework.respond_to?(:wants_to_quit=)
end
end
|