blob: 0d2856a3273409cef0de08c3a8d976180849909a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
require 'chef_zero/rest_base'
module ChefZero
module Endpoints
# The minimum amount of S3 necessary to support cookbook upload/download
# /file_store/FILE
class FileStoreFileEndpoint < RestBase
def json_only
false
end
def get(request)
[200, {"Content-Type" => 'application/x-binary'}, get_data(request) ]
end
def put(request)
data_store.set(request.rest_path, request.body, :create, :create_dir)
json_response(200, {})
end
end
end
end
|