summaryrefslogtreecommitdiff
path: root/test/api_test.rb
AgeCommit message (Collapse)Author
2019-03-20stop find_by iteration if filter block returns :stop directive (PR #3162)Dan Allen
2019-03-20find_by should reject node when :reject directive is used with ID selectorDan Allen
- reject node if ID selector matches, but filter returns :reject directive - simplify find_by implementation
2019-03-15resolves #3133 next_adjacent_block should not fail when used on dlist item ↵Dan Allen
(PR #3149)
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-13use terminology for find_by that better aligns with NodeFilter (PR #3130)Dan Allen
- assume that true implies "accept" - assume that false implies "skip" - prefer :reject rather than :skip - prefer :prune instead of :skip_children
2019-03-11upgrade truffleruby to 1.0.0-rc13 (PR #3043)Dan Allen
2019-03-02resolves #2524 AbstractBlock#find_by finds table cells (PR #3117)Dan Allen
- find_by will discover table cells - table cells can be selected by specifying the :table_cell context in the selector
2019-03-01resolves #3101 find_by looks inside AsciiDoc table cells if ↵Dan Allen
traverse_documents selector option is true (PR #3102) - find_by descends into AsciiDoc table cells if traverse_documents selector option is true - find_by only finds document for AsciiDoc table cell if context is :inner_document or any - restructure find_by method
2019-02-27resolves #2963 modify Cell class to extend from AbstractBlock instead of ↵Dan Allen
AbstractNode (PR #3103) - modify Cell class to extend AbstractBlock - don't split paragraphs in table cell at line that resolves to blank and adjacent to other non-blank lines - set level property on Cell and Column - set content_model property on Cell - define block? and inline? methods on Column that both return false
2019-02-25resolves #2884 add clearer exception message when source data is binary or ↵Dan Allen
has invalid encoding (PR #3099) - add clearer exception message when source data is binary or has invalid encoding - update RDoc for prepare_lines method - check if source data is Array first - allow source data to be nil
2019-02-24add Document#parsed? method to check whether document has been parsedDan Allen
2019-02-20ensure dlist item tuple always has two entriesDan Allen
- if desc for term is missing, second entry in tuple is nil
2019-02-17resolves #2640 allow outfilesuffix to be soft set from API (PR #3076)Dan Allen
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-10fix indentation in api_test and manpage_testDan Allen
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-08resolves #3051 drop the options attributeDan Allen
- don't store the options attribute on the block once the options are parsed - only store options as individual attributes (e.g., header-option) - add an options method on AbstractNode to retrieve the set of option names - store partial-option as empty string instead of true - reference low-level option attribute internally
2019-02-02use strict heredoc in api_testDan Allen
2019-02-01use indented heredoc in api_testDan Allen
2019-01-30add Adapter to the end of syntax highlighter adapter impl classesDan Allen
2019-01-26resolves #2106 make syntax highlighter pluggable (PR #3016)Dan Allen
- define the Asciidoctor::SyntaxHighlighter module to handle all aspects of syntax highlighting - define built-in SyntaxHighlighter adapters for coderay, pygments, highlight.js, html-pipeline, and prettify - move all embedded syntax highlighting logic into SyntaxHighlighter adapters - allow SyntaxHighlighter adapter class to self register with a source highlighter name using register_for - load SyntaxHighlighter adapters lazily (except for highlight.js and html-pipeline) - add :syntax_highlighters and :syntax_highlighter_factory options to API to allow syntax highlighter resolution to be customized - instantiate SyntaxHighlighter adapter once header is finalized if source-highlighter attribute is set on document and basebackend is html - provide SyntaxHighlighter factory modules for registering syntax highlighter adapters (default, custom, and default proxy) - allow SyntaxHighlighter adapters to contribute docinfo at :head and :footer slots in HTML output document - move retrieval and writing of stylesheets for syntax highlighters to SyntaxHighlighter adapters - wire methods in Stylesheets class that pertain to syntax highlighting to SyntaxHighlighter adapters - remove hard-coded styles in Pygments output - update default stylesheets to support Pygments styles and drop CSS workarounds - don't fail if value of pygments-style attribute is not recognized; instead fallback to default style - don't remove nested pre tags in HTML produced by Pygments when linenums are enabled - update default stylesheet to avoid styling nested pre tags - rename pygments table class to pygments-table - change pygments base CSS selector from .listingblock .pygments to pre.pygments - allow color for generic text, line numbers, and line number border to inherit from Pygments style - align stylesheet for default CodeRay style with other syntax highlighters - set default background color for prettify using a selector with the lowest precedence - update and add tests - add tests for the Pygments integration - add pygments.rb dependency and enable Pygments integration tests if the environment variable PYGMENTS=true is set - move syntax highlighter tests to dedicated test file
2019-01-24document when workarounds can be removed [skip ci]Dan Allen
2019-01-23resolves #2995 use methods on File class instead of IO class (PR #2999)Dan Allen
2019-01-19add truffleruby to CI matrix (PR #3026)Dan Allen
2019-01-06use .adoc as AsciiDoc file extension in test suiteDan Allen
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-06modernize UTF-8 encoding operationsDan Allen
- encode strings to UTF-8 properly instead of force encoding - remove FORCE_ENCODING constant - use File.open to read include files - use OpenURI.open_uri to read URIs (instead of Kernel.open) - define constants for file and URI read and write modes (FILE_READ_MODE, URI_READ_MODE, and FILE_WRITE_MODE) - read files and URIs using the rb:utf-8 mode (except on Opal, drop the binary and encoding flags) - write files using the w:utf-8 mode (except on Opal, drop the encoding flag) - use byteslice instead of slice to remove BOM from string - remove valid_encoding? workaround for JRuby 1.7
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-10-25change authors API to compute authors on demand from document attributesDan Allen
2018-10-12resolves #2067 allow filter block passed to AbstractBlock#find_by to skip ↵Dan Allen
subtrees (PR #2902) - interpret :skip return value of filter block to mean skip node and its descendants - interpret :skip_children return value of filter block to mean accept node, but skip its descendants
2018-10-08resolves #2900 change AbstractBlock#find_by to honor StopIteration exception ↵Dan Allen
(PR #2901)
2018-05-13should not set option on node if already set (PR #2778)Dan Allen
2018-05-02add fallback for nil cell text in Cell constructorDan Allen
2018-04-24resolves #2705 populate source_location property on cell when sourcemap ↵Dan Allen
option enabled (PR #2708) - add source_location property to Table::Cell - add file and lineno methods to Table::Cell - when sourcemap option is enabled, set source_location property on cell - mark first line of table so line number for first cell is correct - add tests to verify source_location information on table cell is correct
2018-04-23populate source_location on list items if sourcemap is enabledGuillaume Grossetie
- set the source_location property on each list item in an item list - set the source_location property on each list term in a description list - set the source_location property on each list item in a description list
2018-04-22remove outdated workaround in api testDan Allen
2018-04-11remove trailing whitespace in sourceDan Allen
2018-04-08purge render method from test suite (except to verify alias)Dan Allen
- replace use of render method with convert method
2018-04-08add test to verify render method is aliased to convert method on each node typeDan Allen
2018-04-08switch to convert methods in API tests; assert render aliasesDan Allen
2018-04-07allow linkcss to be disabled from API when safe mode is secureDan Allen
2018-02-23resolves #2574 record timings when calling convert and write on DocumentDan Allen
- store timings object on Document - record timing for convert in Document#convert - record timing for write in Document#write
2018-02-20resolves #2567 duplicate header attributes when restoring (PR #2570)Dan Allen
- when restoring attributes, duplicate header attributes - allow header attributes to be restored an arbitrary number of times
2018-01-14resolves #2518 don't expand docdir value passed to API (PR #2522)Dan Allen
2017-11-18resolves #2478 assign Document#source_location when sourcemap option is ↵Dan Allen
enabled (PR #2488)
2017-08-27move API tests to dedicated fileDan Allen