lib/ribose/cli.rb in ribose-cli-0.1.0 vs lib/ribose/cli.rb in ribose-cli-0.2.0
- old
+ new
@@ -1,7 +1,26 @@
+require "thor"
+require "ribose"
+
+require "ribose/cli/auth"
+require "ribose/cli/util"
require "ribose/cli/version"
+require "ribose/cli/command"
module Ribose
- module Cli
- # Your code goes here...
+ module CLI
+ def self.start(arguments)
+ Ribose::CLI::Command.start(arguments)
+ rescue 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 --token "" --email "" `",
+ )
+ end
+ end
+
+ # Temporary: The API Client will implement it
+ module Errors
+ class Forbidden < StandardError; end
end
end