asciidoctor-rfc 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 415bbddbd5dc25773291e4b534f831aca0b95095afde843bb5d042a798fab7dd
4
- data.tar.gz: df38598b9f2fc70983b605b7ef003d4b90a76be28027092191b0a8ec52e57967
3
+ metadata.gz: 337abc665a8ebfc15002e2743650056cc7cea8df4ac4c7545dc8e682ce4271a3
4
+ data.tar.gz: 92e9b5da7d41dfe8606c949d0326bb1b3a1a7ad16554b27b6395e52bd5474254
5
5
  SHA512:
6
- metadata.gz: 4db78b248939d8bcc55bcf95ff35c37295505c532f75056d9152b8d157da522a3219139620420b06daf02888f25fdb2e46f82b7f7bb90d789a9ffe383325692d
7
- data.tar.gz: 1448366ea2283e1483a8279dc2e381784dfc94a6a77e8516a967de40303f0e03a77de05ecb35208fc56eb44cef8cc4285c83079727c0e41f4fb5ac0b0def9449
6
+ metadata.gz: 2967ded359773bf3b926a28f0c925e787dc23b0fa8fbbfc09df549f1b723ba3a7d325c244b0b036c2572031a564c4ae0417a90d1e89d5638db784969d1dff924
7
+ data.tar.gz: cbb62b0a445dd105d5690d510c44282e519f3936bd67d37eb3e41dbe5714697c27fa255ad787e4a7709e410003664a60eabb9ef6e0b9786441be599f2b58b575
@@ -10,6 +10,6 @@ inherit_from:
10
10
  AllCops:
11
11
  DisplayCopNames: false
12
12
  StyleGuideCopsOnly: false
13
- TargetRubyVersion: 2.4
13
+ TargetRubyVersion: 2.3
14
14
  Rails:
15
15
  Enabled: true
@@ -6,6 +6,7 @@ require "pathname"
6
6
  require "open-uri"
7
7
  require "pp"
8
8
  require "set"
9
+ require "fileutils"
9
10
 
10
11
  module Asciidoctor
11
12
  module RFC::Common
@@ -377,7 +378,7 @@ HERE
377
378
  wgcache_name = "#{Dir.home}/.asciidoc-rfc-workgroup-cache.json"
378
379
  # If we are required to, clear the wg cache
379
380
  if node.attr("flush-caches") == "true"
380
- system("rm -f #{wgcache_name}")
381
+ FileUtils.rm_f wgcache_name
381
382
  end
382
383
  # Is there already a wg cache? If not, create it.
383
384
  wg = []
@@ -414,7 +415,7 @@ HERE
414
415
  bibliocache_name = "#{Dir.home}/.asciidoc-rfc-biblio-cache.json"
415
416
  # If we are required to, clear the biblio cache
416
417
  if node.attr("flush-caches") == "true"
417
- system("rm -f #{bibliocache_name}")
418
+ FileUtils.rm_f bibliocache_name
418
419
  end
419
420
  # Is there already a biblio cache? If not, create it.
420
421
  biblio = {}
@@ -528,12 +529,13 @@ HERE
528
529
  end
529
530
 
530
531
  def output_dtd
532
+ return if Dir.getwd == File.expand_path("../../../../..", __FILE__)
531
533
  filename = File.join(File.dirname(__FILE__), "../../../../rfc2629.dtd")
532
- system "cp #{filename} ."
534
+ FileUtils.cp filename, Dir.getwd
533
535
  filename = File.join(File.dirname(__FILE__), "../../../../rfc2629-other.ent")
534
- system "cp #{filename} ."
536
+ FileUtils.cp filename, Dir.getwd
535
537
  filename = File.join(File.dirname(__FILE__), "../../../../rfc2629-xhtml.ent")
536
- system "cp #{filename} ."
538
+ FileUtils.cp filename, Dir.getwd
537
539
  end
538
540
  end
539
541
  end
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module RFC
3
- VERSION = "0.9.1".freeze
3
+ VERSION = "0.9.2".freeze
4
4
  end
5
5
  end
@@ -20,14 +20,8 @@ module Metanorma
20
20
  "Asciidoctor::Rfc2 #{Asciidoctor::RFC::VERSION}"
21
21
  end
22
22
 
23
- def input_to_isodoc(file)
24
- Asciidoctor.convert(
25
- file,
26
- to_file: false,
27
- safe: :safe,
28
- backend: @asciidoctor_backend,
29
- header_footer: true
30
- )
23
+ def input_to_isodoc(file, filename)
24
+ Metanorma::Input::Asciidoc.new.process(file, filename, @asciidoctor_backend)
31
25
  end
32
26
 
33
27
  def output(isodoc_node, outname, format, options={})
@@ -21,13 +21,7 @@ module Metanorma
21
21
  end
22
22
 
23
23
  def input_to_isodoc(file)
24
- Asciidoctor.convert(
25
- file,
26
- to_file: false,
27
- safe: :safe,
28
- backend: @asciidoctor_backend,
29
- header_footer: true
30
- )
24
+ Metanorma::Input::Asciidoc.new.process(file, filename, @asciidoctor_backend)
31
25
  end
32
26
 
33
27
  def output(isodoc_node, outname, format, options={})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-rfc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.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: 2018-08-08 00:00:00.000000000 Z
11
+ date: 2018-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor