<commit_before># ActiveresourceHeaders

TODO: Write a gem description

## Installation

Add this line to your application's Gemfile:

    gem 'activeresource_headers'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install activeresource_headers

## Usage

TODO: Write usage instructions here

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request<commit_msg>Readme updated<commit_after># Activeresource Headers

Add ability to send custom headers on each http request by an ActiveResource model.

There are two ways of setting headers.
  * class method ```custom_headers do ... end``` in a model, that is an ActiveResource::Base kind
  * Chainable method ```with_headers```, that can be putten between model class and ```find``` method

## Examples

```ruby

  class Person < ActiveResource::Base
    include ActiveresourceHeaders::CustomHeaders

    self.site = 'http://example.com'

    custom_headers do
      {"My-Time" => Time.now.to_s}
    end
  end

  Person.find(:all) #=> will add header "My-Time: 2012-10-02 18:56:18 +0300"

  Person.with_headers("My-Time" => "to drink!", "Age" => "25+")
    #=> will add headers "My-Time: to drink!" and "Age: 25+"
```


## Installation

Add this line to your application's Gemfile:

    gem 'activeresource_headers'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install activeresource_headers

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
{'fraction_non_alphanumeric': 0.10596026490066225, 'fraction_numerical': 0.017660044150110375, 'mean_word_length': 3.8605898123324396, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5761912', 'n_tokens_mistral': 585, 'n_tokens_neox': 528, 'n_words': 218}