Sha256: 502814824404d314d2c3ee903503af7a22cd6e4d8f94fb76d753c89a5cb8e8fd

Contents?: true

Size: 497 Bytes

Versions: 1

Compression:

Stored size: 497 Bytes

Contents

# Wrap project in object to allow lazy loading of status
class Cody::List
  class Project
    include Cody::AwsServices

    attr_reader :name
    def initialize(name)
      @name = name # Simple string
    end

    def status
      resp = codebuild.batch_get_builds(ids: [build_id])
      build = resp.builds.first
      build.build_status
    end

    def build_id
      resp = codebuild.list_builds_for_project(project_name: @name)
      resp.ids.first # most recent build_id
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cody-0.9.1 lib/cody/list/project.rb