summaryrefslogtreecommitdiff
path: root/test/converter_test.rb
AgeCommit message (Collapse)Author
2023-10-23verify templates can be used from classloader when using JRubyDan Allen
2023-04-08resolves #4429 add support for Haml 6 to template converter (PR #4431)Dan Allen
2022-01-11don't overqualify types in test suiteDan Allen
2021-07-31omit_parentheses where possible in test codeDan Allen
2021-06-11use correct assertion methods in converter test [skip ci]Dan Allen
2021-06-10add test to verify Converter.included is privateDan Allen
2021-06-08add respond_to_missing? method to html5 converter to complement method_missingDan Allen
- when method_missing is define, respond_to_missing? should also be defined - add tests to verify result of respond_to? (which delegates to respond_to_missing?)
2021-05-31use appropriate assertions in test suiteDan Allen
- assert_equal instead of == - assert instead of assert_equal true - refute instead of assert_equal false - specify literal value as first argument to assert_equal
2021-05-31fix incomplete assertions in test suiteDan Allen
2021-05-29use join instead of * to join elements of an array in test suite [skip ci]Dan Allen
2021-05-28remove excess empty lines in test suite; use multiple lines for class ↵Dan Allen
definitions [skip ci]
2021-05-18fix template converter test when concurrent-ruby gem is not installedDan Allen
2021-04-30ignore redundant root namespace reference when checking for Tilt in test suiteDan Allen
2021-04-30leave empty line after magic comment [skip ci]Dan Allen
2020-08-20resolves #3737 add support for erubi template engine; use it in place of ↵Dan Allen
erubis in test suite (PR #3738)
2020-01-11fix invalid method call in test suite when running on Ruby 2.7Dan Allen
2019-11-28resolves #3491 allow template to override outline (PR #3493)Nik Everett
Allows plugging a template in to the html5 converter's outline node by replacing all direct calls to `convert_outline` with calls to the to the conversion named `outline`.
2019-06-18resolves #3341 initialize backend traits for converter using assigned ↵Dan Allen
basebackend (PR #3342)
2019-04-22resolves #3274 update register_for methods to accept symbol arguments (PR #3275)Dan Allen
- coerce symbol arguments to register_for to strings - fill in missing API doc for register_for and register methods in SyntaxHighlighter module
2019-04-15resolves #3261 fix regexp for SVG preamble so it works the same in ↵Dan Allen
Asciidoctor.js (PR #3262) - replace . with CC_ALL - also replace . with CC_ANY when matching dimension attribute
2019-04-14use Concurrent::Map instead of Concurrent::Hash for cache in template converterDan Allen
2019-03-31move Asciidoctor::Converter::BackendTraits.derive_backend_traits method to ↵Dan Allen
Asciidoctor::Converter
2019-03-31make Asciidoctor::Converter::Config.register_for method public as documentedDan Allen
2019-03-18when resolving a convert method for a node, only consider methods prefixed ↵Dan Allen
with convert_ (PR #3150) - prefix convert methods on built-in converters with convert_ - drop leading underscore from helper methods on built-in converters - add adapter for older converters that rely on unprefixed convert methods - use optimize convert handler dispatcher in HTML 5 converter - only pass options to convert handler method if value is non-nil - update RDoc
2019-03-15export read_svg_contents method on built-in HTML 5 converter for Bespoke ↵Dan Allen
converter
2019-03-14resolves #1444 rename header_footer option to standalone (PR #3146)Dan Allen
* still honor header_footer option as fallback for backwards compatibility
2019-03-01resolves #891 allow backend to delegate to a registered backend using the ↵Dan Allen
syntax synthetic:delegate (PR #3100)
2019-02-15clean up newline handling in test suite (PR #3074)Dan Allen
- use chop instead of chomp to remove trailing newline from heredoc string - document all uses of non-quoted squiggly heredoc to preserve indentation - fix incorrect preparation of uniform indentation in list tests - remove unnecessary uses of chomp
2019-02-10resolves #3054 never mutate strings; add `frozen_string_literal: true` ↵Dan Allen
comment to source files (PR #3055) - replace gsub! and sub! with gsub and sub, respectively - add `frozen_string_literal: true` magic comment to all Ruby source files - see https://www.mikeperham.com/2018/02/28/ruby-optimization-with-one-magic-comment/
2019-02-07resolves #3056 create a template converter even if backend is not recognized ↵Dan Allen
(PR #3057)
2019-02-07check for Tilt.new instead of Tilt::VERSION [skip ci]Dan Allen
2019-02-05correctly map Converter::Factory.new (PR #3041)Dan Allen
- map to DefaultFactoryProxy constructor by default - map to CustomProxy constructor if proxy_default keyword arg is false
2019-02-05resolves #3005 remove the converter for the docbook45 backend (PR #3040)Dan Allen
- remove the DocBook45Converter class - remove accomodations in DocBook5Converter for DocBook 4.5 - don't register the docbook45 backend name in the converter registry - drop docbook45 from the backend CLI option values - don't mention DocBook 4.5 in the man page - don't mention DocBook 4.5 in the CLI usage statement - update tests to use DocBook 5 instead of DocBook 4.5
2019-02-04resolves #2891 redesign converter API (PR #3038)Dan Allen
- redesign converter API based on design of syntax highlighter API - fold default converter factory (static / global) into Converter - make registration and resolution of global converters thread-safe - allow converter factory to be specified using :converter_factory API option - provide forgiving default implementation for convert method in Base converter - change handles? method on Converter module to always return true - move current implementation of handles? method from Converter module to Base converter - add _content_only and _skip helper methods to Base converter - warn if a handler method for a node is not found in a subclass of the Base converter - rename BackendInfo module to BackendTraits; map backend_info method to backend_traits - allow computation of backend traits to be disabled using init_backend_traits - introduce non-static CustomFactory - map old (deprecated) public API to new API - reconfigure built-in (aka provided) converters to use Base converter; set backend traits - remove BuiltIn converter - add backend_traits_source keyword argument to CompositeConverter constructor - honor htmlsyntax set by converter - move Writer to dedicated source file - remove unused convert_with_options method on Converter - add and update tests - prefix internal helper methods in converters with underscore - make write_alternate_pages a static method of the manpage converter - delineate private sections of the manpage converter
2019-01-28simplify definition of converts? method on Converter; add testsDan Allen
2019-01-10resolves #2998 drop support for Slim < 3 (PR #3003)Dan Allen
2019-01-09resolves #3006 fix deprecated ERB trim mode (PR #3007)Dan Allen
- use 0 instead of < - augment test to verify behavior of trim mode - remove encoding setting from ERB template
2019-01-06switch to modern hash syntaxDan Allen
- switch to modern hash syntax (from :key => value to key: value) - put space inside hash brackets (from {key: value} to { key: value } - use dangling comma on last entry of multi-line hash
2019-01-06use require_relative instead of modifying $LOAD_PATHDan Allen
- use require_relative in place of require when it relied on $LOAD_PATH manipulation - configure bin scripts to work with require_relative - rename ROOT_PATH to ROOT_DIR - rename DATA_PATH to DATA_DIR - rename STYLESHEETS_DATA_PATH to STYLESHEETS_DIR - define LIB_DIR - simplify test helper require and setup - add bindir helper to test suite - remove unneeded constants in test helper - reorder autoload statements - require version directly instead of autoloading
2019-01-06remove workarounds for Ruby < 2.3Dan Allen
- remove constants for differentiating between Ruby versions - remove fallback assignment for RUBY_ENGINE constant - remove rubygems require - use unicode character properties in regular expressions (e.g., \p{Word}) - remove COERCE_ENCODING constant - always set FORCE_ENCODING constant to true unless default external encoding is not UTF-8 - remove workaround for computing line length - use lines method instead of lines.entries to get lines for string - always normalize lines - check if JRuby class is defined instead of checking for JRuby engine - remove global RUBY_ENGINE_JRUBY constant - move RUBY_ENGINE_OPAL constant inside Asciidoctor module - remove magic encoding comments (since default script encoding is UTF-8) - remove workaround when printing encoding information - remove fallback assignments for passthrough escape characters - remove Ruby core backports (only leave Asciidoctor-specific extensions) - use __dir__ instead of File.dirname __FILE__ - use Float#truncate to truncate column widths - override Float#truncate on Ruby 2.3 to implement precision argument - remove concurrent/hash backport - simplify class_for_name helper - don't call to_sym on constants returned from constants method - remove unnecessary aliasing of regexp match variables; use magic variable instead (e.g., m = $~) - remove workaround for sub_specialchars to accomodate gsub with map argument - remove comment about %:z placeholder for strftime - don't call .to_a on return value of Hash#keys - get home directory using Dir.home - remove exceptions and exclusions for Ruby < 2 in test suite - update list of supported Ruby engines and versions in READMEs - update ruby versions in run-tests.sh
2018-09-11replace the use of render with convert in test suiteDan Allen
- rename render_string to convert_string - rename render_embedded_string to convert_string_to_embedded - rename render_inline_string to convert_inline_string - use convert_inline_string where :doctype was being set to :inline
2018-07-31replace thread_safe with concurrent-rubyJun Aruga
thread_safe is deprecated and has been merged into concurrent-ruby
2018-04-17resolves #2619 allow custom converter to declare that it supports templatesDan Allen
2018-04-17map handles? method for custom converter to respond_to? by defaultDan Allen
2018-04-09delegate to test helper method to resolve test directory and fixture pathsDan Allen
2018-04-08purge render method from test suite (except to verify alias)Dan Allen
- replace use of render method with convert method
2018-03-21coerce value of template_dirs option to an Array (PR #2621)Dan Allen
2017-09-25convert remaining uses of raw is_a? assertions in test suiteDan Allen
- use assert_kind_of or refute_kind_of instead
2017-07-23use refute in place of assert ! in test suite (PR #2336)Dan Allen
- replace assert ! with refute - use assert_nil and refute_nil - use assert_empty and refute_empty - use assert_kind_of instead of direct is_a? call - use assert_respond_to instead of direct respond_to? call
2017-05-25resolves #2214 configure Slim to resolve includes in specified template dirs ↵Dan Allen
(#2215)