Module: Kongfigure

Defined in:
lib/kongfigure.rb,
lib/kongfigure/cli.rb,
lib/kongfigure/kong.rb,
lib/kongfigure/parser.rb,
lib/kongfigure/version.rb,
lib/kongfigure/http_client.rb,
lib/kongfigure/configuration.rb

Defined Under Namespace

Modules: Errors, Resources, Synchronizers Classes: CLI, Configuration, HTTPClient, Kong, Parser

Constant Summary collapse

VERSION =
"0.1.1"

Class Method Summary collapse

Class Method Details

.loggerObject



41
42
43
# File 'lib/kongfigure.rb', line 41

def self.logger
  @logger ||= Logger.new(STDOUT)
end

.start(args) ⇒ Object



45
46
47
48
49
50
51
52
53
54
# File 'lib/kongfigure.rb', line 45

def self.start(args)
  # CLI
  cli           = Kongfigure::CLI.new
  options       = cli.parse!(args)
  # Parser
  parser        = Kongfigure::Parser.new(options[:file], options[:debug])
  http_client   = Kongfigure::HTTPClient.new(parser, options[:url])
  kong          = Kongfigure::Kong.new(parser, http_client)
  kong.apply!
end