auth PUT to /artifacts/:id
This commit is contained in:
parent
260c46181d
commit
b8dfb1cd00
1
Gemfile
1
Gemfile
|
@ -34,6 +34,7 @@ group :development do
|
|||
gem 'foreman'
|
||||
gem 'rerun'
|
||||
# gem 'debugger'
|
||||
gem 'rb-fsevent', '~> 0.9.1'
|
||||
end
|
||||
|
||||
group :development, :test do
|
||||
|
|
18
Gemfile.lock
18
Gemfile.lock
|
@ -1,8 +1,8 @@
|
|||
GIT
|
||||
remote: git://github.com/getsentry/raven-ruby.git
|
||||
revision: 73ee575e641bfe9e6d919599bde277bb21529954
|
||||
revision: ab0e8e5a14c416d38686de9a20f436e005efe735
|
||||
specs:
|
||||
sentry-raven (0.4.0)
|
||||
sentry-raven (0.4.2)
|
||||
faraday (>= 0.7.6)
|
||||
hashie
|
||||
multi_json (~> 1.0)
|
||||
|
@ -45,7 +45,7 @@ GIT
|
|||
|
||||
GIT
|
||||
remote: git://github.com/travis-ci/travis-core.git
|
||||
revision: 2d766c54c2fea70dfc4d937c22413eee937f002b
|
||||
revision: b8d0d63f433c8e63472b97b3c287b99d31027ecb
|
||||
specs:
|
||||
travis-core (0.0.1)
|
||||
actionmailer (~> 3.2.11)
|
||||
|
@ -209,7 +209,7 @@ GEM
|
|||
rack (>= 0.4)
|
||||
rack-protection (1.3.2)
|
||||
rack
|
||||
rack-ssl (1.3.2)
|
||||
rack-ssl (1.3.3)
|
||||
rack
|
||||
rack-test (0.6.2)
|
||||
rack (>= 1.0)
|
||||
|
@ -221,6 +221,7 @@ GEM
|
|||
rdoc (~> 3.4)
|
||||
thor (>= 0.14.6, < 2.0)
|
||||
rake (0.9.6)
|
||||
rb-fsevent (0.9.3)
|
||||
rdoc (3.12)
|
||||
json (~> 1.4)
|
||||
redcarpet (2.2.2)
|
||||
|
@ -237,7 +238,7 @@ GEM
|
|||
rspec-core (2.12.2)
|
||||
rspec-expectations (2.12.1)
|
||||
diff-lcs (~> 1.1.3)
|
||||
rspec-mocks (2.12.1)
|
||||
rspec-mocks (2.12.2)
|
||||
sidekiq (2.5.4)
|
||||
celluloid (~> 0.12.0)
|
||||
connection_pool (~> 0.9.2)
|
||||
|
@ -245,9 +246,9 @@ GEM
|
|||
redis (~> 3)
|
||||
redis-namespace
|
||||
signature (0.1.6)
|
||||
sinatra (1.3.3)
|
||||
rack (~> 1.3, >= 1.3.6)
|
||||
rack-protection (~> 1.2)
|
||||
sinatra (1.3.4)
|
||||
rack (~> 1.4)
|
||||
rack-protection (~> 1.3)
|
||||
tilt (~> 1.3, >= 1.3.3)
|
||||
sinatra-contrib (1.3.2)
|
||||
backports (>= 2.0)
|
||||
|
@ -295,6 +296,7 @@ DEPENDENCIES
|
|||
rack-cache (~> 1.2)
|
||||
rack-contrib!
|
||||
rake (~> 0.9.2)
|
||||
rb-fsevent (~> 0.9.1)
|
||||
rerun
|
||||
rspec (~> 2.11)
|
||||
sentry-raven!
|
||||
|
|
|
@ -10,11 +10,13 @@ class Travis::Api::App
|
|||
respond_with service(:find_artifact, params)
|
||||
end
|
||||
|
||||
# TODO needs auth, required for live log archiving on log:aggregted in travis-tasks
|
||||
#
|
||||
# put '/:id' do |id|
|
||||
# respond_with service(:update_artifact, params)
|
||||
# end
|
||||
put '/:id' do |id|
|
||||
# TODO @rkh ... rather lost in the auth/scopes code.
|
||||
token = env['HTTP_TOKEN']
|
||||
halt 403, 'no token' unless token
|
||||
halt 403, 'internal' unless token == Travis.config.tokens.internal
|
||||
respond_with service(:update_artifact, params)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user