<commit_before># [![<NAME>](https://cloud.githubusercontent.com/assets/2419/6550752/832d9a64-c5ea-11e4-9717-6f9aa6e023b5.png)](https://github.com/shuber) owners

[![Build Status](https://secure.travis-ci.org/shuber/owners.svg)](http://travis-ci.org/shuber/owners) [![Code Climate](https://codeclimate.com/github/shuber/owners/badges/gpa.svg)](https://codeclimate.com/github/shuber/owners) [![Coverage](https://codeclimate.com/github/shuber/owners/badges/coverage.svg)](https://codeclimate.com/github/shuber/owners) [![Gem Version](https://badge.fury.io/rb/owners.svg)](http://badge.fury.io/rb/owners)

Take ownership of your code.


## Installation

```
gem install owners
```


## Usage

Define an `OWNERS` file in any directory within your repository. This file should contain a newline separated list of subscribers to notify when files within the directory have changed. The `OWNERS` files are searched recursively up the tree to make organizing owners more convenient.

Subscribers can be anything that suits your needs e.g. emails, GitHub handles, or Slack channels.

```
<EMAIL>
<EMAIL>
@some_github_handle
@your_github_org/group
#some_slack_channel
```

The `OWNERS` file also supports limiting paths with regular expressions or exact matches. Any whitespace that separates the subscriber from the path limiters are ignored.

```
@data         app/models/.*
@ui           \.(css|haml|js|scss)$
<EMAIL>  lib/bobs_special_file.rb
```

Once your `OWNERS` files are defined, you can search for a list of owners by calling `Owners.for` with a list of paths e.g. output from `git diff --name-only`.

```ruby
Owners.for(".env", "app/controllers/posts_controller.rb", "app/models/user.rb")
```

This method returns a unique array of all the owners who have subscribed to changes for the specified files.
<commit_msg>Small updates to README<commit_after># [![<NAME>](https://cloud.githubusercontent.com/assets/2419/6550752/832d9a64-c5ea-11e4-9717-6f9aa6e023b5.png)](https://github.com/shuber) owners

[![Build Status](https://secure.travis-ci.org/shuber/owners.svg)](http://travis-ci.org/shuber/owners) [![Code Climate](https://codeclimate.com/github/shuber/owners/badges/gpa.svg)](https://codeclimate.com/github/shuber/owners) [![Coverage](https://codeclimate.com/github/shuber/owners/badges/coverage.svg)](https://codeclimate.com/github/shuber/owners) [![Gem Version](https://badge.fury.io/rb/owners.svg)](http://badge.fury.io/rb/owners)

Take ownership of your code.


## Installation

```
gem install owners
```


## Usage

Define an `OWNERS` file in any directory within your repository. This file should contain a newline separated list of subscribers to notify when files within the directory have changed. The `OWNERS` files are searched recursively up the tree to make organizing owners more convenient.

Subscribers can be anything that suits your needs e.g. emails, GitHub handles, Slack channels, etc.

```
<EMAIL>
<EMAIL>
@some_github_handle
@your_github_org/group
#some_slack_channel
```

The `OWNERS` file also supports limiting paths with regular expressions or exact matches. Any whitespace that separates the subscriber from the path limiters are ignored.

```
@data         app/models/.*
@ui           \.(css|haml|js|scss)$
<EMAIL>  lib/bobs_special_file.rb
```

Once your `OWNERS` files are defined, you can search for a list of owners by calling `Owners.for` with a list of paths e.g. output from `git diff --name-only`.

```ruby
Owners.for(".env", "app/controllers/posts_controller.rb", "app/models/user.rb")
```

This method returns a unique array of all the owners who have subscribed to changes for the specified files. These subscribers can then be notified however you see fit!

{'fraction_non_alphanumeric': 0.12958963282937366, 'fraction_numerical': 0.017278617710583154, 'mean_word_length': 4.735294117647059, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2156232', 'n_tokens_mistral': 1244, 'n_tokens_neox': 1156, 'n_words': 345}