This is a README document for iCasei Back-End Developer test. The description bellow explains whatever steps are necessary to get the application up and running. Requirements The basic requirements for iCasei Back-End Developer test to work properly are as follows:
Requirement Minimum Version:
- Ruby
-
2.3.3p222
- Rails
-
5.0.1
- MySQL
-
5.0
- Mysql2
-
0.3.18 < 0.5
- Puma
-
3.0
- Bootstrap-sass
-
3.3.6
- Sass-rails
-
5.0
- font-awesome-sass
-
4.7.0
- Uglifier
-
1.3.0
- Coffee-rails
-
4.2
- Jquery-rails
-
4.2.2
- Jquery-datatables-rails
-
3.4.0
- Turbolinks
-
5
- Jbuilder
-
2.5
- Sdoc
-
0.4.0
Development Environment:
How to improve your development environment for running the application:
• MySQL Server (dev.mysql.com/doc/mysql-getting-started/en/). It´s an open-source database used in this application.
-
For more information about MySQL services performed: dev.mysql.com/
• MySQL Workbench (www.mysql.com/downloads/). It´s provides database design & modeling; SQL development; database administration and database migration.
• Rails (www.railsinstaller.org/en). It´s used for developing Ruby on Rails applications.
Database Creation:
* Database for Test:
create database IcaseiTest_test; grant all privileges on IcaseiTest_test.* to root@'%' identified by 'password';
* Database for Development:
create database IcaseiTest; grant all privileges on IcaseiTest.* to root@'%' identified by 'password';
If your MySQL Server has different host, username or password, it is necessary set the file configuration reference in application’s root directory:
IcaseiTest/config/database.yml
username: root password: password host: localhost
The final file will be:
default: &default adapter: mysql2 encoding: utf8 pool: 5 username: root password: password host: localhost development: <<: *default database: IcaseiTest test: <<: *default database: IcaseiTest_test production: <<: *default database: IcaseiTest_production username: IcaseiTest' password: <%= ENV['ICASEITEST_DATABASE_PASSWORD'] %>
Deployment instructions:
This application use GEM to manage bundle install to run. Follow the deployment instructions bellow for Installing:
Run the command in the application’s root directory
$ bundle install
Run the command in the application’s root directory to create tables in database
$ rake db:migrate
Run the command to start the application
$ rails server -b 0.0.0.0
Run the command to perform the test suite
$ rake db:schema:dump $ rake db:test:prepare $ rake test