Giter Club home page Giter Club logo

expedia's Introduction

#Expedia Code Challenge

##To get it up and running

  1. Install Ruby 1.9.3 https://www.ruby-lang.org/en/downloads/
  2. Execute: sudo gem install bundler
  3. Clone this git repository
  4. In the root directory of this project execute bundle install capybara-webkit may need some dependencies. Instructions for getting capybara-webkit working: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit
  5. Execute: rackup -p 4567 and visit localhost:4567 to interact with application.
  6. Execute rake spec or rake acceptance for tests.

##Thoughts about application. I am most familiar with making Rails applications but I ran into problems with making a Rails app with no database. I decided to venture out into a database-less app made with Sinatra.

The application is simple. It calls the Expedia API and parses the JSON into an array of hashes with HTTParty. I then convert the hashes into OpenStructs to make calling keys within the hashes a bit easier to type.

The search results page is simple. I'm not very familiar with JavaScript so I used Twitter Bootstrap to add some styling and transitions. All the search results are ordered by star ranking. Assuming the user put in what the maximum amount they are willing to spend, the best hotel within their price range will be their first result. I used accordion style results to keep the user from being overloaded with information when they have 30+ results. I restricted initial information to only hotel, picture of hotel, star rating, price, and discounts (if any).

A couple issues with my application: My acceptance tests could be better but I ran into issues with capybara not finding the haml files. I was forced to move the acceptance test from the spec folder to the root directory to get the test to pass. Additionally, the date picker on the root page does not restrict the "to" (date field) to only future dates.

View on Heroku: http://blooming-thicket-4513.herokuapp.com/

expedia's People

Contributors

zaithottakath 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.