Sha256: 51e53392f0b87f72df0f4d64596847b7e5f34ea3a1f9c980d08388b82ec00a6f

Contents?: true

Size: 951 Bytes

Versions: 3

Compression:

Stored size: 951 Bytes

Contents

# frozen_string_literal: true

require "thor"

module Boilercode
  module Commands
    class Drive < Thor
      namespace :drive

      desc "search", "Search for a file, receive the url and optionally download it"
      method_option :help, aliases: "-h", type: :boolean,
        desc: "Display usage information"
      def search
        if options[:help]
          invoke :help, ["search"]
        else
          require_relative "drive/search"
          Boilercode::Commands::Drive::Search.new(options).execute
        end
      end

      desc "upload", "Upload given file to BoilerCode Drive"
      method_option :help, aliases: "-h", type: :boolean,
        desc: "Upload given file to BoilerCode Drive"
      def upload
        if options[:help]
          invoke :help, ["upload"]
        else
          require_relative "drive/upload"
          Boilercode::Commands::Drive::Upload.new(options).execute
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
boilercode-0.1.2 lib/boilercode/commands/drive.rb
boilercode-0.1.1 lib/boilercode/commands/drive.rb
boilercode-0.1.0 lib/boilercode/commands/drive.rb