Sha256: 4d9ccc45c43c329e4554bcb1843fbc50375c68e3b585e41c3b39b85fc2def112

Contents?: true

Size: 691 Bytes

Versions: 1

Compression:

Stored size: 691 Bytes

Contents

require "thor"
require "ribose"

require "ribose/cli/auth"
require "ribose/cli/util"
require "ribose/cli/version"
require "ribose/cli/command"

module Ribose
  module CLI
    def self.start(arguments)
      Ribose::CLI::Command.start(arguments)
    rescue Ribose::Unauthorized, Ribose::Errors::Forbidden
      Thor::Shell::Basic.new.say(
        "Invalid: Missing API Configuration\n\n" \
        "Ribose API Token & Email are required for any of the CLI operation\n" \
        "You can set your API Key using `ribose config --email email --password`",
      )
    end
  end

  # Temporary: The API Client will implement it
  module Errors
    class Forbidden < StandardError; end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ribose-cli-0.5.0 lib/ribose/cli.rb