filestack 2.9.7 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +0 -5
- data/VERSION +1 -1
- data/filestack-ruby.gemspec +1 -0
- data/lib/filestack/core_ext/hash/keys.rb +1 -0
- data/lib/filestack/ruby/version.rb +2 -1
- data/lib/filestack/utils/multipart_upload_utils.rb +5 -5
- data/lib/filestack/utils/utils.rb +6 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2aaa98b594a492feb98669ada0e1ad0118893c0c1993194b3a0cfe0386b66bc4
|
4
|
+
data.tar.gz: 9d7cca2dd7f86ee16d88eb5a5e810bceb3299930acaaee00dbf831afa6726e14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d04a14df2e333ad3f04a262d0a321883ce01054a8e91c1edc682d86e0646e6970549add42e8d2c7aec6668da51661fcc432ea633434f74efe73f351f3d36a0e
|
7
|
+
data.tar.gz: c634e6292049d9bf4b511010dab7609edb6a3a82938fb5671403eeac0f05c4624937342552e9974e580653e830ed44f6915e0feab8b7ac4fd29a76811a7f6cf5
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -56,11 +56,6 @@ filelink = client.upload(filepath: '/path/to/localfile')
|
|
56
56
|
|
57
57
|
filelink = client.upload(external_url: 'http://domain.com/image.png')
|
58
58
|
|
59
|
-
# OR
|
60
|
-
|
61
|
-
file = StringIO.new
|
62
|
-
filelink = client.upload(io: file)
|
63
|
-
|
64
59
|
|
65
60
|
# Return response body on upload complete
|
66
61
|
puts filelink.upload_response
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.0
|
data/filestack-ruby.gemspec
CHANGED
@@ -9,6 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.version = Filestack::Ruby::VERSION
|
10
10
|
spec.authors = ["Filestack"]
|
11
11
|
spec.email = ["dev@filestack.com"]
|
12
|
+
spec.required_ruby_version = '>= 3.0.0'
|
12
13
|
|
13
14
|
spec.summary = %q{Official Ruby SDK for the Filestack API}
|
14
15
|
spec.description = %q{This is the official Ruby SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.}
|
@@ -107,11 +107,11 @@ module MultipartUploadUtils
|
|
107
107
|
|
108
108
|
part_info[:store].merge!(options) if options
|
109
109
|
|
110
|
-
if seek_point + FilestackConfig::DEFAULT_CHUNK_SIZE > filesize
|
111
|
-
|
110
|
+
size = if seek_point + FilestackConfig::DEFAULT_CHUNK_SIZE > filesize
|
111
|
+
filesize - (seek_point)
|
112
112
|
else
|
113
|
-
|
114
|
-
|
113
|
+
FilestackConfig::DEFAULT_CHUNK_SIZE
|
114
|
+
end
|
115
115
|
part_info[:size] = size
|
116
116
|
jobs.push(part_info)
|
117
117
|
part += 1
|
@@ -275,7 +275,7 @@ module MultipartUploadUtils
|
|
275
275
|
)
|
276
276
|
end
|
277
277
|
}
|
278
|
-
rescue
|
278
|
+
rescue StandardError
|
279
279
|
raise "Upload timed out upon completion. Please try again later"
|
280
280
|
end
|
281
281
|
JSON.parse(response_complete.body)
|
@@ -9,13 +9,13 @@ require 'filestack/config'
|
|
9
9
|
class IntelligentState
|
10
10
|
attr_accessor :offset, :ok, :error_type
|
11
11
|
def initialize
|
12
|
-
@offset =
|
12
|
+
@offset = 524_288
|
13
13
|
@ok = true
|
14
14
|
@alive = true
|
15
15
|
@retries = 0
|
16
16
|
@backoff = 1
|
17
17
|
@offset_index = 0
|
18
|
-
@offset_sizes = [
|
18
|
+
@offset_sizes = [524_288, 262_144, 131_072, 65_536, 32_768]
|
19
19
|
end
|
20
20
|
|
21
21
|
def alive?
|
@@ -103,7 +103,7 @@ module UploadUtils
|
|
103
103
|
begin
|
104
104
|
response_body = JSON.parse(response.body)
|
105
105
|
return response_body
|
106
|
-
rescue
|
106
|
+
rescue StandardError
|
107
107
|
raise response.body
|
108
108
|
end
|
109
109
|
end
|
@@ -317,7 +317,7 @@ module IntelligentUtils
|
|
317
317
|
Parallel.map(chunks, in_threads: 3) do |chunk|
|
318
318
|
begin
|
319
319
|
upload_chunk_intelligently(chunk, state, part[:apikey], filepath, io, part[:options], storage)
|
320
|
-
rescue => e
|
320
|
+
rescue StandardError => e
|
321
321
|
state.error_type = e.message
|
322
322
|
failed = true
|
323
323
|
Parallel::Kill
|
@@ -401,7 +401,7 @@ module IntelligentUtils
|
|
401
401
|
end
|
402
402
|
end
|
403
403
|
|
404
|
-
rescue
|
404
|
+
rescue StandardError
|
405
405
|
raise 'BACKEND_NETWORK'
|
406
406
|
end
|
407
407
|
fs_response = JSON.parse(fs_response.body)
|
@@ -419,7 +419,7 @@ module IntelligentUtils
|
|
419
419
|
end
|
420
420
|
end
|
421
421
|
|
422
|
-
rescue
|
422
|
+
rescue StandardError
|
423
423
|
raise 'S3_NETWORK'
|
424
424
|
end
|
425
425
|
amazon_response
|
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:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Filestack
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -209,7 +209,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
209
209
|
requirements:
|
210
210
|
- - ">="
|
211
211
|
- !ruby/object:Gem::Version
|
212
|
-
version:
|
212
|
+
version: 3.0.0
|
213
213
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
214
|
requirements:
|
215
215
|
- - ">="
|