Module: Specjour

Defined in:
lib/specjour.rb,
lib/specjour/cpu.rb,
lib/specjour/cli.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/protocol.rb,
lib/specjour/db_scrub.rb,
lib/specjour/connection.rb,
lib/specjour/dispatcher.rb,
lib/specjour/rsync_daemon.rb,
lib/specjour/socket_helper.rb,
lib/specjour/configuration.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, Error, Loader, Manager, Printer, RsyncDaemon, Worker

Class Method Summary (collapse)

Class Method Details

+ (Object) interrupted=(bool)



44
45
46
47
48
49
50
# File 'lib/specjour.rb', line 44

def self.interrupted=(bool)
  @interrupted = bool
  if bool
    will_quit(:RSpec)
    will_quit(:Cucumber)
  end
end

+ (Boolean) interrupted?



40
41
42
# File 'lib/specjour.rb', line 40

def self.interrupted?
  @interrupted
end

+ (Object) load_custom_hooks



73
74
75
# File 'lib/specjour.rb', line 73

def self.load_custom_hooks
  require HOOKS_PATH if File.exists?(HOOKS_PATH)
end

+ (Boolean) log?



69
70
71
# File 'lib/specjour.rb', line 69

def self.log?
  logger.level != Logger::UNKNOWN
end

+ (Object) logger



59
60
61
# File 'lib/specjour.rb', line 59

def self.logger
  @logger ||= new_logger
end

+ (Object) new_logger(level = Logger::UNKNOWN)



63
64
65
66
67
# File 'lib/specjour.rb', line 63

def self.new_logger(level = Logger::UNKNOWN)
  @logger = Logger.new $stderr
  @logger.level = level
  @logger
end

+ (Object) trap_interrupt



77
78
79
80
81
82
# File 'lib/specjour.rb', line 77

def self.trap_interrupt
  Signal.trap('INT') do
    self.interrupted = true
    abort("\n")
  end
end

+ (Object) will_quit(framework)



52
53
54
55
56
57
# File 'lib/specjour.rb', line 52

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