<commit_before># Rollerskates

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rollerskates`. To experiment with that code, run `bin/console` for an interactive prompt.

TODO: Delete this and the text above, and describe your gem

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'rollerskates'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rollerskates

## Usage

TODO: Write usage instructions here

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rollerskates. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.


## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
<commit_msg>docs(readme): update readme.md<commit_after># Rollerskates [![Code Climate](https://codeclimate.com/github/andela-fsenjobi/rollerskates/badges/gpa.svg)](https://codeclimate.com/github/andela-fsenjobi/rollerskates) [![CircleCI](https://circleci.com/gh/andela-fsenjobi/rollerskates.svg?style=svg)](https://circleci.com/gh/andela-fsenjobi/rollerskates) [![Coverage Status](https://coveralls.io/repos/github/andela-fsenjobi/rollerskates/badge.svg?branch=master)](https://coveralls.io/github/andela-fsenjobi/rollerskates?branch=master)

You all have heard about rails, right? (obviously). Rails is a gigantic framework capable of supporting massive projects. Like its name, it can support massive trains (trains) with tons of weight (requirements). Here is rollerskates, a micro MVC built with ruby and is just capable of getting you from here to there.


## Installation

Add this line to your application's Gemfile:

```ruby
gem 'rollerskates'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install rollerskates

## Usage

### Setup
Ensure that your folder structure follow this pattern:

```
app_name
│   
└───app
|   └───assets
|   └───controllers
|   └───models
|   └───views
└───config
|    └─── routes.rb
|    └───application.rb
└───db
|    └───development.sqlite3
└───config.ru
```

### Config.ru
Set up your routes this way:

```ruby
APP_ROOT = __dir__
require APP_ROOT + "/config/application.rb"
TodoApplication = Todolist::Application.new
use Rack::MethodOverride
require APP_ROOT + "/config/routes.rb"
run TodoApplication
```

### Routes

```ruby
TodoApplication.pot.prepare do
  get "/", to: "welcome#index"
  resources :lists
  resources :items, only: :index
end

```
`resources` can also accomodate the only option.

### Controllers

```ruby
class ItemsController < Rollerskates::BaseController
  def index
    @items = Item.all
  end

  def new
  end

  def show
    @item = Item.find(params["id"])
    render :show_full
  end
end

```
Just like rails, controller action can take optional `render`. If the view to render is not stated explicitly, Rollerskates will render a view with the corresponding contoller action name.

### Models

```ruby
class Item < Rollerskates::BaseRecord
  property :name, type: :text, nullable: false
  property :status, type: :boolean, nullable: false

  create_table
end
```
Rolletskates automatically adds the `id, created_at and updated_at` fields and thus need not to be specified in the model. Other properties, however should be specified as above.

### Views

```
...
│   
└───views
|   └───items
|       |____ new.erb
|       |____ show.erb
...
```
Files in the view folder should be organized according to the controller and action name.
## Testing

The tests could be run automatically by using

```bash
$ rspec
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/andela-fsenjobi/rollerskates. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.


## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
{'fraction_non_alphanumeric': 0.10475992517148203, 'fraction_numerical': 0.00020785699438786114, 'mean_word_length': 4.4006734006734005, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '692454', 'n_tokens_mistral': 1475, 'n_tokens_neox': 1427, 'n_words': 556}