The Mentor-Mentee Matching System is a web application designed to securely match university students (mentees) with mentors in their relevant subjects. This application is developed using Ruby, Sinatra, SQLite 3, among other technologies.
- Ruby
- Sinatra
- SQLite 3
- Capybara
- Rack-test
- Require_all
- RSpec
- Sequel
- SimpleCov
- Thin
- Sinatra-contrib
Note: All commands are presented in "quotes"
, remove these when running the command.
From the terminal, use cd project
to access the project directory, e.g. cd ~workspace/project
.
- In the terminal, use
cd db
to access the database directory. - Enter the following commands into the terminal (in order):
Use
sqlite3 production.sqlite3 .read tables.sql .schema
ctrl+z
to exit SQLite form. - Use
select * from tableName
where tableName is the table name intables.sql
(visible with.schema
command), e.g.select * from mentees;
. - Use
delete * from tableName
to clear a table where tableName is the table name intables.sql
, e.g.delete * from requests;
. - Use
cd ..
to exit the directory.
- Install gems by typing
bundle install
in the terminal. - Type
ruby app.rb
to start up the website on the webserver. - Open a browser and navigate to
https://<codio_box_name>-<port_number>.codio.io/
. The<codio_box_name>
and<port_number>
are available in your terminal once you runapp.rb
. - Press
CTRL+C
in the terminal to stop the webserver.- Important: Make sure the requests table is empty before you run the webserver.
To log in to our website use the following username and password combinations:
- mentee1 : mentee1
- mentee2 : mentee2
- mentor1 : mentor1
- mentor2 : mentor2
- To run a specific test make sure you're in the project directory and run
rspec spec/features/test-file
orrspec spec/unit/test-file
wheretest-file
is the test you want to run, e.g.edit_spec.rb
. - To run all tests, simply run
rspec
orrspec spec
.- Note: The tests will make changes to the database so the database should be returned to its previous state after running all of the tests. This can be done using
git checkout db/testing.sqlite3
.
- Note: The tests will make changes to the database so the database should be returned to its previous state after running all of the tests. This can be done using