<commit_before># RailsUiKit

[![Code Climate](https://codeclimate.com/github/puffy/rails_ui_kit.png)](https://codeclimate.com/github/puffy/rails_ui_kit)

Helpful components for developing UI in Rails.

Inspired by <NAME> (Hashrocket) series of posts:
* http://hashrocket.com/blog/posts/managing-design-handoffs-with-the-ui-controller
* http://hashrocket.com/blog/posts/the-ui-controller-part-2-faking-it
* http://hashrocket.com/blog/posts/the-ui-controller-part-3-the-ui-helper

What included in the gem:

* controller for browsing list of UI templates
* helpers for creating sample data in the UI templates (read more about using in the above links)

## Installation and configuration

All you need to do is add the next line to your application's Gemfile:

    gem 'rails_ui_kit', group: :development

If you want to use gem functionality on staging or production environment, don't forget to restrict access for `/ui` resource if it necessary.

And then execute:

    $ bundle

Create your own layout in `app/views/layouts` (e.g. `ui.html.erb`) and define `ui_layout` method in your `ApplicationController`:

```ruby
class ApplicationController < ActionController::Base
  protected

  def ui_layout
    'ui'
  end
end
```

## Usage
<commit_msg>Bump README<commit_after># RailsUiKit

[![Code Climate](https://codeclimate.com/github/puffy/rails_ui_kit.png)](https://codeclimate.com/github/puffy/rails_ui_kit)

Helpful components for developing UI in Rails.

Inspired by <NAME> (Hashrocket) series of posts:
* http://hashrocket.com/blog/posts/managing-design-handoffs-with-the-ui-controller
* http://hashrocket.com/blog/posts/the-ui-controller-part-2-faking-it
* http://hashrocket.com/blog/posts/the-ui-controller-part-3-the-ui-helper

What included in the gem:

* controller for browsing list of UI templates
* helpers for creating sample data in the UI templates (read more about using in the above links)

## Installation and configuration

Add the next line to your application's Gemfile:

```ruby
gem 'rails_ui_kit', group: :development
```

*Note: If you want to use gem functionality on staging or production environment, don't forget to restrict access for `/ui` resource if it necessary.*

And then execute:

    $ bundle

Create your own layout in `app/views/layouts` (e.g. `ui.html.erb`) and define `ui_layout` method in your `ApplicationController`:

```ruby
class ApplicationController < ActionController::Base
  protected

  def ui_layout
    'ui'
  end
end
```

## Usage

{'fraction_non_alphanumeric': 0.10740144810941271, 'fraction_numerical': 0.0016090104585679806, 'mean_word_length': 4.563758389261745, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '2691295', 'n_tokens_mistral': 800, 'n_tokens_neox': 757, 'n_words': 245}