obf 0.6.31 → 0.6.32

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +3 -1
  3. data/README.md +4 -0
  4. data/lib/obf/utils.rb +4 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d429c4dfe662ff1048c6a2e74a13c8640e3da35
4
- data.tar.gz: 7d3bb396e6ce6317cc24a09e1df2c3adfee5e55e
3
+ metadata.gz: 0dedc95448e2b00a85d37a4d9f5f4bb66757f605
4
+ data.tar.gz: edd01f088aa2c707c6e1537464b56f2503102602
5
5
  SHA512:
6
- metadata.gz: 6fc702de3b29b71c0ee57cb6fbb64404e33bf10e37454f094769bf3c84835f45c93e3206aa03abb2b83a74ab243faee3ec970a0a63d16aed9abf445d8677595f
7
- data.tar.gz: 3b15fc57800c0d5603f0e2cd1fb821d1073e5c061bb91b98949b93ab6b6ad113a9b02a46189d2f9d65131c4d63e435cc43d1ad55671a79d8fe02f630a2bf5310
6
+ metadata.gz: 09cd638178247d79039caa951dd9df024350aa0ad36c5ca185465703f81ed0f86c9f57ba811e03f5d297a489171416bbe437c82eb3fd7165cd1eb182d23e1176
7
+ data.tar.gz: c770c9b2b41736f8c3d986d06228663a3e251e25e196ec922c504bc2170bd23e52a776adb8f2b0ea70efecf9b7a90d61cbe3d9baead946b919c743f05d9d6d7c
data/LICENSE CHANGED
@@ -1,4 +1,6 @@
1
- Copyright (c) 2014 CoughDrop
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 CoughDrop
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
4
6
  this software and associated documentation files (the "Software"), to deal in
data/README.md CHANGED
@@ -61,3 +61,7 @@ We've talked about including some utilities to make translation easier. Basicall
61
61
  something that would take an .obf or .obz file and spit out a set of translation strings,
62
62
  and another something that would take an .obf or .obz file and a set of translation strings
63
63
  and generate a new, translated result.
64
+
65
+ ## License
66
+
67
+ Licensed under the MIT License.
data/lib/obf/utils.rb CHANGED
@@ -153,10 +153,13 @@ module OBF::Utils
153
153
  return nil
154
154
  end
155
155
  file.close
156
- if extension && ['image/png', 'image/jpeg', 'image/jpg', 'image/gif'].include?(image['content_type']) && image['width'] < 1000 && image['width'] == image['height']
156
+ if extension && ['image/jpeg', 'image/jpg', 'image/gif'].include?(image['content_type']) && image['width'] < 1000 && image['width'] == image['height']
157
+ # png files need to be converted to make sure they don't have a transparent bg, or
158
+ # else performance takes a huge hit.
157
159
  `cp #{file.path} #{file.path}.#{extension}`
158
160
  "#{file.path}.#{extension}"
159
161
  else
162
+ puts image.to_json
160
163
  # TODO: maybe convert to jpg instead of png?
161
164
  # see https://github.com/prawnpdf/prawn/issues/324
162
165
  # in that case, fill the image with a white background, perhaps?
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.6.31
4
+ version: 0.6.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Whitmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-06 00:00:00.000000000 Z
11
+ date: 2016-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json