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.1.5 lib/terraspace/cli/new/stack.rb
terraspace-2.1.4 lib/terraspace/cli/new/stack.rb
terraspace-2.1.3 lib/terraspace/cli/new/stack.rb
terraspace-2.1.2 lib/terraspace/cli/new/stack.rb
terraspace-2.1.1 lib/terraspace/cli/new/stack.rb
terraspace-2.1.0 lib/terraspace/cli/new/stack.rb
terraspace-2.0.3 lib/terraspace/cli/new/stack.rb
terraspace-2.0.2 lib/terraspace/cli/new/stack.rb
terraspace-2.0.1 lib/terraspace/cli/new/stack.rb
terraspace-2.0.0 lib/terraspace/cli/new/stack.rb
terraspace-1.1.7 lib/terraspace/cli/new/stack.rb
terraspace-1.1.6 lib/terraspace/cli/new/stack.rb
terraspace-1.1.5 lib/terraspace/cli/new/stack.rb
terraspace-1.1.4 lib/terraspace/cli/new/stack.rb
terraspace-1.1.3 lib/terraspace/cli/new/stack.rb
terraspace-1.1.2 lib/terraspace/cli/new/stack.rb
terraspace-1.1.1 lib/terraspace/cli/new/stack.rb
terraspace-1.1.0 lib/terraspace/cli/new/stack.rb
terraspace-1.0.6 lib/terraspace/cli/new/stack.rb
terraspace-1.0.5 lib/terraspace/cli/new/stack.rb