Sha256: 62959054a8b78ae79d9725ae0cb23d25363a4e369599d60cfc43fa3e5d0121dc

Contents?: true

Size: 1.82 KB

Versions: 19

Compression:

Stored size: 1.82 KB

Contents

# The base module for everything MiniAutobot and is the container for other
# modules and classes in the hierarchy:
#
# * `Connector` provides support for drivers and connector profiles;
# * `Emails` introduces email-specific drivers for MiniAutobot;
# * `PageObjects` provides a hierarchy of page objects, page modules, widgets,
#   and overlays;
# * `Settings` provides support for internal MiniAutobot settings; and
# * `Utils` provides an overarching module for miscellaneous helper modules.
module MiniAutobot

  def self.logger
    @@logger ||= MiniAutobot::Logger.new($stdout)
  end

  def self.logger=(value)
    @@logger = value
  end

  def self.settings
    @@settings ||= Settings.new
  end

  def self.settings=(options)
    self.settings.merge!(options)
  end

  # Root directory of the automation repository.
  # Automation repo can use it to refer to files within itself,
  # and this gem also uses it to refer to config files of automation,
  # for example:
  #
  #   File.read(MiniAutobot.root.join('config/mini_autobot', 'data.yml'))
  #
  # will return the contents of `automation_root/config/mini_autobot/data.yml`.
  #
  # @return [Pathname] A reference to the root directory, ready to be used
  #         in directory and file path calculations.
  def self.root
    @@__root__ ||= Pathname.new(File.expand_path('.'))
  end

  # Absolute path of root directory of this gem
  # can be used both within this gem and in automation repo
  def self.gem_root
    @@__gem_root__ ||= Pathname.new(File.realpath(File.join(File.dirname(__FILE__), '..', '..')))
  end

end

require_relative 'runner'
require_relative 'logger'
require_relative 'utils'

require_relative 'connector'
require_relative 'page_objects'
require_relative 'parallel'
require_relative 'settings'

require_relative 'emails'

require_relative 'test_case'
require_relative 'console'

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
mini_autobot-0.8.0 lib/mini_autobot/init.rb
mini_autobot-0.7.0 lib/mini_autobot/init.rb
mini_autobot-0.6.0 lib/mini_autobot/init.rb
mini_autobot-0.5.0 lib/mini_autobot/init.rb
mini_autobot-0.4.0 lib/mini_autobot/init.rb
mini_autobot-0.3.0 lib/mini_autobot/init.rb
mini_autobot-0.2.2 lib/mini_autobot/init.rb
mini_autobot-0.2.1 lib/mini_autobot/init.rb
mini_autobot-0.2.0 lib/mini_autobot/init.rb
mini_autobot-0.1.1 lib/mini_autobot/init.rb
mini_autobot-0.1.0 lib/mini_autobot/init.rb
mini_autobot-0.0.8 lib/mini_autobot/init.rb
mini_autobot-0.0.7 lib/mini_autobot/init.rb
mini_autobot-0.0.6 lib/mini_autobot/init.rb
mini_autobot-0.0.5 lib/mini_autobot/init.rb
mini_autobot-0.0.4 lib/mini_autobot/init.rb
mini_autobot-0.0.3 lib/mini_autobot/init.rb
mini_autobot-0.0.2 lib/mini_autobot/init.rb
mini_autobot-0.0.1 lib/mini_autobot/init.rb