Giter VIP home page Giter VIP logo

toy-asis's Introduction

toy-asis

Toy Author Status Inquiry System - A coding exercise for software developer candidates

Requirements

Setup Instructions

  • Clone the repo
  • Use RVM to switch to ruby 1.9.3
  • Install the bundle (bundler)
  • Seed the database rake db:setup - The database is populated with the following manuscript from db/seeds.rb via Mongoid.
      Manuscript.create(code: 'AA1001', title: 'My awesome paper', status: 'WITH_AUTHOR', :status_date => Date.parse('01Jan2014')) do |m|
        m.authors << Author.new(publish_name: 'Smith,Joe')
        m.authors << Author.new(publish_name: 'Li,Wen')
        m.authors << Author.new(publish_name: 'Jones,Ben')
      end
    

Specifications

We want to implement a simple author inquiry system for authors to view the status of their submitted manuscripts. Fix the link on the welcome page so that when clicked, the author sees a form that allows him/her to input a code and an author name. When submitted, if the name matches an acceptable author on the specified manuscript, they should be shown a page that displays the title, status, and authors of the manuscript. If the inputs are invalid, the form page should be re-rendered (inputs intact) with a "No match" message.

The specified author name must match the last name of one of the first 3 authors on the specified manuscript to be accepted.

The project already includes Manuscript and Author models. Use Manuscript.find_by_code and Author#last_name to implement the above.

Below are the specifications/rules for the name matching:

  • ignore surrounding whitespace and case
  • accept match on first 3 chars (e.g. Jon for Jones)
  • reject match on less than 3 chars (e.g. Jo for Jones)
  • accept exact match for 2 char author name (e.g. Li for Li)
  • reject exact match on 1 char author name
  • reject mismatch on chars beyond 3 (e.g. reject Jonis for Jones)

toy-asis's People

Contributors

lenny avatar dasibre avatar

Watchers

James Cloos avatar  avatar

Forkers

jnaadjie

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.