class Drone::Repository

Attributes

active[R]
clone_url[R]
created_at[R]
git_url[R]
host[R]
name[R]
owner[R]
post_commits[R]
private[R]
privileged[R]
pull_requests[R]
remote[R]
ssh_url[R]
timeout[R]
updated_at[R]
url[R]

Public Class Methods

build_with_hash(hash) click to toggle source
# File lib/drone/repository.rb, line 32
def self.build_with_hash(hash)
  Repository.new(
    remote:         hash["remote"],
    host:           hash["host"],
    owner:          hash["owner"],
    name:           hash["name"],
    url:            hash["url"],
    clone_url:      hash["clone_url"],
    git_url:        hash["git_url"],
    ssh_url:        hash["ssh_url"],
    active:         hash["active"],
    private:        hash["private"],
    privileged:     hash["privileged"],
    post_commits:   hash["post_commits"],
    pull_requests:  hash["pull_requests"],
    timeout:        hash["timeout"],
    created_at:     hash["created_at"],
    updated_at:     hash["updated_at"]
  )
end
new( remote: nil, host: nil, owner: nil, name: nil, url: nil, clone_url: nil, git_url: nil, ssh_url: nil, active: nil, private: nil, privileged: nil, post_commits: nil, pull_requests: nil, timeout: nil, created_at: nil, updated_at: nil) click to toggle source
# File lib/drone/repository.rb, line 5
def initialize(
    remote: nil, host: nil, owner: nil, name: nil,
    url: nil, clone_url: nil, git_url: nil, ssh_url: nil,
    active: nil, private: nil, privileged: nil, post_commits: nil, pull_requests: nil,
    timeout: nil, created_at: nil, updated_at: nil)
  @remote        = remote
  @host          = host
  @owner         = owner
  @name          = name
  @url           = url
  @clone_url     = clone_url
  @git_url       = git_url
  @ssh_url       = ssh_url
  @active        = active
  @private       = private
  @privileged    = privileged
  @post_commits  = post_commits
  @pull_requests = pull_requests
  @timeout       = timeout
  @created_at    = created_at
  @updated_at    = updated_at
end

Public Instance Methods

path() click to toggle source
# File lib/drone/repository.rb, line 28
def path
  [@host, @owner, @name].join("/")
end