asciidoctor-interdoc-reftext 0.1.1 → 0.2.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c198842d29c3f2d5ec0a2e10465885cd5172d698224f2cc05c2e0d72beda2d73
|
4
|
+
data.tar.gz: 2241e3587eaf4097ccc9d3a8305f8ce957d88d0d052cc7522401795b1d8d933c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 662b5938301f727bba05fd130ad25cd5c101b3cfe43fbc75299f7f5f6fc9e0a5400f9d28997e005885ed04883ab0f68abe522623469c6d102f252998a186a614
|
7
|
+
data.tar.gz: 1cd4739d61b4d8279b4e24775b702f34425c4f09be3610f3f81885dc7415b3017c105c10be1bea99e1fd0d38ebafb2b28fec2c6d8de78ffca065f1279a94dff4
|
@@ -9,13 +9,21 @@ module Asciidoctor::InterdocReftext
|
|
9
9
|
|
10
10
|
# @param document [Asciidoctor::Document] the document associated with this resolver.
|
11
11
|
# @param asciidoc_exts [Array<String>] AsciiDoc file extensions (e.g. `.adoc`).
|
12
|
-
# @param logger [Logger] the logger to use for logging warning and errors.
|
12
|
+
# @param logger [Logger, nil] the logger to use for logging warning and errors.
|
13
|
+
# Defaults to `Asciidoctor::LoggerManager.logger` if using Asciidoctor 1.5.7+,
|
14
|
+
# or `Logger.new(STDERR)` otherwise.
|
13
15
|
# @param raise_exceptions [Boolean] whether to raise exceptions, or just log them.
|
14
16
|
def initialize(document,
|
15
17
|
asciidoc_exts: ['.adoc', '.asciidoc', '.ad'],
|
16
|
-
logger:
|
18
|
+
logger: nil,
|
17
19
|
raise_exceptions: true)
|
18
20
|
|
21
|
+
logger ||= if defined? ::Asciidoctor::LoggerManager
|
22
|
+
::Asciidoctor::LoggerManager.logger
|
23
|
+
else
|
24
|
+
::Logger.new(STDERR)
|
25
|
+
end
|
26
|
+
|
19
27
|
@document = document
|
20
28
|
@asciidoc_exts = asciidoc_exts.dup.freeze
|
21
29
|
@logger = logger
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-interdoc-reftext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakub Jirutka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|