Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

webhooks (6) Versions 0.1.2

LWRP Providers for API Calls

Berkshelf/Librarian
Policyfile
Knife
cookbook 'webhooks', '= 0.1.2'
cookbook 'webhooks', '= 0.1.2', :supermarket
knife cookbook site install webhooks
knife cookbook site download webhooks
README
Dependencies
Changelog
Quality

Webhooks Cookbook

<br /> Maybe you are using Chef-Solo and need an API to store node configuration or other configuration values. Maybe you just want to access an API for whatever reason. Maybe you don't need this because you are using Chef-Server. I found a use for it, maybe you can to!

Supported Platforms

Debian(6.x+), Ubuntu(10.04+) CentOS(6.x+), RedHat, Fedora(20+)

Tested Against

Debian 6.x and above Ubuntu 10.04 and above CenOS 6.x and above Fedora 20

Planned Improvements

0.1.2 - Enable Proxy

No additional cookboks are required. <br /> <br /> <br />

Attributes


webhooks::default

<br /> <table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>["webhooks"]["get_response"]</tt></td> <td>String</td> <td>Store GET Response and Parse it Later.</td> <td><tt>Empty</tt></td> </tr> <tr> <td><tt>["webhooks"]["post_response"]</tt></td> <td>String</td> <td>Store POST Response and Parse it Later.</td> <td><tt>Empty</tt></td> </tr> <tr> <td><tt>["webhooks"]["put_response"]</tt></td> <td>String</td> <td>Store PUT Response and Parse it Later.</td> <td><tt>Empty</tt></td> </tr> </table> <br /> <br /> <br />

Resource/Provider


webhooks_request

<br />

Actions

  • :get
  • :post
  • :put <br /> <br /> ### Attribute Parameters
#Default name for operation.  Not used for other than resource name.
attribute :operation_name, :name_attribute => true, :kind_of => String, :required => true

#Base Required Options
attribute :uri, :kind_of => String, :required => true, :default => nil
attribute :uri_port, :kind_of => Integer, :required => false, :default => 80
attribute :expected_response_codes, :kind_of => Array, :required => false, :default => [200]
attribute :follow_redirect, :kind_of => [ TrueClass, FalseClass ], :default => false
attribute :read_timeout, :kind_of => Integer, :required => false, :default => 60
attribute :use_ssl, :kind_of => [ TrueClass, FalseClass ], :default => false
attribute :ssl_validation, :kind_of => [ TrueClass, FalseClass ], :default => true
attribute :post_data, :kind_of => Hash, :required => false, :default => nil
attribute :header_data, :kind_of => Hash, :required => false, :default => nil
attribute :save_response, :kind_of => [ TrueClass, FalseClass ], :default => true

#Basic Authentication
attribute :use_basic_auth, :kind_of => [ TrueClass, FalseClass ], :default => false
attribute :basic_auth_username, :kind_of => String, :required => false, :default => nil
attribute :basic_auth_password, :kind_of => String, :required => false, :default => nil

#Proxy Options
attribute :use_proxy, :kind_of => [ TrueClass, FalseClass ], :default => false
attribute :proxy_address, :kind_of => String, :required => false, :default => nil
attribute :proxy_port, :kind_of => Integer, :required => false, :default => nil
attribute :proxy_username, :kind_of => String, :required => false, :default => nil
attribute :proxy_password, :kind_of => String, :required => false, :default => nil

<br /> <br />

Example

webhooks_request "Test Get" do
  uri "s1n4l2z.runscope.net/"
  use_ssl true
  expected_response_codes [ 200, 201 ]
  action :get
end
webhooks_request "Test Post" do
  uri "s1n4l2z.runscope.net/"
  use_ssl true
  post_data (
                { 'value1' => '1', 'value2' => '2'}
            )
  header_data (
                { 'header1' => '1', 'header2' => '2', 'User-Agent' => 'Mozilla/5.0'}
              )
  expected_response_codes [ 200, 201 ]
  action :post
end

<br /> <br /> <br />

Recipe Usage

N/A NONE

<br /> <br /> <br />

License and Authors


Authors: Brian Stajkowski

Copyright 2014 Brian Stajkowski

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

webhooks CHANGELOG

0.1.2

  • stajkowski - Add ssl_validation attribute. It is set to enable by default; disable it for self signed certs.

0.1.1

  • stajkowski - Fix Documentation

0.1.0

  • stajkowski - Initial release of webhooks

Foodcritic Metric
            

0.1.2 failed this metric

FC002: Avoid string interpolation where not required: /tmp/cook/e1d0483abfdb9446bf8df508/webhooks/providers/request.rb:142
FC002: Avoid string interpolation where not required: /tmp/cook/e1d0483abfdb9446bf8df508/webhooks/providers/request.rb:161