Git Product home page Git Product logo

jetfuel's Introduction

Jet Fuel

Abstract

In this project you'll build a URL shortener service.

This version is a little bit different than what we do in Module 2 these days:

  • You can use Rails and ActiveRecord instead of Sinatra and Sequel
  • We're skipping authentication and authorization: We won't be implementing the idea of registered users
  • You don't have to worry about deployment
  • You must use Hound
    • Set up your repository
    • Visit the Hound site and activate Hound for your repository
    • Work on new features in a branch
    • When you're ready to merge it into master, open a pull request on your respository
    • Address Hound's comments (they should be folded up when you update make new commits that affect that line)
    • Merge in your pull request into master when you make all of your commits
  • Most of the extensions are now base requirements. 😜

Your application will allow users to provide long, ugly URLs and create shortened URLs through your service.

The main goal of your application is to redirect a request at the shortened URL to their long URL equivalent.

Your secondary goal is to track URL usage and provide popularity statistics.

Base Expectations

Given that I am an anonymous user of the system
When I visit the site
And give a URL to the service
Then I expect it to return a service shortened URL

Given that I am an anonymous user of the system
When I follow a service shortened URL
Then I expect to be redirected to the original URL

Given that I am an anonymous user of the sytem
When I visit the site
Then I expect to see URLs sorted by popularity
And I expect to see URLs sorted by how recently they were added

API

Create a Ruby gem that uses your API

$ gem install --local jetfuel-0.0.1.gem
$ jf = JetFuel.new 'http://SERVER', 'IDENTIFIER', 'API_KEY'
$ jf.shorten "http://jumpstartlab.com"
=> "http://SERVER/AFGAD"

Statistics

Provide additional statistics on the main page of your application, a user's page of shortened URLS, and indivudal URL pages.

Given that I am an anonymous user of the system
When I visit the site
And click to sort by popularity
Then I expect to see a list of generated links sorted by popularity

Filtering

Given that I am an anonymous user of the system
When I visit the site
And type into the search field
Then I expect to only see a list of generated links that contain my search query

This should be done using jQuery.

Titles

Having just a big table of URLs (shortened and unshortened) is going to get unweidly fast.

Ideally, it would be cool if we could use Faraday to fetch the title of the page. This probably shouldn't happen in the controller, though, right?

Create a background worker that fetches the title of the webpage and saves it to the model.

Evaluation

Application

  • Does the application meet the expectations defined above?

Code Clarity

  • Is the application consistent with other Rails applications you have written or seen?
  • Are the files of the application laid out in a logical manner?
  • Does the code within each file directly relate to the name of the file and location within the application?
  • Is the code clearly laid out within the class?
  • Does each method accomplish their intended task or do they do more than their intended?

Models

  • Are the shortened urls generated within the Url model or within a class method?

Controller Code

  • Does each controller handle a single operation?
  • Are there a small number of instance variables defined?
  • Could multiple of the instance variables be represented with a singular concept/object?

View

  • Are the views well formatted?
  • Are the views broken into appropriate sub-view templates?
  • Are the views free of complicated code and conditional logic?

Tests

  • Are all aspects of the application well-tested?
  • Do the tests run? Are there failures?
  • Are the tests within the test file directly related to the file they are testing?
  • Is it clear what code is under test?
  • Is it clear what scenario is being tested?
  • Is it clear the expected results of the scenario?
  • Is there a lot of repetition of setup/teardown in the tests?

jetfuel's People

Contributors

bayendor avatar

Watchers

Steve Kinney 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.