<commit_before># Twitter Flight framework for Rails

This asset gem packages the [twitter flight](https://github.com/twitter/flight/) framework for Rails.

## Installation

Add this line to your application's Gemfile:

    gem 'twitter-flight-rails'

    or

    gem 'twitter-flight-rails', :git => "<EMAIL>:yourabi/twitter-flight-rails.git"
    
You'll also want to add the following dependencies to your Gemfile (see the dependencies section for more details)

    gem 'requirejs-rails'

    gem 'es5-shim-rails'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install twitter-flight-rails

## Dependencies

Twitter flight depdends on ES5-shim, jQuery and an AMD implementation like require.js.

One possible Rails/Require.js integration is [requirejs-rails](https://github.com/jwhitley/requirejs-rails) ... you'll probably want to read their documentation and follow their initial setup instructions.

[ES5-shim](https://github.com/kriskowal/es5-shim) is used to polyfill ES5 support for older browsers and [JQuery](http://jquery.com) for DOM manipulation API. 

## Usage

Eventually you'll end up using require.js to include jquery, es5-shim, flight and your own compnents using something like this

```js
  // here "root" is a file that contains your own components under app/assets/javascripts/root.js and accessed at /assets/root.js
  require(['jquery', 'es5-shim/shims/es5-shim', 'es5-shim/shims/es5-sham', 'twitter/flight/', 'root'], function($) {<commit_msg>tweaking readme, including link to es5-shim-rails<commit_after># Twitter Flight framework for Rails

This asset gem packages the [twitter flight](https://github.com/twitter/flight/) framework for Rails.

## Installation

Add this line to your application's Gemfile:

    gem 'twitter-flight-rails'

    or

    gem 'twitter-flight-rails', :git => "<EMAIL>:yourabi/twitter-flight-rails.git"
    
You'll also want to add the following dependencies to your Gemfile (see the dependencies section for more details)

    gem 'requirejs-rails'

    gem 'es5-shim-rails'

And then execute:

    $ bundle

## Dependencies

Twitter flight depdends on ES5-shim, jQuery and an AMD implementation like require.js.

One possible Rails/Require.js integration is [requirejs-rails](https://github.com/jwhitley/requirejs-rails) ... you'll probably want to read their documentation and follow their initial setup instructions.

[ES5-shim](https://github.com/kriskowal/es5-shim) is used to polyfill ES5 support for older browsers and [JQuery](http://jquery.com) for DOM manipulation API. This is provided by the [es5-shim-rails](https://github.com/yourabi/es5-shim-rails) gem.

## Usage

Eventually you'll end up using require.js to include jquery, es5-shim, flight and your own compnents using something like this

```js
  // here "root" is a file that contains your own components under app/assets/javascripts/root.js and accessed at /assets/root.js
  require(['jquery', 'es5-shim/shims/es5-shim', 'es5-shim/shims/es5-sham', 'twitter/flight/', 'root'], function($) {
{'fraction_non_alphanumeric': 0.10723684210526316, 'fraction_numerical': 0.007565789473684211, 'mean_word_length': 4.1982905982905985, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 7, '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': '2574999', 'n_tokens_mistral': 961, 'n_tokens_neox': 886, 'n_words': 316}