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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 994a732239924e9e97be2b2f6a77aa95e9b91ef3
4
- data.tar.gz: f6385d224deba5c1a9f9c452c89535a4ea0a734d
3
+ metadata.gz: 58c3479c59e20893f65ba55c52498183ebce293a
4
+ data.tar.gz: 45b5a9f416a2522b820ebd2f5229024bb5e055a2
5
5
  SHA512:
6
- metadata.gz: 37af802a5e9f09fd81935c87003c25049b3aebdd534dec781592efd00426a2906d95eb0e6210ed2c47b76db64941d7e5590d2f7b35c27f5df0eebc0c717382ad
7
- data.tar.gz: 6538886c89dc87eb99432d43a4b1c6a90dfdd5626e49aef97176c8b21d9a302e2698848d128b044cb0b774b9d470a8f9db6cefb09989d033caaf0eb0f19c0d6b
6
+ metadata.gz: fd74bfe3c3f91408cfdb0de65add6249c51c8828d61ea3bb3831efcb02219551ccabbf67b99e3a47c6cbfc8d1540974f75aa8e40aad67b51c33177b1bb58954f
7
+ data.tar.gz: 36ff909b5ef5903ef1ffec3ba61ec21f7807d27f0e933ca0b807bb653551f858ded73a9f3ad8d7f49f2e3f6c95e9767f38ce0652b37fe576417de9a48b0d0f09
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
1
 
2
+ 1.1.6 / 2016-04-20
3
+ ==================
4
+
5
+ * Fix CarrierWave integration - update without new upload saves identifier with resource_type and type
6
+ * Fixed tests
7
+
2
8
  1.1.5 / 2016-04-12
3
9
  ==================
4
10
 
@@ -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
@@ -1,4 +1,4 @@
1
1
  # Copyright Cloudinary
2
2
  module Cloudinary
3
- VERSION = "1.1.5"
3
+ VERSION = "1.1.6"
4
4
  end
@@ -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"}], :tags => TEST_TAG)
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.5
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-12 00:00:00.000000000 Z
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