Sha256: a6496da54a5e590ca3c09018042f5d07eb34779c4928ac124185246ed11eda2d

Contents?: true

Size: 1002 Bytes

Versions: 1

Compression:

Stored size: 1002 Bytes

Contents

# frozen_string_literal: true

require 'hobgoblin'
require 'thor'

module Hobgoblin
  class CLI < Thor
    include Thor::Actions

    class_option 'server', type: :string, desc: 'URL for the Bridge Troll server',
      required: true

    desc 'upload <SOURCE> <REMOTE_PATH>', 'Uploads a local file to the Bridge Troll bucket'
    long_desc <<-DESC
      Upload sends a local file to the remote Bridge Troll bucket with the path
      specified by <REMOTE_PATH>.
    DESC
    def upload(source, remote_path)
      require 'hobgoblin/cli/upload'
      Upload.new(source, remote_path, options).run
    end

    desc 'download <REMOTE_SOURCE> <PATH>', 'Downloads a remote file from the Bridge Troll bucket'
    long_desc <<-DESC
      Download pulls a remote file to the remote Bridge Troll bucket with the path
      specified by <REMOTE_SOURCE>.
    DESC
    def download(remote_source, path)
      require 'hobgoblin/cli/download'
      Download.new(remote_source, path, options).run
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hobgoblin-0.1.0 lib/hobgoblin/cli.rb