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 ADDED
@@ -0,0 +1,2 @@
1
+ v0.1.0
2
+ * Added support for remote_url
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)
@@ -1,5 +1,5 @@
1
1
  module Dragonfly
2
2
  module Cloudinary
3
- VERSION = "0.0.4"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
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
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-08 00:00:00.000000000 Z
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: 505355215
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: 505355215
102
+ hash: -198975085
102
103
  requirements: []
103
104
  rubyforge_project:
104
105
  rubygems_version: 1.8.24