Sha256: 31bd79279a971ea9cb0e4c8cdfb5f668f867ad4bae7d61f3dab2835ba2bdb21e

Contents?: true

Size: 719 Bytes

Versions: 20

Compression:

Stored size: 719 Bytes

Contents

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

    argument :name

    def create_stack
      plugin_template_source(@options[:lang], "stack") # IE: plugin_template_source("hcl", "stack")

      puts "=> Creating new stack called #{name}."
      dest = "app/stacks/#{name}"
      dest = "#{@options[:project_name]}/#{dest}" if @options[:project_name]
      directory ".", dest
    end

    def create_test
      Test::Project.start(component_args(name, @options[:project_name]))
    end

    def run_generator_hook_script
      script = ENV['TS_GENERATOR_STACK']
      return unless script
      run_script(script, "app/stacks/#{name}")
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
terraspace-0.4.4 lib/terraspace/cli/new/stack.rb
terraspace-0.4.3 lib/terraspace/cli/new/stack.rb
terraspace-0.4.2 lib/terraspace/cli/new/stack.rb
terraspace-0.4.1 lib/terraspace/cli/new/stack.rb
terraspace-0.4.0 lib/terraspace/cli/new/stack.rb
terraspace-0.3.6 lib/terraspace/cli/new/stack.rb
terraspace-0.3.5 lib/terraspace/cli/new/stack.rb
terraspace-0.3.4 lib/terraspace/cli/new/stack.rb
terraspace-0.3.3 lib/terraspace/cli/new/stack.rb
terraspace-0.3.2 lib/terraspace/cli/new/stack.rb
terraspace-0.3.1 lib/terraspace/cli/new/stack.rb
terraspace-0.3.0 lib/terraspace/cli/new/stack.rb
terraspace-0.2.4 lib/terraspace/cli/new/stack.rb
terraspace-0.2.3 lib/terraspace/cli/new/stack.rb
terraspace-0.2.2 lib/terraspace/cli/new/stack.rb
terraspace-0.2.1 lib/terraspace/cli/new/stack.rb
terraspace-0.2.0 lib/terraspace/cli/new/stack.rb
terraspace-0.1.2 lib/terraspace/cli/new/stack.rb
terraspace-0.1.1 lib/terraspace/cli/new/stack.rb
terraspace-0.1.0 lib/terraspace/cli/new/stack.rb