Install postgresql gem

Also set up database in dummy application.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Add devise gem

For security and user control.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Set up devise for a mountable Rails engine

Based on the article found in:
https://github.com/plataformatec/devise/wiki/How-To:-Use-devise-inside-a-mountable-engine

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Create the user model

Generate the User model via devise and add first name
and last name fields.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Update devise version

From 3.2.4 to 3.4.1. The changelog can be found
in the devise gem's github repo.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Add user roles

A user can either be an admin or just a
user.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Install HAML in the engine.

To use the HAML generator, the gem must be manually
configured via engine.rb

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Install rspec, factorygirl, shoulda matchers and faker.

The gems are used mainly for testing. Move test/dummy to
spec/test_app and remove default test suite completely
in favor of rspec.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Configure rspec to load supporting classes

Via this lines of code:
`ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../')`
`Dir[File.join(ENGINE_RAILS_ROOT, "spec/support/**/*.rb")].each {|f| require f }`

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Create test class for the User model

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Create scaffold for Users

Default CRUD for Users using generated scaffold.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Create home controller in test app

This will serve as the home page of the dummy app.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Create view generator in the rule engine

This generator will copy the user view files to the
parent app for customization

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Create controller generator in the rule engine

This generator will copy the user controller files to the
parent app for customization

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Commit bin directories

Otherwise, it's not recognized as a rails project folder.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Install role_model and cancancan

For security features.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Update User model with security methods

Also compiled new attributes in one migration file.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Update UserController

Based on pesto implementation

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Install Simple Form gem

Convenient way of creating input forms.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Moved ability model to the test app

The ability model should be in the main app in order
to specify the security rules.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>