filestack 2.6.1 → 2.6.6

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: 64087d0d1f3deee44ab49782a9f4ee8bbf1e98a5
4
- data.tar.gz: b960e1925df802838d1cfec91ff68de11dc98e3d
3
+ metadata.gz: 5549737880835111a37ba416eb3c38e85b51f299
4
+ data.tar.gz: 4eda4d8fc1f9a2144f60b044f5509f65cca9d89d
5
5
  SHA512:
6
- metadata.gz: 5edae4b3577595c4164314020bc78c7f644e54f63277c5d5e7cdfa7b47085b43bdeb36f44cca27b318f9e8fd1d76606e2398eba2a64c2b2e8f069604a77be93f
7
- data.tar.gz: a0c15b6ee0db13f2419487175f25f6b242d7d46509cb3a681374c2f3b466aaa84d2d17a80bcf99a0186b6f0e7bab879c72a53f75aca35cf3ea8e0c88592b0184
6
+ metadata.gz: 7492e7492765ae20dd6614e994bb9c0e36470cc70bcc50bbcde2ddee6dbfa6ada23e8d57f215ce9583c51de6d5a5c808264ff3a5726f5b680ac8d9f68e185032
7
+ data.tar.gz: 8c56e6f5adcafaf646face0a4268b3c7bff3001319e6d2536f508c6f79f81b833411a7697b363b4c77c05aa8ffad2b510be9dcdcc9ad840e775f948f68be6bd0
@@ -1,5 +1,20 @@
1
1
  # Filestack-Ruby Changelog
2
2
 
3
+ ## 2.6.6 (June 19, 2020)
4
+ - Add compress task to transformations
5
+
6
+ ## 2.6.5 (January 9, 2020)
7
+ - Updated version of the parallel gem
8
+
9
+ ## 2.6.4 (November 4, 2019)
10
+ - Fix issue with file upload
11
+
12
+ ## 2.6.3 (August 12, 2019)
13
+ - Add animate to transformations
14
+
15
+ ## 2.6.2 (August 8, 2019)
16
+ - Add minify_js, minify_css and auto_image to transformations
17
+
3
18
  ## 2.6.1 (May 6, 2019)
4
19
  - Add cache transformation and remove monochrome duplicates
5
20
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.6.0
1
+ 2.6.6
@@ -113,7 +113,9 @@
113
113
  </span><span class='tstring_content'> blackwhite</span><span class='words_sep'> </span><span class='tstring_content'>sepia</span><span class='words_sep'> </span><span class='tstring_content'>pixelate</span><span class='words_sep'> </span><span class='tstring_content'>oil_paint</span><span class='words_sep'> </span><span class='tstring_content'>negative</span><span class='words_sep'> </span><span class='tstring_content'>modulate</span><span class='words_sep'>
114
114
  </span><span class='tstring_content'> partial_pixelate</span><span class='words_sep'> </span><span class='tstring_content'>partial_blur</span><span class='words_sep'> </span><span class='tstring_content'>collage</span><span class='words_sep'> </span><span class='tstring_content'>upscale</span><span class='words_sep'> </span><span class='tstring_content'>enhance</span><span class='words_sep'>
115
115
  </span><span class='tstring_content'> redeye</span><span class='words_sep'> </span><span class='tstring_content'>ascii</span><span class='words_sep'> </span><span class='tstring_content'>filetype_conversion</span><span class='words_sep'> </span><span class='tstring_content'>quality</span><span class='words_sep'> </span><span class='tstring_content'>urlscreenshot</span><span class='words_sep'>
116
- </span><span class='tstring_content'> no_metadata</span><span class='words_sep'></span><span class='tstring_content'> fallback</span><span class='words_sep'></span><span class='tstring_content'> pdfinfo</span><span class='words_sep'></span><span class='tstring_content'> pdfconvert</span><span class='words_sep'></span><span class='tstring_content'> cache</span><span class='words_sep'></span>
116
+ </span><span class='tstring_content'> no_metadata</span><span class='words_sep'></span><span class='tstring_content'> fallback</span><span class='words_sep'></span><span class='tstring_content'> pdfinfo</span><span class='words_sep'></span><span class='tstring_content'> pdfconvert</span><span class='words_sep'></span><span class='tstring_content'> cache</span><span class='words_sep'></span><span class='tstring_content'> auto_image</span><span class='words_sep'>
117
+ </span><span class='tstring_content'> minify_js</span><span class='words_sep'></span><span class='tstring_content'> minify_css</span><span class='words_sep'></span><span class='tstring_content'> animate</span><span class='words_sep'></span><span class='tstring_content'> video_convert</span><span class='words_sep'></span><span class='tstring_content'> video_playlist</span><span class='words_sep'>
118
+ </span><span class='tstring_content'> compress</span><span class='words_sep'></span>
117
119
  <span class='tstring_end'>]</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
118
120
 
119
121
  </dl>
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ["lib"]
24
24
 
25
25
  spec.add_dependency "typhoeus", "~> 1.1"
26
- spec.add_dependency "parallel", "~> 1.11.2"
26
+ spec.add_dependency "parallel", "~> 1.11", ">= 1.11.2"
27
27
  spec.add_dependency "mimemagic", "~> 0.3.2"
