Sha256: c05db7e92af9eaf780a6eae3f38d359abd4529b3fe24103fc04583dfd905984e

Contents?: true

Size: 661 Bytes

Versions: 1

Compression:

Stored size: 661 Bytes

Contents

require "json"

module RSpec::Terraspace
  class Ts
    extend Memoist
    include Concern

    CLI = ::Terraspace::CLI

    def build_test_harness(options={})
      project = Project.new(options)
      root = project.create
      Terraspace.root = root # switch root to the generated test harness
    end

    def up(args)
      run("up #{args} -y")
      mod = args.split(' ').first
      @mod = ::Terraspace::Mod.new(mod)
    end

    def down(args)
      run("down #{args} -y")
    end

    def run(command)
      puts "=> TS_ENV=#{Terraspace.env} terraspace #{command}".color(:green)
      args = command.split(' ')
      CLI.start(args)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec-terraspace-0.3.0 lib/rspec/terraspace/ts.rb