obf 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/obf/utils.rb +7 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ef8367072fd8152240b77c218078b47a113c9af770dcf7c2f1cac8aa958cc35a
|
4
|
+
data.tar.gz: 82cf17375666097b9a38c4d3e22b657924592a12c3b568b8869e2bdecdfe5ce8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 332b2f7f42277f916a88d44777859bd0864b038e60bed05d8f61128829f37c52726067cc3cee27830c5914011fbec9dd8a6f0ef0629be2d003ebe2af1ef69f6c
|
7
|
+
data.tar.gz: e293cef7f4d072a00175c84cefb32f66d741c23c9d94c413065669a447879dcffe4bb2d5ea1ea2835f2174d0264cbcaf4b0373e13bde0b4b100de25a550d3bef
|
data/lib/obf/utils.rb
CHANGED
@@ -178,13 +178,15 @@ module OBF::Utils
|
|
178
178
|
size = 400
|
179
179
|
path = file.path
|
180
180
|
if image['content_type'] && image['content_type'].match(/svg/)
|
181
|
-
`convert -background
|
181
|
+
`convert -background "#{background}" -density 300 -resize #{size}x#{size} -gravity center -extent #{size}x#{size} #{file.path} -flatten #{file.path}.jpg`
|
182
182
|
# `rsvg-convert -w #{size} -h #{size} -a #{file.path} > #{file.path}.png`
|
183
|
-
path = "#{file.path}.
|
183
|
+
path = "#{file.path}.jpg"
|
184
|
+
else
|
185
|
+
`convert #{path} -density 300 -resize #{size}x#{size} -background "#{background}" -gravity center -extent #{size}x#{size} -flatten #{path}.jpg`
|
186
|
+
path = "#{path}.jpg"
|
184
187
|
end
|
185
|
-
`convert #{path} -density 300 -resize #{size}x#{size} -background "#{background}" -gravity center -extent #{size}x#{size} #{path}.jpg`
|
186
188
|
|
187
|
-
|
189
|
+
path
|
188
190
|
end
|
189
191
|
end
|
190
192
|
|
@@ -333,6 +335,7 @@ module OBF::Utils
|
|
333
335
|
file.close
|
334
336
|
end
|
335
337
|
end
|
338
|
+
puts "file not found, #{path}" if !File.exist?(path)
|
336
339
|
data = `identify -verbose #{path}`
|
337
340
|
data.split(/\n/).each do |line|
|
338
341
|
pre, post = line.sub(/^\s+/, '').split(/:\s/, 2)
|
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.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Whitmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.
|
184
|
+
rubygems_version: 2.7.6
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: Open Board Format
|