RainbowLiquid is a Ruby gem that leverages Liquid templates to neatly style and colorize your command line tools with a touch of rainbow.
gem 'rainbow_liquid'
RainbowLiquid offers two simple approaches to render styled output.
require 'rainbow_liquid'
using RainbowLiquid
render <<~MSG
-------------------------------
{% bright -%}
{%- green -%}
Welcome to 🌈 Rainbow Liquid 💧
{%- endgreen -%}
{%- endbright %}
-------------------------------
MSG
require 'rainbow_liquid'
RainbowLiquid.render <<~MSG
-------------------------------
{% bright -%}
{%- green -%}
Welcome to 🌈 Rainbow Liquid 💧
{%- endgreen -%}
{%- endbright %}
-------------------------------
MSG
To work on RainbowLiquid locally:
-
Setup dependencies:
Run the setup script:bin/setup
-
Run tests:
Execute:bundle exec rake test
-
Interactive console:
Launch an interactive Ruby prompt:bin/console
-
Local gem installation:
Install the gem on your system:bundle exec rake install
-
Release a new version:
Update the version number inlib/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.
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.
RainbowLiquid is available as open source under the terms of the MIT License.
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.