cloudinary 1.0.36 → 1.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,6 +24,7 @@ class Cloudinary::Uploader
24
24
  :backup=>options[:backup],
25
25
  :invalidate=>options[:invalidate],
26
26
  :eager=>build_eager(options[:eager]),
27
+ :headers=>build_custom_headers(options[:headers]),
27
28
  :tags=>options[:tags] && Cloudinary::Utils.build_array(options[:tags]).join(",")}
28
29
  params
29
30
  end
@@ -68,6 +69,8 @@ class Cloudinary::Uploader
68
69
  :public_id=> public_id,
69
70
  :callback=> options[:callback],
70
71
  :eager=>build_eager(options[:eager]),
72
+ :headers=>build_custom_headers(options[:headers]),
73
+ :tags=>options[:tags] && Cloudinary::Utils.build_array(options[:tags]).join(",")
71
74
  }
72
75
  end
73
76
  end
@@ -124,7 +127,8 @@ class Cloudinary::Uploader
124
127
  :timestamp=>Time.now.to_i,
125
128
  :tag=>tag,
126
129
  :public_ids => Cloudinary::Utils.build_array(public_ids),
127
- :command => command
130
+ :command => command,
131
+ :type => options[:type]
128
132
  }
129
133
  end
130
134
  end
@@ -165,4 +169,8 @@ class Cloudinary::Uploader
165
169
 
166
170
  result
167
171
  end
172
+
173
+ def self.build_custom_headers(headers)
174
+ Array(headers).map{|*a| a.join(": ")}.join("\n")
175
+ end
168
176
  end
@@ -1,4 +1,4 @@
1
1
  # Copyright Cloudinary
2
2
  module Cloudinary
3
- VERSION = "1.0.36"
3
+ VERSION = "1.0.37"
4
4
  end
data/spec/api_spec.rb CHANGED
@@ -6,6 +6,8 @@ describe Cloudinary::Api do
6
6
 
7
7
  before(:all) do
8
8
  @api = Cloudinary::Api
9
+ Cloudinary::Uploader.destroy("api_test")
10
+ Cloudinary::Uploader.destroy("api_test2")
9
11
  Cloudinary::Uploader.upload("spec/logo.png", :public_id=>"api_test", :tags=>"api_test_tag", :eager=>[:width=>100,:crop=>:scale])
10
12
  Cloudinary::Uploader.upload("spec/logo.png", :public_id=>"api_test2", :tags=>"api_test_tag", :eager=>[:width=>100,:crop=>:scale])
11
13
  @api.delete_transformation("api_test_transformation") rescue nil
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.0.36
4
+ version: 1.0.37
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-09-09 00:00:00.000000000 Z
14
+ date: 2012-09-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rest-client