URLockBox is a Rails app that allows users to create and store links!
This app is built with a restful API based on the resource 'link' (with the exception of /links, which is replaced by the root).
URLockBox can be viewed live at https://loliveri-urlockbox.herokuapp.com/.
Users must sign up or log in with an existing account to continue:
Once logged in, users can review their already saved links and add new ones. Note that URLs must be valid to be submitted, and need to also include a title.
Users edit their link urls and titles, and can also mark their reads as "read" or "unread".
Users can also filter their links by those that are read, unread, or just search by the text in either the link or the title! Users can also easily clear their search with the "clear filters" button.
Links marked as 'Top' (most visited of all users) or 'Spicy' (in top 10 of all visited sites) are dependent on data from a companion app, https://github.com/lao9/hot-reads, retrieved and compared through a service utilizing Faraday.
To set up URLockBox:
- Clone done this repo.
- Bundle
- rake db:setup
- To run the test suite, rspec
The app has the selenium-webdriver
gem listed in the Gemfile
and setup in the rails_helper.rb
. You will need to download version 46 of Firefox here. If you do have it, make sure it is on version 46. Selenium does not work with all versions of Firefox, so make sure that you are using Firefox 46 or else it will potentially cause you problems.
If you already have Firefox and it's on a version more recent than 46, the easiest way to downgrade is to turn off automatic updates, uninstall Firefox, and then install version 46.
You can then write capybara feature tests and add js: true
tag if you'd like your test to use the Selenium WebDriver rather than the default WebDriver. Your tests will execute and recognize your JavaScript.
If you're having problems troubleshooting asynchronous actions (like DOM changes after an AJAX request), peruse this section of Capybara's docs
It is highly suggested that you also check out the Capybara docs and and the section on selenium-webdriver.
URLockbox's companion app is live at https://loliveri-hotreads.herokuapp.com/. Hot Reads tracks which links are most popular for the past 24 hours.