28
28
  spec.add_dependency "progress_bar"
29
29
 
@@ -36,6 +36,8 @@ class TransformConfig
36
36
  blackwhite sepia pixelate oil_paint negative modulate
37
37
  partial_pixelate partial_blur collage upscale enhance
38
38
  redeye ascii filetype_conversion quality urlscreenshot
39
- no_metadata fallback pdfinfo pdfconvert cache
39
+ no_metadata fallback pdfinfo pdfconvert cache auto_image
40
+ minify_js minify_css animate video_convert video_playlist
41
+ compress
40
42
  ].freeze
41
43
  end
@@ -1,5 +1,5 @@
1
1
  module Filestack
2
2
  module Ruby
3
- VERSION = '2.6.1'.freeze
3
+ VERSION = '2.6.6'.freeze
4
4
  end
5
5
  end
@@ -45,7 +45,7 @@ module MultipartUploadUtils
45
45
  # multipart uploads
46
46
  #
47
47
  # @return [Typhoeus::Response]
48
- def multipart_start(apikey, filename, filesize, mimetype, security, storage, options = {})
48
+ def multipart_start(apikey, filename, filesize, mimetype, security, storage, options = {}, intelligent)
49
49
  params = {
50
50
  apikey: apikey,
51
51
  filename: filename,
@@ -53,8 +53,9 @@ module MultipartUploadUtils
53
53
  size: filesize,
54
54
  store_location: storage,
55
55
  file: Tempfile.new(filename),
56
- 'multipart' => 'true'
56
+ multipart: intelligent
57
57
  }
58
+
58
59
  options = multipart_options(options)
59
60
  params = params.merge!(options) if options
60
61
 
@@ -204,35 +205,20 @@ module MultipartUploadUtils
204
205
  #
205
206
  # @return [Typhoeus::Response]
206
207
  def multipart_complete(apikey, filename, filesize, mimetype, start_response, parts_and_etags, options, storage, intelligent = false)
207
- if !intelligent
208
- data = {
209
- apikey: apikey,
210
- uri: start_response['uri'],
211
- region: start_response['region'],
212
- upload_id: start_response['upload_id'],
213
- filename: filename,
214
- size: filesize,
215
- mimetype: mimetype,
216
- parts: parts_and_etags.join(';'),
217
- store_location: storage,
218
- file: Tempfile.new(filename)
219
- }
220
- else
221
- data = {
222
- apikey: apikey,
223
- uri: start_response['uri'],
224
- region: start_response['region'],
225
- upload_id: start_response['upload_id'],
226
- filename: filename,
227
- size: filesize,
228
- mimetype: mimetype,
229
- store_location: storage,
230
- file: Tempfile.new(filename),
231
- 'multipart' => 'true'
232
- }
233
- end
208
+ data = {
209
+ apikey: apikey,
210
+ uri: start_response['uri'],
211
+ region: start_response['region'],
212
+ upload_id: start_response['upload_id'],
213
+ filename: filename,
214
+ size: filesize,
215
+ mimetype: mimetype,
216
+ store_location: storage,
217
+ file: Tempfile.new(filename)
218
+ }
234
219
  options = multipart_options(options)
235
- data = data.merge!(options) if options
220
+ data.merge!(options) if options
221
+ data.merge!(intelligent ? { multipart: intelligent } : { parts: parts_and_etags.join(';') })
236
222
 
237
223
  Typhoeus.post(
238
224
  FilestackConfig::MULTIPART_COMPLETE_URL, body: data,
@@ -253,7 +239,7 @@ module MultipartUploadUtils
253
239
  def multipart_upload(apikey, filepath, security, options, timeout, storage, intelligent: false)
254
240
  filename, filesize, mimetype = get_file_info(filepath)
255
241
  start_response = multipart_start(
256
- apikey, filename, filesize, mimetype, security, storage, options
242
+ apikey, filename, filesize, mimetype, security, storage, options, intelligent
257
243
  )
258
244
 
259
245
  unless start_response['upload_type'].nil?
@@ -91,7 +91,8 @@ module UploadUtils
91
91
  base = "#{base}&signature=#{signature}&policy=#{policy}"
92
92
  end
93
93
 
94
- response = make_call(base, 'post', parameters: data)
94
+ response = Typhoeus.post(base, body: data, headers: FilestackConfig::HEADERS)
95
+
95
96
  if response.code == 200
96
97
  response_body = JSON.parse(response.body)
97
98
  handle = response_body['url'].split('/').last
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.6.1
4
+ version: 2.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filestack
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-06 00:00:00.000000000 Z
11
+ date: 2020-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -29,6 +29,9 @@ dependencies:
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.11'
34
+ - - ">="
32
35
  - !ruby/object:Gem::Version
33
36
  version: 1.11.2
34
37
  type: :runtime
@@ -36,6 +39,9 @@ dependencies:
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
41
  - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '1.11'
44
+ - - ">="
39
45
  - !ruby/object:Gem::Version
40
46
  version: 1.11.2
41
47
  - !ruby/object:Gem::Dependency