Contributed by the 18F team, part of the United States General Services Administration: https://18f.gsa.gov/

Motivation

This gem was extracted from the 18F Hub Joiner plugin. That plugin manipulates Jekyll-imported data by removing or promoting private data, building indices, and performing joins between different data files so that the results appear as unified collections in Jekyll's site.data object. It serves as the first stage in a pipeline that also builds cross-references and canonicalizes data before generating static HTML pages and other artifacts.

Installation

$ gem install hash-joiner

Usage

The typical use case is to have a YAML file containing both public and private data, with all private data nested within private: properties:

The filter-yaml-files program can also strip other properties besides private:, and can promote data contained within a property rather than strip it. Run filter-yaml-files -h to see the options that allow this.

Contributing

Just fork 18F/hash-joiner and start sending pull requests! Feel free to ping @mbland with any questions you may have, especially if the current documentation should've addressed your needs, but didn't.