obf 0.9.8.13 → 0.9.8.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a00f932e746089fd18edbc5106531875c6b5f0343ec5879f947b98b7825c76cb
4
- data.tar.gz: 9f2e7277eb0080490255753c5ca510554f9c7cb4be85152861d8a4e811de06f3
3
+ metadata.gz: 8a370cf7909de50dda45b037ee6be7f7df137dac296341e327f9dc2266d6f988
4
+ data.tar.gz: dc08ca5de1dd70c48c9e7d3ff19670f8e82b7d4823c1277b03809a41b7a505c3
5
5
  SHA512:
6
- metadata.gz: 56218fc388124d302fb2dddbc10dc61d60f0c278f5a9c798516c9148c24715d8d83a358b61d37bcc06996bd066ad70e960aaab8354de7f089616397c4b701880
7
- data.tar.gz: 6e2e310a447cf2b1eb83bdbab259317ff12a6078c584122508c129f2101015ad9d995866bc162af384260a6de08ebdfcc571c9b820d4131dd490d38d6abb577e
6
+ metadata.gz: 046ee06392c4b516ec1e1d85fb9a08fcd46099d95767564e45081f37928b78098c134432f52d6eaad5385fab30d0f1674911f1e1fdf67874ea919b02afb5a778
7
+ data.tar.gz: 7f5c28c4cd7aae2cfc7af1da288a8a604d5019c90dc5d3340a7b89d5100ec4107d4005aa03a5a36d1f242a4370aabe8183c2df0d51d6c2345211b8876260a625
@@ -117,7 +117,7 @@ module OBF::External
117
117
  end
118
118
 
119
119
  if to_include[:images]
120
- hydra = Typhoeus::Hydra.new(max_concurrency: 10)
120
+ hydra = OBF::Utils.hydra
121
121
  grabs = []
122
122
  images.each do |img|
123
123
  if path_hash && path_hash['images'] && path_hash['images'][img['id']]
@@ -186,7 +186,7 @@ module OBF::PDF
186
186
 
187
187
  # Grab all the images per board in parallel
188
188
  OBF::Utils.log " batch-retrieving remote images"
189
- hydra = Typhoeus::Hydra.new(max_concurrency: 10)
189
+ hydra = OBF::Utils.hydra
190
190
  grabs = []
191
191
  obj['buttons'].each do |btn|
192
192
  image = (obj['images_hash'] || {})[btn['image_id']]
@@ -204,7 +204,7 @@ module OBF::PDF
204
204
  hydra.run
205
205
  threads = []
206
206
  grabs.each do |grab|
207
- if grab[:res]
207
+ if grab[:res] && grab[:res]['data']
208
208
  grab[:image]['raw_data'] = grab[:res]['data']
209
209
  grab[:image]['content_type'] ||= grab[:res]['content_type']
210
210
  grab[:image]['extension'] ||= grab[:res]['extension']
@@ -154,6 +154,9 @@ module OBF::Utils
154
154
  str
155
155
  end
156
156
 
157
+ def self.hydra
158
+ Typhoeus::Hydra.new(max_concurrency: 10)
159
+ end
157
160
 
158
161
  def self.save_image(image, zipper=nil, background=nil)
159
162
  if image['data']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8.13
4
+ version: 0.9.8.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Whitmer