<commit_before># rg (Rails + Angular, pronounced "regular")

Opinionated way to use [AngularJS](http://angularjs.org) in a [Rails](http://rubyonrails.org)/[Rails-API](https://github.com/rails-api/rails-api) app using

- [CoffeeScript] for code, because it looks good.
- [Bower] for managing frontend libraries, because it's simple.
- [angularjs-rails-resource], because why not use it?

By using this gem, you will
- Be able to use Angular + Rails
- Adopt a convention about your Angular directory structure and
- Get some basic, but handy generators!
- Delegate Angular/frontend library management to Bower
- Still live in Ruby land (i.e. you can do E2E testing using Capybara)

You are invited to read [this blog post](http://rbjl.net/69) for background information on this mindset, which could be called the *CARB* stack.

## Setup

Make sure [you have bower installed](https://bower.io). Then add this to your Gemfile:

    gem 'rg'

Run `bundle` on the command-line. Then setup your angular project:

    rails g rg:bower  # Set up a new .bowerrc file and bower.json file

    bower install angular angularjs-rails-resource --save  # Use bower to install latest angulars

    rails g rg:install --manifests=application.js  # Set up the angular app directory and add to sprocket manifest

Alternatively, you can run all the previous commands via rake:

    rake rg:setup

## Views

This gem does not mandate how you should organize your views. Don't forget to:

- include the JavaScript manifest file (once)
- include the `ng-app` directive
- turn off turbolinks
- turn off `config.assets.debug` in development.rb

## Generators<commit_msg>blog link<commit_after># rg (Rails + Angular, pronounced "regular")

Opinionated way to use [AngularJS](http://angularjs.org) in a [Rails](http://rubyonrails.org)/[Rails-API](https://github.com/rails-api/rails-api) app using

- [CoffeeScript] for code, because it looks good.
- [Bower] for managing frontend libraries, because it's simple.
- [angularjs-rails-resource], because why not use it?

By using this gem, you will
- Be able to use Angular + Rails
- Adopt a convention about your Angular directory structure and
- Get some basic, but handy generators!
- Delegate Angular/frontend library management to Bower
- Still live in Ruby land (i.e. you can do E2E testing using Capybara)

You are invited to read [this blog post](http://ruby.janlelis.de/69-the-carb-stack-coffee-angular-rails-bower) for background information on this mindset (*CARB*).

## Setup

Make sure [you have bower installed](https://bower.io). Then add this to your Gemfile:

    gem 'rg'

Run `bundle` on the command-line. Then setup your angular project:

    rails g rg:bower  # Set up a new .bowerrc file and bower.json file

    bower install angular angularjs-rails-resource --save  # Use bower to install latest angulars

    rails g rg:install --manifests=application.js  # Set up the angular app directory and add to sprocket manifest

Alternatively, you can run all the previous commands via rake:

    rake rg:setup

## Views

This gem does not mandate how you should organize your views. Don't forget to:

- include the JavaScript manifest file (once)
- include the `ng-app` directive
- turn off turbolinks
- turn off `config.assets.debug` in development.rb

## Generators
{'fraction_non_alphanumeric': 0.08931274598849531, 'fraction_numerical': 0.0018165304268846503, 'mean_word_length': 3.960960960960961, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '5636761', 'n_tokens_mistral': 1023, 'n_tokens_neox': 942, 'n_words': 420}