Below is a guide to get this app up and running on your local machine.
-
You will also require postgresql with the role "postgres" with password "postgres" (You can use whatever role and password by changing the config/database.yml file, which contains the username and password under the default definitions)
-
You will need to get Ruby (I have used Ruby 2.4.1). There is a .ruby_version included in the repository which can be used by rbenv (a ruby version manager)
-
After this, you will need bundler. gem install bundler
-
After you have cloned the repository, run bundle install inside the project root folder
-
You will now be able to run the migrations and create the tables the app needs. rake db:migrate
-
You can now run the server. rails s
-
Create a new user and search using twitters api! You will also be able to use the history tab to look at what you have already searched for.
-
The tests are located in the test/controllers/search_controller_test.rb file.
-
Create a database and run the migrations as before but in the test enviroment. RAILS_ENV=test rake db:create db:migrate
-
Run the tests with rake test