Sha256: 8e1b9bfab01e041caa05e4daf0ee4959856516ec93ed9ae0a201fd610c42d4b6

Contents?: true

Size: 1.53 KB

Versions: 1

Compression:

Stored size: 1.53 KB

Contents

# encoding: UTF-8

require 'pp'

require_relative '../shared'
require_relative '../../commands/process'

GoodData::CLI.module_eval do

  desc 'Work with deployed processes'
  arg_name 'Describe arguments to list here'
  command :process do |c|

    c.desc 'Use when you need to redeploy a specific process'
    c.default_value nil
    c.flag :process_id

    c.desc 'Specify directory for deployment'
    c.default_value nil
    c.flag :dir

    c.desc 'Specify type of deployment'
    c.default_value nil
    c.flag :type

    c.desc 'Specify name of deployed process'
    c.default_value nil
    c.flag :name

    c.desc "Lists all user's processes deployed on the plaform"
    c.command :list do |list|
      list.action do |global_options, options, args|
        opts = options.merge(global_options)
        GoodData.connect(opts)
        pp GoodData::Command::Process.list(options.merge(global_options))
      end
    end

    c.desc 'Gives you some basic info about the process'
    c.command :get do |get|
      get.action do |global_options, options, args|
        opts = options.merge(global_options)
        GoodData.connect(opts)
        pp GoodData::Command::Process.get(options.merge(global_options))
      end
    end

    c.desc 'Deploys provided directory to the server'
    c.command :deploy do |deploy|
      deploy.action do |global_options, options, args|
        opts = options.merge(global_options)
        GoodData.connect(opts)
        pp GoodData::Command::Process.deploy(options[:dir], options.merge(global_options))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gooddata-0.6.0 lib/gooddata/cli/commands/process_cmd.rb