CagedChef
CagedChef is a middleware for Faraday.
Installation
Add this line to your application's Gemfile:
gem 'caged_chef'
And then execute:
$ bundle
Or install it yourself as:
$ gem install caged_chef
Usage
url = 'https://example.chef.com'
= {
key: '/path/to/client/private/key',
host: url,
user_id: 'your-chef-user-id'
}
faraday = Faraday.new(url: url) do |faraday|
faraday.request :chef_auth,
# other faraday settings
end
response = faraday.run_request('http_method', "#{url}/some/path", "body", {})
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