Sha256: d3a93d27745c20c235f7885519271d511c4844966cfd88131c8f347050af9ed3

Contents?: true

Size: 560 Bytes

Versions: 21

Compression:

Stored size: 560 Bytes

Contents

require 'stash/pull_request'

module Stash
  class Repository
    attr_accessor :server, :project, :repo

    def initialize(server, project, repo)
      self.server = server
      self.project = project
      self.repo = repo
    end

    def pull_request(id)
      PullRequest.new(self, id)
    end

    def get(path)
      server.get(endpoint + path)
    end

    def post(path, data)
      server.post(endpoint + path, data)
    end

    def endpoint
      "/projects/#{project}/repos/#{repo}"
    end

    def logger
      server.logger
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
face_control-1.0.0 lib/stash/repository.rb
face_control-0.9.1 lib/stash/repository.rb
face_control-0.8.6 lib/stash/repository.rb
face_control-0.9.0 lib/stash/repository.rb
face_control-0.8.5 lib/stash/repository.rb
face_control-0.8.4 lib/stash/repository.rb
face_control-0.8.3 lib/stash/repository.rb
face_control-0.8.2 lib/stash/repository.rb
face_control-0.8.1 lib/stash/repository.rb
face_control-0.8.0 lib/stash/repository.rb
face_control-0.7.0 lib/stash/repository.rb
face_control-0.6.0 lib/stash/repository.rb
face_control-0.5.1 lib/stash/repository.rb
face_control-0.5.0 lib/stash/repository.rb
face_control-0.4.0 lib/stash/repository.rb
face_control-0.3.0 lib/stash/repository.rb
face_control-0.2.1 lib/stash/repository.rb
stash_pull_request_commenter-0.2.1 lib/stash/repository.rb
stash_pull_request_commenter-0.2.0 lib/stash/repository.rb
stash_pull_request_commenter-0.0.2 lib/stash/repository.rb