Project

rndr

0.0
No commit activity in last 3 years
No release in over 3 years
rndr is a tool that simply renders Ruby erb templates for use with other applications.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 0.8
~> 11.2
~> 3.5
~> 0.46

Runtime

~> 0.19
 Project Readme

Rndr

Build Status Coverage Status

Rndr is a small Ruby cli gem that provides a method of rendering discovered erb templates. Variables for use in template rendering can be used directly by providing a either a yaml or json file, or alternatively a directory may be supplied along with the variable merging strategy. Rndr supports both standard hash merges or recursive (default).

In addition to supporting recursive hash merges, additional hash control options may be passed via the --merge-opts hash directive. This supports the available options as supported by the deep_merge gem.

Paths can be ignored by either creating a .rndrignore file within the current working directly, or supplying a path to a desired ignore file.

  • Commands
    • Check
    • List
    • Render
    • Vars

Commands

$ bin/rndr help
Commands:
  rndr check           # Verifies discovered erb templates.
  rndr help [COMMAND]  # Describe available commands or one specific command
  rndr list            # List discovered templates.
  rndr render          # Renders discovered templates.
  rndr vars            # Lists Combined Variables.
  rndr version         # Prints rndr Version Information.
...

Check

$ bin/rndr help check
Usage:
  rndr check

Options:
  e, [--extension=EXTENSION]   # Extension of templates.
                               # Default: erb
  i, [--ignore=IGNORE]         # Path to file containing list of files to be ignored.
                               # Default: /Users/demo/ruby/rndr/.rndrignore
  m, [--merge], [--no-merge]   # Recursively merge variables instead of replacing.
                               # Default: true
  t, [--template=TEMPLATE]     # Path to erb template or directory.
                               # Default: /Users/demo/ruby/rndr
  V, [--vars=VARS]             # Path to var file or directory.
                               # Default: /Users/demo/ruby/rndr/vars
  o, [--merge-opts=key:value]  # Hash of options to pass to deep_merge function

Verifies discovered erb templates.

List

$ bin/rndr help list
Usage:
  rndr list

Options:
  e, [--extension=EXTENSION]  # Extension of templates.
                              # Default: erb
  i, [--ignore=IGNORE]        # Path to file containing list of files to be ignored.
                              # Default: /Users/demo/ruby/rndr/.rndrignore
  t, [--template=TEMPLATE]    # Path to erb template or directory.
                              # Default: /Users/demo/ruby/rndr/rndr

List discovered templates.

Render

$ bin/rndr help render
Usage:
  rndr render

Options:
  e, [--extension=EXTENSION]  # Extension of templates.
                              # Default: erb
  i, [--ignore=IGNORE]        # Path to file containing list of files to be ignored.
                              # Default: /Users/demo/ruby/rndr/.rndrignore
  m, [--merge], [--no-merge]  # Recursively merge variables instead of replacing.
                              # Default: true
  t, [--template=TEMPLATE]    # Path to erb template or directory.
                              # Default: /Users/demo/ruby/rndr/rndr
  V, [--vars=VARS]            # Path to var file or directory.
                              # Default: /Users/demo/ruby/rndr/vars
  o, [--merge-opts=key:value]  # Hash of options to pass to deep_merge function

Renders discovered templates.

Vars

$ bin/rndr help vars
Usage:
  rndr vars

Options:
  f, [--format=FORMAT]        # Output Format [yaml|json]
                              # Default: yaml
  m, [--merge], [--no-merge]  # Recursively merge variables instead of replacing.
                              # Default: true
  V, [--vars=VARS]            # Path to var file or directory.
                              # Default: /Users/demo/ruby/rndr/vars
  o, [--merge-opts=key:value]  # Hash of options to pass to deep_merge function

Lists Combined Variables.