<commit_before># Pling 


## Requirements



## Install


## Usage




## Build Status

pling is on {Travis}[http://travis-ci.org/flinc/pling] running the specs on Ruby 1.8.7, Ruby 1.9.2 and Ruby Enterprise Edition.


## Known issues

See https://github.com/flinc/pling/issues


## Repository

See https://github.com/flinc/pling and feel free to fork it!


## Contributors

See a list of all contributors at https://github.com/flinc/pling/contributors. Thanks a lot everyone!

<commit_msg>Sketched the basic idea of Pling in the README<commit_after># Pling ![Travis build status of pling](http://travis-ci.org/flinc/pling.png)

Pling is a notification framework that supports multiple gateways.


## Requirements



## Install

Add this line to your `Gemfile`:

    gem 'pling'

## Configuration

    Pling.configure do |config|
      config.gateways = [
        Pling::Gateways::C2DM.new(:options => 'here'),
        Pling::Gateways::IPhone.new(:options => 'here'),
        Pling::Gateways::Email.new(:options => 'here')
      ]
    end

## Usage

Pling has three core components:

* A `Device` describes a concrete receiver such as a smartphone or an email address. 
* A `Message` wraps the content delivered to a device. 
* A `Gateway` handles the communication with the service provider used to deliver the message.

To integrate Pling in your application you have to implement a `to_pling` method on each of your models to convert your data into Pling compatible objects.

### Devices

Devices store an identifier and a type. 

  Example:

    email_device  = Pling::Device.new(:identifier => '<EMAIL>', :type => :email)
    iphone_device = Pling::Device.new(:identifier => 'XXXXXXXXXX...XXXXXX', :type => :iphone)


### Messages

The `Message` stores the content as well as additional options that may be evaluated by the gateways.

  Example:

    options = {} # To be added
    message = Pling::Message.new("Hello from Pling", options)


### Gateways

The Gateway delivers the message in the required format to the service provider.

Currently there are these gateways available:

* Android C2DM (not yet implemented)
* iPhone Push (not yet implemented)
* SMS via Mobilant (See `pling-mobilant` gem, not yet implemented)
* E-Mail (See `pling-actionmailer` gem, not yet implemented)

## Build Status

Pling is on [Travis](http://travis-ci.org/flinc/pling) running the specs on Ruby 1.8.7, Ruby 1.9.2 and Ruby Enterprise Edition.


## Known issues

See https://github.com/flinc/pling/issues


## Repository

See https://github.com/flinc/pling and feel free to fork it!


## Contributors

See a list of all contributors at https://github.com/flinc/pling/contributors. Thanks a lot everyone!


{'fraction_non_alphanumeric': 0.10604375231738969, 'fraction_numerical': 0.005190952910641453, 'mean_word_length': 3.775221238938053, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '843072', 'n_tokens_mistral': 841, 'n_tokens_neox': 793, 'n_words': 301}