obf 0.9.9.0 → 0.9.9.1

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: a69fdd5e4096eb1801dcfa04abe1d091abfcca98aab6c8170bab7bb3ae93375d
4
- data.tar.gz: 2d09ffd7e75aedc26c1b764fe2d442c8d527f484d44d678c7757117b46565629
3
+ metadata.gz: 2516fbb23f12e3378fa47cc3c61cae145104a2c2595022db3026c26e944f4a12
4
+ data.tar.gz: b5087e0ee7223306ba60ce4503b3293f3e0dfe8e3de2f206e3f31d833ed349be
5
5
  SHA512:
6
- metadata.gz: 5d9a0f073fa2028b6f967caed39687d67b21d82c7cd8f37e06f26a8c7e42d99d2a1a76b474a674bea4893325ad1dbf49d2ae38f07f7bdccc22cf1b4514c2c34f
7
- data.tar.gz: a8015113cbb3c8e2f3fcf79283e645dd96fb2dd67a3c7623e430301f8d5338898057c4a2b6e2d6b48d1b4daad93dfeddcf646ca325bb995b30559c735d40431e
6
+ metadata.gz: 274d446b05caab4279d2a9acb563e7322b8e57521a9c2da386daa0da50057ee4f96b5d07cb1f832b012a60add50c08db803c894fbd6a6770bcf5831b3fbf08fb
7
+ data.tar.gz: 67bfaba475aaa1c882e3a0b705790f26b9fe90bd94cfeb77468f329404b20e7d1f0a78593c5181449dc6b4ccd82a06fcaec05b9767d7e5cc810bfaa8f713b45f
data/lib/obf/external.rb CHANGED
@@ -149,6 +149,8 @@ module OBF::External
149
149
  'width' => original_image['width'],
150
150
  'height' => original_image['height'],
151
151
  'license' => OBF::Utils.parse_license(original_image['license']),
152
+ 'protected' => original_image['protected'],
153
+ 'protected_source' => original_image['protected_source'],
152
154
  'url' => original_image['url'],
153
155
  'data' => original_image['data'],
154
156
  'data_url' => original_image['data_url'],
@@ -172,7 +174,7 @@ module OBF::External
172
174
  image['height'] ||= path_hash['images'][image['id']]['height']
173
175
  else
174
176
  image_fetch = OBF::Utils.image_raw(image['data'] || image['url'])
175
- if image_fetch
177
+ if image_fetch && image_fetch['data']
176
178
  if !image['content_type'] || !image['width'] || !image['height']
177
179
  attrs = OBF::Utils.image_attrs(image_fetch['data'])
178
180
  image['content_type'] ||= image_fetch['content_type'] || attrs['content_type']
@@ -202,6 +204,8 @@ module OBF::External
202
204
  'width' => original_image['width'],
203
205
  'height' => original_image['height'],
204
206
  'license' => OBF::Utils.parse_license(original_image['license']),
207
+ 'protected' => original_image['protected'],
208
+ 'protected_source' => original_image['protected_source'],
205
209
  'url' => original_image['url'],
206
210
  'data_url' => original_image['data_url'],
207
211
  'content_type' => original_image['content_type']
@@ -217,6 +221,8 @@ module OBF::External
217
221
  'id' => original_sound['id'],
218
222
  'duration' => original_sound['duration'],
219
223
  'license' => OBF::Utils.parse_license(original_sound['license']),
224
+ 'protected' => original_sound['protected'],
225
+ 'protected_source' => original_sound['protected_source'],
220
226
  'url' => original_sound['url'],
221
227
  'data' => original_sound['data'],
222
228
  'data_url' => original_sound['data_url'],
@@ -250,6 +256,8 @@ module OBF::External
250
256
  'id' => original_sound['id'],
251
257
  'duration' => original_sound['duration'],
252
258
  'license' => OBF::Utils.parse_license(original_sound['license']),
259
+ 'protected' => original_sound['protected'],
260
+ 'protected_source' => original_sound['protected_source'],
253
261
  'url' => original_sound['url'],
254
262
  'data_url' => original_sound['data_url'],
255
263
  'content_type' => original_sound['content_type']
data/lib/obf/utils.rb CHANGED
@@ -377,7 +377,7 @@ module OBF::Utils
377
377
 
378
378
  def self.image_attrs(path, extension='')
379
379
  res = {}
380
- if path.match(/^data:/)
380
+ if path && path.match(/^data:/)
381
381
  res['content_type'] = path.split(/;/)[0].split(/:/)[1]
382
382
  raw = Base64.strict_decode64(path.split(/\,/, 2)[1])
383
383
  file = Tempfile.new(['file', extension])
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.9.0
4
+ version: 0.9.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Whitmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-22 00:00:00.000000000 Z
11
+ date: 2022-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
184
  - !ruby/object:Gem::Version
185
185
  version: '0'
186
186
  requirements: []
187
- rubygems_version: 3.2.3
187
+ rubygems_version: 3.0.9
188
188
  signing_key:
189
189
  specification_version: 4
190
190
  summary: Open Board Format