0.0
The project is in a healthy, maintained state
Rainbow and Liquid: style your command line tools with liquid templates.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

= 5.8.1
= 3.1.1
 Project Readme

RainbowLiquid

RainbowLiquid is a Ruby gem that leverages Liquid templates to neatly style and colorize your command line tools with a touch of rainbow.

Installation

gem 'rainbow_liquid'

Usage

RainbowLiquid offers two simple approaches to render styled output.

Example 1: Using refinements

require 'rainbow_liquid'

using RainbowLiquid

render <<~MSG
  -------------------------------
  {% bright -%}
    {%- green -%}
      Welcome to 🌈 Rainbow Liquid 💧
    {%- endgreen -%}
  {%- endbright %}
  -------------------------------
MSG

Example 2: Using the namespace

require 'rainbow_liquid'

RainbowLiquid.render <<~MSG
  -------------------------------
  {% bright -%}
    {%- green -%}
      Welcome to 🌈 Rainbow Liquid 💧
    {%- endgreen -%}
  {%- endbright %}
  -------------------------------
MSG

Development

To work on RainbowLiquid locally:

  1. Setup dependencies:
    Run the setup script:

    bin/setup
  2. Run tests:
    Execute:

    bundle exec rake test
  3. Interactive console:
    Launch an interactive Ruby prompt:

    bin/console
  4. Local gem installation:
    Install the gem on your system:

    bundle exec rake install
  5. Release a new version:
    Update the version number in lib/rainbow_liquid/version.rb, then run:

    bundle exec rake release

    This process creates a git tag, pushes your commits and tag, and uploads the gem to RubyGems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/karreiro/rainbow_liquid. We appreciate collaboration in a respectful and pragmatic environment. Please review the code of conduct before contributing.

License

RainbowLiquid is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting with the RainbowLiquid project—whether via codebases, issue trackers, chat rooms, or mailing lists—is expected to adhere to the code of conduct.