Aspects to be covered in this README:
- Ruby / Rails version
- System dependencies
- Configuration
- Database creation
- Database initialization
- How to run the test suite
- Services (job queues, cache servers, search engines, etc.)
- Deployment instructions
Ruby Version: ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin15]
Rails Version: Rails 4.2.6
The application dependencies are as follows:
- Redis 3.0.5
- Mailcatcher 0.6.1
- Foreman 0.78.0 (For running the app through the Procfile)
- MySQL server 5.7.11
Note: To install these dependencies you can use a package manager like Homebrew to get the job done.
The application is meant to be executed on the localhost. Redis will run on its default port as well as mysql server. The rails application is supposed to be deployed/started to its default port 3000 on localhost.
To create the database simply run bundle exec rake db:create
To initialize the database simply run bundle exec rake db:migrate db:seed
To run/execute the test suite simply run bundle exec rake test
The application will only be using a job queue to process emails. This is done using Resque. To get this service running you can go ahead and open a terminal an type: QUEUE=* rake environment resque:work
or you can run the application with foreman like this: foreman start -p 3000
. The last command will run the web server and the resque process.
To deploy the application locally you only need to do the following after installing all the dependencies.
- Clone this repo -
git clone https://github.com/sebasjimenez10/people-manager-gap.git
- Run
bundle install
or simplybundle
- Follow the database creation and initialization commands
- Run
mailcatcher
and open a browser on localhost:1080 to see the emails console - Finally run
foreman start -p 3000
to start the application