Project

yaml_bot

0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Validate YAML files according to a set of rules.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 10.0
~> 3.0
~> 0.46.0
 Project Readme

Build Status Code Climate Test Coverage

YamlBot

YamlBot is not a Yaml linter, it is a Yaml format validator.

Why

Mistakes can often be made when working with yaml-based configuration. Systems such as travis-ci, rubocop, and other tools that utilize yaml files to govern how they work often present users with a multitude of keys and options that can take on many possible values. yamlbot allows users to feed it a set of rules that a yaml-based system follows and then validate any yaml file against those rules.

If a tool works off of a yaml-based configuration then a rules file can be crafted for validating the configuration is correct. Create a rules file, share it with others, and have them use yamlbot to validate their configuration against the specified rules.

See the RULES FILE specification for details on creating a .yamlbot.yml rules file.

Installation

Add this line to your application's Gemfile:

gem 'yaml_bot'

And then execute:

$ bundle

Or install it yourself as:

$ gem install yaml_bot

Usage

Create a .yamlbot.yml file with a set of rules that you want to validate yaml files against yamlbot file specification.

Usage assuming the existence .yamlbot.yml in the current directory:

yamlbot -f yaml_file_to_validate

Usage passing the path to a rules file (doesn't have to be named .yamlbot.yml):

yamlbot -f yaml_file_to_validate [-r path_to_rules_file]
Usage: yamlbot -f yaml_file_to_validate [-r path_to_rules_file]
        -r, --rule-file rules           The rules you will be evaluating your yaml against
        -f, --file file                 The file to validate against
        -h, --help                      help

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/skippyPeanutButter/yaml_bot. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

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