Class: KitchenHooks::Main

Inherits:
Thor
  • Object
show all
Defined in:
lib/kitchen_hooks/main.rb

Instance Method Summary collapse

Instance Method Details

#artObject



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/kitchen_hooks/main.rb', line 18

def art
  w = ART.lines.map(&:length).sort.last
  w += 1 if w % 2 != 0
  puts
  puts 'kitchen_hooks'.center(w)
  puts VERSION.center(w)
  puts
  puts SUMMARY.center(w)
  puts "\n\n\n"
  puts ART
  puts "\n\n\n"
end

#serverObject



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/kitchen_hooks/main.rb', line 63

def server
  App.config! JSON::parse(File.read(options.config))
  App.backlog!
  App.db! options.database
  App.tmp! options.tmpdir
  App.sync!
  App.set :environment, options.environment
  App.set :port, options.port
  App.set :bind, options.bind
  App.set :raise_errors, true
  App.set :dump_errors, true
  App.set :show_exceptions, true
  App.set :logging, ::Logger::DEBUG
  App.run!

  at_exit do
    App.close!
  end
end

#versionObject



12
13
14
# File 'lib/kitchen_hooks/main.rb', line 12

def version
  puts VERSION
end