Sha256: 2ff3ee48b5a99643baaab4f999a1d8814b2848d098924755aa346e1c266542c0

Contents?: true

Size: 960 Bytes

Versions: 1

Compression:

Stored size: 960 Bytes

Contents

require 'pp'

require File.join(File.dirname(__FILE__), "../shared")
require File.join(File.dirname(__FILE__), "../../commands/scaffold")

GoodData::CLI.module_eval do

  desc 'Scaffold things'
  arg_name 'show'
  command :scaffold do |c|

    c.desc "Scaffold a gooddata project blueprint"
    c.command :project do |project|
      project.action do |global_options, options, args|
        name = args.first
        fail "Name of the project has to be provided" if name.nil? || name.empty?
        GoodData::Command::Scaffold.project(name)
      end
    end

    c.desc "Scaffold a gooddata ruby brick. This is a piece of code that you can run on our platform"
    c.command :brick do |brick|
      # brick.arg_name 'name'
      brick.action do |global_options, options, args|
        name = args.first
        fail "Name of the brick has to be provided" if name.nil? || name.empty?
        GoodData::Command::Scaffold.brick(name)
      end
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gooddata-0.6.0.pre11 lib/gooddata/cli/commands/scaffold_cmd.rb