<commit_before># Interactor Rails

[![Gem Version](https://badge.fury.io/rb/interactor-rails.png)](http://badge.fury.io/rb/interactor-rails)
[![Build Status](https://travis-ci.org/collectiveidea/interactor-rails.png?branch=master)](https://travis-ci.org/collectiveidea/interactor-rails)
[![Code Climate](https://codeclimate.com/github/collectiveidea/interactor-rails.png)](https://codeclimate.com/github/collectiveidea/interactor-rails)
[![Coverage Status](https://coveralls.io/repos/collectiveidea/interactor-rails/badge.png?branch=master)](https://coveralls.io/r/collectiveidea/interactor-rails?branch=master)
[![Dependency Status](https://gemnasium.com/collectiveidea/interactor-rails.png)](https://gemnasium.com/collectiveidea/interactor-rails)

Interactor Rails provides Rails support for the
[Interactor](https://github.com/collectiveidea/interactor) gem.

## Installation

Add this line to your application's Gemfile:

```ruby
gem "interactor-rails", "~> 1.0"
```

Interactor Rails is compatible with Ruby 1.9 or 2.0 on Rails 3 or 4.

## Usage

Interactor Rails ensures that `app/interactors` is included in your autoload
paths, and provides generators for your convenience.

```bash
rails generate interactor authenticate_user
```

adds to `app/interactors/authenticate_user.rb`:

```ruby
class AuthenticateUser
  include Interactor

  def perform
    # TODO
  end<commit_msg>Update the readme to reflect suggested installation<commit_after># Interactor Rails

[![Gem Version](https://badge.fury.io/rb/interactor-rails.png)](http://badge.fury.io/rb/interactor-rails)
[![Build Status](https://travis-ci.org/collectiveidea/interactor-rails.png?branch=master)](https://travis-ci.org/collectiveidea/interactor-rails)
[![Code Climate](https://codeclimate.com/github/collectiveidea/interactor-rails.png)](https://codeclimate.com/github/collectiveidea/interactor-rails)
[![Coverage Status](https://coveralls.io/repos/collectiveidea/interactor-rails/badge.png?branch=master)](https://coveralls.io/r/collectiveidea/interactor-rails?branch=master)
[![Dependency Status](https://gemnasium.com/collectiveidea/interactor-rails.png)](https://gemnasium.com/collectiveidea/interactor-rails)

Interactor Rails provides Rails support for the
[Interactor](https://github.com/collectiveidea/interactor) gem.

## Installation

Add this line to your application's Gemfile:

```ruby
gem "interactor-rails", "~> 2.0"
```

Interactor Rails is compatible with Ruby 1.9 or 2.0 on Rails 3 or 4.

## Usage

Interactor Rails ensures that `app/interactors` is included in your autoload
paths, and provides generators for your convenience.

```bash
rails generate interactor authenticate_user
```

adds to `app/interactors/authenticate_user.rb`:

```ruby
class AuthenticateUser
  include Interactor

  def perform
    # TODO
  end
{'fraction_non_alphanumeric': 0.13898788310762653, 'fraction_numerical': 0.005702066999287242, 'mean_word_length': 5.896805896805897, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 20, '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': '6659529', 'n_tokens_mistral': 966, 'n_tokens_neox': 875, 'n_words': 171}