isodoc 2.6.1 → 2.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b149d913a483c336d7463e587e980fe234f4d1e32d8d683a070d919b0ce7429
4
- data.tar.gz: 46e568e2b91f13069f62131ab1b86e28fd74416c55ae0937935575927a578430
3
+ metadata.gz: 5b66faaa134c306dcb9be32f7a587682d9910f0863d2d252824eb0df319735ee
4
+ data.tar.gz: 9f8b6559fa659841260b72430137ea8f93614f877a22089617e7976f7c2b61a3
5
5
  SHA512:
6
- metadata.gz: ae43a3f990e70f7d1929357172ca48b4cbc5db2750e61d1f91768c8087e796f5e333de64b60fc928434862e1fb874151c6a00a0cd41e25d491fe79e8604dfa9d
7
- data.tar.gz: 9abab47db0d610e3971c1f9a19af240449dc11d6cd1d8d0f9e1e860f4b00e4a6947cce60d8483ba8701a180472278badaee6d431a07bd32ba1727ea5ad4d9a16
6
+ metadata.gz: 93267016a42a2f247bbbc9e6cd20d500fb3845fadcf32337e46cb94b84cea9939c11a3180c90355a5350928cc628cb0a88eaf36720775a7eae59adf74e3a70c9
7
+ data.tar.gz: deb0709eb785d832c3b3fe2602bd4d3549b2126731c6d44fcc9c752a8d38dab572c3926bed2d27d168bf9e47de65adff8b34699b941185f906742b16138b1d1d
data/lib/isodoc/css.rb CHANGED
@@ -101,6 +101,7 @@ module IsoDoc
101
101
  stylesheet = convert_scss(filename, stylesheet, stripwordcss)
102
102
  end
103
103
  Tempfile.open([File.basename(filename, ".*"), "css"],
104
+ mode: File::BINARY | File::SHARE_DELETE,
104
105
  encoding: "utf-8") do |f|
105
106
  f.write(stylesheet)
106
107
  f
@@ -177,7 +177,8 @@ module IsoDoc
177
177
  imgtype = imgtype.sub(/\+[a-z0-9]+$/, "") # svg+xml
178
178
  imgtype = "png" unless /^[a-z0-9]+$/.match? imgtype
179
179
  imgtype == "postscript" and imgtype = "eps"
180
- Tempfile.open(["image", ".#{imgtype}"]) do |f|
180
+ Tempfile.open(["image", ".#{imgtype}"],
181
+ mode: File::BINARY | File::SHARE_DELETE) do |f|
181
182
  f.binmode
182
183
  f.write(Base64.strict_decode64(imgdata))
183
184
  @tempfile_cache << f # persist to the end
@@ -186,7 +187,8 @@ module IsoDoc
186
187
  end
187
188
 
188
189
  def save_svg(img)
189
- Tempfile.open(["image", ".svg"]) do |f|
190
+ Tempfile.open(["image", ".svg"],
191
+ mode: File::BINARY | File::SHARE_DELETE) do |f|
190
192
  f.write(img.to_xml)
191
193
  @tempfile_cache << f # persist to the end
192
194
  f.path
@@ -154,7 +154,6 @@ module IsoDoc
154
154
  def cache_dataimage(uri)
155
155
  if %r{^data:}.match?(uri)
156
156
  uri = save_dataimage(uri)
157
- @tempfile_cache << uri
158
157
  end
159
158
  uri
160
159
  end
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "2.6.1".freeze
2
+ VERSION = "2.6.2".freeze
3
3
  end
@@ -95,7 +95,9 @@ module IsoDoc
95
95
  .merge(@meta.labels ? { labels: @meta.labels } : {})
96
96
  meta[:filename] = filename
97
97
  params = meta.transform_keys(&:to_s)
98
- Tempfile.open(%w(header html), encoding: "utf-8") do |f|
98
+ Tempfile.open(%w(header html),
99
+ mode: File::BINARY | File::SHARE_DELETE,
100
+ encoding: "utf-8") do |f|
99
101
  f.write(template.render(params))
100
102
  f
101
103
  end
@@ -78,6 +78,7 @@ module IsoDoc
78
78
  def input_xml_path(input_filename, xml_file, debug)
79
79
  docxml, filename, dir = convert_init(xml_file, input_filename, debug)
80
80
  input_filename = Tempfile.open([File.basename(filename), ".xml"],
81
+ mode: File::BINARY | File::SHARE_DELETE,
81
82
  encoding: "utf-8") do |f|
82
83
  f.write docxml
83
84
  f
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-28 00:00:00.000000000 Z
11
+ date: 2023-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: html2doc