Skip to content

amar47shah/record-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

record-parser

Command-line data parser with web API. Specification: http://reverb.com/page/dev-challenge

Command Line

$ bin/record-parser <instruction> <files>

  • Allowed instructions:
    • birth-date
    • gender-and-last-name
    • last-name-descending
  • Multiple files should be separated by a space: one.txt two.txt three.txt

API

  • Create a record from a new data line: POST /records
    • The parameter line represents the data line
    • Allowed formats:
      • LastName FirstName Gender FavoriteColor DateOfBirth
      • LastName, FirstName, Gender, FavoriteColor, DateOfBirth
      • LastName | FirstName | Gender | FavoriteColor | DateOfBirth
  • List sorted records as JSON:
    • GET /records/birthdate
    • GET /records/gender
    • GET /records/name

Assumptions

Setup

$ gem install bundler
$ bundle install

Testing

$ bundle exec cucumber
$ bundle exec rspec -fd

About

Command-line data parser. Specification: http://reverb.com/page/dev-challenge

Resources

Stars

Watchers

Forks

Packages

No packages published