Create an application that should all you to:
- Type in a query and display a list of books matching that query.
- Each item in the list should include the book's author, title, and publishing company, as well as a picture of the book.
- From each list item, you should also be able to navigate to more information about the book, but this information does not necessarily need to appear on a page within your application. In other words, this could link out to an external site with more information about that particular book.
- Created a Ruby on Rails web-application
- Configured the Google Books API for consumption
- Created API requests using HTTParty gem
- Consumed JSON responses from the API
- Mapped response to application-specific data by creating Book objects
- Added appropriate structure/styling for usability of the application (HTML/CSS/Bootstrap)
- Added appropriate unit tests for the controller, API wrapper, and class object created
After cloning repository and navigating to directory, run the following code in terminal:
$ bundle install
$ rails server
go to http://localhost:3000/ in the browser to open the application.
To run tests run the following code in the terminal:
$ rails test
The application is deployed on Heroku at: http://mybookworm.herokuapp.com/
To Deploy to heroku, take the following steps:
-
Make a Heroku account and download Heroku command line tools at https://devcenter.heroku.com/articles/heroku-command-line.
-
Sign into Heroku from terminal
$ heroku login Enter your Heroku credentials. Email: [email protected] Password (Typing will be hidden): Authentication successful.
-
Navigate to app directory
-
Choose an app name and create heroku app in terminal
~ $ cd path/to/my_rails_app ~/path/to/my_rails_app $ heroku create my-new-app
-
Use git push to push current state of master branch to Heroku.
~/path/to/my_rails_app $ git push heroku master
-
Open page in browser by going to link
http://my-new-app.herokuapp.com/
orheroku open
command.
- Add feature to allow for navigation to book information on a page within the application -- will need to update consumption of JSON responses to map responses to book description, publisher date, page count etc.