tessa 1.0.0.pre.rc2 → 1.0.0.pre.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ec91d7852a413f0688cb7f10bfbae9dc695c08deee483247a1b775889f0a3df
4
- data.tar.gz: 72d7716cab7a0aabf2ec96261f27f072aa385c9a0261b76b0441a4eed77355a3
3
+ metadata.gz: 17688b084097b7f79807a5a55ca6a7d26bbc0b08e242876afe101d3cb5073698
4
+ data.tar.gz: 739705feff83e9b10c30f119b29bb455f9d8b67263447997fc30255d54b5c4ed
5
5
  SHA512:
6
- metadata.gz: 9a8bd41b2ae1e8fd37663f4c9cdf862b73372b6e6d7902d55af206cbae60a082529dd01ff8372254c2ef043560197273306eca1101618da89b0e3a327842c028
7
- data.tar.gz: 240014276857923ac31349684eafc0a5bf4e95f8bbfde3e68cb386e0c9c41363af4ed9dc9aaf8767ddf93cb5cb9418553606507292ac98538f30af9a67ac5b6f
6
+ metadata.gz: 113b0ff0fef87cebead7f296902273448a1333d7abfc8d93a2ba308944df19f169b72579a076a378350435037d7af9001680e83fc27a32cc07db0a4dfbd754cf
7
+ data.tar.gz: 7281dbe6f2b6a571d34c3db137fcb593dd64c586b92034333ff3908a5ce0856444b4ee459b40d29660a8d7834592027ac58b57e51036804757150f7a48df81b2
@@ -468,15 +468,10 @@ Dropzone.autoDiscover = false;
468
468
 
