<commit_before>Angular Postman
===============

## Introduction

Neither snow nor rain nor heat nor gloom of night stays these couriers from the swift completion of their appointed rounds.

## Installation

You can simply download and extract the package downloaded from GitHub. Alternatively, you can download the files via [Bower](http://bower.io/) (a JavaScript package management system):

```
bower install angular-postman
```

which will also automatically install Postman and AngularJS if needed.

Once you have the files downloaded, link to the files in your code *after* you include the main Angular files (`ngAnimate` highly recommended for sexy Postman animations):

```html
<!-- script order matters! -->
<script src="/path/to/angular.min.js"></script>
<script src="/path/to/angular-animate.min.js"></script>
<script src="/path/to/postman.min.js"></script>
<link rel="stylesheet" href="/path/to/postman.css">
```

## Usage

At its core, Postman is a service that allows you to send what we call `parcel`s, which pops up in the upper right corner* of your screen.

Just include `Postman` into your project and inject the `postman` service into your controller and use one of the 4 methods to create a `parcel`:

<small>*If the screen width is below 540px, it will use the mobile styles, which has the `parcel` appear at the bottom.</small>

```js
angular.module('DemoApp', ['Postman', 'ngAnimate'])

.controller('mainCtrl', ['$scope', 'postman', function ($scope, postman) {
    $scope.warn = function() { postman.warn('WARNING!', 'An optional message...'); };
    $scope.error = function() { postman.error('ERROR!', 'An optional message...'); };
    $scope.success = function() { postman.success('SUCCESS!'); };
    $scope.info = function() { postman.info('INFO!', 'An optional message... This message is quite a bit longer. It will never go more than 50% of the screen.'); };
}]);
```

`ngAnimate` is optional, but highly recommended for Postman animations.

## Options

```js
postman.warn|error|info|success(parcelTitle, parcelBody);
```

* **parcelTitle**: The title for the parcel.
* **parcelBody**: *(optional)* An optional message to add to the parcel that is in a smaller font than the title.

Each of these functions return a promise a la Angular's `$q`. If the `parcel` is clicked by the user, that promise will resolve.

## Demo

Very basic demo: [http://cwspear.github.io/angular-postman/](http://cwspear.github.io/angular-postman/). More advanced usage demo coming soon-ish.

## History

* **2013-09-30** Initial release.

## Contributions

[<NAME>](https://github.com/nostalgiaz) helped me with the idea for the data-attributes and doing the options via an object.

## Roadmap

I want to add some more configuration options, such as some pre-defined animations, icons, placement, etc.

## Me

Follow me on Twitter: [@CWSpear](https://twitter.com/CWSpear) or check out my [blog](http://cameronspear.com/blog/) that I never update.<commit_msg>Whoops, remove contribution copied over from a different project.<commit_after>Angular Postman
===============

## Introduction

Neither snow nor rain nor heat nor gloom of night stays these couriers from the swift completion of their appointed rounds.

## Installation

You can simply download and extract the package downloaded from GitHub. Alternatively, you can download the files via [Bower](http://bower.io/) (a JavaScript package management system):

```
bower install angular-postman
```

which will also automatically install Postman and AngularJS if needed.

Once you have the files downloaded, link to the files in your code *after* you include the main Angular files (`ngAnimate` highly recommended for sexy Postman animations):

```html
<!-- script order matters! -->
<script src="/path/to/angular.min.js"></script>
<script src="/path/to/angular-animate.min.js"></script>
<script src="/path/to/postman.min.js"></script>
<link rel="stylesheet" href="/path/to/postman.css">
```

## Usage

At its core, Postman is a service that allows you to send what we call `parcel`s, which pops up in the upper right corner* of your screen.

Just include `Postman` into your project and inject the `postman` service into your controller and use one of the 4 methods to create a `parcel`:

<small>*If the screen width is below 540px, it will use the mobile styles, which has the `parcel` appear at the bottom.</small>

```js
angular.module('DemoApp', ['Postman', 'ngAnimate'])

.controller('mainCtrl', ['$scope', 'postman', function ($scope, postman) {
    $scope.warn = function() { postman.warn('WARNING!', 'An optional message...'); };
    $scope.error = function() { postman.error('ERROR!', 'An optional message...'); };
    $scope.success = function() { postman.success('SUCCESS!'); };
    $scope.info = function() { postman.info('INFO!', 'An optional message... This message is quite a bit longer. It will never go more than 50% of the screen.'); };
}]);
```

`ngAnimate` is optional, but highly recommended for Postman animations.

## Options

```js
postman.warn|error|info|success(parcelTitle, parcelBody);
```

* **parcelTitle**: The title for the parcel.
* **parcelBody**: *(optional)* An optional message to add to the parcel that is in a smaller font than the title.

Each of these functions return a promise a la Angular's `$q`. If the `parcel` is clicked by the user, that promise will resolve.

## Demo

Very basic demo: [http://cwspear.github.io/angular-postman/](http://cwspear.github.io/angular-postman/). More advanced usage demo coming soon-ish.

## History

* **2013-09-30** Initial release.

## Roadmap

I want to add some more configuration options, such as some pre-defined animations, icons, placement, etc.

## Me

Follow me on Twitter: [@CWSpear](https://twitter.com/CWSpear) or check out my [blog](http://cameronspear.com/blog/) that I never update.
{'fraction_non_alphanumeric': 0.13373287671232878, 'fraction_numerical': 0.004794520547945206, 'mean_word_length': 4.594827586206897, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2030059', 'n_tokens_mistral': 1723, 'n_tokens_neox': 1634, 'n_words': 688}