<commit_before># Gon-sinatra gem — get your Sinatra variables in your js

### Build Status ![http://travis-ci.org/gazay/gon-sinatra](https://secure.travis-ci.org/gazay/gon-sinatra.png)

If you need to send some data to your js files and you don't want to do this with long way through views and parsing - use this force!

Now with [Rabl](https://github.com/nesquena/rabl) support!

Now with [Padrino](https://github.com/padrino/padrino-framework) support as well!

For rails use [gon](https://github.com/gazay/gon).

## Usage

`my_sinatra_application.rb`

**Note: For classic (non-modular) applications, you still have to explicitely register `Gon::Sinatra`**

``` ruby
# For classic applications:<commit_msg>Add martians banner<commit_after># Gon-sinatra gem — get your Sinatra variables in your js

### Build Status ![http://travis-ci.org/gazay/gon-sinatra](https://secure.travis-ci.org/gazay/gon-sinatra.png)

If you need to send some data to your js files and you don't want to do this with long way through views and parsing - use this force!

Now with [Rabl](https://github.com/nesquena/rabl) support!

Now with [Padrino](https://github.com/padrino/padrino-framework) support as well!

For rails use [gon](https://github.com/gazay/gon).

<a href="https://evilmartians.com/?utm_source=gon-sinatra">
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
</a>

## Usage

`my_sinatra_application.rb`

**Note: For classic (non-modular) applications, you still have to explicitely register `Gon::Sinatra`**

``` ruby
# For classic applications:
{'fraction_non_alphanumeric': 0.1381011097410604, 'fraction_numerical': 0.0030826140567200987, 'mean_word_length': 4.838129496402877, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 10, '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': '5536652', 'n_tokens_mistral': 564, 'n_tokens_neox': 542, 'n_words': 160}