dragonfly-cloudinary 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/README.md +6 -0
- data/lib/dragonfly/data_storage/cloudinary_store.rb +5 -0
- data/lib/dragonfly-cloudinary/version.rb +1 -1
- metadata +5 -4
data/CHANGELOG
ADDED
data/README.md
CHANGED
@@ -27,6 +27,12 @@ app.datastore = Dragonfly::DataStorage::CloudinaryStore.new
|
|
27
27
|
|
28
28
|
You don't need to configure datastore itself, it will use your cloudinary settings.
|
29
29
|
|
30
|
+
## Cloudinary urls
|
31
|
+
|
32
|
+
You can generate direct urls for stored image in cloudinary using `image.remote_url`. See [Dragonfly documentation for this](http://markevans.github.com/dragonfly/file.ServingRemotely.html).
|
33
|
+
|
34
|
+
You can pass any options that cloudinary supports, e.g. `image.remote_url(width: 100, height: 100, crop: :crop)`. See more at [Cloudinary documentation](http://cloudinary.com/documentation/image_transformations)
|
35
|
+
|
30
36
|
## Contributing
|
31
37
|
|
32
38
|
1. Fork it
|
@@ -17,6 +17,11 @@ module Dragonfly
|
|
17
17
|
::Cloudinary::Uploader.destroy public_id(uid)
|
18
18
|
end
|
19
19
|
|
20
|
+
def url_for(uid, options = {})
|
21
|
+
options = {format: ext(uid)}.merge(options)
|
22
|
+
::Cloudinary::Utils.cloudinary_url(public_id(uid), options)
|
23
|
+
end
|
24
|
+
|
20
25
|
private
|
21
26
|
|
22
27
|
def public_id(uid)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dragonfly-cloudinary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -67,6 +67,7 @@ extensions: []
|
|
67
67
|
extra_rdoc_files: []
|
68
68
|
files:
|
69
69
|
- .gitignore
|
70
|
+
- CHANGELOG
|
70
71
|
- Gemfile
|
71
72
|
- LICENSE.txt
|
72
73
|
- README.md
|
@@ -89,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
90
|
version: '0'
|
90
91
|
segments:
|
91
92
|
- 0
|
92
|
-
hash:
|
93
|
+
hash: -198975085
|
93
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
95
|
none: false
|
95
96
|
requirements:
|
@@ -98,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
99
|
version: '0'
|
99
100
|
segments:
|
100
101
|
- 0
|
101
|
-
hash:
|
102
|
+
hash: -198975085
|
102
103
|
requirements: []
|
103
104
|
rubyforge_project:
|
104
105
|
rubygems_version: 1.8.24
|