cloudinary 1.2.1 → 1.2.2

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: ebe3f99a4c5e55a3287d9d64442f4c11ff0cdbef
4
- data.tar.gz: b0a18af4fbc649482c454a7799146879811b9c13
3
+ metadata.gz: 0fcfb2ec23208e42dc314f218a803b9ddc0d62fc
4
+ data.tar.gz: d77b2eceee548a28eccca9f3b653cc8946936d2b
5
5
  SHA512:
6
- metadata.gz: 575ef273a4d869096ceca7113ef7b2d759ecdef854db325134d5e5cc997dc7695c42008befdc3f896b9103bedde431496f2ad03187a07646b475546da837719a
7
- data.tar.gz: bcbca570b27ca7582ebda1c1ac36ebf49fc1295f59fedc5fa82f4f63dacaadc7dc876756f3930101986a5ee40c9f5aa39938f35db549f042549e53a844281e16
6
+ metadata.gz: 326be4f55c3abb55067a0dd4353e2b9bf4607a09f068bc78569094f4bb50006dfed3474863ffcea9a486b3f515ef7dc074d2833b54d8de1924cc8289edddafc7
7
+ data.tar.gz: 755b17418a13dd7749947a78af187c01edec641a82097425af880a66b43a7d2b30036940f0e397788c6d65a1b7e84dbf9fcc053c90f81a2282bf52a3b74ccfb3
@@ -1,4 +1,11 @@
1
1
 
2
+ 1.2.2 / 2016-07-16
3
+ ==================
4
+
5
+ * Update gemspec to differentiate between ruby 1.9 and 2.0
6
+ * Add `:max_results => 500` to tags test.
7
+ * Add json spec. Add explicit exception names to `raise_error`.
8
+
2
9
  1.2.1 / 2016-07-16
3
10
  ==================
4
11
 
@@ -25,10 +25,15 @@ Gem::Specification.new do |s|
25
25
  s.add_development_dependency "rspec-rails"
26
26
  s.add_development_dependency "rubyzip"
27
27
 
28
- if RUBY_VERSION > "1.9"
28
+ if RUBY_VERSION > "2.0"
29
29
  s.add_dependency "rest-client"
30
30
  s.add_development_dependency "actionpack"
31
31
  s.add_development_dependency "simplecov"
32
+ elsif RUBY_VERSION > "1.9"
33
+ s.add_dependency "rest-client", '< 2.0'
34
+ s.add_dependency 'json', '~> 1.8'
35
+ s.add_development_dependency "actionpack", '< 5.0'
36
+ s.add_development_dependency "simplecov"
32
37
  else
33
38
  s.add_dependency "i18n", "<0.7.0"
34
39
  s.add_dependency "rest-client", "<=1.6.8"
@@ -1,4 +1,4 @@
1
1
  # Copyright Cloudinary
2
2
  module Cloudinary
3
- VERSION = "1.2.1"
3
+ VERSION = "1.2.2"
4
4
  end
@@ -141,7 +141,7 @@ describe Cloudinary::Api do
141
141
  end
142
142
 
143
143
  it "should allow listing tags" do
144
- tags = @api.tags()["tags"]
144
+ tags = @api.tags(:max_results => 500)["tags"]
145
145
  expect(tags).to include(TEST_TAG)
146
146
  end
147
147
 
@@ -262,7 +262,7 @@ describe Cloudinary::Api do
262
262
  @api.create_upload_preset(:name => "api_test_upload_preset4", :folder => "folder", :tags => [TEST_TAG, TIMESTAMP_TAG])
263
263
  preset = @api.upload_preset("api_test_upload_preset4")
264
264
  @api.delete_upload_preset("api_test_upload_preset4")
265
- expect{preset = @api.upload_preset("api_test_upload_preset4")}.to raise_error
265
+ expect{preset = @api.upload_preset("api_test_upload_preset4")}.to raise_error(Cloudinary::Api::NotFound)
266
266
  end
267
267
 
268
268
  it "should allow updating upload_presets", :upload_preset => true do
@@ -50,7 +50,7 @@ describe Cloudinary::Uploader do
50
50
  it 'should not allow renaming to an existing ID' do
51
51
  id = @resource_2_id
52
52
  @resource_2_id = @resource_1_id+"2" # if rename doesn't fail, this is the new ID
53
- expect { Cloudinary::Uploader.rename(id, @resource_1_id+"2") }.to raise_error
53
+ expect { Cloudinary::Uploader.rename(id, @resource_1_id+"2") }.to raise_error(CloudinaryException)
54
54
  @resource_2_id = id
55
55
  end
56
56
  context ':overwrite => true' do
@@ -151,7 +151,7 @@ describe Cloudinary::Uploader do
151
151
  end
152
152
 
153
153
  it "should prevent non whitelisted formats from being uploaded if allowed_formats is specified", :allowed=>true do
154
- expect{Cloudinary::Uploader.upload(TEST_IMG, :allowed_formats => ["jpg"], :tags => [TEST_TAG, TIMESTAMP_TAG])}.to raise_error
154
+ expect{Cloudinary::Uploader.upload(TEST_IMG, :allowed_formats => ["jpg"], :tags => [TEST_TAG, TIMESTAMP_TAG])}.to raise_error(CloudinaryException)
155
155
  end
156
156
 
157
157
  it "should allow non whitelisted formats if type is specified and convert to that type", :allowed=>true do
@@ -244,7 +244,7 @@ describe Cloudinary::Uploader do
244
244
  end
245
245
 
246
246
  it "should fail if timeout is reached" do
247
- expect{Cloudinary::Uploader.upload(Pathname.new(TEST_IMG), :tags => [TEST_TAG, TIMESTAMP_TAG])}.to raise_error
247
+ expect{Cloudinary::Uploader.upload(Pathname.new(TEST_IMG), :tags => [TEST_TAG, TIMESTAMP_TAG])}.to raise_error(RestClient::RequestTimeout)
248
248
  end
249
249
  end
250
250
 
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.2.1
4
+ version: 1.2.2
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-07-15 00:00:00.000000000 Z
13
+ date: 2016-07-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: aws_cf_signer