bin/balboa in balboa-0.1.3 vs bin/balboa in balboa-0.1.4

- old
+ new

@@ -1,22 +1,26 @@ #!/usr/bin/env ruby # frozen_string_literal: true require_relative '../lib/balboa' +require_relative '../lib/balboa/cli/parser_builder' +require_relative '../lib/balboa/interactor/interactor_builder' -defaults = if File.exist?(Balboa::CONFIG_FILE) +require 'highline/import' + +options = if File.exist?(Balboa::CONFIG_FILE) YAML.load_file(Balboa::CONFIG_FILE) else - Balboa::CLI::Defaults.prompt + Balboa::CLI::Defaults.prompt(HighLine) end -options = Balboa::CLI::Options.parse(ARGV, defaults) +Balboa::CLI::ParserBuilder.create(ARGV, options).parse! raw_interactor = Balboa::Interactor::InteractorBuilder.create(options) interactor = Balboa::Interactor::InteractorWrapper.new(raw_interactor) app_last = Balboa::CLI::Command::LastCommand.new(interactor) -app_punch = Balboa::CLI::Command::PunchCommand.new(interactor) +app_punch = Balboa::CLI::Command::PunchCommand.new(interactor, HighLine) app_reset = Balboa::CLI::Command::ResetCommand.new app_star_wars = Balboa::CLI::Command::StarWarsCommand.new command = ARGV.first app = Balboa::CLI::Application.new(command)