An object-resource mapper for your Chef server. Enables a Rails app to manipulate its own Chef node attributes and trigger a +chef-client+ run on its local machine, as well as others.
Add this line to your application's Gemfile:
And then execute:
Generate a new model with the following command:
$ rails generate hibachi:model network_interface name is_static:boolean address netmask gateway --plural
This will generate the following model and an accompanying test:
class NetworkInterface < :: pluralized! field :name, type: String field :is_static, type: Boolean field :address, type: String field :netmask, type: String field :gateway, type: String end
To learn more about how to use Hibachi, visit the Wiki
You can run
bin/setup to install all dependencies in one go, and
bin/console for an interactive console prompt. We also provide
rspec commands for running regular shell tasks.
To run tests and check against the Ruby style guide:
$ bin/rake test
Will It Build?
Make sure the gem builds properly with the default Rake task:
NOTE: This also runs tests.
To release a new version of this gem, bump the version number in
lib/hibachi/version.rb and run the following command to push a Git tag
to the server. Travis will handle deploying the gem to RubyGems on new
successful tag builds:
$ rake publish
A passing build is required for any contributions made to this project. We also prefer you write tests for any new features you wish to add and use the test framework to highlight how and why bug fixes had to occur.
- Fork it ( https://github.com/tubbo/hibachi/fork )
- 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 a new Pull Request