<commit_before># Greenhouse IO

[![Gem
Version](https://badge.fury.io/rb/greenhouse_io.png)](http://badge.fury.io/rb/greenhouse_io)
[![Build
Status](https://travis-ci.org/adrianbautista/greenhouse_io.png)](https://travis-ci.org/adrianbautista/greenhouse_io)
[![Coverage Status](https://coveralls.io/repos/adrianbautista/greenhouse_io/badge.png)](https://coveralls.io/r/adrianbautista/greenhouse_io)

A Ruby interface to
[Greenhouse.io's](https://app.greenhouse.io/jobboard/jsonp_instructions)
API (requires Ruby 1.9.3 or greater).

## Installation

Add the gem to your application's Gemfile:

    gem 'greenhouse_io'

Or install it yourself as:

    $ gem install greenhouse_io
    
## Configuration

You can assign default configuration values when using this gem, below is an example `config/initializers/greenhouse_io.rb` file in a Rails application:

```ruby
GreenhouseIo.configure do |config|
	config.symbolize_keys = true # set response keys as strings or symbols, default is false
	config.organization = 'General Assembly'
	config.api_token = ENV['GREENHOUSE_API_TOKEN']
end
```

## Usage

Greenhouse's two APIs, [Harvest](https://app.greenhouse.io/configure/dev_center/harvest) and [JobBoard](https://app.greenhouse.io/configure/dev_center/api_documentation), can now be accessed through the gem. The `[GreenhouseIo::JobBoard](#greenhouseio-jobboard)` is nearly identical to the old `GreenhouseIo::API` class. `[GreenhouseIo::Client](#greenhouseio-client)` connects to the new Harvest API.

### GreenhouseIo::JobBoard

Creating an instance of the JobBoard client:
```ruby
gh = GreenhouseIo::JobBoard.new("api_token", organization: "your_organization")
```

If you've configured the gem with a default `organization` and `api_token`, then you can just instantiate the class.
```ruby
gh = GreenhouseIo::JobBoard.new
```

`api_token` is only required for `#apply_to_job` and `organization` is also optional during initialization if an organization is passed in during method requests.

#### Fetching Office Data<commit_msg>Clean up readme and links<commit_after># Greenhouse IO

[![Gem
Version](https://badge.fury.io/rb/greenhouse_io.png)](http://badge.fury.io/rb/greenhouse_io)
[![Build
Status](https://travis-ci.org/adrianbautista/greenhouse_io.png)](https://travis-ci.org/adrianbautista/greenhouse_io)
[![Coverage Status](https://coveralls.io/repos/adrianbautista/greenhouse_io/badge.png)](https://coveralls.io/r/adrianbautista/greenhouse_io)

A Ruby interface to
[Greenhouse.io's](https://app.greenhouse.io/jobboard/jsonp_instructions)
API (requires Ruby 1.9.3 or greater).

## Installation

Add the gem to your application's Gemfile:

    gem 'greenhouse_io'

Or install it yourself as:

    $ gem install greenhouse_io
    
## Configuration

You can assign default configuration values when using this gem.  
Here is an example `config/initializers/greenhouse_io.rb` file used in a Rails application:

```ruby
GreenhouseIo.configure do |config|
	config.symbolize_keys = true # set response keys as strings or symbols, default is false
	config.organization = 'General Assembly'
	config.api_token = ENV['GREENHOUSE_API_TOKEN']
end
```

## Usage

Greenhouse's two APIs, **[Harvest](https://app.greenhouse.io/configure/dev_center/harvest)** and **[JobBoard](https://app.greenhouse.io/configure/dev_center/api_documentation)**, can now be accessed through the gem. The [`GreenhouseIo::JobBoard`](#greenhouseiojobboard) is nearly identical to the old `GreenhouseIo::API` class. [`GreenhouseIo::Client`](#greenhouseioclient) connects to the new Harvest API.

### GreenhouseIo::JobBoard

Creating an instance of the JobBoard client:
```ruby
gh = GreenhouseIo::JobBoard.new("api_token", organization: "your_organization")
```

If you've configured the gem with a default `organization` and `api_token`, then you can just instantiate the class.
```ruby
gh = GreenhouseIo::JobBoard.new
```

`api_token` is only required for `#apply_to_job` and `organization` is also optional during initialization if an organization is passed in during method requests.

#### Fetching Office Data
{'fraction_non_alphanumeric': 0.12107843137254902, 'fraction_numerical': 0.0014705882352941176, 'mean_word_length': 5.790349417637271, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 16, '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': '5946540', 'n_tokens_mistral': 1315, 'n_tokens_neox': 1246, 'n_words': 346}