add API endpoints for listing and deleting caches
This commit is contained in:
parent
018c3b3228
commit
44e1db3944
|
@ -23,7 +23,7 @@ GIT
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/travis-ci/travis-core.git
|
remote: git://github.com/travis-ci/travis-core.git
|
||||||
revision: bcc14ad2fafff932f1b681a332b6435b50ddb099
|
revision: 9db978cabd740dddbc94d105cc4242b56afe2e9f
|
||||||
specs:
|
specs:
|
||||||
travis-core (0.0.1)
|
travis-core (0.0.1)
|
||||||
actionmailer (~> 3.2.12)
|
actionmailer (~> 3.2.12)
|
||||||
|
@ -39,6 +39,7 @@ GIT
|
||||||
rake
|
rake
|
||||||
redis (~> 3.0)
|
redis (~> 3.0)
|
||||||
rollout (~> 1.1.0)
|
rollout (~> 1.1.0)
|
||||||
|
s3 (~> 0.3)
|
||||||
simple_states (~> 1.0.0)
|
simple_states (~> 1.0.0)
|
||||||
thor (~> 0.14.6)
|
thor (~> 0.14.6)
|
||||||
|
|
||||||
|
@ -177,6 +178,7 @@ GEM
|
||||||
newrelic_rpm (3.6.7.152)
|
newrelic_rpm (3.6.7.152)
|
||||||
pg (0.13.2)
|
pg (0.13.2)
|
||||||
polyglot (0.3.3)
|
polyglot (0.3.3)
|
||||||
|
proxies (0.2.1)
|
||||||
pry (0.9.12.2)
|
pry (0.9.12.2)
|
||||||
coderay (~> 1.0.5)
|
coderay (~> 1.0.5)
|
||||||
method_source (~> 0.8)
|
method_source (~> 0.8)
|
||||||
|
@ -226,6 +228,8 @@ GEM
|
||||||
rspec-expectations (2.14.0)
|
rspec-expectations (2.14.0)
|
||||||
diff-lcs (>= 1.1.3, < 2.0)
|
diff-lcs (>= 1.1.3, < 2.0)
|
||||||
rspec-mocks (2.14.1)
|
rspec-mocks (2.14.1)
|
||||||
|
s3 (0.3.17)
|
||||||
|
proxies (~> 0.2.0)
|
||||||
sidekiq (2.5.4)
|
sidekiq (2.5.4)
|
||||||
celluloid (~> 0.12.0)
|
celluloid (~> 0.12.0)
|
||||||
connection_pool (~> 0.9.2)
|
connection_pool (~> 0.9.2)
|
||||||
|
|
|
@ -68,6 +68,16 @@ class Travis::Api::App
|
||||||
respond_with service(:find_branch, params), type: :branch, version: :v2
|
respond_with service(:find_branch, params), type: :branch, version: :v2
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# List caches for a given repo. Can be filtered with `branch` and `match` query parameter.
|
||||||
|
get '/:repository_id/caches', scope: :private do
|
||||||
|
respond_with service(:find_caches, params), type: :caches, version: :v2
|
||||||
|
end
|
||||||
|
|
||||||
|
# Delete caches for a given repo. Can be filtered with `branch` and `match` query parameter.
|
||||||
|
delete '/:repository_id/caches', scope: :private do
|
||||||
|
respond_with service(:delete_caches, params), type: :caches, version: :v2
|
||||||
|
end
|
||||||
|
|
||||||
# Gets the repository with the given name.
|
# Gets the repository with the given name.
|
||||||
#
|
#
|
||||||
# ### Response
|
# ### Response
|
||||||
|
@ -129,6 +139,16 @@ class Travis::Api::App
|
||||||
get '/:owner_name/:name/branches/:branch' do
|
get '/:owner_name/:name/branches/:branch' do
|
||||||
respond_with service(:find_branch, params), type: :branch, version: :v2
|
respond_with service(:find_branch, params), type: :branch, version: :v2
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# List caches for a given repo. Can be filtered with `branch` and `match` query parameter.
|
||||||
|
get '/:owner_name/:name/caches', scope: :private do
|
||||||
|
respond_with service(:find_caches, params), type: :caches, version: :v2
|
||||||
|
end
|
||||||
|
|
||||||
|
# Delete caches for a given repo. Can be filtered with `branch` and `match` query parameter.
|
||||||
|
delete '/:owner_name/:name/caches', scope: :private do
|
||||||
|
respond_with service(:delete_caches, params), type: :caches, version: :v2
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user