README.md - The Oracle of Bacon = The goals of this assignment are as follows 1 Give you more exposure to RSpec and to more advanced and idiomatic Ruby

README.md - The Oracle of Bacon = The goals of this...

This preview shows page 1 - 3 out of 6 pages.

The Oracle of Bacon =================== The goals of this assignment are as follows: 1. Give you more exposure to RSpec and to more advanced and idiomatic Ruby programming 2. Introduce you to important technologies and libraries used in service-oriented architecture, including parsing XML using XPath expressions and calling RESTful APIs of a remote service 3. Get you accustomed to reading both RSpec code and Ruby app code. Generally useful documentation pointers, in addition to those specific to this assignment scattered throughout the handout: Nokogiri docs: Docs for Ruby libraries Net::HTTP, URI, CGI: # Background: The Oracle of Bacon The [Oracle of Bacon]() is a fanciful website maintained by Berkeley alumnus Patrick Reynolds. You enter the names of two actors (if you leave either one blank, it defaults to Kevin Bacon) and it computes the number of links or degrees of separation ("Bacon number") between the two actors, using information from the Internet Movie Database (IMDb). A "link" is a movie that two actors have worked on together. For example, Sir Laurence Olivier has a Bacon number of 2: Laurence Olivier \_ Dracula (1979) / Frank Langella \_ Frost/Nixon (2008) / Kevin Bacon You can read this as: "Laurence Olivier starred in Dracula with Frank Langella; Frank Langella starred in Frost/Nixon with Kevin Bacon." The website also has a RESTful XML API that returns raw XML documents rather than complete Web pages. We will use this API in this assignment. We've provided a code skeleton and a reasonable (but not exhaustive) set of specs for this assignment. The assignment has 4 parts; each part has its own specs in a `describe` group. Initially, all specs are marked `:pending => true` so you don't get a rash of failing tests when you start the assignment; when you start work on any one part of the assignment, remove the pending option from the describe block, watch the group of tests fail, and then start writing the code to make them pass. (This is a crude version of the Test-Driven Development methodology we embrace later in the course; in the full version of TDD, you will write your own tests one at a time, watching each one fail and then creating the code to make it pass.) # Part 0: Background (no submission needed) You can experiment with the XML API at [this test page](), but you will need to provide an API key. The key provided for using the API in this course is in the picture below, to avoid having it indexed by search engines:
![Image of API key](oob_api_key.png) *Please respect the Oracle's maintainers by not using this key for any

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture