<commit_before>#SPYCollectionController

SPYCollectionController is a simple control to remove some of the boiler plate when setting up a UICollectionView.  SPYCollectionController is by no means built for every use case, but instead for the most basic of cases where you only want to show a single section collection view and get selection events.  

##Initializing

SPYCollectionController has a few different init methods but the most encompassing is: 

```objective-c
controllerWithItems:(NSArray *)items identifier:(NSString *)cellIdentifier configurationBlock:(SPYCollectionCellConfigurationBlock)configurationBlock selectionBlock:(SPYCollectionCellSelectionBlock)selectionBlock;
```

The cellIdentifier should be the string value that you passed when registering the NIB or Cell with the collection view.  The configuration block gives you a chance to provide any context specific data to the cell.  In the example it is used as such 

```objective-c
^(id cell, UIColor *item) {
        [cell setBackgroundColor:item];
    }
```

The selection block works similarly and is called on 
```objective-c
collectionView: didSelectItemAtIndexPath:
```

and in the example app is used like

```objective-c
^(id cell, id item) {
        [self.collectionView setBackgroundColor:item];
    }];
```

As I said the Collection Controller is not meant for all use cases but as being a simple delegate/data source it is a simple, tested way of removing some UICollectionView boilerplate.<commit_msg>Adds build status to README<commit_after>#SPYCollectionController

SPYCollectionController is a simple control to remove some of the boiler plate when setting up a UICollectionView.  SPYCollectionController is by no means built for every use case, but instead for the most basic of cases where you only want to show a single section collection view and get selection events.  

<br/>
[![Build Status](https://travis-ci.org/scottpetit/SPYCollectionController.png?branch=master)](https://travis-ci.org/scottpetit/SPYCollectionController)

##Initializing

SPYCollectionController has a few different init methods but the most encompassing is: 

```objective-c
controllerWithItems:(NSArray *)items identifier:(NSString *)cellIdentifier configurationBlock:(SPYCollectionCellConfigurationBlock)configurationBlock selectionBlock:(SPYCollectionCellSelectionBlock)selectionBlock;
```

The cellIdentifier should be the string value that you passed when registering the NIB or Cell with the collection view.  The configuration block gives you a chance to provide any context specific data to the cell.  In the example it is used as such 

```objective-c
^(id cell, UIColor *item) {
        [cell setBackgroundColor:item];
    }
```

The selection block works similarly and is called on 
```objective-c
collectionView: didSelectItemAtIndexPath:
```

and in the example app is used like

```objective-c
^(id cell, id item) {
        [self.collectionView setBackgroundColor:item];
    }];
```

As I said the Collection Controller is not meant for all use cases but as being a simple delegate/data source it is a simple, tested way of removing some UICollectionView boilerplate.
{'fraction_non_alphanumeric': 0.0624801776086267, 'fraction_numerical': 0.0, 'mean_word_length': 5.270377733598409, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, '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': '5228111', 'n_tokens_mistral': 810, 'n_tokens_neox': 772, 'n_words': 366}