obf 0.9.8.12 → 0.9.8.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/obf/external.rb +5 -3
- data/lib/obf/pdf.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a00f932e746089fd18edbc5106531875c6b5f0343ec5879f947b98b7825c76cb
|
4
|
+
data.tar.gz: 9f2e7277eb0080490255753c5ca510554f9c7cb4be85152861d8a4e811de06f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56218fc388124d302fb2dddbc10dc61d60f0c278f5a9c798516c9148c24715d8d83a358b61d37bcc06996bd066ad70e960aaab8354de7f089616397c4b701880
|
7
|
+
data.tar.gz: 6e2e310a447cf2b1eb83bdbab259317ff12a6078c584122508c129f2101015ad9d995866bc162af384260a6de08ebdfcc571c9b820d4131dd490d38d6abb577e
|
data/lib/obf/external.rb
CHANGED
@@ -131,10 +131,12 @@ module OBF::External
|
|
131
131
|
end
|
132
132
|
hydra.run
|
133
133
|
grabs.each do |grab|
|
134
|
+
if grab[:res] && grab[:res]['data']
|
134
135
|
str = "data:" + grab[:res]['content_type']
|
135
|
-
|
136
|
-
|
137
|
-
|
136
|
+
str += ";base64," + Base64.strict_encode64(grab[:res]['data'])
|
137
|
+
grab[:img]['data'] = str
|
138
|
+
grab[:img]['content_type'] ||= grab[:res]['content_type']
|
139
|
+
end
|
138
140
|
end
|
139
141
|
|
140
142
|
images.each do |original_image|
|
data/lib/obf/pdf.rb
CHANGED
@@ -195,7 +195,7 @@ module OBF::PDF
|
|
195
195
|
res = OBF::Utils.get_url(url, true)
|
196
196
|
if res['request']
|
197
197
|
hydra.queue(res['request'])
|
198
|
-
grabs << {url: url, req: res['request'], image: image, fill: btn['background_color'] ? OBF::Utils.fix_color(btn['background_color'], 'hex') : "ffffff"}
|
198
|
+
grabs << {url: url, res: res, req: res['request'], image: image, fill: btn['background_color'] ? OBF::Utils.fix_color(btn['background_color'], 'hex') : "ffffff"}
|
199
199
|
end
|
200
200
|
elsif image && image['data'] && !(image['path'] && options['zipper'])
|
201
201
|
grabs << {image: image, fill: btn['background_color'] ? OBF::Utils.fix_color(btn['background_color'], 'hex') : "ffffff"}
|
@@ -204,9 +204,10 @@ module OBF::PDF
|
|
204
204
|
hydra.run
|
205
205
|
threads = []
|
206
206
|
grabs.each do |grab|
|
207
|
-
if grab[:
|
208
|
-
grab[:image]['raw_data'] = grab[:
|
209
|
-
grab[:image]['content_type'] ||= grab[:
|
207
|
+
if grab[:res]
|
208
|
+
grab[:image]['raw_data'] = grab[:res]['data']
|
209
|
+
grab[:image]['content_type'] ||= grab[:res]['content_type']
|
210
|
+
grab[:image]['extension'] ||= grab[:res]['extension']
|
210
211
|
end
|
211
212
|
grab[:image]['threadable'] = true
|
212
213
|
bg = 'white'
|