summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/asciidoctor.rb1
-rw-r--r--lib/asciidoctor/abstract_block.rb1
-rw-r--r--lib/asciidoctor/abstract_node.rb1
-rw-r--r--lib/asciidoctor/attribute_list.rb1
-rw-r--r--lib/asciidoctor/block.rb1
-rw-r--r--lib/asciidoctor/callouts.rb1
-rw-r--r--lib/asciidoctor/cli.rb1
-rw-r--r--lib/asciidoctor/cli/invoker.rb1
-rw-r--r--lib/asciidoctor/cli/options.rb1
-rw-r--r--lib/asciidoctor/convert.rb1
-rw-r--r--lib/asciidoctor/converter.rb1
-rw-r--r--lib/asciidoctor/converter/composite.rb1
-rw-r--r--lib/asciidoctor/converter/docbook5.rb1
-rw-r--r--lib/asciidoctor/converter/html5.rb1
-rw-r--r--lib/asciidoctor/converter/manpage.rb1
-rw-r--r--lib/asciidoctor/converter/template.rb1
-rw-r--r--lib/asciidoctor/core_ext.rb1
-rw-r--r--lib/asciidoctor/core_ext/float/truncate.rb1
-rw-r--r--lib/asciidoctor/core_ext/hash/merge.rb1
-rw-r--r--lib/asciidoctor/core_ext/match_data/names.rb1
-rw-r--r--lib/asciidoctor/core_ext/nil_or_empty.rb1
-rw-r--r--lib/asciidoctor/core_ext/regexp/is_match.rb1
-rw-r--r--lib/asciidoctor/document.rb1
-rw-r--r--lib/asciidoctor/extensions.rb1
-rw-r--r--lib/asciidoctor/helpers.rb1
-rw-r--r--lib/asciidoctor/inline.rb1
-rw-r--r--lib/asciidoctor/list.rb1
-rw-r--r--lib/asciidoctor/load.rb1
-rw-r--r--lib/asciidoctor/logging.rb1
-rw-r--r--lib/asciidoctor/parser.rb1
-rw-r--r--lib/asciidoctor/path_resolver.rb1
-rw-r--r--lib/asciidoctor/reader.rb1
-rw-r--r--lib/asciidoctor/rouge_ext.rb1
-rw-r--r--lib/asciidoctor/rx.rb1
-rw-r--r--lib/asciidoctor/section.rb1
-rw-r--r--lib/asciidoctor/stylesheets.rb1
-rw-r--r--lib/asciidoctor/substitutors.rb1
-rw-r--r--lib/asciidoctor/syntax_highlighter.rb1
-rw-r--r--lib/asciidoctor/syntax_highlighter/coderay.rb1
-rw-r--r--lib/asciidoctor/syntax_highlighter/highlightjs.rb1
-rw-r--r--lib/asciidoctor/syntax_highlighter/html_pipeline.rb1
-rw-r--r--lib/asciidoctor/syntax_highlighter/prettify.rb1
-rw-r--r--lib/asciidoctor/syntax_highlighter/pygments.rb1
-rw-r--r--lib/asciidoctor/syntax_highlighter/rouge.rb1
-rw-r--r--lib/asciidoctor/table.rb1
-rw-r--r--lib/asciidoctor/timings.rb1
-rw-r--r--lib/asciidoctor/version.rb1
-rw-r--r--lib/asciidoctor/writer.rb1
-rw-r--r--test/api_test.rb1
-rw-r--r--test/attribute_list_test.rb1
-rw-r--r--test/attributes_test.rb1
-rw-r--r--test/blocks_test.rb1
-rw-r--r--test/converter_test.rb1
-rw-r--r--test/document_test.rb1
-rw-r--r--test/extensions_test.rb1
-rw-r--r--test/helpers_test.rb1
-rw-r--r--test/invoker_test.rb1
-rw-r--r--test/links_test.rb1
-rw-r--r--test/lists_test.rb1
-rw-r--r--test/logger_test.rb1
-rw-r--r--test/manpage_test.rb1
-rw-r--r--test/options_test.rb1
-rw-r--r--test/paragraphs_test.rb1
-rw-r--r--test/parser_test.rb1
-rw-r--r--test/paths_test.rb1
-rw-r--r--test/preamble_test.rb1
-rw-r--r--test/reader_test.rb1
-rw-r--r--test/sections_test.rb1
-rw-r--r--test/substitutions_test.rb1
-rw-r--r--test/syntax_highlighter_test.rb1
-rw-r--r--test/tables_test.rb1
-rw-r--r--test/test_helper.rb1
-rw-r--r--test/text_test.rb1
73 files changed, 73 insertions, 0 deletions
diff --git a/lib/asciidoctor.rb b/lib/asciidoctor.rb
index 9edc76fa..a0ae7dae 100644
--- a/lib/asciidoctor.rb
+++ b/lib/asciidoctor.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require 'set'
# NOTE RUBY_ENGINE == 'opal' conditional blocks like this are filtered by the Opal preprocessor
diff --git a/lib/asciidoctor/abstract_block.rb b/lib/asciidoctor/abstract_block.rb
index 0f27002f..b1fa657a 100644
--- a/lib/asciidoctor/abstract_block.rb
+++ b/lib/asciidoctor/abstract_block.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
class AbstractBlock < AbstractNode
# Public: Get the Array of {AbstractBlock} child blocks for this block. Only applies if content model is :compound.
diff --git a/lib/asciidoctor/abstract_node.rb b/lib/asciidoctor/abstract_node.rb
index f4de7964..c080ebf0 100644
--- a/lib/asciidoctor/abstract_node.rb
+++ b/lib/asciidoctor/abstract_node.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: An abstract base class that provides state and methods for managing a
# node of AsciiDoc content. The state and methods on this class are common to
diff --git a/lib/asciidoctor/attribute_list.rb b/lib/asciidoctor/attribute_list.rb
index 128fcd46..bb6465e0 100644
--- a/lib/asciidoctor/attribute_list.rb
+++ b/lib/asciidoctor/attribute_list.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: Handles parsing AsciiDoc attribute lists into a Hash of key/value
# pairs. By default, attributes must each be separated by a comma and quotes
diff --git a/lib/asciidoctor/block.rb b/lib/asciidoctor/block.rb
index 28af80d9..fba49e74 100644
--- a/lib/asciidoctor/block.rb
+++ b/lib/asciidoctor/block.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: Methods for managing AsciiDoc content blocks.
#
diff --git a/lib/asciidoctor/callouts.rb b/lib/asciidoctor/callouts.rb
index 68e37824..b7dcf5e2 100644
--- a/lib/asciidoctor/callouts.rb
+++ b/lib/asciidoctor/callouts.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: Maintains a catalog of callouts and their associations.
class Callouts
diff --git a/lib/asciidoctor/cli.rb b/lib/asciidoctor/cli.rb
index 045bb9b8..4385cd52 100644
--- a/lib/asciidoctor/cli.rb
+++ b/lib/asciidoctor/cli.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require 'optparse'
require_relative 'cli/options'
require_relative 'cli/invoker'
diff --git a/lib/asciidoctor/cli/invoker.rb b/lib/asciidoctor/cli/invoker.rb
index 36b0666c..deb8997b 100644
--- a/lib/asciidoctor/cli/invoker.rb
+++ b/lib/asciidoctor/cli/invoker.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
module Cli
# Public Invocation class for starting Asciidoctor via CLI
diff --git a/lib/asciidoctor/cli/options.rb b/lib/asciidoctor/cli/options.rb
index 35225da8..113aa30e 100644
--- a/lib/asciidoctor/cli/options.rb
+++ b/lib/asciidoctor/cli/options.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
module Cli
FS = ?/
diff --git a/lib/asciidoctor/convert.rb b/lib/asciidoctor/convert.rb
index 894f5999..293bc77c 100644
--- a/lib/asciidoctor/convert.rb
+++ b/lib/asciidoctor/convert.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
class << self
# Public: Parse the AsciiDoc source input into an Asciidoctor::Document and
diff --git a/lib/asciidoctor/converter.rb b/lib/asciidoctor/converter.rb
index a9eb466f..fc23fcb7 100644
--- a/lib/asciidoctor/converter.rb
+++ b/lib/asciidoctor/converter.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# A module for defining converters that are used to convert {AbstractNode} objects in a parsed AsciiDoc document to an
# output (aka backend) format such as HTML or DocBook.
diff --git a/lib/asciidoctor/converter/composite.rb b/lib/asciidoctor/converter/composite.rb
index 610e91d2..d560d534 100644
--- a/lib/asciidoctor/converter/composite.rb
+++ b/lib/asciidoctor/converter/composite.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# A {Converter} implementation that delegates to the chain of {Converter}
# objects passed to the constructor. Selects the first {Converter} that
diff --git a/lib/asciidoctor/converter/docbook5.rb b/lib/asciidoctor/converter/docbook5.rb
index 51faaf04..84c780d7 100644
--- a/lib/asciidoctor/converter/docbook5.rb
+++ b/lib/asciidoctor/converter/docbook5.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# A built-in {Converter} implementation that generates DocBook 5 output. The output is inspired by the output produced
# by the docbook45 backend from AsciiDoc.py, except it has been migrated to the DocBook 5 specification.
diff --git a/lib/asciidoctor/converter/html5.rb b/lib/asciidoctor/converter/html5.rb
index 605ff4dc..9db2ca9b 100644
--- a/lib/asciidoctor/converter/html5.rb
+++ b/lib/asciidoctor/converter/html5.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# A built-in {Converter} implementation that generates HTML 5 output
# consistent with the html5 backend from AsciiDoc.py.
diff --git a/lib/asciidoctor/converter/manpage.rb b/lib/asciidoctor/converter/manpage.rb
index e42ca5b4..1b0612a9 100644
--- a/lib/asciidoctor/converter/manpage.rb
+++ b/lib/asciidoctor/converter/manpage.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# A built-in {Converter} implementation that generates the man page (troff) format.
#
diff --git a/lib/asciidoctor/converter/template.rb b/lib/asciidoctor/converter/template.rb
index 9f6265b5..788084d1 100644
--- a/lib/asciidoctor/converter/template.rb
+++ b/lib/asciidoctor/converter/template.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# A {Converter} implementation that uses templates composed in template
# languages supported by {https://github.com/rtomayko/tilt Tilt} to convert
diff --git a/lib/asciidoctor/core_ext.rb b/lib/asciidoctor/core_ext.rb
index 18c6f006..31b1898a 100644
--- a/lib/asciidoctor/core_ext.rb
+++ b/lib/asciidoctor/core_ext.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'core_ext/nil_or_empty'
require_relative 'core_ext/hash/merge'
if RUBY_ENGINE == 'opal'
diff --git a/lib/asciidoctor/core_ext/float/truncate.rb b/lib/asciidoctor/core_ext/float/truncate.rb
index b2cd8272..c8395d42 100644
--- a/lib/asciidoctor/core_ext/float/truncate.rb
+++ b/lib/asciidoctor/core_ext/float/truncate.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
# NOTE remove once minimum required Ruby version is at least 2.4
# NOTE use `send :prepend` to be nice to Ruby 2.0
Float.send :prepend, (Module.new do
diff --git a/lib/asciidoctor/core_ext/hash/merge.rb b/lib/asciidoctor/core_ext/hash/merge.rb
index 18019d8b..49b25bf1 100644
--- a/lib/asciidoctor/core_ext/hash/merge.rb
+++ b/lib/asciidoctor/core_ext/hash/merge.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
# NOTE remove once minimum required Ruby version is at least 2.6
# NOTE use `send :prepend` to be nice to Ruby 2.0
Hash.send :prepend, (Module.new do
diff --git a/lib/asciidoctor/core_ext/match_data/names.rb b/lib/asciidoctor/core_ext/match_data/names.rb
index 05cc794b..91dcf55e 100644
--- a/lib/asciidoctor/core_ext/match_data/names.rb
+++ b/lib/asciidoctor/core_ext/match_data/names.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
# NOTE remove once implemented in Opal; see https://github.com/opal/opal/issues/1964
class MatchData
def names
diff --git a/lib/asciidoctor/core_ext/nil_or_empty.rb b/lib/asciidoctor/core_ext/nil_or_empty.rb
index bed6f5fc..4267c846 100644
--- a/lib/asciidoctor/core_ext/nil_or_empty.rb
+++ b/lib/asciidoctor/core_ext/nil_or_empty.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
# A core library extension that defines the method nil_or_empty? as an alias to
# optimize checks for nil? or empty? on common object types such as NilClass,
# String, Array, Hash, and Numeric.
diff --git a/lib/asciidoctor/core_ext/regexp/is_match.rb b/lib/asciidoctor/core_ext/regexp/is_match.rb
index 44edd567..8c767e1d 100644
--- a/lib/asciidoctor/core_ext/regexp/is_match.rb
+++ b/lib/asciidoctor/core_ext/regexp/is_match.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
# NOTE remove once minimum required Ruby version is at least 2.4
class Regexp
alias match? ===
diff --git a/lib/asciidoctor/document.rb b/lib/asciidoctor/document.rb
index ce8a5d71..89cf481f 100644
--- a/lib/asciidoctor/document.rb
+++ b/lib/asciidoctor/document.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: The Document class represents a parsed AsciiDoc document.
#
diff --git a/lib/asciidoctor/extensions.rb b/lib/asciidoctor/extensions.rb
index 96550fa9..30127342 100644
--- a/lib/asciidoctor/extensions.rb
+++ b/lib/asciidoctor/extensions.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
(require 'asciidoctor' unless defined? Asciidoctor.load) unless RUBY_ENGINE == 'opal'
module Asciidoctor
diff --git a/lib/asciidoctor/helpers.rb b/lib/asciidoctor/helpers.rb
index 789cafe0..46ebc6f2 100644
--- a/lib/asciidoctor/helpers.rb
+++ b/lib/asciidoctor/helpers.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Internal: Except where noted, a module that contains internal helper functions.
module Helpers
diff --git a/lib/asciidoctor/inline.rb b/lib/asciidoctor/inline.rb
index b51cc9bd..63924aed 100644
--- a/lib/asciidoctor/inline.rb
+++ b/lib/asciidoctor/inline.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: Methods for managing inline elements in AsciiDoc block
class Inline < AbstractNode
diff --git a/lib/asciidoctor/list.rb b/lib/asciidoctor/list.rb
index c61d4ad8..3a075552 100644
--- a/lib/asciidoctor/list.rb
+++ b/lib/asciidoctor/list.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: Methods for managing AsciiDoc lists (ordered, unordered and description lists)
class List < AbstractBlock
diff --git a/lib/asciidoctor/load.rb b/lib/asciidoctor/load.rb
index 866a10f3..e4b84d64 100644
--- a/lib/asciidoctor/load.rb
+++ b/lib/asciidoctor/load.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
class << self
# Public: Parse the AsciiDoc source input into a {Document}
diff --git a/lib/asciidoctor/logging.rb b/lib/asciidoctor/logging.rb
index 71657686..ebae1c06 100644
--- a/lib/asciidoctor/logging.rb
+++ b/lib/asciidoctor/logging.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require 'logger'
module Asciidoctor
diff --git a/lib/asciidoctor/parser.rb b/lib/asciidoctor/parser.rb
index 2fabf8c5..ca0654ef 100644
--- a/lib/asciidoctor/parser.rb
+++ b/lib/asciidoctor/parser.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Internal: Methods to parse lines of AsciiDoc into an object hierarchy
# representing the structure of the document. All methods are class methods and
diff --git a/lib/asciidoctor/path_resolver.rb b/lib/asciidoctor/path_resolver.rb
index cfe7092d..8cfd88dd 100644
--- a/lib/asciidoctor/path_resolver.rb
+++ b/lib/asciidoctor/path_resolver.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: Handles all operations for resolving, cleaning and joining paths.
# This class includes operations for handling both web paths (request URIs) and
diff --git a/lib/asciidoctor/reader.rb b/lib/asciidoctor/reader.rb
index 6d0708cc..cdc5586c 100644
--- a/lib/asciidoctor/reader.rb
+++ b/lib/asciidoctor/reader.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: Methods for retrieving lines from AsciiDoc source files
class Reader
diff --git a/lib/asciidoctor/rouge_ext.rb b/lib/asciidoctor/rouge_ext.rb
index 1852cb77..21a7e280 100644
--- a/lib/asciidoctor/rouge_ext.rb
+++ b/lib/asciidoctor/rouge_ext.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require 'rouge' unless defined? Rouge.version
module Asciidoctor; module RougeExt; module Formatters
diff --git a/lib/asciidoctor/rx.rb b/lib/asciidoctor/rx.rb
index 423ff902..31689b60 100644
--- a/lib/asciidoctor/rx.rb
+++ b/lib/asciidoctor/rx.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# A collection of regular expression constants used by the parser. (For speed, these are not defined in the Rx module,
# but rather directly in the Asciidoctor module).
diff --git a/lib/asciidoctor/section.rb b/lib/asciidoctor/section.rb
index a72c50ba..4557ce2a 100644
--- a/lib/asciidoctor/section.rb
+++ b/lib/asciidoctor/section.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: Methods for managing sections of AsciiDoc content in a document.
# The section responds as an Array of content blocks by delegating
diff --git a/lib/asciidoctor/stylesheets.rb b/lib/asciidoctor/stylesheets.rb
index 3b04a2d7..e3858bb7 100644
--- a/lib/asciidoctor/stylesheets.rb
+++ b/lib/asciidoctor/stylesheets.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# A utility class for working with the built-in stylesheets.
#--
diff --git a/lib/asciidoctor/substitutors.rb b/lib/asciidoctor/substitutors.rb
index a4e38522..a0360a05 100644
--- a/lib/asciidoctor/substitutors.rb
+++ b/lib/asciidoctor/substitutors.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: Methods to perform substitutions on lines of AsciiDoc text. This module
# is intented to be mixed-in to Section and Block to provide operations for performing
diff --git a/lib/asciidoctor/syntax_highlighter.rb b/lib/asciidoctor/syntax_highlighter.rb
index 6a88b722..12c0caed 100644
--- a/lib/asciidoctor/syntax_highlighter.rb
+++ b/lib/asciidoctor/syntax_highlighter.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: A pluggable adapter for integrating a syntax (aka code) highlighter into AsciiDoc processing.
#
diff --git a/lib/asciidoctor/syntax_highlighter/coderay.rb b/lib/asciidoctor/syntax_highlighter/coderay.rb
index eb9dee1a..2d49d56e 100644
--- a/lib/asciidoctor/syntax_highlighter/coderay.rb
+++ b/lib/asciidoctor/syntax_highlighter/coderay.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
class SyntaxHighlighter::CodeRayAdapter < SyntaxHighlighter::Base
register_for 'coderay'
diff --git a/lib/asciidoctor/syntax_highlighter/highlightjs.rb b/lib/asciidoctor/syntax_highlighter/highlightjs.rb
index 2fefe77f..2bef9457 100644
--- a/lib/asciidoctor/syntax_highlighter/highlightjs.rb
+++ b/lib/asciidoctor/syntax_highlighter/highlightjs.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
class SyntaxHighlighter::HighlightJsAdapter < SyntaxHighlighter::Base
register_for 'highlightjs', 'highlight.js'
diff --git a/lib/asciidoctor/syntax_highlighter/html_pipeline.rb b/lib/asciidoctor/syntax_highlighter/html_pipeline.rb
index d2679262..2f97236b 100644
--- a/lib/asciidoctor/syntax_highlighter/html_pipeline.rb
+++ b/lib/asciidoctor/syntax_highlighter/html_pipeline.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
class SyntaxHighlighter::HtmlPipelineAdapter < SyntaxHighlighter::Base
register_for 'html-pipeline'
diff --git a/lib/asciidoctor/syntax_highlighter/prettify.rb b/lib/asciidoctor/syntax_highlighter/prettify.rb
index 7904aeaf..56e7df80 100644
--- a/lib/asciidoctor/syntax_highlighter/prettify.rb
+++ b/lib/asciidoctor/syntax_highlighter/prettify.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
class SyntaxHighlighter::PrettifyAdapter < SyntaxHighlighter::Base
register_for 'prettify'
diff --git a/lib/asciidoctor/syntax_highlighter/pygments.rb b/lib/asciidoctor/syntax_highlighter/pygments.rb
index 7d59ffbe..13e9c2f7 100644
--- a/lib/asciidoctor/syntax_highlighter/pygments.rb
+++ b/lib/asciidoctor/syntax_highlighter/pygments.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
class SyntaxHighlighter::PygmentsAdapter < SyntaxHighlighter::Base
register_for 'pygments'
diff --git a/lib/asciidoctor/syntax_highlighter/rouge.rb b/lib/asciidoctor/syntax_highlighter/rouge.rb
index 29b28c91..605d75a5 100644
--- a/lib/asciidoctor/syntax_highlighter/rouge.rb
+++ b/lib/asciidoctor/syntax_highlighter/rouge.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
class SyntaxHighlighter::RougeAdapter < SyntaxHighlighter::Base
register_for 'rouge'
diff --git a/lib/asciidoctor/table.rb b/lib/asciidoctor/table.rb
index 350fa128..28f7c3c3 100644
--- a/lib/asciidoctor/table.rb
+++ b/lib/asciidoctor/table.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# Public: Methods and constants for managing AsciiDoc table content in a document.
# It supports all three of AsciiDoc's table formats: psv, dsv and csv.
diff --git a/lib/asciidoctor/timings.rb b/lib/asciidoctor/timings.rb
index 2be2024e..b554e359 100644
--- a/lib/asciidoctor/timings.rb
+++ b/lib/asciidoctor/timings.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
class Timings
def initialize
diff --git a/lib/asciidoctor/version.rb b/lib/asciidoctor/version.rb
index bdbabb2b..a311ab98 100644
--- a/lib/asciidoctor/version.rb
+++ b/lib/asciidoctor/version.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
VERSION = '2.0.16.dev'
end
diff --git a/lib/asciidoctor/writer.rb b/lib/asciidoctor/writer.rb
index abd3e865..9054cfc2 100644
--- a/lib/asciidoctor/writer.rb
+++ b/lib/asciidoctor/writer.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
module Asciidoctor
# A module that can be used to mix the {#write} method into a {Converter} implementation to allow the converter to
# control how the output is written to disk.
diff --git a/test/api_test.rb b/test/api_test.rb
index 78ad4e42..c57fe2c3 100644
--- a/test/api_test.rb
+++ b/test/api_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'API' do
diff --git a/test/attribute_list_test.rb b/test/attribute_list_test.rb
index db279775..aad93769 100644
--- a/test/attribute_list_test.rb
+++ b/test/attribute_list_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'AttributeList' do
diff --git a/test/attributes_test.rb b/test/attributes_test.rb
index 076a47b8..4d17b541 100644
--- a/test/attributes_test.rb
+++ b/test/attributes_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'Attributes' do
diff --git a/test/blocks_test.rb b/test/blocks_test.rb
index 9bf5e5c8..4575bb54 100644
--- a/test/blocks_test.rb
+++ b/test/blocks_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'Blocks' do
diff --git a/test/converter_test.rb b/test/converter_test.rb
index cf227db8..bd6b0aa0 100644
--- a/test/converter_test.rb
+++ b/test/converter_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
require 'tilt' unless defined? ::Tilt.new
diff --git a/test/document_test.rb b/test/document_test.rb
index 3d85ae86..e10d35b6 100644
--- a/test/document_test.rb
+++ b/test/document_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
BUILT_IN_ELEMENTS = %w(admonition audio colist dlist document embedded example floating_title image inline_anchor inline_break inline_button inline_callout inline_footnote inline_image inline_indexterm inline_kbd inline_menu inline_quoted listing literal stem olist open page_break paragraph pass preamble quote section sidebar table thematic_break toc ulist verse video)
diff --git a/test/extensions_test.rb b/test/extensions_test.rb
index 7d9d0aec..2886da39 100644
--- a/test/extensions_test.rb
+++ b/test/extensions_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
class ExtensionsInitTest < Minitest::Test
diff --git a/test/helpers_test.rb b/test/helpers_test.rb
index a6551bcd..9866c101 100644
--- a/test/helpers_test.rb
+++ b/test/helpers_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'Helpers' do
diff --git a/test/invoker_test.rb b/test/invoker_test.rb
index eae5cebb..82ed4c7f 100644
--- a/test/invoker_test.rb
+++ b/test/invoker_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: false
+
require_relative 'test_helper'
require File.join Asciidoctor::LIB_DIR, 'asciidoctor/cli'
diff --git a/test/links_test.rb b/test/links_test.rb
index 501be6ab..3598eed2 100644
--- a/test/links_test.rb
+++ b/test/links_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'Links' do
diff --git a/test/lists_test.rb b/test/lists_test.rb
index 3f90eb7b..4850e6a4 100644
--- a/test/lists_test.rb
+++ b/test/lists_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context "Bulleted lists (:ulist)" do
diff --git a/test/logger_test.rb b/test/logger_test.rb
index 87d18c75..58399875 100644
--- a/test/logger_test.rb
+++ b/test/logger_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'Logger' do
diff --git a/test/manpage_test.rb b/test/manpage_test.rb
index afff7eb5..e795e8a8 100644
--- a/test/manpage_test.rb
+++ b/test/manpage_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'Manpage' do
diff --git a/test/options_test.rb b/test/options_test.rb
index d0dfd814..3280c3e2 100644
--- a/test/options_test.rb
+++ b/test/options_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
require File.join Asciidoctor::LIB_DIR, 'asciidoctor/cli/options'
diff --git a/test/paragraphs_test.rb b/test/paragraphs_test.rb
index 74e80f5b..a42e85bf 100644
--- a/test/paragraphs_test.rb
+++ b/test/paragraphs_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'Paragraphs' do
diff --git a/test/parser_test.rb b/test/parser_test.rb
index dc9a9d27..e95be35e 100644
--- a/test/parser_test.rb
+++ b/test/parser_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context "Parser" do
diff --git a/test/paths_test.rb b/test/paths_test.rb
index 2d6e725f..eca9ac16 100644
--- a/test/paths_test.rb
+++ b/test/paths_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'Path Resolver' do
diff --git a/test/preamble_test.rb b/test/preamble_test.rb
index ef7db9ef..b4c132c8 100644
--- a/test/preamble_test.rb
+++ b/test/preamble_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'Preamble' do
diff --git a/test/reader_test.rb b/test/reader_test.rb
index 4337fc43..b1ac2033 100644
--- a/test/reader_test.rb
+++ b/test/reader_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
class ReaderTest < Minitest::Test
diff --git a/test/sections_test.rb b/test/sections_test.rb
index 86ca67e6..3d89a0a4 100644
--- a/test/sections_test.rb
+++ b/test/sections_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'Sections' do
diff --git a/test/substitutions_test.rb b/test/substitutions_test.rb
index 5d2481dd..89405ee2 100644
--- a/test/substitutions_test.rb
+++ b/test/substitutions_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
# TODO
diff --git a/test/syntax_highlighter_test.rb b/test/syntax_highlighter_test.rb
index 38027bc9..d8d148f0 100644
--- a/test/syntax_highlighter_test.rb
+++ b/test/syntax_highlighter_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'Syntax Highlighter' do
diff --git a/test/tables_test.rb b/test/tables_test.rb
index 5d10c0cf..5ddde1d3 100644
--- a/test/tables_test.rb
+++ b/test/tables_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context 'Tables' do
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 76f3f795..260159e0 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
ASCIIDOCTOR_TEST_DIR = File.absolute_path __dir__
ASCIIDOCTOR_LIB_DIR = ENV['ASCIIDOCTOR_LIB_DIR'] || (File.join ASCIIDOCTOR_TEST_DIR, '../lib')
diff --git a/test/text_test.rb b/test/text_test.rb
index 7bdc93f6..ca34bf46 100644
--- a/test/text_test.rb
+++ b/test/text_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true
+
require_relative 'test_helper'
context "Text" do