Sha256: dff1b666cee489fdd15baa5f1e29145b78408ad9c55e4a59e6752e5c600c52c0

Contents?: true

Size: 854 Bytes

Versions: 71

Compression:

Stored size: 854 Bytes

Contents

class Terraspace::Terraform::Tfc::Runs
  class Base
    extend Memoist
    include Terraspace::Util::Logging
    include Terraspace::Util::Sure
    include Terraspace::Terraform::Api::Client

    # Api::Client requires @mod to be set
    def initialize(mod, options={})
      @mod, @options = mod, options
    end

    def runs
      runs = api.runs.list
      runs.select! do |item|
        @options[:status].nil? ||
        @options[:status].include?("all") ||
        @options[:status].include?(item['attributes']['status'])
      end
      runs
    end
    memoize :runs

    def build_project
      Terraspace::Builder.new(@options).run

      unless remote && remote['organization']
        logger.info "ERROR: There was no organization found. Are you sure you configured backend.tf with it?".color(:red)
        exit 1
      end
    end
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
terraspace-0.6.10 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.9 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.8 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.7 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.6 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.5 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.4 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.3 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.2 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.1 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.0 lib/terraspace/terraform/tfc/runs/base.rb