Releases: pdobb/say
Releases · pdobb/say
v0.5.2
v0.5.1
Complete rewrite of Say::InterpolationTemplate.
- Say::InterpolationTemplate is now defined through piecemeal attributes, instead of by passing in a representative interpolation template String. This allows for very obvious and fine-grained control of which parts of the template are which.
- Add the ability to specify left/right bookends on Say::InterpolationTemplate. These allow for specifying text that should always appear on the left/right end of the interpolated text, regardless of length restrictions.
Remove the Say::LJBanner, Say::CJBanner, and Say::RJBanner classes.
- Instead, we now have Say::JustifierBehaviors and implementing classes: Say::LeftJustifier, Say::CenterJustifier, and Say::RightJustifier.
- These new classes are internally instantiated when calling Say::InterpolationTemplate#left_justify, Say::InterpolationTemplate#center_justify, and Say::InterpolationTemplate#right_justify, respectively.
Updates to README to show advanced usage using the newly rewritten Say::InterpolationTemplate class.
Public API Updates!
- Add
Say.<type>
convenience methods. These are single-argument alternatives toSay.line(text, type)
:Say.debug("TEST") # => " >> TEST"
Say.error("TEST") # => " ** TEST"
Say.info("TEST") # => " -- TEST"
Say.success("TEST") # => " -> TEST"
Say.warn("TEST") # => " !¡ TEST"
v0.4.0
BREAKING CHANGES:
Public API Updates!
- Add
Say.section
andsay_section
for 3-line banners that really visually split up your output into major sections. Say.message
was renamed toSay.build_message
and is no longer part of the public API.- When using
include Say
,say_message
has been removed.
Non-breaking Changes:
Say.banner
will now callSay.write
, internally. This means it now outputs directly as well, instead of only returning a String.- Prepend a timestamp to the output text from
Say.progress
andSay.progress_line
.
v0.3.1
v0.3.0
BREAKING CHANGES:
- Remove
warning
from Say::Types (keepwarn
)
Public API Updates!
- The updated public API when not including Say is:
Say.line
(wasSay.result
)
- The updated public API when including Say is:
say_line
(wassay_result
)
Non-breaking Changes:
- Add to public API:
Say.progress
andsay_progress
.- Use this to track long-running processing loops on a given interval.
- See the README for more details.
- Internal Changes: Abstract Say#banner using new classes/concepts:
- Say::InterpolationTemplate
- Say::LJBanner (Left-Justified Banner)
v0.2.0
BREAKING CHANGES:
Public API Updates!
- The updated public API when not including Say is:
Say.()
(orSay.call
) (wasSay.say
)Say.with_block
(wasSay.say_with_block
)Say.header
(wasSay.say_header
)Say.result
(wasSay.say_item
)Say.footer
(wasSay.say_footer
)Say.banner
(wasSay.build_banner
)Say.message
(wasSay.build_message
)Say.write
(wasSay.do_say
)
- The updated public API when including Say is:
say
(no change)say_with_block
(no change)say_header
(no change)say_result
(wassay_item
)say_footer
(no change)say_banner
(wasbuild_banner
)say_message
(wasbuild_message
)-
(`do_say` has been removed and `write` is not defined)
Non-breaking Changes:
-
When calling
Say.call
,Say.result
, andSay.message
without passing in a message String, the "message" result will now be" ..."
, instead of raising ArgumentError. -
Better definition of the
Say.with_block
method:- Rename
footer_message
kwarg to justfooter
- Make
header_message
into a kwarg and rename toheader
- Make
header
an optional argument
- Rename
-
Display processing time info via
Say.say_with_block
. e.g.# Instead of just: = Processing =================================================================== # ... = Done ========================================================================= # We'll now display, e.g.: = Processing =================================================================== # ... = Done (0.0000s) ===============================================================
v0.1.0
Define basic functionality for this gem:
Say.say(message, type = nil, &block)
Say.say_with_block(header_message, footer_message: "Done")
Say.say_header(message = nil, **kwargs)
Say.say_item(message, **kwargs)
Say.say_footer(message = "Done", **kwargs)
Say.build_banner(message = nil, columns: MAX_COLUMNS)
Say.build_message(message, type: nil)
Say.do_say(*messages, silent: false)