https://rhok-n-the-joint.herokuapp.com
gem install bundler
bundle install
shotgun app.rb
. Your server will now be listening on http://localhost:9393
docker build ./
docker run --rm -p 9393:9393 <container id>
This project uses Sinatra, a micro framework for Ruby.
Code that is in public/
will automatically be served as static assets from the root path
public/example.html
will be served from http://localhost:9393/example.html
public/js/app.js
will be served from http://localhost:9393/js/app.js
Insert binding.pry
into your code and exection will stop here. You can then inspect the window running the server and interactively debug.
We have tests! Run the test suite using ruby test/responses_test.rb
This request will return an inflammatory diagnosis.
{
"questions":[
{
"id":1,
"description":"Age",
"answers":[
{"id":null, "value":35}
]
},
{
"id":2,
"description":"Sex",
"answers":[
{"id":1, "value":"female"}
]
},
{
"id":3,
"description":"Onset of symptoms",
"answers":[
{"id":1, "value":"> 1 month"}
]
},
{
"id":4,
"description":"Regularity of symptoms",
"answers":[
{"id":1, "value":"intermittent"}
]
},
{
"id":5,
"description":"Morning pain or stiffness",
"answers":[
{"id":3, "value":"> 60 mins"}
]
},
{
"id":6,
"description":"Articulations of the upper limb",
"answers":[
{"id":1, "value":"Elbow joint articulations"},
{"id":2, "value":"Radio ulnar articulations"},
{"id":3, "value":"Carpometacarpal articulations"},
{"id":4, "value":"Metacarpophalangeal articulations"},
{"id":5, "value":"Articulations of the digits"}
]
}
]
}
This request will return an inflammatory diagnosis.
{
"questions":[
{
"id":1,
"description":"Age",
"answers":[
{"id":null, "value":55}
]
},
{
"id":2,
"description":"Sex",
"answers":[
{"id":1, "value":"male"}
]
},
{
"id":3,
"description":"Onset of symptoms",
"answers":[
{"id":1, "value":"> 3 months"}
]
},
{
"id":4,
"description":"Regularity of symptoms",
"answers":[
{"id":1, "value":"persistant"}
]
},
{
"id":5,
"description":"Morning pain or stiffness",
"answers":[
{"id":3, "value":"< 30 mins"}
]
},
{
"id":6,
"description":"Articulations of the upper limb",
"answers":[
{"id":5, "value":"Articulations of the digits"}
]
}
]
}
This request will return an mechanical diagnosis.
{
"questions":[
{
"id":1,
"description":"Age",
"answers":[
{"id":null, "value":28}
]
},
{
"id":2,
"description":"Sex",
"answers":[
{"id":1, "value":"female"}
]
},
{
"id":3,
"description":"Onset of symptoms",
"answers":[
{"id":1, "value":"> 1 month"}
]
},
{
"id":4,
"description":"Regularity of symptoms",
"answers":[
{"id":1, "value":"intermittent"}
]
},
{
"id":5,
"description":"Morning pain or stiffness",
"answers":[
{"id":3, "value":"> 60 mins"}
]
},
{
"id":6,
"description":"Articulations of the upper limb",
"answers":[]
}
]
}