summaryrefslogtreecommitdiff
path: root/test/logger_test.rb
AgeCommit message (Collapse)Author
2022-01-28resolves #4250 enhance Logger constructor to honor positional and keyword ↵Dan Allen
arguments (PR #4251)
2021-07-31resolves #2557 enable RuboCop to enforce a consistent code style and perform ↵Dan Allen
static analysis
2021-04-30leave empty line after magic comment [skip ci]Dan Allen
2021-03-29resolves #3982 allow NullLogger to be enabled by setting the :logger option ↵Dan Allen
to a falsy value (PR #3983)
2019-03-11initialize the level to WARN when instantiating the NullLoggerDan 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-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-02use indented (squiggly) heredoc strings in invoker_test and logger_testDan Allen
2019-01-06use .adoc as AsciiDoc file extension in test suiteDan Allen
2019-01-06add visibility modifiers to methodsDan Allen
- mark private and protected methods (either individually or by section) - reorder methods by visibility where appropriate - move nextval helper method to Helpers - move class_for_name and resolve_class methods to Helpers - mark methods on Logger module (logger and message_with_context) as public - add some API doc where needed; fix visibility labels
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-04-14rename enrich_message method to message_with_contextDan Allen
2018-04-14update tests to use memory logger instead of capturing stderrDan Allen
- use memory logger in some of the tests instead of capturing messages from stderr - add test to verify basic formatter includes progname and source location in printed message
2018-04-14add :logger option to API methodsDan Allen
2018-04-14log message containing source location as an objectDan Allen
- add method to enrich and auto-format log message - change string message to object message
2018-04-14add tests for logging infrastructureDan Allen