<commit_before># FrontEndBuilds

FrontEndBuilds lets you easily serve remotely-hosted static (JS) applications from your Rails apps.

Benefits:
  - JS app can be deployed without redeploying your Rails app
  - Easily smoke test SHAs, branches and releases in your production environment with query params:
    http://your-app.com/my-ember-app?branch=new-feature

Features:
  - Admin interface lets you easily view, rollback and activate different app versions (coming soon)

The motivation for this gem came from [Luke Melia's RailsConf2014 talk]().


## Installation

Add this line to your application's Gemfile:

    gem 'front_end_Builds' 

And then execute:

    $ bundle 


## Usage

1. Run migrations
2. Add a front_end route pointing to your app in your `routes.rb`:

    ```rb
    Rails.application.routes.draw do

      front_end 'app-name', '/app-route'

      resources :users
      ...
    end
    ```

3. Make a FrontEndBuild model from the rails console:

        $ rails console
        > FrontEndBuilds::App.create(name: 'name-you-used-in-router')

Copy the API key that shows up, and POST to `/name-you-used-in-router` with that key for a new deploy.


## Development

### Running tests

```
rspec
```


## TODO

* Customize fetching endpoint per app
* Create docs site
* Build admin ui
* Auto live setting<commit_msg>add todo in readme<commit_after># FrontEndBuilds

FrontEndBuilds lets you easily serve remotely-hosted static (JS) applications from your Rails apps.

Benefits:
  - JS app can be deployed without redeploying your Rails app
  - Easily smoke test SHAs, branches and releases in your production environment with query params:
    http://your-app.com/my-ember-app?branch=new-feature

Features:
  - Admin interface lets you easily view, rollback and activate different app versions (coming soon)

The motivation for this gem came from [Luke Melia's RailsConf2014 talk]().


## Installation

Add this line to your application's Gemfile:

    gem 'front_end_Builds' 

And then execute:

    $ bundle 


## Usage

1. Run migrations
2. Add a front_end route pointing to your app in your `routes.rb`:

    ```rb
    Rails.application.routes.draw do

      front_end 'app-name', '/app-route'

      resources :users
      ...
    end
    ```

3. Make a FrontEndBuild model from the rails console:

        $ rails console
        > FrontEndBuilds::App.create(name: 'name-you-used-in-router')

Copy the API key that shows up, and POST to `/name-you-used-in-router` with that key for a new deploy.


## Development

### Running tests

```
rspec
```


## TODO

* Customize fetching endpoint per app
* Create docs site
* Build admin ui
* Auto live setting
* make posts idempotent (i think they are), but dont insert a new row if
  it already exists.
{'fraction_non_alphanumeric': 0.0841459010473095, 'fraction_numerical': 0.005055976886962802, 'mean_word_length': 3.3213728549141965, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '2415768', 'n_tokens_mistral': 856, 'n_tokens_neox': 800, 'n_words': 331}