Module: WatchDoge

Defined in:
lib/watchdoge/worker.rb,
lib/watchdoge.rb,
lib/watchdoge/version.rb,
lib/watchdoge/pixel_test.rb,
lib/watchdoge/regression.rb,
lib/watchdoge/cookie_pool.rb,
lib/watchdoge/notification.rb,
lib/watchdoge/configuration.rb,
lib/watchdoge/rails/railtie.rb,
lib/watchdoge/regression/dsl.rb,
lib/watchdoge/rails/generator.rb,
lib/watchdoge/regression/utils.rb,
lib/watchdoge/notification/base.rb,
lib/watchdoge/webdriver_manager.rb,
lib/watchdoge/notification/mattermost.rb,
lib/watchdoge/notification/gitlab_repo.rb,
lib/watchdoge/notification/slack_webhook.rb

Overview

todo: finish document

Defined Under Namespace

Modules: CookiePool, Notification, Regression Classes: Configuration, PixelTest, RegressionError, WatchDogeGenerator, WatchDogeTask, WebdriverManager, Worker

Constant Summary collapse

VERSION =
'0.1.26'

Class Method Summary collapse

Class Method Details

.base_dirObject


14
15
16
# File 'lib/watchdoge.rb', line 14

def base_dir
  configuration.base_dir
end

.configurationObject


27
28
29
# File 'lib/watchdoge.rb', line 27

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

Yields:


22
23
24
25
# File 'lib/watchdoge.rb', line 22

def configure(&block)
  yield(configuration)
  configuration
end

.hooksObject


18
19
20
# File 'lib/watchdoge.rb', line 18

def hooks
  configuration.hooks
end

.initialize!Object


31
32
33
34
35
36
37
38
39
40
# File 'lib/watchdoge.rb', line 31

def initialize!
  config_file = ENV['WATCHDOGE_CONFIG'] ||
    if defined?(Rails)
      "#{Rails.root}/config/watchdoge.rb"
    else
      "#{Dir.pwd}/watchdoge.rb"
    end

  load config_file
end