Add Sinatra Flash and Warden

Add Sinatra Flash and Warden to Gemfile.

Signed-off-by: Emanuele <feliziani.emanuele@gmail.com>
Update location sending behavior

Location data now are sent after clicking a button.

Signed-off-by: Emanuele <feliziani.emanuele@gmail.com>
Implements authentication

Now we have a simple authentication method and the possibility to protect pages when needed. The ajax call to save the location data is protected, too.

Signed-off-by: Emanuele <feliziani.emanuele@gmail.com>
Add user registration

Add a user registration page/form.

Signed-off-by: Emanuele <feliziani.emanuele@gmail.com>
Add coords and timestamp to db

Coords and timestamp have been added to the database definition.

Signed-off-by: Emanuele <feliziani.emanuele@gmail.com>
Correct path declaration in layout.erb

Path declaration was not relative to the root path. Fixed now.

Signed-off-by: Emanuele <feliziani.emanuele@gmail.com>
Move nav from home to layout

Navigation links have been moved from home to layout to make them available in every page of the app.

Signed-off-by: Emanuele <feliziani.emanuele@gmail.com>
Improves Ajax response

Ajax response does not replace the whole page content anymore. Now it's output in a specific #response div.

Signed-off-by: Emanuele <feliziani.emanuele@gmail.com>
Use PATCH instead of POST

Use http verb PATCH instead of POST when saving coords, because we are only updating db entries, not replacing the whole row.

Signed-off-by: Emanuele <feliziani.emanuele@gmail.com>
Save coords to the db

With this commit I implemented the functionality to save coords received from the client to the db and print the result to the screen to check that everything went well. It actually isn't going too well, since db entries are stored in a weird format at the moment. I will look into this lately.

Signed-off-by: Emanuele <feliziani.emanuele@gmail.com>
Ignore database.db

Ignore database.db, we won't need it in the repo.

Signed-off-by: Emanuele <feliziani.emanuele@gmail.com>