Sha256: 24a690ed3040c51aae4e94768e412774807f89e82b155cae05a85e2591a1be62

Contents?: true

Size: 857 Bytes

Versions: 6

Compression:

Stored size: 857 Bytes

Contents

require "shelly/cli/main"

module Shelly
  module CLI
    class Runner < Thor::Shell::Basic
      include Helpers
      attr_accessor :args

      def initialize(args = [])
        super()
        @args = args
      end

      def debug?
        args.include?("--debug") || ENV['SHELLY_DEBUG'] == "true"
      end

      def start
        Shelly::CLI::Main.start(args)
      rescue SystemExit; raise
      rescue Client::GemVersionException => e
        say "Required shelly gem version: #{e.body["required_version"]}"
        say "Your version: #{VERSION}"
        say_error "Update shelly gem with `gem install shelly`"
      rescue Interrupt
        say_new_line
        say_error "[canceled]"
      rescue Exception
        raise if debug?
        say_error "Unknown error, to see debug information run command with --debug"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
shelly-0.0.49.pre lib/shelly/cli/runner.rb
shelly-0.0.49 lib/shelly/cli/runner.rb
shelly-0.0.48 lib/shelly/cli/runner.rb
shelly-0.0.48.pre4 lib/shelly/cli/runner.rb
shelly-0.0.48.pre3 lib/shelly/cli/runner.rb
shelly-0.0.48.pre2 lib/shelly/cli/runner.rb