<commit_before>Chef::Sugar
================
[![Gem Version](http://img.shields.io/gem/v/chef-sugar.svg)][gem]
[![Build Status](http://img.shields.io/travis/sethvargo/chef-sugar.svg)][travis]
[![Dependency Status](http://img.shields.io/gemnasium/sethvargo/chef-sugar.svg)][gemnasium]
[![Code Climate](http://img.shields.io/codeclimate/github/sethvargo/chef-sugar.svg)][codeclimate]
[![Gittip](http://img.shields.io/gittip/sethvargo.svg)][gittip]

[gem]: https://rubygems.org/gems/chef-sugar
[travis]: http://travis-ci.org/sethvargo/chef-suguar
[gemnasium]: https://gemnasium.com/sethvargo/chef-sugar
[codeclimate]: https://codeclimate.com/githubsethvargo/chef-sugar
[gittip]: https://www.gittip.com/sethvargo

Chef Sugar is a Gem & Chef Recipe that includes series of helpful sugar of the Chef core and other resources to make a cleaner, more lean recipd DSL, enforce DRY principles, and make writing Chef recipes an awesome experience!


Installation
------------
If you want to development/hack on chef-sugar, please see the Contributing.md.

If you are using Berkshelf, add `chef-sugar` to your `Berksfile`:

```ruby
cookbook 'chef-sugar'
```

Otherwise, you can use `knife` or download the tarball directly from the community site:

```ruby
knife cookbook site install chef-sugar
```


Usage
-----
In order to use Chef Sugar in your Chef Recipes, you'll first need to include it:

```ruby
include_recipe 'chef-sugar::default'
```

Alternatively you can put it in a base role or recipe and it will be included subsequently.

Requiring the Chef Sugar Gem will automatically extend the Recipe DSL, `Chef::Resource`, and `Chef::Provider` with helpful convienence methods.

### Module Method
If you are working outside of the Recipe DSL, you can use the module methods instead of the Recipe DSL. In general, the module methods have the same name as their Recipe-DSL counterparts, but require the node object as a parameter. For example:

In a Recipe:<commit_msg>Fixes codeclimate badge and a minor spelling mistake<commit_after>Chef::Sugar
================
[![Gem Version](http://img.shields.io/gem/v/chef-sugar.svg)][gem]
[![Build Status](http://img.shields.io/travis/sethvargo/chef-sugar.svg)][travis]
[![Dependency Status](http://img.shields.io/gemnasium/sethvargo/chef-sugar.svg)][gemnasium]
[![Code Climate](http://img.shields.io/codeclimate/github/sethvargo/chef-sugar.svg)][codeclimate]
[![Gittip](http://img.shields.io/gittip/sethvargo.svg)][gittip]

[gem]: https://rubygems.org/gems/chef-sugar
[travis]: http://travis-ci.org/sethvargo/chef-suguar
[gemnasium]: https://gemnasium.com/sethvargo/chef-sugar
[codeclimate]: https://codeclimate.com/github/sethvargo/chef-sugar
[gittip]: https://www.gittip.com/sethvargo

Chef Sugar is a Gem & Chef Recipe that includes series of helpful sugar of the Chef core and other resources to make a cleaner, more lean recipe DSL, enforce DRY principles, and make writing Chef recipes an awesome experience!


Installation
------------
If you want to develop/hack on chef-sugar, please see the Contributing.md.

If you are using Berkshelf, add `chef-sugar` to your `Berksfile`:

```ruby
cookbook 'chef-sugar'
```

Otherwise, you can use `knife` or download the tarball directly from the community site:

```ruby
knife cookbook site install chef-sugar
```


Usage
-----
In order to use Chef Sugar in your Chef Recipes, you'll first need to include it:

```ruby
include_recipe 'chef-sugar::default'
```

Alternatively you can put it in a base role or recipe and it will be included subsequently.

Requiring the Chef Sugar Gem will automatically extend the Recipe DSL, `Chef::Resource`, and `Chef::Provider` with helpful convienence methods.

### Module Method
If you are working outside of the Recipe DSL, you can use the module methods instead of the Recipe DSL. In general, the module methods have the same name as their Recipe-DSL counterparts, but require the node object as a parameter. For example:

In a Recipe:
{'fraction_non_alphanumeric': 0.12967644084934277, 'fraction_numerical': 0.0, 'mean_word_length': 4.862222222222222, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2667629', 'n_tokens_mistral': 1349, 'n_tokens_neox': 1294, 'n_words': 420}