filestack 2.8.0 → 2.8.1

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
  SHA256:
3
- metadata.gz: 8293c3bf008ad994166882a2029f0936ee64f4c070ef41040d2c97f492f37cb4
4
- data.tar.gz: 7749e600bce0dc504a943553ea6e807a5ed4aab8f43813a2cc62fd78d61905ff
3
+ metadata.gz: 77f23edf489898b7e03305bca017f6eb519cf3995aecd120908a6d01042ca60d
4
+ data.tar.gz: bcdc3b18c9ecd5ebbc886cfd518a08b2ba0eccdc994f24e673095fdfdc84945f
5
5
  SHA512:
6
- metadata.gz: f44323a268793efb45679967fbeafe880ab3b21299744c5ab545d066bfe72007af5673d4e750e789d400469ae6e3888ba58459f8f5d41713d31d527bdc7f4147
7
- data.tar.gz: 01d18cbf962f1548b8cdca6db43d15705d07c15647c638710eaf90d9bba419e315f2fc39ef15ee48bc0e247f4cf7cbcd0bb094525413ded7d4cf341584e90cec
6
+ metadata.gz: 596a72ca7995f8ba53a63d78f6ae2b0994f5c02b5b8e38fb273f0b6aefb8f657638544ee2775320d7d8c472dee8879bf5e7765de0f8ecf96ed93c973eeb1707a
7
+ data.tar.gz: e55b56cfefdfeaa5bffbd52f83af5d9d92ebf7952150c02fec12a43f256a3f8b2e8575627593f12fe826ac1004104e4c42bf45c1e7c8748609730faaf6ced218
@@ -1,5 +1,8 @@
1
1
  # Filestack-Ruby Changelog
2
2
 
3
+ ## 2.8.1 (October 1, 2020)
4
+ - Add rescue and raises body message on upload
5
+
3
6
  ## 2.8.0 (September 29, 2020)
4
7
  - Add IO object upload
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.8.0
1
+ 2.8.1
@@ -1,5 +1,5 @@
1
1
  module Filestack
2
2
  module Ruby
3
- VERSION = '2.8.0'.freeze
3
+ VERSION = '2.8.1'.freeze
4
4
  end
5
5
  end
@@ -63,7 +63,7 @@ module UploadUtils
63
63
  end
64
64
 
65
65
  def build_store_task(options = {})
66
- return 'store' if options.empty?
66
+ return 'store' if options.nil? || options.empty?
67
67
  tasks = []
68
68
  options.each do |key, value|
69
69
  value = case key
@@ -100,9 +100,13 @@ module UploadUtils
100
100
  response = Typhoeus.post("#{base}/#{external_url}", headers: FilestackConfig::HEADERS)
101
101
 
102
102
  if response.code == 200
103
- response_body = JSON.parse(response.body)
104
- handle = response_body['url'].split('/').last
105
- return { 'handle' => handle }
103
+ begin
104
+ response_body = JSON.parse(response.body)
105
+ handle = response_body['url'].split('/').last
106
+ return { 'handle' => handle }
107
+ rescue
108
+ raise response.body
109
+ end
106
110
  end
107
111
  raise response.body
108
112
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filestack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filestack
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-29 00:00:00.000000000 Z
11
+ date: 2020-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus