Varfile
Varfile is a little executable to write and read variables from a text file. It's job is trivial, but the little automation becomes very handy when dealing distributed environments. Varfile is suitable to be used as a tool for configuration of remote servers when used in conjunction with other automation tools like capistrano.
Installation
Add this line to your application's Gemfile:
gem 'varfile'
And then execute:
$ bundle
Or install it yourself as:
$ gem install varfile
Usage
Set a value for a key:
$ varfile set FOO bar --file=/u/app/shared/config/.env
Get the value of a key:
$ varfile get FOO --file=/u/app/shared/config/.env
bar
List all keys and values:
$ varfile list --file=/u/app/shared/config/.env
FOO=bar
Remove a key:
$ varfile rm FOO --file=/u/app/shared/config/.env
If --file
option is missing, variables will be written to a file named
Varfile
.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request