activestorage-cloudinary-service 0.2.2 → 0.2.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
  SHA1:
3
- metadata.gz: b50dae378cf0139e357b729556b67dc4c54d5145
4
- data.tar.gz: 1abc550178e3e9d0185d6054ac6e106b93856785
3
+ metadata.gz: 0a4addc314d1d3ec83927bc14bc68f75d79135fc
4
+ data.tar.gz: 4e62c454a04e7b36deccfdb85240e465629d99c1
5
5
  SHA512:
6
- metadata.gz: '038120527a18e575f83ecd25affec02642e2a1ca9436188441dca8e835a01526bc02b0898e0a5d075c2155a670748950dc0d1027242f4db6e7022d5b29b34e00'
7
- data.tar.gz: c56153d54fb3f1e195d828904292d3afdf0d30ee16a663979a97bb7959857dc9775422dd585442ba688513aaebf03d23503f39f489df9b1f710d5e54a071d1dd
6
+ metadata.gz: ff5707d1401e4865f9ec45588bbb7582307bc618d77e94aee0b32fe0d9c03d78a9798fe4d7b35c90c853d211195b150e2923a3fa6a2aeb0dcfd5bb7cf6e6035e
7
+ data.tar.gz: a2c39c52f3f091c5a103c4166d8cdecbdb11cc56b5defb5301703331433547a534565f5257d92496e689f0c43addd8ea1c49a6e34ba7c5a7ed73199b89087b4f
@@ -27,14 +27,15 @@ module ActiveStorage
27
27
 
28
28
  # Return the content of the file at the +key+.
29
29
  def download(key, &block)
30
+ source = cloudinary_url_for_key(key)
31
+
30
32
  if block_given?
31
33
  instrument :streaming_download, key: key do
32
- source = cloudinary_url_for_key(key)
33
34
  stream_download(source, &block)
34
35
  end
35
36
  else
36
37
  instrument :download, key: key do
37
- Cloudinary::Downloader.download(key)
38
+ Cloudinary::Downloader.download(source)
38
39
  end
39
40
  end
40
41
  end
@@ -161,7 +162,7 @@ module ActiveStorage
161
162
  end
162
163
 
163
164
  def cloudinary_url_for_key(key)
164
- Cloudinary::Utils.cloudinary_url(key)
165
+ Cloudinary::Utils.cloudinary_url(key, sign_url: true)
165
166
  end
166
167
  end
167
168
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveStorage
2
2
  module CloudinaryService
3
- VERSION = '0.2.2'.freeze
3
+ VERSION = '0.2.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activestorage-cloudinary-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Osmond Oscar
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-12 00:00:00.000000000 Z
11
+ date: 2018-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler