Sha256: 3820f93de4ecea3f3c1a07521afa2d961e82e886943572bba6b4276c1feeb940

Contents?: true

Size: 1.75 KB

Versions: 3

Compression:

Stored size: 1.75 KB

Contents

require "ribose/cli/rcfile"
require "ribose/cli/commands/base"
require "ribose/cli/commands/space"
require "ribose/cli/commands/file"
require "ribose/cli/commands/conversation"
require "ribose/cli/commands/message"
require "ribose/cli/commands/note"
require "ribose/cli/commands/member"
require "ribose/cli/commands/invitation"
require "ribose/cli/commands/join_space"

module Ribose
  module CLI
    class Command < Thor
      desc "space", "List, Add or Remove User Space"
      subcommand :space, Ribose::CLI::Commands::Space

      desc "member", "List, Add or Remove Space Member"
      subcommand :member, Ribose::CLI::Commands::Member

      desc "note", "List, Add or Remove Space Note"
      subcommand :note, Ribose::CLI::Commands::Note

      desc "file", "List, Add or Remove Files"
      subcommand :file, Ribose::CLI::Commands::File

      desc "conversation", "List, Add or Remove Conversation"
      subcommand :conversation, Ribose::CLI::Commands::Conversation

      desc "message", "List, Add or Remove Message"
      subcommand :message, Ribose::CLI::Commands::Message

      desc "invitation", "Manage Space Invitations"
      subcommand :invitation, Ribose::CLI::Commands::Invitation

      desc "join-space", "Manage Join Space Request"
      subcommand :join_space, Ribose::CLI::Commands::JoinSpace

      desc "config", "Configure API Key and User Email"
      option :token, required: true, desc: "Your API Token for Ribose"
      option :email, required: true, desc: "Your email address for Ribose"

      def config
        Ribose::CLI::RCFile.set(
          email: options[:email], token: options[:token],
        )
      end

      desc "version", "The current active version"
      def version
        say(Ribose::CLI::VERSION)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ribose-cli-0.3.2 lib/ribose/cli/command.rb
ribose-cli-0.2.1 lib/ribose/cli/command.rb
ribose-cli-0.2.0 lib/ribose/cli/command.rb