cloudinary 1.1.5 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/cloudinary/carrier_wave.rb +4 -0
- data/lib/cloudinary/carrier_wave/storage.rb +4 -0
- data/lib/cloudinary/version.rb +1 -1
- data/spec/uploader_spec.rb +1 -1
- data/spec/utils_spec.rb +2 -2
- 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: 58c3479c59e20893f65ba55c52498183ebce293a
|
4
|
+
data.tar.gz: 45b5a9f416a2522b820ebd2f5229024bb5e055a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd74bfe3c3f91408cfdb0de65add6249c51c8828d61ea3bb3831efcb02219551ccabbf67b99e3a47c6cbfc8d1540974f75aa8e40aad67b51c33177b1bb58954f
|
7
|
+
data.tar.gz: 36ff909b5ef5903ef1ffec3ba61ec21f7807d27f0e933ca0b807bb653551f858ded73a9f3ad8d7f49f2e3f6c95e9767f38ce0652b37fe576417de9a48b0d0f09
|
data/CHANGELOG.md
CHANGED
@@ -164,6 +164,10 @@ module Cloudinary::CarrierWave
|
|
164
164
|
@resource_type ||= Cloudinary::Utils.resource_type_for_format(@filename)
|
165
165
|
@public_id, @format = Cloudinary::PreloadedFile.split_format(@filename)
|
166
166
|
end
|
167
|
+
|
168
|
+
def storage_identifier
|
169
|
+
identifier
|
170
|
+
end
|
167
171
|
|
168
172
|
def delete
|
169
173
|
public_id = @resource_type == "raw" ? self.filename : self.public_id
|
@@ -52,6 +52,10 @@ class Cloudinary::CarrierWave::Storage < ::CarrierWave::Storage::Abstract
|
|
52
52
|
nil
|
53
53
|
end
|
54
54
|
|
55
|
+
def identifier
|
56
|
+
uploader.file.respond_to?(:storage_identifier) ? uploader.file.storage_identifier : super
|
57
|
+
end
|
58
|
+
|
55
59
|
# Updates the model mounter identifier with version information.
|
56
60
|
#
|
57
61
|
# Carrierwave uses hooks when integrating with ORMs so it's important to
|
data/lib/cloudinary/version.rb
CHANGED
data/spec/uploader_spec.rb
CHANGED
@@ -73,7 +73,7 @@ describe Cloudinary::Uploader do
|
|
73
73
|
|
74
74
|
|
75
75
|
it "should support explicit" do
|
76
|
-
result = Cloudinary::Uploader.explicit("sample", :type=>"upload", :eager=>[{:crop=>"scale", :width=>"2.0"}]
|
76
|
+
result = Cloudinary::Uploader.explicit("sample", :type=>"upload", :eager=>[{:crop=>"scale", :width=>"2.0"}])
|
77
77
|
url = Cloudinary::Utils.cloudinary_url("sample", :type=>"upload", :crop=>"scale", :width=>"2.0", :format=>"jpg", :version=>result["version"])
|
78
78
|
expect(result["eager"][0]["url"]).to eq(url)
|
79
79
|
end
|
data/spec/utils_spec.rb
CHANGED
@@ -464,8 +464,8 @@ describe Cloudinary::Utils do
|
|
464
464
|
]
|
465
465
|
layers_options.each do |name, options, result|
|
466
466
|
it "should support #{name}" do
|
467
|
-
expect(["sample", { param => options }]).to produce_url("#{upload_path}/#{short}_#{result}/sample").and empty_options
|
468
|
-
expect("#{upload_path}/#{short}_#{result}/sample").to be_served_by_cloudinary
|
467
|
+
expect(["sample.jpg", { param => options }]).to produce_url("#{upload_path}/#{short}_#{result}/sample.jpg").and empty_options
|
468
|
+
expect("#{upload_path}/#{short}_#{result}/sample.jpg").to be_served_by_cloudinary
|
469
469
|
end
|
470
470
|
unless options.is_a? String
|
471
471
|
op = Hash.new
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudinary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nadav Soferman
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-04-
|
13
|
+
date: 2016-04-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws_cf_signer
|