shrine-cloudinary 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/shrine/storage/cloudinary.rb +6 -3
- data/shrine-cloudinary.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 41dea0917908eed7217824a177712ab780ac44d8
|
|
4
|
+
data.tar.gz: 6413d85af1e21214988f7cd5201dbf13d6a535fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a39bd818d6e1a60bcbaf5d5d8a8d6253e2ce8d924bdd228efc5fdc5150ebf78594343ab23fa9d9f11632ef5050b8be7c120eb8fbc6835c53645e55d371f9316e
|
|
7
|
+
data.tar.gz: 727ad30490548dd17429afa49b0e1528b4d3d2bbaeb89a5a18a0ae52cb0baee1f4163f56693cf150f63dbc2968c29679bc1511741835e26e3794887b976d8c21
|
data/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Cloudinary.config(
|
|
|
20
20
|
api_key: "...",
|
|
21
21
|
api_secret: "...",
|
|
22
22
|
)
|
|
23
|
-
|
|
23
|
+
```
|
|
24
24
|
|
|
25
25
|
You can now initialize your storage:
|
|
26
26
|
|
|
@@ -99,6 +99,9 @@ user.avatar_url(transformation: "medium")
|
|
|
99
99
|
user.avatar_url(transformation: "large")
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
+
Read [this Cloudinary section](http://cloudinary.com/documentation/rails_image_manipulation)
|
|
103
|
+
for all URL options you can pass in.
|
|
104
|
+
|
|
102
105
|
### Large files
|
|
103
106
|
|
|
104
107
|
If you're uploading large files with Cloudinary (like videos), you can take
|
|
@@ -23,10 +23,13 @@ class Shrine
|
|
|
23
23
|
result =
|
|
24
24
|
if remote?(io)
|
|
25
25
|
uploader.upload(io.storage.url(io.id), **options)
|
|
26
|
-
elsif large?(io)
|
|
27
|
-
uploader.upload_large(io, chunk_size: chunk_size, **options)
|
|
28
26
|
else
|
|
29
|
-
|
|
27
|
+
io = io.download if io.is_a?(UploadedFile)
|
|
28
|
+
if large?(io)
|
|
29
|
+
uploader.upload_large(io, chunk_size: chunk_size, **options)
|
|
30
|
+
else
|
|
31
|
+
uploader.upload(io, **options)
|
|
32
|
+
end
|
|
30
33
|
end
|
|
31
34
|
|
|
32
35
|
update_id!(result, id)
|
data/shrine-cloudinary.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shrine-cloudinary
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Janko Marohnić
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-12-
|
|
11
|
+
date: 2015-12-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cloudinary
|