Sha256: aca21c812d44bacf4b7e48fe3cf4368293ffd4ca8b1ad47c34dc555492cd36df

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

module WerckerAPI
  class Commit

    include Virtus.model

    attribute :_id,     String
    attribute :commit,  String
    attribute :message, String
    attribute :by,      String

  end

  class Run
    INDEX = -> (version) { "/api/#{version}/runs" }
    SHOW = -> (version, run_id) { "/api/#{version}/runs/#{run_id}" }

    include Virtus.model

    attribute :id, String
    attribute :url, String
    attribute :branch, String
    attribute :commitHash, String
    attribute :createdAt, Time
    attribute :envVars, Array[String]
    attribute :finishedAt, Time
    attribute :message, String
    attribute :progress, Integer
    attribute :result, String
    attribute :startedAt, Time
    attribute :status, String
    attribute :pullRequest, Hash
    attribute :commits, Array[Commit]
    attribute :sourceRun, Run
    attribute :user, User
    attribute :pipeline, Pipeline

    def source_run
      sourceRun
    end

    def commit_hash
      commitHash
    end

    def created_at
      createdAt
    end

    def finished_at
      finishedAt
    end

    def env_vars
      envVars
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wercker_api-0.1.10 lib/wercker_api/run.rb