html2odt 0.4.4 → 0.4.6
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 +5 -5
- data/CHANGELOG.md +9 -0
- data/lib/html2odt/document.rb +4 -1
- data/lib/html2odt/image.rb +1 -1
- data/lib/html2odt/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f516bc8a83378731a7fa9962c56543784bbaf8d9
|
4
|
+
data.tar.gz: 9851cb1589a9cb5b30aed2061b38c8686202b02e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f28b6b63b34290a0eaff83ed813ca0b7add7f57911bf89e965073b1fec4ea745c575f0f49ab0cf67a596090b444411d3507e5699279d74241164b65db08e792e
|
7
|
+
data.tar.gz: 55f00819a1e29f07a3de4a239c579cd7c7e33703ae948f8aec9ee56ea96666941b818e7e44395207887af5caac20f3ca8a5e145c8c6ec6b6168bb03f9e173d2f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# v0.4.6 - 2021-03-23
|
2
|
+
|
3
|
+
Support resources behind redirects.
|
4
|
+
Check for source being a file before trying to read it
|
5
|
+
|
6
|
+
# v0.4.5 - 2021-01-06
|
7
|
+
|
8
|
+
Force binmode when writing out the ODT
|
9
|
+
|
1
10
|
# v0.4.4 - 2020-01-06
|
2
11
|
|
3
12
|
Fix exception occurring with some document contents
|
data/lib/html2odt/document.rb
CHANGED
@@ -174,7 +174,7 @@ class Html2Odt::Document
|
|
174
174
|
end
|
175
175
|
|
176
176
|
def write_to(path)
|
177
|
-
File.write(path, data)
|
177
|
+
File.write(path, data, mode: 'wb')
|
178
178
|
end
|
179
179
|
|
180
180
|
protected
|
@@ -399,6 +399,9 @@ class Html2Odt::Document
|
|
399
399
|
def uri_to_file(uri)
|
400
400
|
Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") do |http|
|
401
401
|
resp = http.get(uri.path)
|
402
|
+
if resp.is_a?(Net::HTTPRedirection) and redirect_uri = URI.parse(resp['location'])
|
403
|
+
resp = http.get(redirect_uri)
|
404
|
+
end
|
402
405
|
|
403
406
|
return nil unless resp.is_a?(Net::HTTPSuccess)
|
404
407
|
|
data/lib/html2odt/image.rb
CHANGED
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.6
|
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:
|
11
|
+
date: 2021-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dimensions
|
@@ -180,7 +180,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
|
-
|
183
|
+
rubyforge_project:
|
184
|
+
rubygems_version: 2.6.14.4
|
184
185
|
signing_key:
|
185
186
|
specification_version: 4
|
186
187
|
summary: html2odt generates ODT documents based on HTML fragments
|