obf 0.9.8.16 → 0.9.8.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/obf/pdf.rb +1 -2
- data/lib/obf/utils.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 963a55b5473b9d4d49a7c115f37d669a414ac8ce5e23f9066516bef8a6136d0f
|
|
4
|
+
data.tar.gz: 740e6745dc7c2f59878715cb82a22902a3396f89589a25207ab90aa090112735
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e18f9bbf2ca719ff45301c65c5108b2e1bbbfb11a4b93703cb3ae9c82aa269ec575ed80d83058c18034be8aca8ff402393fae49fd13bf93369790d6254e08e3
|
|
7
|
+
data.tar.gz: de2f834f4e9aa4d9d59b47ffd1bef855dbe959e0837e50e41145565da679688a0053661002d2294176342d24dd08b7dc77b1b1629d444bf6d02e4d55d7654424
|
data/lib/obf/pdf.rb
CHANGED
|
@@ -203,7 +203,6 @@ module OBF::PDF
|
|
|
203
203
|
end
|
|
204
204
|
hydra.run
|
|
205
205
|
threads = []
|
|
206
|
-
grabs = []
|
|
207
206
|
grabs.each do |grab|
|
|
208
207
|
if grab[:res] && grab[:res]['data']
|
|
209
208
|
grab[:image]['raw_data'] = grab[:res]['data']
|
|
@@ -220,7 +219,7 @@ module OBF::PDF
|
|
|
220
219
|
res = OBF::Utils.save_image(grab[:image], options['zipper'], bg)
|
|
221
220
|
threads << res if res && !res.is_a?(String)
|
|
222
221
|
end
|
|
223
|
-
threads.each{|t| t.join }
|
|
222
|
+
threads.each{|t| t[:thread].join }
|
|
224
223
|
grabs.each{|g| g[:image].delete('threadable') }
|
|
225
224
|
OBF::Utils.log " done with #{grabs.length} remote images!"
|
|
226
225
|
|
data/lib/obf/utils.rb
CHANGED
|
@@ -176,7 +176,7 @@ module OBF::Utils
|
|
|
176
176
|
types = MIME::Types.type_for(image['path'])
|
|
177
177
|
image['content_type'] = types[0] && types[0].to_s
|
|
178
178
|
end
|
|
179
|
-
elsif image['url']
|
|
179
|
+
elsif image['url'] && !image['threadable']
|
|
180
180
|
OBF::Utils.log " retrieving #{image['url']}"
|
|
181
181
|
url_data = get_url(image['url'])
|
|
182
182
|
OBF::Utils.log " done!"
|
|
@@ -220,7 +220,7 @@ module OBF::Utils
|
|
|
220
220
|
image['local_path'] = "#{file.path}.jpg"
|
|
221
221
|
if image['threadable']
|
|
222
222
|
thr = Process.detach(Process.spawn(cmd))
|
|
223
|
-
return thr
|
|
223
|
+
return {thread: thr, type: 'svg'}
|
|
224
224
|
else
|
|
225
225
|
`#{cmd}`
|
|
226
226
|
end
|
|
@@ -232,7 +232,7 @@ module OBF::Utils
|
|
|
232
232
|
image['local_path'] = "#{path}.jpg"
|
|
233
233
|
if image['threadable']
|
|
234
234
|
thr = Process.detach(Process.spawn(cmd))
|
|
235
|
-
return thr
|
|
235
|
+
return {thread: thr, type: 'not_svg'}
|
|
236
236
|
else
|
|
237
237
|
`#{cmd}`
|
|
238
238
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: obf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.8.
|
|
4
|
+
version: 0.9.8.17
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brian Whitmer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-01-
|
|
11
|
+
date: 2020-01-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|