Module: Tanakai

Defined in:
lib/tanakai.rb,
lib/tanakai/cli.rb,
lib/tanakai/base.rb,
lib/tanakai/runner.rb,
lib/tanakai/version.rb,
lib/tanakai/pipeline.rb,
lib/tanakai/base/saver.rb,
lib/tanakai/base_helper.rb,
lib/tanakai/base/storage.rb,
lib/tanakai/cli/generator.rb,
lib/tanakai/browser_builder.rb,
lib/tanakai/cli/ansible_command_builder.rb

Defined Under Namespace

Modules: BaseHelper, BrowserBuilder Classes: Base, CLI, Pipeline, Runner

Constant Summary collapse

VERSION =
"1.7.4"

Class Method Summary collapse

Class Method Details

.configurationObject



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

def configuration
  @configuration ||= OpenStruct.new
end

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

Yields:



26
27
28
# File 'lib/tanakai.rb', line 26

def configure
  yield(configuration)
end

.envObject



30
31
32
# File 'lib/tanakai.rb', line 30

def env
  ENV.fetch("TANAKAI_ENV") { "development" }
end

.find_by_name(name) ⇒ Object



49
50
51
52
# File 'lib/tanakai.rb', line 49

def find_by_name(name)
  return unless name
  Base.descendants.find { |klass| klass.name == name }
end

.listObject



42
43
44
45
46
47
# File 'lib/tanakai.rb', line 42

def list
  Base.descendants.map do |klass|
    next unless klass.name
    [klass.name, klass]
  end.compact.to_h
end

.time_zoneObject



34
35
36
# File 'lib/tanakai.rb', line 34

def time_zone
  ENV["TZ"]
end

.time_zone=(value) ⇒ Object



38
39
40
# File 'lib/tanakai.rb', line 38

def time_zone=(value)
  ENV.store("TZ", value)
end