From f7450cdb6b195e5220b6568f2fbf07db88171dd0 Mon Sep 17 00:00:00 2001 From: Josh Kalderimis Date: Wed, 6 Nov 2013 01:40:42 +0100 Subject: [PATCH] removed the branches endpoint we already have branch info accessible via the repos endpoints, having this at the root level doesn't make sense. --- lib/travis/api/app/endpoint/branches.rb | 16 ---------------- spec/integration/v1/branches_spec.rb | 11 ----------- spec/integration/v2/branches_spec.rb | 11 ----------- spec/unit/endpoint/branches_spec.rb | 5 ----- 4 files changed, 43 deletions(-) delete mode 100644 lib/travis/api/app/endpoint/branches.rb delete mode 100644 spec/integration/v1/branches_spec.rb delete mode 100644 spec/integration/v2/branches_spec.rb delete mode 100644 spec/unit/endpoint/branches_spec.rb diff --git a/lib/travis/api/app/endpoint/branches.rb b/lib/travis/api/app/endpoint/branches.rb deleted file mode 100644 index 5f071bd6..00000000 --- a/lib/travis/api/app/endpoint/branches.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'travis/api/app' - -class Travis::Api::App - class Endpoint - class Branches < Endpoint - get '/' do - respond_with service(:find_branches, params), type: :branches - end - - # get '/:owner_name/:name/branches' do # v1 - # get '/repos/:owner_name/:name/branches' do # v2 - # respond_with service(:branches, :find_all, params), type: :branches - # end - end - end -end diff --git a/spec/integration/v1/branches_spec.rb b/spec/integration/v1/branches_spec.rb deleted file mode 100644 index 6e5c8735..00000000 --- a/spec/integration/v1/branches_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'spec_helper' - -describe 'Branches' do - let(:repo) { Repository.by_slug('svenfuchs/minimal').first } - let(:headers) { { 'HTTP_ACCEPT' => 'application/vnd.travis-ci.1+json' } } - - it 'GET /branches?repository_id=:repository_id' do - response = get '/branches', { repository_id: repo.id }, headers - response.should deliver_json_for(repo.last_finished_builds_by_branches, version: 'v1', type: 'branches') - end -end diff --git a/spec/integration/v2/branches_spec.rb b/spec/integration/v2/branches_spec.rb deleted file mode 100644 index 3e54ecc8..00000000 --- a/spec/integration/v2/branches_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'spec_helper' - -describe 'Branches' do - let(:repo) { Repository.by_slug('svenfuchs/minimal').first } - let(:headers) { { 'HTTP_ACCEPT' => 'application/vnd.travis-ci.2+json' } } - - it 'GET /branches?repository_id=:repository_id' do - response = get '/branches', { repository_id: repo.id }, headers - response.should deliver_json_for(repo.last_finished_builds_by_branches, version: 'v2', type: 'branches') - end -end diff --git a/spec/unit/endpoint/branches_spec.rb b/spec/unit/endpoint/branches_spec.rb deleted file mode 100644 index 03923cfd..00000000 --- a/spec/unit/endpoint/branches_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe Travis::Api::App::Endpoint::Branches do - it 'has to be tested' -end