crunchysoul / code-test-2016-cultureamp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Culture Amp Code Test by Fred Wu

Prerequisite

  • ruby 2.2+
  • bundler
bundle install

Usage

./bin/survey-tool --help

Example usage:
    -s, --survey FILE                Survey data input file
    -r, --responses FILE             Responses data input file
./bin/survey-tool -s example-data/survey-1.csv -r example-data/survey-1-responses.csv

Application Architecture

    +----------------------------+
    |             CLI            |
    +--------------+-------------+
                   |
+------------------v-----------------+
|              Workflow              |
+------------------------------------+
|   +----------------------------+   |
|   |         Transformer        |   | <- Transforms text input for consumption.
|   +--------------+-------------+   |
|                  |                 |
|   +--------------v-------------+   |
|   |          Producer          |   | <- Produces metrics.
|   +----------------------------+   |
|   |  +----------------------+  |   |
|   |  |        Models        |  |   | <- Domain models.
|   |  +----------------------+  |   |
|   |  |  +----------------+  |  |   |
|   |  |  |     Survey     |  |  |   |
|   |  |  +----------------+  |  |   |
|   |  |  +----------------+  |  |   |
|   |  |  | SurveyQuestion |  |  |   |
|   |  |  +----------------+  |  |   |
|   |  |  +----------------+  |  |   |
|   |  |  |    Response    |  |  |   |
|   |  |  +----------------+  |  |   |
|   |  +----------------------+  |   |
|   +--------------+-------------+   |
|                  |                 |
|   +--------------v-------------+   |
|   |          Presenter         |   | <- Presents metrics.
|   +----------------------------+   |
+------------------+-----------------+

Test Suite

Run all the tests

bundle exec rake

Run only Rubocop

bundle exec rake rubocop

Run only spec

bundle exec rake spec

Author

About


Languages

Language:Ruby 100.0%