Git Product home page Git Product logo

hotel_deals's Introduction

Thank you for the opportunity to work on this coding challenge!

This app will consume an API of hotel deals and display them. More specifically, it will read in JSON from http://deals.expedia.com/beta/deals/hotels.json, parse the JSON and display the hotel deals that it delivers. It will also allow the user to search the hotel deals on various criteria.

Heroku Deployment

http://.herokuapp.com/

How to run the app from your local sandbox

  1. Have Ruby 3.2.13 or higher installed on your machine

  2. Clone this repository

  3. Run bundle to install the required gems

  4. Run rake db:setup

  5. Run rake db:test:prepare

  6. Run "rails s" from the command line in the top level directory where you cloned the repository to

  7. Point your browser to http://localhost:3000/

Automated Tests

I used the Rspec and Capybara specs. To run all the tests, once you have followed steps 1-5 above, run "rake spec" from the top level directory where you cloned the repository to.

Assumptions

  1. That it was not desirable to persist any of the data read in from the url.

  2. That a certain, predictable, set of data would be available for running automated tests. This may not be a valid assumption but in keeping with the suggested timeframe and simplicity, my tests were written under this assumption.

  3. That it was intended that the site should only display 50 deals at a time.

Thoughts

I noticed that you can only read in 50 deals at a time.

Ideas for Future Iterations

  1. Add tests for specific data in particular columns.

  2. Use the Geocoder gem or something similar to search for hotel deals near a particular address or near the ip address of the user. However, to do this I believe it would be necessary to have access to all of the deals to check if each one's coordinates were near to the coordinates of the given address or ip address

Screenshot of homepage

Image

hotel_deals's People

Contributors

nglasgow avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.