paperclip-cloudinary 1.3.0 → 1.3.1

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: 1777407449495c90962cd0540d3e9dc826a4fb03
4
- data.tar.gz: ecb3b29dee07e50ea59d7e799c68d9444e553e96
3
+ metadata.gz: e2c4446aa2b6a0704bd424769d7533e058515c3f
4
+ data.tar.gz: 9e890898c667652c347dbcee0ba85d9d05d27103
5
5
  SHA512:
6
- metadata.gz: e918d3aadcd2aacc8ba207951b4b9463fde67c749b7a262077e86a957b9f1070c367e500509129124304a431d85b6573a7412528f7df0149587cc18dca39795f
7
- data.tar.gz: 815561dcf263b692bdded9a65f80932247b0754d663a909d35248cd7aa1dd84bb677d67eb1d18d285d7b540ee07696d73be7d96baa7f1d80244c8632298b5528
6
+ metadata.gz: 7a2cdc10ee8a707105267f0dbdccee1e1395d085609f84ae22f0c6cbee22fa6224fb31896e4bb6efa843a4c85ce44d661b7c56b4938d54ba27a952b29a2a4138
7
+ data.tar.gz: f39c17d00fff9f16dc860aa5d2b7b1c137df4e157a5dd0e29a7e6233e048faad7d86362dd5d676da9e8d83a766be8099a58ecb840c814e8a8f46d6d9c438616b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paperclip-cloudinary (1.3.0)
4
+ paperclip-cloudinary (1.3.1)
5
5
  cloudinary (~> 1.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -49,13 +49,29 @@ This will enable the
49
49
  [Cloudinary gem](https://github.com/cloudinary/cloudinary_gem) to pick
50
50
  up your configuration automatically.
51
51
 
52
- To use in your model, add the following options for `storage` to `has_attached_file`
52
+ To use in your model, add the following option for `storage` to `has_attached_file`:
53
53
 
54
54
  ```ruby
55
55
  has_attached_file :image,
56
56
  :storage => :cloudinary
57
57
  ```
58
58
 
59
+ You should specify the Paperclip `path` pattern that you would like to
60
+ use to store and access your saved attachments. The value should be URL-friendly,
61
+ should NOT begin with a forward slash, and, aside from forward slashes, can only
62
+ contain alphanumeric characters, dashes (-), periods (.) and underscores (\_).
63
+ The `path` can be specified in your default Paperclip options or
64
+ via `has_attached_file`:
65
+
66
+ ```ruby
67
+ has_attached_file :image,
68
+ :storage => :cloudinary,
69
+ :path => ':id/:style/:filename'
70
+ ```
71
+
72
+ Failure to supply a `path` in either of these places may result in the default path
73
+ being used, which could cause an `InfiniteInterpolationError`.
74
+
59
75
  If you have put your cloudinary config file at a location other than
60
76
  config/cloudinary.yml (which is ill-advised), you can specify where the
61
77
  credentials are located by specifying the `cloudinary_credentials`
@@ -1,5 +1,5 @@
1
1
  module Paperclip
2
2
  module Cloudinary
3
- VERSION = "1.3.0"
3
+ VERSION = "1.3.1"
4
4
  end
5
5
  end
@@ -74,7 +74,8 @@ module Paperclip
74
74
  style = style_or_options
75
75
  end
76
76
  inline_opts = options[:cloudinary] || {}
77
- ::Cloudinary::Utils.cloudinary_url path(style), cloudinary_url_options(style, inline_opts)
77
+ result = ::Cloudinary::Utils.cloudinary_url path(style), cloudinary_url_options(style, inline_opts)
78
+ result.nil? ? super(nil) : result
78
79
  end
79
80
 
80
81
  def public_id style
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip-cloudinary
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Scott
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-25 00:00:00.000000000 Z
11
+ date: 2017-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cloudinary