url2png 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/url2png/config.rb +1 -1
- data/lib/url2png/helpers/common.rb +3 -1
- data/url2png.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.6
|
data/lib/url2png/config.rb
CHANGED
@@ -18,6 +18,8 @@ module Url2png
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def site_image_url url, options = {}
|
21
|
+
options[:protocol] ||= 'http://'
|
22
|
+
|
21
23
|
dim = Url2png::Dimensions.parse(options)
|
22
24
|
|
23
25
|
# escape the url
|
@@ -27,7 +29,7 @@ module Url2png
|
|
27
29
|
token = Digest::MD5.hexdigest("#{ Url2png::Config.shared_secret }+#{ safe_url }")
|
28
30
|
|
29
31
|
# build image url
|
30
|
-
File.join(Url2png::Config.api_url(
|
32
|
+
File.join(Url2png::Config.api_url(options[:protocol]), Url2png::Config.api_version, Url2png::Config.public_key, token, dim[:size], safe_url)
|
31
33
|
end
|
32
34
|
|
33
35
|
end
|
data/url2png.gemspec
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 6
|
9
|
+
version: 0.0.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- wout fierens
|
@@ -131,7 +131,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
131
|
requirements:
|
132
132
|
- - ">="
|
133
133
|
- !ruby/object:Gem::Version
|
134
|
-
hash: -
|
134
|
+
hash: -4384475011927731947
|
135
135
|
segments:
|
136
136
|
- 0
|
137
137
|
version: "0"
|