cloudinary 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/cloudinary.gemspec +1 -0
- data/lib/cloudinary.rb +21 -2
- data/lib/cloudinary/api.rb +126 -94
- data/lib/cloudinary/helper.rb +17 -4
- data/lib/cloudinary/uploader.rb +190 -167
- data/lib/cloudinary/utils.rb +138 -14
- data/lib/cloudinary/version.rb +1 -1
- data/spec/api_spec.rb +168 -115
- data/spec/archive_spec.rb +102 -0
- data/spec/cloudinary_spec.rb +17 -0
- data/spec/spec_helper.rb +23 -0
- data/spec/uploader_spec.rb +90 -44
- data/spec/utils_spec.rb +183 -176
- data/spec/video_tag_spec.rb +7 -2
- metadata +20 -2
data/spec/video_tag_spec.rb
CHANGED
@@ -14,6 +14,11 @@ if ::Rails::VERSION::MAJOR < 4
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
describe CloudinaryHelper do
|
17
|
+
before :all do
|
18
|
+
# Test the helper in the context it runs in in production
|
19
|
+
ActionView::Base.send :include, CloudinaryHelper
|
20
|
+
|
21
|
+
end
|
17
22
|
before(:each) do
|
18
23
|
Cloudinary.config do |config|
|
19
24
|
config.cloud_name = "test123"
|
@@ -28,8 +33,6 @@ describe CloudinaryHelper do
|
|
28
33
|
end
|
29
34
|
|
30
35
|
let(:helper) {
|
31
|
-
# Test the helper in the context it runs in in production
|
32
|
-
ActionView::Base.send :include, CloudinaryHelper
|
33
36
|
ActionView::Base.new
|
34
37
|
}
|
35
38
|
let(:root_path) { "http://res.cloudinary.com/test123" }
|
@@ -64,6 +67,7 @@ describe CloudinaryHelper do
|
|
64
67
|
:start_offset => 3) }
|
65
68
|
|
66
69
|
it 'should create a tag with "src" attribute that includes the transformations' do
|
70
|
+
expect(test_tag["src"]).to be_truthy
|
67
71
|
expect(test_tag["src"]).to include("ac_acc")
|
68
72
|
expect(test_tag["src"]).to include("vc_h264")
|
69
73
|
expect(test_tag["src"]).to include("so_3")
|
@@ -71,6 +75,7 @@ describe CloudinaryHelper do
|
|
71
75
|
expect(test_tag["src"]).to include("h_200")
|
72
76
|
end
|
73
77
|
it 'should have the correct tag height' do
|
78
|
+
expect(test_tag["src"]).to include("ac_acc")
|
74
79
|
expect(test_tag["height"]).to eq("100")
|
75
80
|
end
|
76
81
|
end
|
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.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: 2015-12-
|
13
|
+
date: 2015-12-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws_cf_signer
|
@@ -54,6 +54,20 @@ dependencies:
|
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '0'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: rubyzip
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
type: :development
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
57
71
|
- !ruby/object:Gem::Dependency
|
58
72
|
name: rest-client
|
59
73
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,7 +151,9 @@ files:
|
|
137
151
|
- lib/cloudinary/video_helper.rb
|
138
152
|
- lib/tasks/cloudinary.rake
|
139
153
|
- spec/api_spec.rb
|
154
|
+
- spec/archive_spec.rb
|
140
155
|
- spec/cloudinary_helper_spec.rb
|
156
|
+
- spec/cloudinary_spec.rb
|
141
157
|
- spec/docx.docx
|
142
158
|
- spec/favicon.ico
|
143
159
|
- spec/logo.png
|
@@ -185,7 +201,9 @@ specification_version: 4
|
|
185
201
|
summary: Client library for easily using the Cloudinary service
|
186
202
|
test_files:
|
187
203
|
- spec/api_spec.rb
|
204
|
+
- spec/archive_spec.rb
|
188
205
|
- spec/cloudinary_helper_spec.rb
|
206
|
+
- spec/cloudinary_spec.rb
|
189
207
|
- spec/docx.docx
|
190
208
|
- spec/favicon.ico
|
191
209
|
- spec/logo.png
|