RailsConfigValidator
The gem uses Kwalify schema validator to check Rails configuration files syntax and content.
Installation
Add this line to your application's Gemfile
:
gem 'rails_config_validator', '~> 3.1'
And then execute:
$ bundle
Run Rake task to copy default database.yml
schema file and add config/schemas/database.schema.yml
to your version control:
rake config_validator:init
git add config/schemas/database.schema.yml
Specify files for which the gem should run validation config/application.rb
or in environment file:
config.config_validator.configs = %w(database your-config)
Usage
After deployment the schema can be validated with Rake task:
export RAILS_ENV=production
bundle exec rake config_validator:validate[config/database.yml]
Development
After checking out the repo, run bin/setup
to install dependencies.
Then, run bin/console
for an interactive prompt that will allow you to experiment.
Use bundle exec guard
to run rspec
and rubocop
on each code change.
To install this gem onto your local machine, run bundle exec rake install
.
Contributing
- Fork it
- Create your feature branch (
git checkout -b feature/my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/my-new-feature
) - Create a new Pull Request to branch
master
.