html2odt 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/html2odt/image.rb +12 -1
- data/lib/html2odt/version.rb +1 -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: df8d84152bdb9bd084049457e5d4b7873947ea7d
|
4
|
+
data.tar.gz: 61d994a96bc8b0a0d6f98ffb10802c2b80422447
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3096708a2dd8854a36be52da95ae61848c51ddde69e3fbee23b326790aa93ec2e97f37f93dda0108b26480cba0a8cb3d979d0acc9d5d36a7bf8420bcce62a6f
|
7
|
+
data.tar.gz: 112d12a289eb3cab46a4404c2b51799cd99a42d90a406b109acf23bedfa1a7f203d838b9e19f11c74ecb1bf7dd8ab860dc96175b1b88d85e4213ff1a01af2ad9
|
data/CHANGELOG.md
CHANGED
data/lib/html2odt/image.rb
CHANGED
@@ -34,11 +34,22 @@ class Html2Odt::Image
|
|
34
34
|
|
35
35
|
if reader.type
|
36
36
|
@type = reader.type
|
37
|
+
|
38
|
+
# for some files, peek doesn't seem to do the trick and width/height
|
39
|
+
# stay nil. According to
|
40
|
+
# https://github.com/sstephenson/dimensions#reading-dimensions-from-a-stream
|
41
|
+
# the dimensions get initialized 'once enough of the file' has been
|
42
|
+
# read, so we do that.
|
43
|
+
#
|
44
|
+
while reader.width.nil?
|
45
|
+
break unless io.read(8192)
|
46
|
+
end
|
47
|
+
|
37
48
|
@width = reader.width
|
38
49
|
@height = reader.height
|
39
50
|
@angle = reader.angle
|
40
51
|
|
41
|
-
@valid =
|
52
|
+
@valid = not(@width.nil? or @height.nil?)
|
42
53
|
else
|
43
54
|
@valid = false
|
44
55
|
end
|
data/lib/html2odt/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html2odt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregor Schmidt (Planio)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dimensions
|