<commit_before># Unveil.js for Rails

This gem will help you get started with unveil.js rather quickly.

## Installation

Add the gem:

``` ruby
gem 'unveil-rails', '~> 0.1.0'
```

Install the assets:

```
bin/rails g unveil:rails:install
```

Include the asset in your JS:

``` js
//= require unveil_init
```

Now use the helper method whereever you want lazy images:

```erb
<%= lazy_image_tag('an-image.png') %>
<%= lazy_image_tag('an-image.png', retina: 'a-retina-image.png') %>
<%= lazy_image_tag('an-image.png', placeholder: 'placeholder.png') %>
```

## Configuration

The installation generator will have added an initializer to your application.
In this file there are a couple of settings you can change.

### Threshold

``` ruby
Unveil::Rails.config.threshold = 200
```

Setting this variable to an integer will set the unveil threshold setting
as [documented here][unveil-docs].

### Default placeholder

You may set an alternative default placeholder image:

``` ruby
Unveil::Rails.config.default_placeholder = 'default.jpg'
```

You can set the placeholder per lazy image by passing in the placeholder option:

``` erb
<%= lazy_image_tag('an-image.png', placeholder: 'placeholder.png') %>
```

## Credits

[![made](https://s3-eu-west-1.amazonaws.com/made-assets/googleapps/google-apps.png)][made]

Developed and maintained by [Made Tech][made]. Key contributions:

 * [<NAME>](https://github.com/DrPheltRight)

## License

Copyright © 2014 Made Tech Ltd. It is free software, and may be
redistributed under the terms specified in the [LICENSE][license] file.

[made]: http://www.madetech.co.uk?ref=github&repo=cf-deploy
[license]: https://github.com/madebymade/cf-deploy/blob/master/LICENSE
[unveil-github]: https://github.com/luis-almeida/unveil
[unveil-docs]: http://luis-almeida.github.io/unveil/<commit_msg>Give more credit to Luis<commit_after># Unveil.js for Rails

This gem will help you get started with [unveil.js][unveil-github] rather quickly.

## Installation

Add the gem:

``` ruby
gem 'unveil-rails', '~> 0.1.0'
```

Install the assets:

```
bin/rails g unveil:rails:install
```

Include the asset in your JS:

``` js
//= require unveil_init
```

Now use the helper method whereever you want lazy images:

```erb
<%= lazy_image_tag('an-image.png') %>
<%= lazy_image_tag('an-image.png', retina: 'a-retina-image.png') %>
<%= lazy_image_tag('an-image.png', placeholder: 'placeholder.png') %>
```

## Configuration

The installation generator will have added an initializer to your application.
In this file there are a couple of settings you can change.

### Threshold

``` ruby
Unveil::Rails.config.threshold = 200
```

Setting this variable to an integer will set the unveil threshold setting
as [documented here][unveil-docs].

### Default placeholder

You may set an alternative default placeholder image:

``` ruby
Unveil::Rails.config.default_placeholder = 'default.jpg'
```

You can set the placeholder per lazy image by passing in the placeholder option:

``` erb
<%= lazy_image_tag('an-image.png', placeholder: 'placeholder.png') %>
```

## Credits

[![made](https://s3-eu-west-1.amazonaws.com/made-assets/googleapps/google-apps.png)][made]

Developed and maintained by [Made Tech][made]. Key contributions:

 * [<NAME>on](https://github.com/DrPheltRight)

And of course [<NAME>][luis-github] creator of [unveil.js][unveil-github].

## License

Copyright © 2014 Made Tech Ltd. It is free software, and may be
redistributed under the terms specified in the [LICENSE][license] file.

[made]: http://www.madetech.co.uk?ref=github&repo=cf-deploy
[license]: https://github.com/madebymade/cf-deploy/blob/master/LICENSE
[unveil-github]: https://github.com/luis-almeida/unveil
[unveil-docs]: http://luis-almeida.github.io/unveil/
[luis-github]: https://github.com/luis-almeida
{'fraction_non_alphanumeric': 0.1475151196423876, 'fraction_numerical': 0.006310807257428346, 'mean_word_length': 4.852307692307693, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 16, 'https://': 9, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3967187', 'n_tokens_mistral': 1334, 'n_tokens_neox': 1238, 'n_words': 356}