scrivito_sdk 1.0.0.rc2 → 1.0.0.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/ca-bundle.crt +1 -1
- data/lib/assets/javascripts/scrivito_ui.js +0 -3
- data/lib/scrivito/cms_rest_api.rb +9 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f33f97ff4b8f4963b1af0d002f3b0aeec65eed41
|
4
|
+
data.tar.gz: ba738b23d73a7a6a65946e7d88f193835c947815
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4608377dc73061e31818562db827f225fd76c260e0bbcfea90fb8b002bf8086a62fc411a164ff580d8d9a87b3ddecf1633a47a1eafed3e792a6a746bd158dc7d
|
7
|
+
data.tar.gz: c4cae0d622dee84ab6c4826de37b740c0b540d9ca3377ebec374bfeb038bbe9e3409ea85254e2d41035b9d3161e1532e6a41132b1a68da7316e26a48d5039ba1
|
data/config/ca-bundle.crt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##
|
2
2
|
## Bundle of CA Root Certificates
|
3
3
|
##
|
4
|
-
## Certificate data from Mozilla as of:
|
4
|
+
## Certificate data from Mozilla as of: Mon Nov 30 13:21:18 2015
|
5
5
|
##
|
6
6
|
## This is a bundle of X.509 certificates of public Certificate Authorities
|
7
7
|
## (CA). These were automatically extracted from Mozilla's root certificates
|
@@ -30581,9 +30581,6 @@ var scrivito = {};
|
|
30581
30581
|
// File must be appended last, otherwise S3 will complain.
|
30582
30582
|
form_data.append('file', binary.blob || binary.file);
|
30583
30583
|
|
30584
|
-
permission.blob.filename = binary.filename;
|
30585
|
-
permission.blob.content_type = binary.content_type;
|
30586
|
-
|
30587
30584
|
return $.ajax({type: 'POST', url: permission.url, data: form_data,
|
30588
30585
|
// These are needed in order for jQuery to work properly with a FormData.
|
30589
30586
|
contentType: false,
|
@@ -69,20 +69,14 @@ module Scrivito
|
|
69
69
|
def self.upload_future_binary(binary, obj_id)
|
70
70
|
if binary.id_to_be_copied
|
71
71
|
id = normalize_path_component(binary.id_to_be_copied)
|
72
|
-
put("blobs/#{id}/copy",
|
73
|
-
|
74
|
-
filename: binary.filename,
|
75
|
-
content_type: binary.content_type,
|
76
|
-
})
|
72
|
+
put("blobs/#{id}/copy", destination_obj_id: obj_id, filename: binary.filename,
|
73
|
+
content_type: binary.content_type)
|
77
74
|
else
|
78
75
|
upload_permission = get('blobs/upload_permission')
|
79
|
-
upload = perform_file_upload(
|
80
|
-
|
81
|
-
|
82
|
-
content_type: binary.content_type
|
83
|
-
upload_permission: upload_permission,
|
84
|
-
)
|
85
|
-
activate_upload(upload: upload, obj_id: obj_id)
|
76
|
+
upload = perform_file_upload(binary.file_to_be_uploaded, binary.content_type,
|
77
|
+
upload_permission)
|
78
|
+
activate_upload(upload: upload, obj_id: obj_id, filename: binary.filename,
|
79
|
+
content_type: binary.content_type)
|
86
80
|
end
|
87
81
|
end
|
88
82
|
|
@@ -189,15 +183,16 @@ module Scrivito
|
|
189
183
|
end
|
190
184
|
end
|
191
185
|
|
192
|
-
def perform_file_upload(file
|
186
|
+
def perform_file_upload(file, content_type, upload_permission)
|
193
187
|
uri = URI.parse(upload_permission['url'])
|
188
|
+
|
194
189
|
File.open(file) do |open_file|
|
195
190
|
upload_io = UploadIO.new(open_file, content_type, File.basename(file))
|
196
191
|
params = upload_permission['fields'].merge('file' => upload_io)
|
197
192
|
request = Net::HTTP::Post::Multipart.new(uri.path, params)
|
198
193
|
response = ConnectionManager.request(uri, request)
|
199
194
|
if response.code.starts_with?('2')
|
200
|
-
upload_permission['blob']
|
195
|
+
upload_permission['blob']
|
201
196
|
else
|
202
197
|
raise ScrivitoError, "File upload failed with code #{response.code}"
|
203
198
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Infopark AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|