metanorma-iso 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "1.7.0".freeze
3
+ VERSION = "1.7.1".freeze
4
4
  end
5
5
  end
@@ -15,6 +15,8 @@ RSpec.describe Asciidoctor::ISO do
15
15
 
16
16
  it "generates error file" do
17
17
  expect do
18
+ mock_pdf
19
+ mock_sts
18
20
  Metanorma::Compile
19
21
  .new
20
22
  .compile("spec/assets/xref_error.adoc", type: "iso", :"agree-to-terms" => true)
@@ -94,6 +94,7 @@ RSpec.describe IsoDoc do
94
94
 
95
95
  it "generates Pdf output docs with null configuration from file" do
96
96
  FileUtils.rm_f "spec/assets/iso.pdf"
97
+ mock_pdf
97
98
  IsoDoc::Iso::PdfConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("spec/assets/iso.xml", nil, false)
98
99
  expect(File.exist?("spec/assets/iso.pdf")).to be true
99
100
  end
data/spec/spec_helper.rb CHANGED
@@ -259,6 +259,18 @@ def stub_fetch_ref(**opts)
259
259
  end.at_least :once
260
260
  end
261
261
 
262
+ def mock_pdf
263
+ allow(::Mn2pdf).to receive(:convert) do |url, output, c, d|
264
+ FileUtils.cp(url.gsub(/"/, ""), output.gsub(/"/, ""))
265
+ end
266
+ end
267
+
268
+ def mock_sts
269
+ allow(::Mn2sts).to receive(:convert) do |url, output, c, d|
270
+ FileUtils.cp(url.gsub(/"/, ""), output.gsub(/"/, ""))
271
+ end
272
+ end
273
+
262
274
  private
263
275
 
264
276
  def get_xml(search, code, opts)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-25 00:00:00.000000000 Z
11
+ date: 2021-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-jing
@@ -410,7 +410,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
410
410
  - !ruby/object:Gem::Version
411
411
  version: '0'
412
412
  requirements: []
413
- rubygems_version: 3.0.3
413
+ rubygems_version: 3.1.4
414
414
  signing_key:
415
415
  specification_version: 4
416
416
  summary: metanorma-iso lets you write ISO standards in AsciiDoc.