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-1.0.4 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-1.0.3 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-1.0.2 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-1.0.1 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-1.0.0 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.7.2 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.7.1 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.7.0 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.23 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.22 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.21 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.20 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.19 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.18 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.17 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.16 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.15 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.13 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.12 lib/terraspace/terraform/tfc/runs/base.rb
terraspace-0.6.11 lib/terraspace/terraform/tfc/runs/base.rb