uploadcare-ruby 3.3.1 → 3.3.2

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: b699a48dfd300be34dbfc459963a7d70aebd3a01e6b90204eb3a6deaa16d0da9
4
- data.tar.gz: 3e0878f457950ec4c3a7da9b126691fbed2934b39aa43cb9d1983861377f7fd2
3
+ metadata.gz: d3c7c464a8d89a9451f4205ba7f82b3c270d2431eb2b9cf9e31f64fc0542e032
4
+ data.tar.gz: 5ee0ef07f9194986eaf3742a5a80d01be38cd69a7e951551b791bcf479cf17f0
5
5
  SHA512:
6
- metadata.gz: 79ff1377255bb94d221518a04f69fd83318c2ba9803fac49901220b0327820d75b12b7cb63a63c110a300635333c71432d7286899d437df25a080c575007ee92
7
- data.tar.gz: a39a15cb2904b2a3f6b7c9a754242b66246f4059dc5deee47247c028fcf613b14ba00721722ca490304e635578422eb772e73c83b995ef939c661863dbd194cb
6
+ metadata.gz: 6accbd5a9c9c593c252a370947f42756a477cb47d6d1261a54a17df6f7026f9dd5e49ded174718ce159e6f3da9638744c4520673cfc0c81dcac381f129de2016
7
+ data.tar.gz: c383653917bab7dbc417eeccd16b800066ee07cf3741f3734361b8ae9da2935e369442711071a0ab0453860321b21a7a979265fa2a7f19daaaefb9fd4c5add20
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.3.2 - 2022-07-18
4
+
5
+ - Fixes dry-configurable deprecation warnings
6
+
3
7
  ## 3.3.1 - 2022-04-19
4
8
 
5
9
  - Fixed README: `Uploadcare::URLGenerators::AmakaiGenerator` > `Uploadcare::SignedUrlGenerators::AmakaiGenerator`
@@ -7,7 +11,7 @@
7
11
 
8
12
  ## 3.3.0 — 2022-04-08
9
13
 
10
- - Added `Uploadcare::URLGenerators::AmakaiGenerator`. Use custom domain and CDN provider to deliver files with authenticated URLs.
14
+ - Added `Uploadcare::URLGenerators::AmakaiGenerator`. Use custom domain and CDN provider to deliver files with authenticated URLs
11
15
 
12
16
  ## 3.2.0 — 2021-11-16
13
17
 
@@ -37,6 +41,7 @@
37
41
  - Added CI
38
42
 
39
43
  ## 3.0.3-dev — 2020-03-13
44
+
40
45
  - Added better pagination and iterators for `GroupList` & `FileList`
41
46
 
42
47
  ## 3.0.2-dev — 2020-03-11
@@ -55,6 +60,7 @@
55
60
  ## 3.0.0-dev — 2020-02-18
56
61
 
57
62
  ### Changed
63
+
58
64
  - Rewrote gem from scratch
59
65
 
60
66
  ### Added
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uploadcare
4
- VERSION = '3.3.1'
4
+ VERSION = '3.3.2'
5
5
  end
data/lib/uploadcare.rb CHANGED
@@ -32,18 +32,31 @@ require 'signed_url_generators/base_generator'
32
32
  # @see https://uploadcare.com/docs/api_reference
33
33
  module Uploadcare
34
34
  extend Dry::Configurable
35
- setting :public_key, ENV.fetch('UPLOADCARE_PUBLIC_KEY')
36
- setting :secret_key, ENV.fetch('UPLOADCARE_SECRET_KEY')
37
- setting :auth_type, 'Uploadcare'
38
- setting :multipart_size_threshold, 100 * 1024 * 1024
39
- setting :rest_api_root, 'https://api.uploadcare.com'
40
- setting :upload_api_root, 'https://upload.uploadcare.com'
41
- setting :max_request_tries, 100
42
- setting :base_request_sleep, 1 # seconds
43
- setting :max_request_sleep, 60.0 # seconds
44
- setting :sign_uploads, false
45
- setting :upload_signature_lifetime, 30 * 60 # seconds
46
- setting :max_throttle_attempts, 5
47
- setting :upload_threads, 2 # used for multiupload only ATM
48
- setting :framework_data, ''
35
+
36
+ # NOTE: The dry-configurable gem has introduced the `default` keyword argument
37
+ # and deprecated the positional default argument in v0.13.0, which requires
38
+ # Ruby >= 2.6.0. In order to provide backwards compatibility and not disable
39
+ # deprecation warnings, we override the dry-configurable's `setting` DSL method.
40
+ def self.setting(name, default:, **options, &block)
41
+ if RUBY_VERSION < '2.6'
42
+ super name, default, &block
43
+ else
44
+ super
45
+ end
46
+ end
47
+
48
+ setting :public_key, default: ENV.fetch('UPLOADCARE_PUBLIC_KEY')
49
+ setting :secret_key, default: ENV.fetch('UPLOADCARE_SECRET_KEY')
50
+ setting :auth_type, default: 'Uploadcare'
51
+ setting :multipart_size_threshold, default: 100 * 1024 * 1024
52
+ setting :rest_api_root, default: 'https://api.uploadcare.com'
53
+ setting :upload_api_root, default: 'https://upload.uploadcare.com'
54
+ setting :max_request_tries, default: 100
55
+ setting :base_request_sleep, default: 1 # seconds
56
+ setting :max_request_sleep, default: 60.0 # seconds
57
+ setting :sign_uploads, default: false
58
+ setting :upload_signature_lifetime, default: 30 * 60 # seconds
59
+ setting :max_throttle_attempts, default: 5
60
+ setting :upload_threads, default: 2 # used for multiupload only ATM
61
+ setting :framework_data, default: ''
49
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uploadcare-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.1
4
+ version: 3.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stepan Redka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-19 00:00:00.000000000 Z
11
+ date: 2022-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: api_struct