GithubHelp home page GithubHelp logo

ht-coding-exercise's Introduction

This coding exercise is used to gauge the level of Ruby on Rails experience for developer candidates.

Feel free to use Ruby Gems, Google, Stack Overflow, or any other resources available in a day-to-day working environment.

Setup

Fork this repository and checkout the code to your local development environment.

Run the Rake DB create and Migrate tasks:

bin/rake db:create db:migrate

Run RSpec to verify test suite is working:

rspec

Submission

When code complete; please submit a Pull Request to have your branch reviewed.

Coding Exercise

Task 1: Write a Rake task to import 311 case data into a SQL database. The rake task should run everyday at 12:00am and import all new cases since last run.

We use MySQL, so this project is setup accordingly, but if you're more comfortable with Postgres, you can change the DB config.

Example usage of 311 case data API: https://data.sfgov.org/Service-Requests-311-/Case-Data-from-San-Francisco-311/vw6y-z8j6

Task 2: Implement JSON API endpoints to view and filter 311 case data for the following scenarios.

GET /cases.json
# Returns all cases

GET /cases.json?since=1398465719
# Returns cases opened since UNIX timestamp 1398465719

GET /cases.json?status=open
# Returns cases that are in open state.

GET /cases.json?category=General%20Requests
# Returns cases that belong to "General Requests" category

GET /cases.json?near=37.77,-122.48
# Returns cases that were created within 5 mile radius of lat=37.77 and lng=-122.48

GET /cases.json?near=37.77,-122.48&status=open&category=General%20Requests
# API endpoint should be able to take any combination of GET params.

Task 3: Include test/specs for Rake task and API.

ht-coding-exercise's People

Contributors

mikeotoole avatar rubymerchant 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.