cloudinary 1.0.77 → 1.0.78
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -15
- data/CHANGELOG +4 -0
- data/lib/cloudinary.rb +17 -6
- data/lib/cloudinary/static.rb +3 -3
- data/lib/cloudinary/utils.rb +1 -1
- data/lib/cloudinary/version.rb +1 -1
- metadata +52 -70
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MDVjNzA1NjdhNjZmNjI3OTllNjAzYTU4ZDQ1MDkyOTU1OWNiMjljNmIyZGQ0
|
10
|
-
ZWVmZjc1NWQ1OTUyOGE5MmIzYTI0MTU0MmQ2YzcwYWFhN2MxNzE4NTY0ZjY1
|
11
|
-
YTg4ZmZlYzA0Mzk1ZDhmMzZkYjhhNjRkNWI4NjBjNDYwOWI0ZTI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NTk3ZjljM2I1YmI4Yzk3MmQ5YTZjYjk0MzhiYWM3ZTkxNDJjMTUyYmUzNDFj
|
14
|
-
MzgyYzU3NDI1YThmMzg2NmE4ZGIyOTg5ZmVjYjBmZjg0OThjYWNlNjg0Mjlk
|
15
|
-
ZmNhMDk4MTQ4YmIwZWVmNjExM2UzOTQwYzc0ZTI3Yjk2ZWUxNzU=
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1b465c67371871382525ab5dd84b4ac295ca59f9
|
4
|
+
data.tar.gz: a46f2de133c16575112eaefb0c92955080f759a4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 21755db5865749be5a67c64ce750d8666618325d0f7d1b5713e0297aa02f30d40d20da5859896036aeb3f6f0312dd2c1b47b0b0cc5e539bd9333bf474653abbb
|
7
|
+
data.tar.gz: a2b04439ffaae15f62100723b97a4ac52e0c543e07f5e2af3f5e644ac1957c962b7cadf522d932641915c9f2c960db8e1119e0db401126860f63dd8596c8ef2a
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
= Version 1.0.78 - 2014-11-04
|
2
|
+
* Add app_root method that handled Rails.root, which is a String in old Rails versions.
|
3
|
+
* Issue #127 - solve cyclical dependency in case cloudinary was included after Rails was initialized.
|
4
|
+
|
1
5
|
= Version 1.0.77 - 2014-09-22
|
2
6
|
* Update Cloudinary's jQuery plugin to v1.0.20.
|
3
7
|
* Support invalidation in bulk deletion requests.
|
data/lib/cloudinary.rb
CHANGED
@@ -7,10 +7,6 @@ require "erb"
|
|
7
7
|
require "cloudinary/version"
|
8
8
|
require "cloudinary/exceptions"
|
9
9
|
require "cloudinary/missing"
|
10
|
-
require "cloudinary/helper" if defined?(::ActionView::Base)
|
11
|
-
require "cloudinary/controller" if defined?(::ActionController::Base)
|
12
|
-
require "cloudinary/railtie" if defined?(Rails) && defined?(Rails::Railtie)
|
13
|
-
require "cloudinary/engine" if defined?(Rails) && defined?(Rails::Engine)
|
14
10
|
|
15
11
|
module Cloudinary
|
16
12
|
autoload :Utils, 'cloudinary/utils'
|
@@ -80,6 +76,15 @@ module Cloudinary
|
|
80
76
|
end
|
81
77
|
end
|
82
78
|
|
79
|
+
def self.app_root
|
80
|
+
if (defined?(Rails) && Rails.root)
|
81
|
+
# Rails 2.2 return String for Rails.root
|
82
|
+
Rails.root.is_a?(Pathname) ? Rails.root : Pathname.new(Rails.root)
|
83
|
+
else
|
84
|
+
Pathname.new(".")
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
83
88
|
private
|
84
89
|
|
85
90
|
def self.config_env
|
@@ -90,11 +95,17 @@ module Cloudinary
|
|
90
95
|
|
91
96
|
def self.config_dir
|
92
97
|
return Pathname.new(ENV["CLOUDINARY_CONFIG_DIR"]) if ENV["CLOUDINARY_CONFIG_DIR"]
|
93
|
-
|
94
|
-
Pathname.new("config")
|
98
|
+
self.app_root.join("config")
|
95
99
|
end
|
96
100
|
|
97
101
|
def self.set_config(new_config)
|
98
102
|
new_config.each{|k,v| @@config.send(:"#{k}=", v) if !v.nil?}
|
99
103
|
end
|
100
104
|
end
|
105
|
+
|
106
|
+
# Prevent require loop if included after Rails is already initialized.
|
107
|
+
require "cloudinary/helper" if defined?(::ActionView::Base)
|
108
|
+
require "cloudinary/controller" if defined?(::ActionController::Base)
|
109
|
+
require "cloudinary/railtie" if defined?(Rails) && defined?(Rails::Railtie)
|
110
|
+
require "cloudinary/engine" if defined?(Rails) && defined?(Rails::Engine)
|
111
|
+
|
data/lib/cloudinary/static.rb
CHANGED
data/lib/cloudinary/utils.rb
CHANGED
@@ -248,7 +248,7 @@ class Cloudinary::Utils
|
|
248
248
|
end
|
249
249
|
|
250
250
|
def self.asset_file_name(path)
|
251
|
-
data =
|
251
|
+
data = Cloudinary.app_root.join(path).read(:mode=>"rb")
|
252
252
|
ext = path.extname
|
253
253
|
md5 = Digest::MD5.hexdigest(data)
|
254
254
|
public_id = "#{path.basename(ext)}-#{md5}"
|
data/lib/cloudinary/version.rb
CHANGED
metadata
CHANGED
@@ -1,82 +1,65 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudinary
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.78
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Nadav Soferman
|
8
8
|
- Itai Lahan
|
9
9
|
- Tal Lev-Ami
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
|
14
|
+
date: 2014-11-04 00:00:00 Z
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
16
17
|
name: rest-client
|
17
|
-
requirement: !ruby/object:Gem::Requirement
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :runtime
|
23
18
|
prerelease: false
|
24
|
-
|
25
|
-
requirements:
|
26
|
-
-
|
27
|
-
-
|
28
|
-
|
29
|
-
|
30
|
-
name: aws_cf_signer
|
31
|
-
requirement: !ruby/object:Gem::Requirement
|
32
|
-
requirements:
|
33
|
-
- - ! '>='
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version: '0'
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- &id002
|
22
|
+
- ">="
|
23
|
+
- !ruby/object:Gem::Version
|
24
|
+
version: "0"
|
36
25
|
type: :runtime
|
26
|
+
version_requirements: *id001
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: aws_cf_signer
|
37
29
|
prerelease: false
|
38
|
-
|
39
|
-
requirements:
|
40
|
-
-
|
41
|
-
|
42
|
-
|
43
|
-
- !ruby/object:Gem::Dependency
|
30
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- *id002
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id003
|
35
|
+
- !ruby/object:Gem::Dependency
|
44
36
|
name: rspec
|
45
|
-
requirement: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - ! '>='
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '0'
|
50
|
-
type: :development
|
51
37
|
prerelease: false
|
52
|
-
|
53
|
-
requirements:
|
54
|
-
-
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '0'
|
57
|
-
- !ruby/object:Gem::Dependency
|
58
|
-
name: actionpack
|
59
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
-
requirements:
|
61
|
-
- - ! '>='
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '0'
|
38
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- *id002
|
64
41
|
type: :development
|
42
|
+
version_requirements: *id004
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: actionpack
|
65
45
|
prerelease: false
|
66
|
-
|
67
|
-
requirements:
|
68
|
-
-
|
69
|
-
|
70
|
-
|
46
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- *id002
|
49
|
+
type: :development
|
50
|
+
version_requirements: *id005
|
71
51
|
description: Client library for easily using the Cloudinary service
|
72
|
-
email:
|
52
|
+
email:
|
73
53
|
- nadav.soferman@cloudinary.com
|
74
54
|
- itai.lahan@cloudinary.com
|
75
55
|
- tal.levami@cloudinary.com
|
76
56
|
executables: []
|
57
|
+
|
77
58
|
extensions: []
|
59
|
+
|
78
60
|
extra_rdoc_files: []
|
79
|
-
|
61
|
+
|
62
|
+
files:
|
80
63
|
- .gitignore
|
81
64
|
- .rspec
|
82
65
|
- CHANGELOG
|
@@ -128,30 +111,29 @@ files:
|
|
128
111
|
- vendor/assets/javascripts/cloudinary/load-image.min.js
|
129
112
|
- vendor/assets/javascripts/cloudinary/processing.js
|
130
113
|
homepage: http://cloudinary.com
|
131
|
-
licenses:
|
114
|
+
licenses:
|
132
115
|
- MIT
|
133
116
|
metadata: {}
|
117
|
+
|
134
118
|
post_install_message:
|
135
119
|
rdoc_options: []
|
136
|
-
|
120
|
+
|
121
|
+
require_paths:
|
137
122
|
- lib
|
138
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
139
|
-
requirements:
|
140
|
-
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
requirements:
|
145
|
-
- - ! '>='
|
146
|
-
- !ruby/object:Gem::Version
|
147
|
-
version: '0'
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- *id002
|
126
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- *id002
|
148
129
|
requirements: []
|
130
|
+
|
149
131
|
rubyforge_project: cloudinary
|
150
|
-
rubygems_version: 2.
|
132
|
+
rubygems_version: 2.4.2
|
151
133
|
signing_key:
|
152
134
|
specification_version: 4
|
153
135
|
summary: Client library for easily using the Cloudinary service
|
154
|
-
test_files:
|
136
|
+
test_files:
|
155
137
|
- spec/api_spec.rb
|
156
138
|
- spec/cloudinary_helper_spec.rb
|
157
139
|
- spec/docx.docx
|