uploadcare-ruby 4.4.2 → 4.4.3

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: b627592459c5fd8142372876e62f4888aa9ce94139011e583b72746ed68063b7
4
- data.tar.gz: b695ed1e4ee129f82e589470930b2b84d58fac576f0f676095c1decc56226a1f
3
+ metadata.gz: 9bf27040e7e061caf3e4810f1e40ab9421f0a063eee05b2338a4b1e7255524bd
4
+ data.tar.gz: b41c835893fc836263ba7e354fce6427a9fbbaec26efbea485fac9874d162af1
5
5
  SHA512:
6
- metadata.gz: f5db8bdd4c9b77826087a6cd83c578e823abb8d1d212cf283baf887b841ba7fc643f35c41df98fa473daaf4614a7f1427cdd28da16df120effedf62e357cf5bb
7
- data.tar.gz: 8772728c7606f69d5d8166a0a928862d6fde6849b91622022d6b0ba0814a4e9e2a586acf1e35a873cc7c835c33d28e4b197df9aebb94be89af0dc74de61b509e
6
+ metadata.gz: 810bd3ad7369ddbb2f44a932d12699c5b969bec1feb33ade6805a31a61d18afc102043ba1e61b0b53c7996956c4b6c8496a8e807598436d7325ad33c3a3bf33e
7
+ data.tar.gz: ef9f05f9f586ba804de9e424ee9634abaebf8cff8a7d47be13147206fa2ff3e3adeac56f61f8ea54ccea77e36a523df100438647df01a92c0f1e0f42d5dff5b3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.4.3 — 2024-07-06
4
+
5
+ ### Added
6
+ * Multi page conversion parameter (`save_in_group`) added to `DocumentConverter#convert` options.
7
+
8
+ ### Fixed
9
+ * Fixed that signed URLs now work with ~ in the path. This also fixes signed URLs with grouped file URLs.
10
+
3
11
  ## 4.4.2 — 2024-05-29
4
12
 
5
13
  ### Fixed
@@ -3,5 +3,7 @@ Uploadcare.config.public_key = 'YOUR_PUBLIC_KEY'
3
3
  Uploadcare.config.secret_key = 'YOUR_SECRET_KEY'
4
4
 
5
5
  document_params = { uuid: '1bac376c-aa7e-4356-861b-dd2657b5bfd2', format: :pdf }
6
- options = { store: true }
6
+ options = { store: '1' }
7
+ # for multipage conversion
8
+ # options = { store: '1', save_in_group: '1' }
7
9
  Uploadcare::DocumentConverter.convert(document_params, options)
@@ -50,7 +50,8 @@ module Uploadcare
50
50
  **build_paths_body(params)
51
51
  )
52
52
  end,
53
- store: options[:store]
53
+ store: options[:store],
54
+ save_in_group: options[:save_in_group]
54
55
  }.compact.to_json
55
56
  end
56
57
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uploadcare
4
- VERSION = '4.4.2'
4
+ VERSION = '4.4.3'
5
5
  end
@@ -35,12 +35,17 @@ module Uploadcare
35
35
 
36
36
  def build_acl(uuid, acl, wildcard: false)
37
37
  if wildcard
38
- "/#{sanitized_string(uuid)}/*"
38
+ "/#{sanitized_delimiter_path(uuid)}/*"
39
39
  else
40
- "/#{sanitized_string(acl)}/"
40
+ "/#{sanitized_delimiter_path(acl)}/"
41
41
  end
42
42
  end
43
43
 
44
+ # Delimiter sanitization referenced from: https://github.com/uploadcare/pyuploadcare/blob/main/pyuploadcare/secure_url.py#L74
45
+ def sanitized_delimiter_path(path)
46
+ sanitized_string(path).gsub('~') { |escape_char| "%#{escape_char.ord.to_s(16).downcase}" }
47
+ end
48
+
44
49
  def build_expire
45
50
  (Time.now.to_i + ttl).to_s
46
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uploadcare-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.2
4
+ version: 4.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - "@dmitrijivanchenko (Dmitrij Ivanchenko), @T0mbery (Andrey Aksenov)"
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-05-29 00:00:00.000000000 Z
12
+ date: 2024-07-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mimemagic
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
221
  requirements: []
222
- rubygems_version: 3.5.9
222
+ rubygems_version: 3.5.11
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: Ruby wrapper for uploadcare API