scrivito_sdk 1.0.0.rc2 → 1.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cf6f6eeb2b370c0b1c082d72ab79945fc5e6e829
4
- data.tar.gz: 951c6bf4700f0b98d2ae83bb8d21b7fb180ef65c
3
+ metadata.gz: f33f97ff4b8f4963b1af0d002f3b0aeec65eed41
4
+ data.tar.gz: ba738b23d73a7a6a65946e7d88f193835c947815
5
5
  SHA512:
6
- metadata.gz: 0b610d0d3e736a780c64ec0f35f7ebddb32376dc1a62bdf4e8ff788199a63ad6e24459e10ac8e938f24c07454b37f94b884dff24ed675d3428419ffa18abbe94
7
- data.tar.gz: 5bcac040e866182fe1e42162fef81c5d094d07f8a72000c7e808d4c017e535280fcb23e36a8b774a7f8c3cf7748f799f42dbbc67f775dc3a5e448dd6de3b9475
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: Thu Nov 26 13:03:28 2015
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
- destination_obj_id: obj_id,
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
- file: binary.file_to_be_uploaded,
81
- filename: binary.filename,
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:, filename:, content_type:, upload_permission:)
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'].merge('filename' => filename, 'content_type' => content_type)
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.rc2
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-26 00:00:00.000000000 Z
11
+ date: 2015-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable