Sha256: 8d9f93cdc7505152a3379b3c86216b069aac10c2890fbc035885f9687d56b8f3

Contents?: true

Size: 543 Bytes

Versions: 48

Compression:

Stored size: 543 Bytes

Contents

class Terraspace::CLI::New
  class Stack < Sequence
    component_options.each { |args| class_option(*args) }

    # default so terraspace new example works without a Thor warning
    argument :name, default: "demo"

    def create_stack
      puts "=> Creating new stack called #{name}"
      plugin_template_source(@options[:lang], "stack") # IE: plugin_template_source("hcl", "stack")
      dest = "app/stacks/#{name}"
      dest = "#{@options[:project_name]}/#{dest}" if @options[:project_name]
      directory ".", dest
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
terraspace-2.2.17 lib/terraspace/cli/new/stack.rb
terraspace-2.2.16 lib/terraspace/cli/new/stack.rb
terraspace-2.2.15 lib/terraspace/cli/new/stack.rb
terraspace-2.2.14 lib/terraspace/cli/new/stack.rb
terraspace-2.2.13 lib/terraspace/cli/new/stack.rb
terraspace-2.2.12 lib/terraspace/cli/new/stack.rb
terraspace-2.2.11 lib/terraspace/cli/new/stack.rb
terraspace-2.2.10 lib/terraspace/cli/new/stack.rb
terraspace-2.2.9 lib/terraspace/cli/new/stack.rb
terraspace-2.2.8 lib/terraspace/cli/new/stack.rb
terraspace-2.2.7 lib/terraspace/cli/new/stack.rb
terraspace-2.2.6 lib/terraspace/cli/new/stack.rb
terraspace-2.2.5 lib/terraspace/cli/new/stack.rb
terraspace-2.2.4 lib/terraspace/cli/new/stack.rb
terraspace-2.2.3 lib/terraspace/cli/new/stack.rb
terraspace-2.2.2 lib/terraspace/cli/new/stack.rb
terraspace-2.2.1 lib/terraspace/cli/new/stack.rb
terraspace-2.2.0 lib/terraspace/cli/new/stack.rb
terraspace-2.1.7 lib/terraspace/cli/new/stack.rb
terraspace-2.1.6 lib/terraspace/cli/new/stack.rb