cloudinary 1.0.19 → 1.0.20
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cloudinary.rb +10 -0
- data/lib/cloudinary/version.rb +1 -1
- metadata +2 -2
data/lib/cloudinary.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
require "ostruct"
|
3
3
|
require "pathname"
|
4
4
|
require "yaml"
|
5
|
+
require "uri"
|
5
6
|
require "cloudinary/version"
|
6
7
|
require "cloudinary/utils"
|
7
8
|
require "cloudinary/uploader"
|
@@ -30,6 +31,15 @@ module Cloudinary
|
|
30
31
|
"secure_distribution" => ENV["CLOUDINARY_SECURE_DISTRIBUTION"],
|
31
32
|
"private_cdn" => ENV["CLOUDINARY_PRIVATE_CDN"].to_s == 'true'
|
32
33
|
)
|
34
|
+
elsif first_time && ENV["CLOUDINARY_URL"]
|
35
|
+
uri = URI.parse(ENV["CLOUDINARY_URL"])
|
36
|
+
set_config(
|
37
|
+
"cloud_name" => uri.host,
|
38
|
+
"api_key" => uri.user,
|
39
|
+
"api_secret" => uri.password,
|
40
|
+
"private_cdn" => !uri.path.blank?,
|
41
|
+
"secure_distribution" => uri.path[1..-1]
|
42
|
+
)
|
33
43
|
end
|
34
44
|
|
35
45
|
set_config(new_config) if new_config
|
data/lib/cloudinary/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: cloudinary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.20
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Nadav Soferman
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2012-05-
|
15
|
+
date: 2012-05-06 00:00:00 +03:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|