<commit_before>### :warning: Listen is [looking for new maintainers](https://groups.google.com/forum/#!topic/guard-dev/2Td0QTvTIsE). Please [contact me](mailto:<EMAIL>) if you're interested.

# Listen

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

The Listen gem listens to file modifications and notifies you about the changes.

## Known issues / Quickfixes / Workarounds

*NOTE: TCP functionality has been removed from Listen 3.x - please use Listen
2.x until alternative server and client gems are created/released for 3.x.*

For other issues, just head over here: https://github.com/guard/listen/wiki/Quickfixes,-known-issues-and-workarounds

## Tips and Techniques

Make sure you know these few basic tricks: https://github.com/guard/listen/wiki/Tips-and-Techniques

## Features

* OS-optimized adapters on MRI for Mac OS X 10.6+, Linux, \*BSD and Windows, [more info](#listen-adapters) below.
* Detects file modification, addition and removal.
* You can watch multiple directories.
* Regexp-patterns for ignoring paths for more accuracy and speed
* Increased change detection accuracy on OS X HFS and VFAT volumes.
* Tested on MRI Ruby environments (1.9+ only) via [Travis CI](https://travis-ci.org/guard/listen),

NOTE: TCP functionality has been moved to a separate gem (listen-server and listen-client)

NOTES:
- Some filesystems won't work without polling (VM/Vagrant Shared folders, NFS, Samba, sshfs, etc.)
- Specs suite on JRuby and Rubinius aren't reliable on Travis CI, but should work.
- Windows and \*BSD adapter aren't continuously and automaticaly tested.


## Pending features / issues

* symlinked directories aren't fully transparent yet: https://github.com/guard/listen/issues/279
* Directory/adapter specific configuration options
* Support for plugins

Pull request or help is very welcome for these.

## Install

The simplest way to install Listen is to use [Bundler](http://bundler.io).

```ruby
gem 'listen', '~> 3.0' # NOTE: for TCP functionality, use '~> 2.10' for now
```


## Usage

Call `Listen.to` with either a single directory or multiple directories, then define the "changes" callback in a block.<commit_msg>Add information about Ruby 1.9.3 EOL<commit_after>### :warning: Listen is [looking for new maintainers](https://groups.google.com/forum/#!topic/guard-dev/2Td0QTvTIsE). Please [contact me](mailto:<EMAIL>) if you're interested.

# Listen

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

The Listen gem listens to file modifications and notifies you about the changes.

## Known issues / Quickfixes / Workarounds

*NOTE: TCP functionality has been removed from Listen 3.x - please use Listen
2.x until alternative server and client gems are created/released for 3.x.*

*NOTE: Ruby 1.9.3 is no longer maintained (and may not work with Listen) - it's best to upgrade to Ruby 2.2.2*

For other issues, just head over here: https://github.com/guard/listen/wiki/Quickfixes,-known-issues-and-workarounds

## Tips and Techniques

Make sure you know these few basic tricks: https://github.com/guard/listen/wiki/Tips-and-Techniques

## Features

* OS-optimized adapters on MRI for Mac OS X 10.6+, Linux, \*BSD and Windows, [more info](#listen-adapters) below.
* Detects file modification, addition and removal.
* You can watch multiple directories.
* Regexp-patterns for ignoring paths for more accuracy and speed
* Increased change detection accuracy on OS X HFS and VFAT volumes.
* Tested on MRI Ruby environments (2.0+ only) via [Travis CI](https://travis-ci.org/guard/listen),

NOTE: TCP functionality has been moved to a separate gem (listen-server and listen-client)

NOTES:
- Some filesystems won't work without polling (VM/Vagrant Shared folders, NFS, Samba, sshfs, etc.)
- Specs suite on JRuby and Rubinius aren't reliable on Travis CI, but should work.
- Windows and \*BSD adapter aren't continuously and automaticaly tested.


## Pending features / issues

* symlinked directories aren't fully transparent yet: https://github.com/guard/listen/issues/279
* Directory/adapter specific configuration options
* Support for plugins

Pull request or help is very welcome for these.

## Install

The simplest way to install Listen is to use [Bundler](http://bundler.io).

```ruby
gem 'listen', '~> 3.0' # NOTE: for TCP functionality, use '~> 2.10' for now
```


## Usage

Call `Listen.to` with either a single directory or multiple directories, then define the "changes" callback in a block.
{'fraction_non_alphanumeric': 0.12432432432432433, 'fraction_numerical': 0.008387698042870456, 'mean_word_length': 4.654373024236038, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 28, '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': '6010099', 'n_tokens_mistral': 1708, 'n_tokens_neox': 1590, 'n_words': 546}