lib/munge/cli/commands/view.rb in munge-0.7.0 vs lib/munge/cli/commands/view.rb in munge-0.7.1

- old
+ new

@@ -26,22 +26,21 @@ module Munge module Cli module Commands class View - def initialize(config_path, options) - config = Munge::Util::Config.read(config_path) - rack_opts = { Host: options[:host], Port: options[:port] } + def initialize(bootloader, host:, port:) + config = bootloader.config app = Rack::Builder.new do use Rack::ShowExceptions use Rack::Head use Adsf::Rack::IndexFileFinder, root: config[:output] run Rack::File.new(config[:output]) end - Rack::Handler::WEBrick.run(app, rack_opts) + Rack::Handler::WEBrick.run(app, Host: host, Port: port) end end end end end