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.
- checksums.yaml +4 -4
- data/LICENSE +3 -1
- data/README.md +4 -0
- data/lib/obf/utils.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0dedc95448e2b00a85d37a4d9f5f4bb66757f605
|
|
4
|
+
data.tar.gz: edd01f088aa2c707c6e1537464b56f2503102602
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 09cd638178247d79039caa951dd9df024350aa0ad36c5ca185465703f81ed0f86c9f57ba811e03f5d297a489171416bbe437c82eb3fd7165cd1eb182d23e1176
|
|
7
|
+
data.tar.gz: c770c9b2b41736f8c3d986d06228663a3e251e25e196ec922c504bc2170bd23e52a776adb8f2b0ea70efecf9b7a90d61cbe3d9baead946b919c743f05d9d6d7c
|
data/LICENSE
CHANGED
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/
|
|
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.
|
|
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:
|
|
11
|
+
date: 2016-01-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|