469
469
  window.WCC.Dropzone = class Dropzone extends window.Dropzone {
470
470
  uploadFile(file) {
471
- var handleError, headerName, headerValue, headers, progressObj, ref, ref1, response, updateProgress, xhr;
471
+ var handleError, headerName, headerValue, headers, progressObj, ref, response, updateProgress, xhr;
472
472
  xhr = new XMLHttpRequest;
473
473
  file.xhr = xhr;
474
474
  xhr.open(file.uploadMethod, file.uploadURL, true);
475
- ref = file.uploadHeaders;
476
- for (headerName in ref) {
477
- headerValue = ref[headerName];
478
- xhr.setRequestHeader(headerName, headerValue);
479
- }
480
475
  response = null;
481
476
  handleError = () => this._errorProcessing([ file ], response || this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr);
482
477
  updateProgress = e => {
@@ -503,7 +498,7 @@ window.WCC.Dropzone = class Dropzone extends window.Dropzone {
503
498
  return this.emit("uploadprogress", file, progress, file.upload.bytesSent);
504
499
  };
505
500
  xhr.onload = e => {
506
- var ref1;
501
+ var ref;
507
502
  if (file.status === WCC.Dropzone.CANCELED) {
508
503
  return;
509
504
  }
@@ -520,7 +515,7 @@ window.WCC.Dropzone = class Dropzone extends window.Dropzone {
520
515
  }
521
516
  }
522
517
  updateProgress();
523
- if (!(200 <= (ref1 = xhr.status) && ref1 < 300)) {
518
+ if (!(200 <= (ref = xhr.status) && ref < 300)) {
524
519
  return handleError();
525
520
  } else {
526
521
  return this._finished([ file ], response, e);
@@ -532,7 +527,7 @@ window.WCC.Dropzone = class Dropzone extends window.Dropzone {
532
527
  }
533
528
  return handleError();
534
529
  };
535
- progressObj = (ref1 = xhr.upload) != null ? ref1 : xhr;
530
+ progressObj = (ref = xhr.upload) != null ? ref : xhr;
536
531
  progressObj.onprogress = updateProgress;
537
532
  headers = {
538
533
  Accept: "application/json",
@@ -540,7 +535,10 @@ window.WCC.Dropzone = class Dropzone extends window.Dropzone {
540
535
  "X-Requested-With": "XMLHttpRequest"
541
536
  };
542
537
  if (this.options.headers) {
543
- extend(headers, this.options.headers);
538
+ $.extend(headers, this.options.headers);
539
+ }
540
+ if (file.uploadHeaders) {
541
+ $.extend(headers, file.uploadHeaders);
544
542
  }
545
543
  for (headerName in headers) {
546
544
  headerValue = headers[headerName];
@@ -463,15 +463,10 @@
463
463
  Dropzone.autoDiscover = false;
464
464
  window.WCC.Dropzone = class Dropzone extends window.Dropzone {
465
465
  uploadFile(file) {
466
- var handleError, headerName, headerValue, headers, progressObj, ref, ref1, response, updateProgress, xhr;
466
+ var handleError, headerName, headerValue, headers, progressObj, ref, response, updateProgress, xhr;
467
467
  xhr = new XMLHttpRequest;
468
468
  file.xhr = xhr;
469
469
  xhr.open(file.uploadMethod, file.uploadURL, true);
470
- ref = file.uploadHeaders;
471
- for (headerName in ref) {
472
- headerValue = ref[headerName];
473
- xhr.setRequestHeader(headerName, headerValue);
474
- }
475
470
  response = null;
476
471
  handleError = () => this._errorProcessing([ file ], response || this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr);
477
472
  updateProgress = e => {
@@ -498,7 +493,7 @@
498
493
  return this.emit("uploadprogress", file, progress, file.upload.bytesSent);
499
494
  };
500
495
  xhr.onload = e => {
501
- var ref1;
496
+ var ref;
502
497
  if (file.status === WCC.Dropzone.CANCELED) {
503
498
  return;
504
499
  }
@@ -515,7 +510,7 @@
515
510
  }
516
511
  }
517
512
  updateProgress();
518
- if (!(200 <= (ref1 = xhr.status) && ref1 < 300)) {
513
+ if (!(200 <= (ref = xhr.status) && ref < 300)) {
519
514
  return handleError();
520
515
  } else {
521
516
  return this._finished([ file ], response, e);
@@ -527,7 +522,7 @@
527
522
  }
528
523
  return handleError();
529
524
  };
530
- progressObj = (ref1 = xhr.upload) != null ? ref1 : xhr;
525
+ progressObj = (ref = xhr.upload) != null ? ref : xhr;
531
526
  progressObj.onprogress = updateProgress;
532
527
  headers = {
533
528
  Accept: "application/json",
@@ -535,7 +530,10 @@
535
530
  "X-Requested-With": "XMLHttpRequest"
536
531
  };
537
532
  if (this.options.headers) {
538
- extend(headers, this.options.headers);
533
+ $.extend(headers, this.options.headers);
534
+ }
535
+ if (file.uploadHeaders) {
536
+ $.extend(headers, file.uploadHeaders);
539
537
  }
540
538
  for (headerName in headers) {
541
539
  headerValue = headers[headerName];
@@ -13,7 +13,6 @@ class window.WCC.Dropzone extends window.Dropzone
13
13
 
14
14
  # Set in our custom accept method
15
15
  xhr.open file.uploadMethod, file.uploadURL, true
16
- xhr.setRequestHeader headerName, headerValue for headerName, headerValue of file.uploadHeaders
17
16
 
18
17
  response = null
19
18
 
@@ -76,7 +75,8 @@ class window.WCC.Dropzone extends window.Dropzone
76
75
  "Cache-Control": "no-cache",
77
76
  "X-Requested-With": "XMLHttpRequest",
78
77
 
79
- extend headers, @options.headers if @options.headers
78
+ $.extend headers, @options.headers if @options.headers
79
+ $.extend headers, file.uploadHeaders if file.uploadHeaders
80
80
 
81
81
  xhr.setRequestHeader headerName, headerValue for headerName, headerValue of headers
82
82
 
data/lib/tessa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tessa
2
- VERSION = "1.0.0-rc2"
2
+ VERSION = "1.0.0-rc3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tessa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.rc2
4
+ version: 1.0.0.pre.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Powell
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-06-10 00:00:00.000000000 Z
12
+ date: 2022-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday