poptart 0.0.13 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/lib/poptart.rb +1 -4
  4. data/lib/poptart/link.rb +9 -0
  5. data/lib/poptart/model.rb +13 -29
  6. data/lib/poptart/question.rb +21 -17
  7. data/lib/poptart/root.rb +10 -1
  8. data/lib/poptart/survey.rb +34 -7
  9. data/lib/poptart/survey_question.rb +32 -12
  10. data/lib/poptart/user.rb +4 -21
  11. data/lib/version.rb +1 -1
  12. data/poptart.gemspec +0 -4
  13. data/spec/lib/poptart/model_spec.rb +95 -0
  14. data/spec/lib/poptart/question_spec.rb +47 -0
  15. data/spec/lib/poptart/root_spec.rb +50 -0
  16. data/spec/lib/poptart/survey_question_spec.rb +166 -0
  17. data/spec/lib/poptart/survey_spec.rb +105 -0
  18. data/spec/lib/poptart/user_spec.rb +45 -0
  19. data/spec/requests/questions_spec.rb +31 -0
  20. data/spec/requests/survey_questions_spec.rb +150 -0
  21. data/spec/requests/surveys_spec.rb +34 -5
  22. data/spec/requests/{user_management_spec.rb → users_spec.rb} +5 -5
  23. data/spec/spec_helper.rb +1 -4
  24. data/spec/vcr/answering/survey_questions_answers_a_multiple_choice_question.yml +1527 -1596
  25. data/spec/vcr/answering/survey_questions_answers_a_survey_question.yml +2942 -2035
  26. data/spec/vcr/answering/survey_questions_creates_and_returns_a_random_question_survey.yml +254 -70
  27. data/spec/vcr/answering/survey_questions_creates_and_returns_an_empty_survey.yml +110 -48
  28. data/spec/vcr/answering/survey_questions_finds_survey_question_for_id.yml +1618 -286
  29. data/spec/vcr/poptart/survey/adds_a_question_to_a_survey.yml +1939 -0
  30. data/spec/vcr/poptart/survey/creates_a_random_survey.yml +318 -0
  31. data/spec/vcr/poptart/survey/creates_an_empty_survey.yml +702 -0
  32. data/spec/vcr/poptart/survey/returns_a_survey_by_id.yml +618 -0
  33. data/spec/vcr/poptart/user/creates_a_user.yml +179 -0
  34. data/spec/vcr/{user/management_creates_a_user.yml → poptart/user/returns_a_user.yml} +72 -69
  35. data/spec/vcr/questions/creates_a_question.yml +186 -0
  36. data/spec/vcr/questions/finds_a_question_by_id.yml +326 -0
  37. data/spec/vcr/questions/finds_a_question_by_key.yml +144 -0
  38. data/spec/vcr/questions/returns_all_answered_survey_questions_for_a_question.yml +1021 -0
  39. data/spec/vcr/retrieving/answers_returns_all_answered_survey_questions_for_a_question.yml +533 -479
  40. data/spec/vcr/survey/questions_answers_a_multiple_choice_question.yml +1454 -0
  41. data/spec/vcr/survey/questions_answers_a_survey_question.yml +1772 -0
  42. data/spec/vcr/survey/questions_creates_and_returns_an_empty_survey.yml +372 -0
  43. data/spec/vcr/survey/questions_finds_survey_question_for_id.yml +3083 -0
  44. data/spec/vcr/survey/questions_returns_all_answered_survey_questions_for_a_question.yml +5756 -0
  45. data/spec/vcr/survey/questions_returns_all_answered_survey_questions_for_a_question_by_key.yml +973 -0
  46. data/spec/vcr/survey/questions_returns_all_answered_survey_questions_for_a_survey.yml +620 -0
  47. metadata +55 -72
  48. data/lib/poptart/boolean_question.rb +0 -14
  49. data/lib/poptart/multiple_response_question.rb +0 -9
  50. data/lib/poptart/range_question.rb +0 -9
  51. data/lib/poptart/time_question.rb +0 -9
  52. data/spec/requests/answering_survey_questions_spec.rb +0 -79
  53. data/spec/requests/answers_spec.rb +0 -45
  54. data/spec/requests/creating_questions_spec.rb +0 -30
@@ -708,291 +708,6 @@ http_interactions:
708
708
  + noMatchText;\n }\n }\n }\n\n setupMatchPaths();\n setupRouteToggleHelperLinks();\n</script>\n\n</div>\n\n\n</body>\n</html>\n"
709
709
  http_version:
710
710
  recorded_at: Sun, 14 Sep 2014 16:59:38 GMT
711
- - request:
712
- method: get
713
- uri: http://localhost:3000/
714
- body:
715
- encoding: US-ASCII
716
- string: ''
717
- headers:
718
- User-Agent:
719
- - Faraday v0.9.0
720
- Content-Type:
721
- - application/json
722
- Api-Token:
723
- - testing
724
- Accept-Encoding:
725
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
726
- Accept:
727
- - "*/*"
728
- response:
729
- status:
730
- code: 500
731
- message: 'Internal Server Error '
732
- headers:
733
- Content-Type:
734
- - text/html; charset=utf-8
735
- Content-Length:
736
- - '21264'
737
- X-Request-Id:
738
- - 894934d0-06cf-402a-b696-f05c663e36a1
739
- X-Runtime:
740
- - '0.027140'
741
- Server:
742
- - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
743
- Date:
744
- - Sat, 04 Oct 2014 15:25:47 GMT
745
- Connection:
746
- - Keep-Alive
747
- body:
748
- encoding: UTF-8
749
- string: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\"
750
- />\n <title>Action Controller: Exception caught</title>\n <style>\n body
751
- {\n background-color: #FAFAFA;\n color: #333;\n margin: 0px;\n
752
- \ }\n\n body, p, ol, ul, td {\n font-family: helvetica, verdana,
753
- arial, sans-serif;\n font-size: 13px;\n line-height: 18px;\n }\n\n
754
- \ pre {\n font-size: 11px;\n white-space: pre-wrap;\n }\n\n
755
- \ pre.box {\n border: 1px solid #EEE;\n padding: 10px;\n margin:
756
- 0px;\n width: 958px;\n }\n\n header {\n color: #F0F0F0;\n
757
- \ background: #C52F24;\n padding: 0.5em 1.5em;\n }\n\n h1 {\n
758
- \ margin: 0.2em 0;\n line-height: 1.1em;\n font-size: 2em;\n
759
- \ }\n\n h2 {\n color: #C52F24;\n line-height: 25px;\n }\n\n
760
- \ .details {\n border: 1px solid #D0D0D0;\n border-radius: 4px;\n
761
- \ margin: 1em 0px;\n display: block;\n width: 978px;\n }\n\n
762
- \ .summary {\n padding: 8px 15px;\n border-bottom: 1px solid #D0D0D0;\n
763
- \ display: block;\n }\n\n .details pre {\n margin: 5px;\n border:
764
- none;\n }\n\n #container {\n box-sizing: border-box;\n width:
765
- 100%;\n padding: 0 1.5em;\n }\n\n .source * {\n margin: 0px;\n
766
- \ padding: 0px;\n }\n\n .source {\n border: 1px solid #D9D9D9;\n
767
- \ background: #ECECEC;\n width: 978px;\n }\n\n .source pre
768
- {\n padding: 10px 0px;\n border: none;\n }\n\n .source .data
769
- {\n font-size: 80%;\n overflow: auto;\n background-color: #FFF;\n
770
- \ }\n\n .info {\n padding: 0.5em;\n }\n\n .source .data .line_numbers
771
- {\n background-color: #ECECEC;\n color: #AAA;\n padding: 1em
772
- .5em;\n border-right: 1px solid #DDD;\n text-align: right;\n }\n\n
773
- \ .line {\n padding-left: 10px;\n }\n\n .line:hover {\n background-color:
774
- #F6F6F6;\n }\n\n .line.active {\n background-color: #FFCCCC;\n
775
- \ }\n\n a { color: #980905; }\n a:visited { color: #666; }\n a:hover
776
- { color: #C52F24; }\n\n \n </style>\n\n <script>\n var toggle = function(id)
777
- {\n var s = document.getElementById(id).style;\n s.display = s.display
778
- == 'none' ? 'block' : 'none';\n return false;\n }\n var show =
779
- function(id) {\n document.getElementById(id).style.display = 'block';\n
780
- \ }\n var hide = function(id) {\n document.getElementById(id).style.display
781
- = 'none';\n }\n var toggleTrace = function() {\n return toggle('blame_trace');\n
782
- \ }\n var toggleSessionDump = function() {\n return toggle('session_dump');\n
783
- \ }\n var toggleEnvDump = function() {\n return toggle('env_dump');\n
784
- \ }\n </script>\n</head>\n<body>\n\n<header>\n <h1>\n NameError\n in
785
- Api::V1::RootController#index\n </h1>\n</header>\n\n<div id=\"container\">\n
786
- \ <h2>undefined local variable or method `api_questions_answers_url&#39; for
787
- #&lt;Api::V1::RootSerializer:0x007fe583f4c228&gt;</h2>\n\n <div class=\"source\">\n<div
788
- class=\"info\">\n Extracted source (around line <strong>#21</strong>):\n</div>\n<div
789
- class=\"data\">\n <table cellpadding=\"0\" cellspacing=\"0\" class=\"lines\">\n
790
- \ <tr>\n <td>\n <pre class=\"line_numbers\">\n<span>19</span>\n<span>20</span>\n<span>21</span>\n<span>22</span>\n<span>23</span>\n<span>24</span>\n
791
- \ </pre>\n </td>\n<td width=\"100%\">\n<pre>\n<div class=\"line\">
792
- \ },\n</div><div class=\"line\"> answers: {\n</div><div class=\"line
793
- active\"> href: api_questions_answers_url\n</div><div class=\"line\">
794
- \ }\n</div><div class=\"line\"> }\n</div><div class=\"line\"> end\n</div>\n</pre>\n</td>\n
795
- \ </tr>\n </table>\n</div>\n</div>\n\n \n<p><code>Rails.root: /Users/austenito/repos/happiness/happiness_service</code></p>\n\n<div
796
- id=\"traces\">\n <a href=\"#\" onclick=\"hide(&#39;Framework-Trace&#39;);hide(&#39;Full-Trace&#39;);show(&#39;Application-Trace&#39;);;
797
- return false;\">Application Trace</a> |\n <a href=\"#\" onclick=\"hide(&#39;Application-Trace&#39;);hide(&#39;Full-Trace&#39;);show(&#39;Framework-Trace&#39;);;
798
- return false;\">Framework Trace</a> |\n <a href=\"#\" onclick=\"hide(&#39;Application-Trace&#39;);hide(&#39;Framework-Trace&#39;);show(&#39;Full-Trace&#39;);;
799
- return false;\">Full Trace</a> \n\n <div id=\"Application-Trace\" style=\"display:
800
- block;\">\n <pre><code>app/serializers/api/v1/root_serializer.rb:21:in
801
- `_links&#39;\napp/controllers/api/v1/root_controller.rb:5:in `index&#39;</code></pre>\n
802
- \ </div>\n <div id=\"Framework-Trace\" style=\"display: none;\">\n <pre><code>(eval):3:in
803
- `_fast_attributes&#39;\nactive_model_serializers (0.8.1) lib/active_model/serializer.rb:466:in
804
- `rescue in attributes&#39;\nactive_model_serializers (0.8.1) lib/active_model/serializer.rb:454:in
805
- `attributes&#39;\nactive_model_serializers (0.8.1) lib/active_model/serializer.rb:478:in
806
- `_serializable_hash&#39;\nactive_model_serializers (0.8.1) lib/active_model/serializer.rb:360:in
807
- `serializable_hash&#39;\nactive_model_serializers (0.8.1) lib/active_model/serializer.rb:348:in
808
- `as_json&#39;\nactivesupport (4.0.4) lib/active_support/json/encoding.rb:50:in
809
- `block in encode&#39;\nactivesupport (4.0.4) lib/active_support/json/encoding.rb:81:in
810
- `check_for_circular_references&#39;\nactivesupport (4.0.4) lib/active_support/json/encoding.rb:49:in
811
- `encode&#39;\nactivesupport (4.0.4) lib/active_support/json/encoding.rb:34:in
812
- `encode&#39;\nactivesupport (4.0.4) lib/active_support/core_ext/object/to_json.rb:16:in
813
- `to_json&#39;\nactive_model_serializers (0.8.1) lib/active_model/serializer.rb:333:in
814
- `to_json&#39;\nactionpack (4.0.4) lib/action_controller/metal/renderers.rb:90:in
815
- `block in &lt;module:Renderers&gt;&#39;\nactive_model_serializers (0.8.1)
816
- lib/action_controller/serialization.rb:46:in `_render_option_json&#39;\nactionpack
817
- (4.0.4) lib/action_controller/metal/renderers.rb:33:in `block in _handle_render_options&#39;\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/set.rb:263:in
818
- `each_key&#39;\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/set.rb:263:in
819
- `each&#39;\nactionpack (4.0.4) lib/action_controller/metal/renderers.rb:30:in
820
- `_handle_render_options&#39;\nactionpack (4.0.4) lib/action_controller/metal/renderers.rb:26:in
821
- `render_to_body&#39;\nactionpack (4.0.4) lib/abstract_controller/rendering.rb:97:in
822
- `render&#39;\nactionpack (4.0.4) lib/action_controller/metal/rendering.rb:16:in
823
- `render&#39;\nactionpack (4.0.4) lib/action_controller/metal/instrumentation.rb:41:in
824
- `block (2 levels) in render&#39;\nactivesupport (4.0.4) lib/active_support/core_ext/benchmark.rb:12:in
825
- `block in ms&#39;\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/benchmark.rb:294:in
826
- `realtime&#39;\nactivesupport (4.0.4) lib/active_support/core_ext/benchmark.rb:12:in
827
- `ms&#39;\nactionpack (4.0.4) lib/action_controller/metal/instrumentation.rb:41:in
828
- `block in render&#39;\nactionpack (4.0.4) lib/action_controller/metal/instrumentation.rb:84:in
829
- `cleanup_view_runtime&#39;\nactiverecord (4.0.4) lib/active_record/railties/controller_runtime.rb:25:in
830
- `cleanup_view_runtime&#39;\nactionpack (4.0.4) lib/action_controller/metal/instrumentation.rb:40:in
831
- `render&#39;\nactionpack (4.0.4) lib/action_controller/metal/responder.rb:255:in
832
- `display&#39;\nactionpack (4.0.4) lib/action_controller/metal/responder.rb:203:in
833
- `api_behavior&#39;\nactionpack (4.0.4) lib/action_controller/metal/responder.rb:182:in
834
- `rescue in to_format&#39;\nactionpack (4.0.4) lib/action_controller/metal/responder.rb:176:in
835
- `to_format&#39;\nactionpack (4.0.4) lib/action_controller/metal/responder.rb:154:in
836
- `respond&#39;\nactionpack (4.0.4) lib/action_controller/metal/responder.rb:147:in
837
- `call&#39;\nactionpack (4.0.4) lib/action_controller/metal/mime_responds.rb:330:in
838
- `respond_with&#39;\nactionpack (4.0.4) lib/action_controller/metal/implicit_render.rb:4:in
839
- `send_action&#39;\nactionpack (4.0.4) lib/abstract_controller/base.rb:189:in
840
- `process_action&#39;\nactionpack (4.0.4) lib/action_controller/metal/rendering.rb:10:in
841
- `process_action&#39;\nactionpack (4.0.4) lib/abstract_controller/callbacks.rb:18:in
842
- `block in process_action&#39;\nactivesupport (4.0.4) lib/active_support/callbacks.rb:383:in
843
- `_run__552417660275114359__process_action__callbacks&#39;\nactivesupport (4.0.4)
844
- lib/active_support/callbacks.rb:80:in `run_callbacks&#39;\nactionpack (4.0.4)
845
- lib/abstract_controller/callbacks.rb:17:in `process_action&#39;\nactionpack
846
- (4.0.4) lib/action_controller/metal/rescue.rb:29:in `process_action&#39;\nactionpack
847
- (4.0.4) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action&#39;\nactivesupport
848
- (4.0.4) lib/active_support/notifications.rb:159:in `block in instrument&#39;\nactivesupport
849
- (4.0.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument&#39;\nactivesupport
850
- (4.0.4) lib/active_support/notifications.rb:159:in `instrument&#39;\nactionpack
851
- (4.0.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action&#39;\nactiverecord
852
- (4.0.4) lib/active_record/railties/controller_runtime.rb:18:in `process_action&#39;\nactionpack
853
- (4.0.4) lib/abstract_controller/base.rb:136:in `process&#39;\nactionpack (4.0.4)
854
- lib/abstract_controller/rendering.rb:44:in `process&#39;\nactionpack (4.0.4)
855
- lib/action_controller/metal.rb:195:in `dispatch&#39;\nactionpack (4.0.4) lib/action_controller/metal/rack_delegation.rb:13:in
856
- `dispatch&#39;\nactionpack (4.0.4) lib/action_controller/metal.rb:231:in `block
857
- in action&#39;\nactionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:80:in
858
- `call&#39;\nactionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:80:in
859
- `dispatch&#39;\nactionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:48:in
860
- `call&#39;\nactionpack (4.0.4) lib/action_dispatch/journey/router.rb:71:in
861
- `block in call&#39;\nactionpack (4.0.4) lib/action_dispatch/journey/router.rb:59:in
862
- `each&#39;\nactionpack (4.0.4) lib/action_dispatch/journey/router.rb:59:in
863
- `call&#39;\nactionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:674:in
864
- `call&#39;\nrack (1.5.2) lib/rack/etag.rb:23:in `call&#39;\nrack (1.5.2) lib/rack/conditionalget.rb:25:in
865
- `call&#39;\nrack (1.5.2) lib/rack/head.rb:11:in `call&#39;\nactionpack (4.0.4)
866
- lib/action_dispatch/middleware/params_parser.rb:27:in `call&#39;\nactiverecord
867
- (4.0.4) lib/active_record/query_cache.rb:36:in `call&#39;\nactiverecord (4.0.4)
868
- lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call&#39;\nactiverecord
869
- (4.0.4) lib/active_record/migration.rb:373:in `call&#39;\nactionpack (4.0.4)
870
- lib/action_dispatch/middleware/callbacks.rb:29:in `block in call&#39;\nactivesupport
871
- (4.0.4) lib/active_support/callbacks.rb:373:in `_run__2270658051568218024__call__callbacks&#39;\nactivesupport
872
- (4.0.4) lib/active_support/callbacks.rb:80:in `run_callbacks&#39;\nactionpack
873
- (4.0.4) lib/action_dispatch/middleware/callbacks.rb:27:in `call&#39;\nactionpack
874
- (4.0.4) lib/action_dispatch/middleware/reloader.rb:64:in `call&#39;\nactionpack
875
- (4.0.4) lib/action_dispatch/middleware/remote_ip.rb:76:in `call&#39;\nactionpack
876
- (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call&#39;\nactionpack
877
- (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call&#39;\nrailties
878
- (4.0.4) lib/rails/rack/logger.rb:38:in `call_app&#39;\nrailties (4.0.4) lib/rails/rack/logger.rb:20:in
879
- `block in call&#39;\nactivesupport (4.0.4) lib/active_support/tagged_logging.rb:68:in
880
- `block in tagged&#39;\nactivesupport (4.0.4) lib/active_support/tagged_logging.rb:26:in
881
- `tagged&#39;\nactivesupport (4.0.4) lib/active_support/tagged_logging.rb:68:in
882
- `tagged&#39;\nrailties (4.0.4) lib/rails/rack/logger.rb:20:in `call&#39;\nactionpack
883
- (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in `call&#39;\nrack
884
- (1.5.2) lib/rack/runtime.rb:17:in `call&#39;\nactivesupport (4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in
885
- `call&#39;\nrack (1.5.2) lib/rack/lock.rb:17:in `call&#39;\nactionpack (4.0.4)
886
- lib/action_dispatch/middleware/static.rb:64:in `call&#39;\nrailties (4.0.4)
887
- lib/rails/engine.rb:511:in `call&#39;\nrailties (4.0.4) lib/rails/application.rb:97:in
888
- `call&#39;\nrack (1.5.2) lib/rack/lock.rb:17:in `call&#39;\nrack (1.5.2) lib/rack/content_length.rb:14:in
889
- `call&#39;\nrack (1.5.2) lib/rack/handler/webrick.rb:60:in `service&#39;\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
890
- `service&#39;\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
891
- `run&#39;\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in
892
- `block in start_thread&#39;</code></pre>\n </div>\n <div id=\"Full-Trace\"
893
- style=\"display: none;\">\n <pre><code>app/serializers/api/v1/root_serializer.rb:21:in
894
- `_links&#39;\n(eval):3:in `_fast_attributes&#39;\nactive_model_serializers
895
- (0.8.1) lib/active_model/serializer.rb:466:in `rescue in attributes&#39;\nactive_model_serializers
896
- (0.8.1) lib/active_model/serializer.rb:454:in `attributes&#39;\nactive_model_serializers
897
- (0.8.1) lib/active_model/serializer.rb:478:in `_serializable_hash&#39;\nactive_model_serializers
898
- (0.8.1) lib/active_model/serializer.rb:360:in `serializable_hash&#39;\nactive_model_serializers
899
- (0.8.1) lib/active_model/serializer.rb:348:in `as_json&#39;\nactivesupport
900
- (4.0.4) lib/active_support/json/encoding.rb:50:in `block in encode&#39;\nactivesupport
901
- (4.0.4) lib/active_support/json/encoding.rb:81:in `check_for_circular_references&#39;\nactivesupport
902
- (4.0.4) lib/active_support/json/encoding.rb:49:in `encode&#39;\nactivesupport
903
- (4.0.4) lib/active_support/json/encoding.rb:34:in `encode&#39;\nactivesupport
904
- (4.0.4) lib/active_support/core_ext/object/to_json.rb:16:in `to_json&#39;\nactive_model_serializers
905
- (0.8.1) lib/active_model/serializer.rb:333:in `to_json&#39;\nactionpack (4.0.4)
906
- lib/action_controller/metal/renderers.rb:90:in `block in &lt;module:Renderers&gt;&#39;\nactive_model_serializers
907
- (0.8.1) lib/action_controller/serialization.rb:46:in `_render_option_json&#39;\nactionpack
908
- (4.0.4) lib/action_controller/metal/renderers.rb:33:in `block in _handle_render_options&#39;\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/set.rb:263:in
909
- `each_key&#39;\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/set.rb:263:in
910
- `each&#39;\nactionpack (4.0.4) lib/action_controller/metal/renderers.rb:30:in
911
- `_handle_render_options&#39;\nactionpack (4.0.4) lib/action_controller/metal/renderers.rb:26:in
912
- `render_to_body&#39;\nactionpack (4.0.4) lib/abstract_controller/rendering.rb:97:in
913
- `render&#39;\nactionpack (4.0.4) lib/action_controller/metal/rendering.rb:16:in
914
- `render&#39;\nactionpack (4.0.4) lib/action_controller/metal/instrumentation.rb:41:in
915
- `block (2 levels) in render&#39;\nactivesupport (4.0.4) lib/active_support/core_ext/benchmark.rb:12:in
916
- `block in ms&#39;\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/benchmark.rb:294:in
917
- `realtime&#39;\nactivesupport (4.0.4) lib/active_support/core_ext/benchmark.rb:12:in
918
- `ms&#39;\nactionpack (4.0.4) lib/action_controller/metal/instrumentation.rb:41:in
919
- `block in render&#39;\nactionpack (4.0.4) lib/action_controller/metal/instrumentation.rb:84:in
920
- `cleanup_view_runtime&#39;\nactiverecord (4.0.4) lib/active_record/railties/controller_runtime.rb:25:in
921
- `cleanup_view_runtime&#39;\nactionpack (4.0.4) lib/action_controller/metal/instrumentation.rb:40:in
922
- `render&#39;\nactionpack (4.0.4) lib/action_controller/metal/responder.rb:255:in
923
- `display&#39;\nactionpack (4.0.4) lib/action_controller/metal/responder.rb:203:in
924
- `api_behavior&#39;\nactionpack (4.0.4) lib/action_controller/metal/responder.rb:182:in
925
- `rescue in to_format&#39;\nactionpack (4.0.4) lib/action_controller/metal/responder.rb:176:in
926
- `to_format&#39;\nactionpack (4.0.4) lib/action_controller/metal/responder.rb:154:in
927
- `respond&#39;\nactionpack (4.0.4) lib/action_controller/metal/responder.rb:147:in
928
- `call&#39;\nactionpack (4.0.4) lib/action_controller/metal/mime_responds.rb:330:in
929
- `respond_with&#39;\napp/controllers/api/v1/root_controller.rb:5:in `index&#39;\nactionpack
930
- (4.0.4) lib/action_controller/metal/implicit_render.rb:4:in `send_action&#39;\nactionpack
931
- (4.0.4) lib/abstract_controller/base.rb:189:in `process_action&#39;\nactionpack
932
- (4.0.4) lib/action_controller/metal/rendering.rb:10:in `process_action&#39;\nactionpack
933
- (4.0.4) lib/abstract_controller/callbacks.rb:18:in `block in process_action&#39;\nactivesupport
934
- (4.0.4) lib/active_support/callbacks.rb:383:in `_run__552417660275114359__process_action__callbacks&#39;\nactivesupport
935
- (4.0.4) lib/active_support/callbacks.rb:80:in `run_callbacks&#39;\nactionpack
936
- (4.0.4) lib/abstract_controller/callbacks.rb:17:in `process_action&#39;\nactionpack
937
- (4.0.4) lib/action_controller/metal/rescue.rb:29:in `process_action&#39;\nactionpack
938
- (4.0.4) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action&#39;\nactivesupport
939
- (4.0.4) lib/active_support/notifications.rb:159:in `block in instrument&#39;\nactivesupport
940
- (4.0.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument&#39;\nactivesupport
941
- (4.0.4) lib/active_support/notifications.rb:159:in `instrument&#39;\nactionpack
942
- (4.0.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action&#39;\nactiverecord
943
- (4.0.4) lib/active_record/railties/controller_runtime.rb:18:in `process_action&#39;\nactionpack
944
- (4.0.4) lib/abstract_controller/base.rb:136:in `process&#39;\nactionpack (4.0.4)
945
- lib/abstract_controller/rendering.rb:44:in `process&#39;\nactionpack (4.0.4)
946
- lib/action_controller/metal.rb:195:in `dispatch&#39;\nactionpack (4.0.4) lib/action_controller/metal/rack_delegation.rb:13:in
947
- `dispatch&#39;\nactionpack (4.0.4) lib/action_controller/metal.rb:231:in `block
948
- in action&#39;\nactionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:80:in
949
- `call&#39;\nactionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:80:in
950
- `dispatch&#39;\nactionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:48:in
951
- `call&#39;\nactionpack (4.0.4) lib/action_dispatch/journey/router.rb:71:in
952
- `block in call&#39;\nactionpack (4.0.4) lib/action_dispatch/journey/router.rb:59:in
953
- `each&#39;\nactionpack (4.0.4) lib/action_dispatch/journey/router.rb:59:in
954
- `call&#39;\nactionpack (4.0.4) lib/action_dispatch/routing/route_set.rb:674:in
955
- `call&#39;\nrack (1.5.2) lib/rack/etag.rb:23:in `call&#39;\nrack (1.5.2) lib/rack/conditionalget.rb:25:in
956
- `call&#39;\nrack (1.5.2) lib/rack/head.rb:11:in `call&#39;\nactionpack (4.0.4)
957
- lib/action_dispatch/middleware/params_parser.rb:27:in `call&#39;\nactiverecord
958
- (4.0.4) lib/active_record/query_cache.rb:36:in `call&#39;\nactiverecord (4.0.4)
959
- lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call&#39;\nactiverecord
960
- (4.0.4) lib/active_record/migration.rb:373:in `call&#39;\nactionpack (4.0.4)
961
- lib/action_dispatch/middleware/callbacks.rb:29:in `block in call&#39;\nactivesupport
962
- (4.0.4) lib/active_support/callbacks.rb:373:in `_run__2270658051568218024__call__callbacks&#39;\nactivesupport
963
- (4.0.4) lib/active_support/callbacks.rb:80:in `run_callbacks&#39;\nactionpack
964
- (4.0.4) lib/action_dispatch/middleware/callbacks.rb:27:in `call&#39;\nactionpack
965
- (4.0.4) lib/action_dispatch/middleware/reloader.rb:64:in `call&#39;\nactionpack
966
- (4.0.4) lib/action_dispatch/middleware/remote_ip.rb:76:in `call&#39;\nactionpack
967
- (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call&#39;\nactionpack
968
- (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call&#39;\nrailties
969
- (4.0.4) lib/rails/rack/logger.rb:38:in `call_app&#39;\nrailties (4.0.4) lib/rails/rack/logger.rb:20:in
970
- `block in call&#39;\nactivesupport (4.0.4) lib/active_support/tagged_logging.rb:68:in
971
- `block in tagged&#39;\nactivesupport (4.0.4) lib/active_support/tagged_logging.rb:26:in
972
- `tagged&#39;\nactivesupport (4.0.4) lib/active_support/tagged_logging.rb:68:in
973
- `tagged&#39;\nrailties (4.0.4) lib/rails/rack/logger.rb:20:in `call&#39;\nactionpack
974
- (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in `call&#39;\nrack
975
- (1.5.2) lib/rack/runtime.rb:17:in `call&#39;\nactivesupport (4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in
976
- `call&#39;\nrack (1.5.2) lib/rack/lock.rb:17:in `call&#39;\nactionpack (4.0.4)
977
- lib/action_dispatch/middleware/static.rb:64:in `call&#39;\nrailties (4.0.4)
978
- lib/rails/engine.rb:511:in `call&#39;\nrailties (4.0.4) lib/rails/application.rb:97:in
979
- `call&#39;\nrack (1.5.2) lib/rack/lock.rb:17:in `call&#39;\nrack (1.5.2) lib/rack/content_length.rb:14:in
980
- `call&#39;\nrack (1.5.2) lib/rack/handler/webrick.rb:60:in `service&#39;\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
981
- `service&#39;\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
982
- `run&#39;\n/Users/austenito/.rubies/ruby-2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in
983
- `block in start_thread&#39;</code></pre>\n </div>\n</div>\n\n \n\n<h2
984
- style=\"margin-top: 30px\">Request</h2>\n<p><b>Parameters</b>:</p> <pre>None</pre>\n\n<div
985
- class=\"details\">\n <div class=\"summary\"><a href=\"#\" onclick=\"return
986
- toggleSessionDump()\">Toggle session dump</a></div>\n <div id=\"session_dump\"
987
- style=\"display:none\"><pre></pre></div>\n</div>\n\n<div class=\"details\">\n
988
- \ <div class=\"summary\"><a href=\"#\" onclick=\"return toggleEnvDump()\">Toggle
989
- env dump</a></div>\n <div id=\"env_dump\" style=\"display:none\"><pre>GATEWAY_INTERFACE:
990
- &quot;CGI/1.1&quot;\nHTTP_ACCEPT: &quot;*/*&quot;\nHTTP_ACCEPT_ENCODING: &quot;gzip;q=1.0,deflate;q=0.6,identity;q=0.3&quot;\nREMOTE_ADDR:
991
- &quot;127.0.0.1&quot;\nREMOTE_HOST: &quot;127.0.0.1&quot;\nSERVER_NAME: &quot;localhost&quot;\nSERVER_PROTOCOL:
992
- &quot;HTTP/1.1&quot;</pre></div>\n</div>\n\n<h2 style=\"margin-top: 30px\">Response</h2>\n<p><b>Headers</b>:</p>
993
- <pre>None</pre>\n\n</div>\n\n\n</body>\n</html>\n"
994
- http_version:
995
- recorded_at: Sat, 04 Oct 2014 15:25:47 GMT
996
711
  - request:
997
712
  method: post
998
713
  uri: http://localhost:3000/api/surveys/?query=random,true
@@ -2216,4 +1931,1621 @@ http_interactions:
2216
1931
  }
2217
1932
  http_version:
2218
1933
  recorded_at: Sat, 18 Oct 2014 17:30:43 GMT
2219
- recorded_with: VCR 2.6.0
1934
+ - request:
1935
+ method: get
1936
+ uri: http://localhost:3000/
1937
+ body:
1938
+ encoding: US-ASCII
1939
+ string: ''
1940
+ headers:
1941
+ User-Agent:
1942
+ - Faraday v0.9.0
1943
+ Content-Type:
1944
+ - application/json
1945
+ Api-Token:
1946
+ - testing
1947
+ Accept-Encoding:
1948
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
1949
+ Accept:
1950
+ - "*/*"
1951
+ response:
1952
+ status:
1953
+ code: 500
1954
+ message: 'Internal Server Error '
1955
+ headers:
1956
+ Content-Type:
1957
+ - text/html; charset=utf-8
1958
+ Content-Length:
1959
+ - '13174'
1960
+ X-Request-Id:
1961
+ - 57ed132b-a3d6-4c4e-a38e-476e855824c9
1962
+ X-Runtime:
1963
+ - '0.168001'
1964
+ Server:
1965
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
1966
+ Date:
1967
+ - Sat, 17 Jan 2015 13:45:54 GMT
1968
+ Connection:
1969
+ - Keep-Alive
1970
+ body:
1971
+ encoding: UTF-8
1972
+ string: "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\"
1973
+ />\n <title>Action Controller: Exception caught</title>\n <style>\n body
1974
+ {\n background-color: #FAFAFA;\n color: #333;\n margin: 0px;\n
1975
+ \ }\n\n body, p, ol, ul, td {\n font-family: helvetica, verdana,
1976
+ arial, sans-serif;\n font-size: 13px;\n line-height: 18px;\n }\n\n
1977
+ \ pre {\n font-size: 11px;\n white-space: pre-wrap;\n }\n\n
1978
+ \ pre.box {\n border: 1px solid #EEE;\n padding: 10px;\n margin:
1979
+ 0px;\n width: 958px;\n }\n\n header {\n color: #F0F0F0;\n
1980
+ \ background: #C52F24;\n padding: 0.5em 1.5em;\n }\n\n h1 {\n
1981
+ \ margin: 0.2em 0;\n line-height: 1.1em;\n font-size: 2em;\n
1982
+ \ }\n\n h2 {\n color: #C52F24;\n line-height: 25px;\n }\n\n
1983
+ \ .details {\n border: 1px solid #D0D0D0;\n border-radius: 4px;\n
1984
+ \ margin: 1em 0px;\n display: block;\n width: 978px;\n }\n\n
1985
+ \ .summary {\n padding: 8px 15px;\n border-bottom: 1px solid #D0D0D0;\n
1986
+ \ display: block;\n }\n\n .details pre {\n margin: 5px;\n border:
1987
+ none;\n }\n\n #container {\n box-sizing: border-box;\n width:
1988
+ 100%;\n padding: 0 1.5em;\n }\n\n .source * {\n margin: 0px;\n
1989
+ \ padding: 0px;\n }\n\n .source {\n border: 1px solid #D9D9D9;\n
1990
+ \ background: #ECECEC;\n width: 978px;\n }\n\n .source pre
1991
+ {\n padding: 10px 0px;\n border: none;\n }\n\n .source .data
1992
+ {\n font-size: 80%;\n overflow: auto;\n background-color: #FFF;\n
1993
+ \ }\n\n .info {\n padding: 0.5em;\n }\n\n .source .data .line_numbers
1994
+ {\n background-color: #ECECEC;\n color: #AAA;\n padding: 1em
1995
+ .5em;\n border-right: 1px solid #DDD;\n text-align: right;\n }\n\n
1996
+ \ .line {\n padding-left: 10px;\n }\n\n .line:hover {\n background-color:
1997
+ #F6F6F6;\n }\n\n .line.active {\n background-color: #FFCCCC;\n
1998
+ \ }\n\n a { color: #980905; }\n a:visited { color: #666; }\n a:hover
1999
+ { color: #C52F24; }\n\n \n </style>\n\n <script>\n var toggle = function(id)
2000
+ {\n var s = document.getElementById(id).style;\n s.display = s.display
2001
+ == 'none' ? 'block' : 'none';\n return false;\n }\n var show =
2002
+ function(id) {\n document.getElementById(id).style.display = 'block';\n
2003
+ \ }\n var hide = function(id) {\n document.getElementById(id).style.display
2004
+ = 'none';\n }\n var toggleTrace = function() {\n return toggle('blame_trace');\n
2005
+ \ }\n var toggleSessionDump = function() {\n return toggle('session_dump');\n
2006
+ \ }\n var toggleEnvDump = function() {\n return toggle('env_dump');\n
2007
+ \ }\n </script>\n</head>\n<body>\n\n<header>\n <h1>\n PG::ConnectionBad\n
2008
+ \ </h1>\n</header>\n\n<div id=\"container\">\n <h2>could not connect to server:
2009
+ No such file or directory\n\tIs the server running locally and accepting\n\tconnections
2010
+ on Unix domain socket &quot;/tmp/.s.PGSQL.5432&quot;?\n</h2>\n\n \n \n<p><code>Rails.root:
2011
+ /Users/austenito/repos/happiness/happiness_service</code></p>\n\n<div id=\"traces\">\n
2012
+ \ <a href=\"#\" onclick=\"hide(&#39;Framework-Trace&#39;);hide(&#39;Full-Trace&#39;);show(&#39;Application-Trace&#39;);;
2013
+ return false;\">Application Trace</a> |\n <a href=\"#\" onclick=\"hide(&#39;Application-Trace&#39;);hide(&#39;Full-Trace&#39;);show(&#39;Framework-Trace&#39;);;
2014
+ return false;\">Framework Trace</a> |\n <a href=\"#\" onclick=\"hide(&#39;Application-Trace&#39;);hide(&#39;Framework-Trace&#39;);show(&#39;Full-Trace&#39;);;
2015
+ return false;\">Full Trace</a> \n\n <div id=\"Application-Trace\" style=\"display:
2016
+ block;\">\n <pre><code></code></pre>\n </div>\n <div id=\"Framework-Trace\"
2017
+ style=\"display: none;\">\n <pre><code>activerecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:848:in
2018
+ `initialize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:848:in
2019
+ `new&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:848:in
2020
+ `connect&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:556:in
2021
+ `initialize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:41:in
2022
+ `new&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:41:in
2023
+ `postgresql_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in
2024
+ `new_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in
2025
+ `checkout_new_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in
2026
+ `acquire_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in
2027
+ `block in checkout&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in
2028
+ `mon_synchronize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in
2029
+ `checkout&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in
2030
+ `block in connection&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in
2031
+ `mon_synchronize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in
2032
+ `connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in
2033
+ `retrieve_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_handling.rb:79:in
2034
+ `retrieve_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_handling.rb:53:in
2035
+ `connection&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:796:in
2036
+ `current_version&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:804:in
2037
+ `needs_migration?&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:383:in
2038
+ `check_pending!&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:370:in
2039
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/callbacks.rb:29:in
2040
+ `block in call&#39;\nactivesupport (4.0.4) lib/active_support/callbacks.rb:373:in
2041
+ `_run__4385228089887704791__call__callbacks&#39;\nactivesupport (4.0.4) lib/active_support/callbacks.rb:80:in
2042
+ `run_callbacks&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/callbacks.rb:27:in
2043
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/reloader.rb:64:in
2044
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/remote_ip.rb:76:in
2045
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in
2046
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
2047
+ `call&#39;\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app&#39;\nrailties
2048
+ (4.0.4) lib/rails/rack/logger.rb:20:in `block in call&#39;\nactivesupport
2049
+ (4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged&#39;\nactivesupport
2050
+ (4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged&#39;\nactivesupport
2051
+ (4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged&#39;\nrailties
2052
+ (4.0.4) lib/rails/rack/logger.rb:20:in `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
2053
+ `call&#39;\nrack (1.5.2) lib/rack/runtime.rb:17:in `call&#39;\nactivesupport
2054
+ (4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call&#39;\nrack
2055
+ (1.5.2) lib/rack/lock.rb:17:in `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
2056
+ `call&#39;\nrailties (4.0.4) lib/rails/engine.rb:511:in `call&#39;\nrailties
2057
+ (4.0.4) lib/rails/application.rb:97:in `call&#39;\nrack (1.5.2) lib/rack/lock.rb:17:in
2058
+ `call&#39;\nrack (1.5.2) lib/rack/content_length.rb:14:in `call&#39;\nrack
2059
+ (1.5.2) lib/rack/handler/webrick.rb:60:in `service&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
2060
+ `service&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
2061
+ `run&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/server.rb:295:in
2062
+ `block in start_thread&#39;</code></pre>\n </div>\n <div id=\"Full-Trace\"
2063
+ style=\"display: none;\">\n <pre><code>activerecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:848:in
2064
+ `initialize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:848:in
2065
+ `new&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:848:in
2066
+ `connect&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:556:in
2067
+ `initialize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:41:in
2068
+ `new&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/postgresql_adapter.rb:41:in
2069
+ `postgresql_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in
2070
+ `new_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in
2071
+ `checkout_new_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in
2072
+ `acquire_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in
2073
+ `block in checkout&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in
2074
+ `mon_synchronize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in
2075
+ `checkout&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in
2076
+ `block in connection&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/monitor.rb:211:in
2077
+ `mon_synchronize&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in
2078
+ `connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in
2079
+ `retrieve_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_handling.rb:79:in
2080
+ `retrieve_connection&#39;\nactiverecord (4.0.4) lib/active_record/connection_handling.rb:53:in
2081
+ `connection&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:796:in
2082
+ `current_version&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:804:in
2083
+ `needs_migration?&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:383:in
2084
+ `check_pending!&#39;\nactiverecord (4.0.4) lib/active_record/migration.rb:370:in
2085
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/callbacks.rb:29:in
2086
+ `block in call&#39;\nactivesupport (4.0.4) lib/active_support/callbacks.rb:373:in
2087
+ `_run__4385228089887704791__call__callbacks&#39;\nactivesupport (4.0.4) lib/active_support/callbacks.rb:80:in
2088
+ `run_callbacks&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/callbacks.rb:27:in
2089
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/reloader.rb:64:in
2090
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/remote_ip.rb:76:in
2091
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in
2092
+ `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in
2093
+ `call&#39;\nrailties (4.0.4) lib/rails/rack/logger.rb:38:in `call_app&#39;\nrailties
2094
+ (4.0.4) lib/rails/rack/logger.rb:20:in `block in call&#39;\nactivesupport
2095
+ (4.0.4) lib/active_support/tagged_logging.rb:68:in `block in tagged&#39;\nactivesupport
2096
+ (4.0.4) lib/active_support/tagged_logging.rb:26:in `tagged&#39;\nactivesupport
2097
+ (4.0.4) lib/active_support/tagged_logging.rb:68:in `tagged&#39;\nrailties
2098
+ (4.0.4) lib/rails/rack/logger.rb:20:in `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/request_id.rb:21:in
2099
+ `call&#39;\nrack (1.5.2) lib/rack/runtime.rb:17:in `call&#39;\nactivesupport
2100
+ (4.0.4) lib/active_support/cache/strategy/local_cache.rb:83:in `call&#39;\nrack
2101
+ (1.5.2) lib/rack/lock.rb:17:in `call&#39;\nactionpack (4.0.4) lib/action_dispatch/middleware/static.rb:64:in
2102
+ `call&#39;\nrailties (4.0.4) lib/rails/engine.rb:511:in `call&#39;\nrailties
2103
+ (4.0.4) lib/rails/application.rb:97:in `call&#39;\nrack (1.5.2) lib/rack/lock.rb:17:in
2104
+ `call&#39;\nrack (1.5.2) lib/rack/content_length.rb:14:in `call&#39;\nrack
2105
+ (1.5.2) lib/rack/handler/webrick.rb:60:in `service&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/httpserver.rb:138:in
2106
+ `service&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/httpserver.rb:94:in
2107
+ `run&#39;\n/Users/austenito/.rubies/ruby-2.1.3/lib/ruby/2.1.0/webrick/server.rb:295:in
2108
+ `block in start_thread&#39;</code></pre>\n </div>\n</div>\n\n \n\n<h2
2109
+ style=\"margin-top: 30px\">Request</h2>\n<p><b>Parameters</b>:</p> <pre>None</pre>\n\n<div
2110
+ class=\"details\">\n <div class=\"summary\"><a href=\"#\" onclick=\"return
2111
+ toggleSessionDump()\">Toggle session dump</a></div>\n <div id=\"session_dump\"
2112
+ style=\"display:none\"><pre></pre></div>\n</div>\n\n<div class=\"details\">\n
2113
+ \ <div class=\"summary\"><a href=\"#\" onclick=\"return toggleEnvDump()\">Toggle
2114
+ env dump</a></div>\n <div id=\"env_dump\" style=\"display:none\"><pre>GATEWAY_INTERFACE:
2115
+ &quot;CGI/1.1&quot;\nHTTP_ACCEPT: &quot;*/*&quot;\nHTTP_ACCEPT_ENCODING: &quot;gzip;q=1.0,deflate;q=0.6,identity;q=0.3&quot;\nREMOTE_ADDR:
2116
+ &quot;127.0.0.1&quot;\nREMOTE_HOST: &quot;127.0.0.1&quot;\nSERVER_NAME: &quot;localhost&quot;\nSERVER_PROTOCOL:
2117
+ &quot;HTTP/1.1&quot;</pre></div>\n</div>\n\n<h2 style=\"margin-top: 30px\">Response</h2>\n<p><b>Headers</b>:</p>
2118
+ <pre>None</pre>\n\n</div>\n\n\n</body>\n</html>\n"
2119
+ http_version:
2120
+ recorded_at: Sat, 17 Jan 2015 13:45:54 GMT
2121
+ - request:
2122
+ method: post
2123
+ uri: http://localhost:3000/api/user
2124
+ body:
2125
+ encoding: UTF-8
2126
+ string: "{}"
2127
+ headers:
2128
+ User-Agent:
2129
+ - Faraday v0.9.0
2130
+ Content-Type:
2131
+ - application/json
2132
+ Api-Token:
2133
+ - testing
2134
+ User-Token:
2135
+ - 56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3
2136
+ Service-User-Id:
2137
+ - a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597
2138
+ Accept-Encoding:
2139
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
2140
+ Accept:
2141
+ - "*/*"
2142
+ response:
2143
+ status:
2144
+ code: 201
2145
+ message: 'Created '
2146
+ headers:
2147
+ X-Frame-Options:
2148
+ - SAMEORIGIN
2149
+ X-Xss-Protection:
2150
+ - 1; mode=block
2151
+ X-Content-Type-Options:
2152
+ - nosniff
2153
+ X-Ua-Compatible:
2154
+ - chrome=1
2155
+ Content-Type:
2156
+ - application/json; charset=utf-8
2157
+ Etag:
2158
+ - '"ccdf1c53d55f6c8480a1894ba79cbe66"'
2159
+ Cache-Control:
2160
+ - max-age=0, private, must-revalidate
2161
+ X-Request-Id:
2162
+ - 64e0a253-b2c5-424e-b636-7e6aff600c87
2163
+ X-Runtime:
2164
+ - '0.006929'
2165
+ Server:
2166
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
2167
+ Date:
2168
+ - Sat, 17 Jan 2015 14:05:21 GMT
2169
+ Content-Length:
2170
+ - '256'
2171
+ Connection:
2172
+ - Keep-Alive
2173
+ body:
2174
+ encoding: UTF-8
2175
+ string: |-
2176
+ {
2177
+ "service_user_id": "a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597",
2178
+ "_links": {
2179
+ "self": {
2180
+ "href": "http://localhost:3000/api/user"
2181
+ }
2182
+ },
2183
+ "token": "56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3"
2184
+ }
2185
+ http_version:
2186
+ recorded_at: Sat, 17 Jan 2015 14:05:21 GMT
2187
+ - request:
2188
+ method: get
2189
+ uri: http://localhost:3000/api/questions
2190
+ body:
2191
+ encoding: US-ASCII
2192
+ string: ''
2193
+ headers:
2194
+ User-Agent:
2195
+ - Faraday v0.9.0
2196
+ Content-Type:
2197
+ - application/json
2198
+ Api-Token:
2199
+ - testing
2200
+ User-Token:
2201
+ - 56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3
2202
+ Service-User-Id:
2203
+ - a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597
2204
+ Accept-Encoding:
2205
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
2206
+ Accept:
2207
+ - "*/*"
2208
+ response:
2209
+ status:
2210
+ code: 200
2211
+ message: 'OK '
2212
+ headers:
2213
+ X-Frame-Options:
2214
+ - SAMEORIGIN
2215
+ X-Xss-Protection:
2216
+ - 1; mode=block
2217
+ X-Content-Type-Options:
2218
+ - nosniff
2219
+ X-Ua-Compatible:
2220
+ - chrome=1
2221
+ Content-Type:
2222
+ - application/json; charset=utf-8
2223
+ Etag:
2224
+ - '"370590f6952ac2411abaf86b5d7c60fe"'
2225
+ Cache-Control:
2226
+ - max-age=0, private, must-revalidate
2227
+ X-Request-Id:
2228
+ - 2d50bef6-2bac-44ff-a0c2-e914d9404ea4
2229
+ X-Runtime:
2230
+ - '0.027036'
2231
+ Server:
2232
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
2233
+ Date:
2234
+ - Sat, 17 Jan 2015 14:05:21 GMT
2235
+ Content-Length:
2236
+ - '19572'
2237
+ Connection:
2238
+ - Keep-Alive
2239
+ body:
2240
+ encoding: UTF-8
2241
+ string: |-
2242
+ [
2243
+ {
2244
+ "id": 1,
2245
+ "question_type": "multiple",
2246
+ "text": "How hungry or full are you right now?",
2247
+ "responses": [
2248
+ "Very hungry",
2249
+ "Somewhat hungry",
2250
+ "Neither full nor hungry",
2251
+ "Somewhat full",
2252
+ "Very full"
2253
+ ],
2254
+ "key": "how_hungry_are_you",
2255
+ "_links": {
2256
+ "self": {
2257
+ "href": "http://localhost:3000/api/questions/1"
2258
+ }
2259
+ }
2260
+ },
2261
+ {
2262
+ "id": 2,
2263
+ "question_type": "time",
2264
+ "text": "What time did you wake up this morning?",
2265
+ "responses": null,
2266
+ "key": "what_time_did_you_wake_up",
2267
+ "_links": {
2268
+ "self": {
2269
+ "href": "http://localhost:3000/api/questions/2"
2270
+ }
2271
+ }
2272
+ },
2273
+ {
2274
+ "id": 3,
2275
+ "question_type": "time",
2276
+ "text": "What time did you got to sleep last night?",
2277
+ "responses": null,
2278
+ "key": "what_time_did_you_sleep",
2279
+ "_links": {
2280
+ "self": {
2281
+ "href": "http://localhost:3000/api/questions/3"
2282
+ }
2283
+ }
2284
+ },
2285
+ {
2286
+ "id": 4,
2287
+ "question_type": "multiple",
2288
+ "text": "Are you judging or evaluating yourself right now (i.e. at the moment just before you were notified)?",
2289
+ "responses": [
2290
+ "f",
2291
+ "Yes - Negatively",
2292
+ "Yes - Neutrally",
2293
+ "Yes - Positively"
2294
+ ],
2295
+ "key": "are_you_judging_yourself",
2296
+ "_links": {
2297
+ "self": {
2298
+ "href": "http://localhost:3000/api/questions/4"
2299
+ }
2300
+ }
2301
+ },
2302
+ {
2303
+ "id": 5,
2304
+ "question_type": "range",
2305
+ "text": "How well did you sleep last night?",
2306
+ "responses": [
2307
+ "0",
2308
+ "10"
2309
+ ],
2310
+ "key": "how_well_did_you_sleep",
2311
+ "_links": {
2312
+ "self": {
2313
+ "href": "http://localhost:3000/api/questions/5"
2314
+ }
2315
+ }
2316
+ },
2317
+ {
2318
+ "id": 6,
2319
+ "question_type": "range",
2320
+ "text": "To what extent are you engrossed in what you are doing?",
2321
+ "responses": [
2322
+ "0",
2323
+ "10"
2324
+ ],
2325
+ "key": "what_extent_are_you_engrossed",
2326
+ "_links": {
2327
+ "self": {
2328
+ "href": "http://localhost:3000/api/questions/6"
2329
+ }
2330
+ }
2331
+ },
2332
+ {
2333
+ "id": 7,
2334
+ "question_type": "multiple",
2335
+ "text": "Are you judging or evaluating what you are doing right now (i.e. at the moment just before you were notified?)",
2336
+ "responses": [
2337
+ "f",
2338
+ "Yes - Negatively",
2339
+ "Yes - Neutrally",
2340
+ "Yes - Positively"
2341
+ ],
2342
+ "key": "are_you_judging_or_evaluating_what_you_are_doing",
2343
+ "_links": {
2344
+ "self": {
2345
+ "href": "http://localhost:3000/api/questions/7"
2346
+ }
2347
+ }
2348
+ },
2349
+ {
2350
+ "id": 8,
2351
+ "question_type": "boolean",
2352
+ "text": "In the past 24 hours, have you engaged in sexual activity with another person?",
2353
+ "responses": [
2354
+ "t",
2355
+ "f"
2356
+ ],
2357
+ "key": "had_sex",
2358
+ "_links": {
2359
+ "self": {
2360
+ "href": "http://localhost:3000/api/questions/8"
2361
+ }
2362
+ }
2363
+ },
2364
+ {
2365
+ "id": 9,
2366
+ "question_type": "multiple",
2367
+ "text": "Imagine you were given $10 to divide between yourself and a stranger to whom you would remain anonymous. How much would you give to the stranger?",
2368
+ "responses": [
2369
+ "0",
2370
+ "1",
2371
+ "2",
2372
+ "3",
2373
+ "4",
2374
+ "5",
2375
+ "6",
2376
+ "7",
2377
+ "8",
2378
+ "9",
2379
+ "10"
2380
+ ],
2381
+ "key": "how_much_would_you_give_to_stranger",
2382
+ "_links": {
2383
+ "self": {
2384
+ "href": "http://localhost:3000/api/questions/9"
2385
+ }
2386
+ }
2387
+ },
2388
+ {
2389
+ "id": 10,
2390
+ "question_type": "boolean",
2391
+ "text": "Have you surprised someone with a gift (including small gifts) in the last week?",
2392
+ "responses": [
2393
+ "t",
2394
+ "f"
2395
+ ],
2396
+ "key": "have_you_surprised_someone",
2397
+ "_links": {
2398
+ "self": {
2399
+ "href": "http://localhost:3000/api/questions/10"
2400
+ }
2401
+ }
2402
+ },
2403
+ {
2404
+ "id": 11,
2405
+ "question_type": "multiple",
2406
+ "text": "In general, how is your health?",
2407
+ "responses": [
2408
+ "Excellent",
2409
+ "Very Good",
2410
+ "Good",
2411
+ "Fair",
2412
+ "Poor"
2413
+ ],
2414
+ "key": "how_is_your_health",
2415
+ "_links": {
2416
+ "self": {
2417
+ "href": "http://localhost:3000/api/questions/11"
2418
+ }
2419
+ }
2420
+ },
2421
+ {
2422
+ "id": 12,
2423
+ "question_type": "range",
2424
+ "text": "Where would you place yourself on this ladder?\nThink of a ladder representing where people stand in your country.\nAt the top of the ladder are the people who are the best off - those who have the most money, the most education and the most respected jobs. At the bottom are the people who are the worst off - who have the least money, least education, and the least respected jobs or no job. The higher up you are on the ladder, the closer you are to the people at the very top; the lower you are the closer you are to people at the very bottom.",
2425
+ "responses": [
2426
+ "0",
2427
+ "10"
2428
+ ],
2429
+ "key": "ladder",
2430
+ "_links": {
2431
+ "self": {
2432
+ "href": "http://localhost:3000/api/questions/12"
2433
+ }
2434
+ }
2435
+ },
2436
+ {
2437
+ "id": 13,
2438
+ "question_type": "range",
2439
+ "text": "To what extent is what you're doing interesting?",
2440
+ "responses": [
2441
+ "0",
2442
+ "10"
2443
+ ],
2444
+ "key": "what_extent_interesting",
2445
+ "_links": {
2446
+ "self": {
2447
+ "href": "http://localhost:3000/api/questions/13"
2448
+ }
2449
+ }
2450
+ },
2451
+ {
2452
+ "id": 14,
2453
+ "question_type": "multiple",
2454
+ "text": "On average, how many hours do you work each week?",
2455
+ "responses": [
2456
+ "Less than 5",
2457
+ "5-10",
2458
+ "10-20",
2459
+ "20-30",
2460
+ "30-40",
2461
+ "40-50",
2462
+ "50-60",
2463
+ "60-70",
2464
+ "More than 70"
2465
+ ],
2466
+ "key": "how_many_hours_do_you_work",
2467
+ "_links": {
2468
+ "self": {
2469
+ "href": "http://localhost:3000/api/questions/14"
2470
+ }
2471
+ }
2472
+ },
2473
+ {
2474
+ "id": 15,
2475
+ "question_type": "range",
2476
+ "text": "How do you feel right now?",
2477
+ "responses": [
2478
+ "0",
2479
+ "10"
2480
+ ],
2481
+ "key": "how_do_you_feel_right_now",
2482
+ "_links": {
2483
+ "self": {
2484
+ "href": "http://localhost:3000/api/questions/15"
2485
+ }
2486
+ }
2487
+ },
2488
+ {
2489
+ "id": 16,
2490
+ "question_type": "range",
2491
+ "text": "To what extent do you expect good things to happen in the future?",
2492
+ "responses": [
2493
+ "0",
2494
+ "10"
2495
+ ],
2496
+ "key": "good_things_future",
2497
+ "_links": {
2498
+ "self": {
2499
+ "href": "http://localhost:3000/api/questions/16"
2500
+ }
2501
+ }
2502
+ },
2503
+ {
2504
+ "id": 17,
2505
+ "question_type": "boolean",
2506
+ "text": "Have you taken any over-the-counter pain medication in the past 24 hours?",
2507
+ "responses": [
2508
+ "t",
2509
+ "f"
2510
+ ],
2511
+ "key": "pain_medication",
2512
+ "_links": {
2513
+ "self": {
2514
+ "href": "http://localhost:3000/api/questions/17"
2515
+ }
2516
+ }
2517
+ },
2518
+ {
2519
+ "id": 18,
2520
+ "question_type": "range",
2521
+ "text": "To what extent have you procrastinated so far today?",
2522
+ "responses": [
2523
+ "0",
2524
+ "10"
2525
+ ],
2526
+ "key": "procrastinated",
2527
+ "_links": {
2528
+ "self": {
2529
+ "href": "http://localhost:3000/api/questions/18"
2530
+ }
2531
+ }
2532
+ },
2533
+ {
2534
+ "id": 19,
2535
+ "question_type": "range",
2536
+ "text": "To what extent are you being productive?",
2537
+ "responses": [
2538
+ "0",
2539
+ "10"
2540
+ ],
2541
+ "key": "productive",
2542
+ "_links": {
2543
+ "self": {
2544
+ "href": "http://localhost:3000/api/questions/19"
2545
+ }
2546
+ }
2547
+ },
2548
+ {
2549
+ "id": 20,
2550
+ "question_type": "multiple",
2551
+ "text": "Who are you talking or interacting with?",
2552
+ "responses": [
2553
+ "Spouse/partner/significant other",
2554
+ "Children",
2555
+ "Parents",
2556
+ "Other relatives",
2557
+ "Friends",
2558
+ "Acquaintances",
2559
+ "Strangers",
2560
+ "Co-workers",
2561
+ "Customers/students",
2562
+ "Boss",
2563
+ "No one"
2564
+ ],
2565
+ "key": "who_are_you_talking_with",
2566
+ "_links": {
2567
+ "self": {
2568
+ "href": "http://localhost:3000/api/questions/20"
2569
+ }
2570
+ }
2571
+ },
2572
+ {
2573
+ "id": 27,
2574
+ "question_type": "multiple",
2575
+ "text": "How many people are you talking or interacting with?",
2576
+ "responses": [
2577
+ "0",
2578
+ "1",
2579
+ "2",
2580
+ "3",
2581
+ "4",
2582
+ "5",
2583
+ "6",
2584
+ "7",
2585
+ "8",
2586
+ "9",
2587
+ "10",
2588
+ "More than 10"
2589
+ ],
2590
+ "key": "how_many_people_are_you_talking_with",
2591
+ "_links": {
2592
+ "self": {
2593
+ "href": "http://localhost:3000/api/questions/27"
2594
+ }
2595
+ }
2596
+ },
2597
+ {
2598
+ "id": 21,
2599
+ "question_type": "range",
2600
+ "text": "To what extent do you feel accepted by the person/people you are interacting with?",
2601
+ "responses": [
2602
+ "0",
2603
+ "10"
2604
+ ],
2605
+ "key": null,
2606
+ "_links": {
2607
+ "self": {
2608
+ "href": "http://localhost:3000/api/questions/21"
2609
+ }
2610
+ }
2611
+ },
2612
+ {
2613
+ "id": 22,
2614
+ "question_type": "boolean",
2615
+ "text": "Are you alone?",
2616
+ "responses": [
2617
+ "t",
2618
+ "f"
2619
+ ],
2620
+ "key": "are_you_alone",
2621
+ "_links": {
2622
+ "self": {
2623
+ "href": "http://localhost:3000/api/questions/22"
2624
+ }
2625
+ }
2626
+ },
2627
+ {
2628
+ "id": 23,
2629
+ "question_type": "boolean",
2630
+ "text": "Do you want to do what you're doing?",
2631
+ "responses": [
2632
+ "t",
2633
+ "f"
2634
+ ],
2635
+ "key": "do_you_want_to_do_what_youre_doing",
2636
+ "_links": {
2637
+ "self": {
2638
+ "href": "http://localhost:3000/api/questions/23"
2639
+ }
2640
+ }
2641
+ },
2642
+ {
2643
+ "id": 24,
2644
+ "question_type": "boolean",
2645
+ "text": "Are you talking or interacting with anyone?",
2646
+ "responses": [
2647
+ "t",
2648
+ "f"
2649
+ ],
2650
+ "key": "are_you_talking_to_anyone",
2651
+ "_links": {
2652
+ "self": {
2653
+ "href": "http://localhost:3000/api/questions/24"
2654
+ }
2655
+ }
2656
+ },
2657
+ {
2658
+ "id": 25,
2659
+ "question_type": "multiple",
2660
+ "text": "Where are you?",
2661
+ "responses": [
2662
+ "At Home",
2663
+ "At Work",
2664
+ "In a car",
2665
+ "Other"
2666
+ ],
2667
+ "key": "where_are_you",
2668
+ "_links": {
2669
+ "self": {
2670
+ "href": "http://localhost:3000/api/questions/25"
2671
+ }
2672
+ }
2673
+ },
2674
+ {
2675
+ "id": 26,
2676
+ "question_type": "multiple",
2677
+ "text": "What are you doing?",
2678
+ "responses": [
2679
+ "Eating",
2680
+ "Bathroom",
2681
+ "Working"
2682
+ ],
2683
+ "key": "what_are_you_doing",
2684
+ "_links": {
2685
+ "self": {
2686
+ "href": "http://localhost:3000/api/questions/26"
2687
+ }
2688
+ }
2689
+ },
2690
+ {
2691
+ "id": 28,
2692
+ "question_type": "boolean",
2693
+ "text": "Do you have to do what you're doing?",
2694
+ "responses": [
2695
+ "t",
2696
+ "f"
2697
+ ],
2698
+ "key": "do_you_have_to_do_what_youre_doing",
2699
+ "_links": {
2700
+ "self": {
2701
+ "href": "http://localhost:3000/api/questions/28"
2702
+ }
2703
+ }
2704
+ },
2705
+ {
2706
+ "id": 29,
2707
+ "question_type": "range",
2708
+ "text": "To what extent are you focused on what you are doing?",
2709
+ "responses": [
2710
+ "0",
2711
+ "10"
2712
+ ],
2713
+ "key": "how_focused",
2714
+ "_links": {
2715
+ "self": {
2716
+ "href": "http://localhost:3000/api/questions/29"
2717
+ }
2718
+ }
2719
+ },
2720
+ {
2721
+ "id": 30,
2722
+ "question_type": "multiple",
2723
+ "text": "When did you last check Facebook?",
2724
+ "responses": [
2725
+ "Right now",
2726
+ "In the last 5 minutes",
2727
+ "In the last 15 minutes",
2728
+ "In the last 30 minutes",
2729
+ "In the last hour",
2730
+ "1-2 hours ago",
2731
+ "3-5 hours ago",
2732
+ "6-12 hours ago",
2733
+ "24 hours ago",
2734
+ "Don't use facebook"
2735
+ ],
2736
+ "key": "when_did_last_check_facebook",
2737
+ "_links": {
2738
+ "self": {
2739
+ "href": "http://localhost:3000/api/questions/30"
2740
+ }
2741
+ }
2742
+ },
2743
+ {
2744
+ "id": 31,
2745
+ "question_type": "multiple",
2746
+ "text": "Beyond any work you've already done today, how many additional hours do you expect to work today?",
2747
+ "responses": [
2748
+ "0 (none)",
2749
+ "Less than 1 hour",
2750
+ "1-2 hours",
2751
+ "2-3 hours",
2752
+ "3-4 hours",
2753
+ "4-5 hours",
2754
+ "5-6 hours"
2755
+ ],
2756
+ "key": "how_many_additional_work_hours",
2757
+ "_links": {
2758
+ "self": {
2759
+ "href": "http://localhost:3000/api/questions/31"
2760
+ }
2761
+ }
2762
+ },
2763
+ {
2764
+ "id": 32,
2765
+ "question_type": "boolean",
2766
+ "text": "If you could, and it had no negative consequences, would you jump forward in time 24 hours?",
2767
+ "responses": [
2768
+ "t",
2769
+ "f"
2770
+ ],
2771
+ "key": "jump_forward_24_hours",
2772
+ "_links": {
2773
+ "self": {
2774
+ "href": "http://localhost:3000/api/questions/32"
2775
+ }
2776
+ }
2777
+ },
2778
+ {
2779
+ "id": 33,
2780
+ "question_type": "boolean",
2781
+ "text": "Do you like poptarts?",
2782
+ "responses": [
2783
+ "t",
2784
+ "f"
2785
+ ],
2786
+ "key": "poptarts",
2787
+ "_links": {
2788
+ "self": {
2789
+ "href": "http://localhost:3000/api/questions/33"
2790
+ }
2791
+ }
2792
+ },
2793
+ {
2794
+ "id": 34,
2795
+ "question_type": "multiple",
2796
+ "text": "Do you like poptarts?",
2797
+ "responses": [
2798
+ "Yes",
2799
+ "No"
2800
+ ],
2801
+ "key": null,
2802
+ "_links": {
2803
+ "self": {
2804
+ "href": "http://localhost:3000/api/questions/34"
2805
+ }
2806
+ }
2807
+ },
2808
+ {
2809
+ "id": 35,
2810
+ "question_type": "range",
2811
+ "text": "Do you like poptarts?",
2812
+ "responses": [
2813
+ "0",
2814
+ "10"
2815
+ ],
2816
+ "key": null,
2817
+ "_links": {
2818
+ "self": {
2819
+ "href": "http://localhost:3000/api/questions/35"
2820
+ }
2821
+ }
2822
+ },
2823
+ {
2824
+ "id": 36,
2825
+ "question_type": "boolean",
2826
+ "text": "Do you like poptarts?",
2827
+ "responses": [
2828
+ "t",
2829
+ "f"
2830
+ ],
2831
+ "key": "poptarts",
2832
+ "_links": {
2833
+ "self": {
2834
+ "href": "http://localhost:3000/api/questions/36"
2835
+ }
2836
+ }
2837
+ },
2838
+ {
2839
+ "id": 37,
2840
+ "question_type": "boolean",
2841
+ "text": "Do you like poptarts?",
2842
+ "responses": [
2843
+ "t",
2844
+ "f"
2845
+ ],
2846
+ "key": "poptarts",
2847
+ "_links": {
2848
+ "self": {
2849
+ "href": "http://localhost:3000/api/questions/37"
2850
+ }
2851
+ }
2852
+ },
2853
+ {
2854
+ "id": 38,
2855
+ "question_type": "boolean",
2856
+ "text": "Do you like poptarts?",
2857
+ "responses": [
2858
+ "t",
2859
+ "f"
2860
+ ],
2861
+ "key": null,
2862
+ "_links": {
2863
+ "self": {
2864
+ "href": "http://localhost:3000/api/questions/38"
2865
+ }
2866
+ }
2867
+ },
2868
+ {
2869
+ "id": 39,
2870
+ "question_type": "boolean",
2871
+ "text": "Do you like poptarts?",
2872
+ "responses": [
2873
+ "t",
2874
+ "f"
2875
+ ],
2876
+ "key": null,
2877
+ "_links": {
2878
+ "self": {
2879
+ "href": "http://localhost:3000/api/questions/39"
2880
+ }
2881
+ }
2882
+ },
2883
+ {
2884
+ "id": 40,
2885
+ "question_type": "boolean",
2886
+ "text": "Do you like poptarts?",
2887
+ "responses": [
2888
+ "t",
2889
+ "f"
2890
+ ],
2891
+ "key": null,
2892
+ "_links": {
2893
+ "self": {
2894
+ "href": "http://localhost:3000/api/questions/40"
2895
+ }
2896
+ }
2897
+ },
2898
+ {
2899
+ "id": 41,
2900
+ "question_type": "boolean",
2901
+ "text": "Do you like poptarts?",
2902
+ "responses": [
2903
+ "t",
2904
+ "f"
2905
+ ],
2906
+ "key": null,
2907
+ "_links": {
2908
+ "self": {
2909
+ "href": "http://localhost:3000/api/questions/41"
2910
+ }
2911
+ }
2912
+ },
2913
+ {
2914
+ "id": 42,
2915
+ "question_type": "boolean",
2916
+ "text": "Do you like poptarts?",
2917
+ "responses": [
2918
+ "t",
2919
+ "f"
2920
+ ],
2921
+ "key": null,
2922
+ "_links": {
2923
+ "self": {
2924
+ "href": "http://localhost:3000/api/questions/42"
2925
+ }
2926
+ }
2927
+ },
2928
+ {
2929
+ "id": 43,
2930
+ "question_type": "boolean",
2931
+ "text": "Do you like poptarts?",
2932
+ "responses": [
2933
+ "t",
2934
+ "f"
2935
+ ],
2936
+ "key": null,
2937
+ "_links": {
2938
+ "self": {
2939
+ "href": "http://localhost:3000/api/questions/43"
2940
+ }
2941
+ }
2942
+ },
2943
+ {
2944
+ "id": 44,
2945
+ "question_type": "boolean",
2946
+ "text": "Do you like poptarts?",
2947
+ "responses": [
2948
+ "t",
2949
+ "f"
2950
+ ],
2951
+ "key": null,
2952
+ "_links": {
2953
+ "self": {
2954
+ "href": "http://localhost:3000/api/questions/44"
2955
+ }
2956
+ }
2957
+ },
2958
+ {
2959
+ "id": 45,
2960
+ "question_type": "boolean",
2961
+ "text": "Do you like poptarts?",
2962
+ "responses": [
2963
+ "t",
2964
+ "f"
2965
+ ],
2966
+ "key": null,
2967
+ "_links": {
2968
+ "self": {
2969
+ "href": "http://localhost:3000/api/questions/45"
2970
+ }
2971
+ }
2972
+ },
2973
+ {
2974
+ "id": 46,
2975
+ "question_type": "boolean",
2976
+ "text": "Do you like poptarts?",
2977
+ "responses": [
2978
+ "t",
2979
+ "f"
2980
+ ],
2981
+ "key": null,
2982
+ "_links": {
2983
+ "self": {
2984
+ "href": "http://localhost:3000/api/questions/46"
2985
+ }
2986
+ }
2987
+ },
2988
+ {
2989
+ "id": 47,
2990
+ "question_type": "multiple",
2991
+ "text": "Where are you?",
2992
+ "responses": [
2993
+ "At Home",
2994
+ "At Work",
2995
+ "In a car",
2996
+ "Other"
2997
+ ],
2998
+ "key": null,
2999
+ "_links": {
3000
+ "self": {
3001
+ "href": "http://localhost:3000/api/questions/47"
3002
+ }
3003
+ }
3004
+ },
3005
+ {
3006
+ "id": 48,
3007
+ "question_type": "boolean",
3008
+ "text": "Do you like poptarts?",
3009
+ "responses": [
3010
+ "t",
3011
+ "f"
3012
+ ],
3013
+ "key": null,
3014
+ "_links": {
3015
+ "self": {
3016
+ "href": "http://localhost:3000/api/questions/48"
3017
+ }
3018
+ }
3019
+ },
3020
+ {
3021
+ "id": 49,
3022
+ "question_type": "multiple",
3023
+ "text": "Where are you?",
3024
+ "responses": [
3025
+ "At Home",
3026
+ "At Work",
3027
+ "In a car",
3028
+ "Other"
3029
+ ],
3030
+ "key": null,
3031
+ "_links": {
3032
+ "self": {
3033
+ "href": "http://localhost:3000/api/questions/49"
3034
+ }
3035
+ }
3036
+ },
3037
+ {
3038
+ "id": 50,
3039
+ "question_type": "boolean",
3040
+ "text": "Do you like poptarts?",
3041
+ "responses": [
3042
+ "t",
3043
+ "f"
3044
+ ],
3045
+ "key": null,
3046
+ "_links": {
3047
+ "self": {
3048
+ "href": "http://localhost:3000/api/questions/50"
3049
+ }
3050
+ }
3051
+ },
3052
+ {
3053
+ "id": 51,
3054
+ "question_type": "multiple",
3055
+ "text": "Where are you?",
3056
+ "responses": [
3057
+ "At Home",
3058
+ "At Work",
3059
+ "In a car",
3060
+ "Other"
3061
+ ],
3062
+ "key": null,
3063
+ "_links": {
3064
+ "self": {
3065
+ "href": "http://localhost:3000/api/questions/51"
3066
+ }
3067
+ }
3068
+ },
3069
+ {
3070
+ "id": 52,
3071
+ "question_type": "boolean",
3072
+ "text": "Do you like poptarts?",
3073
+ "responses": [
3074
+ "t",
3075
+ "f"
3076
+ ],
3077
+ "key": null,
3078
+ "_links": {
3079
+ "self": {
3080
+ "href": "http://localhost:3000/api/questions/52"
3081
+ }
3082
+ }
3083
+ },
3084
+ {
3085
+ "id": 53,
3086
+ "question_type": "multiple",
3087
+ "text": "Where are you?",
3088
+ "responses": [
3089
+ "At Home",
3090
+ "At Work",
3091
+ "In a car",
3092
+ "Other"
3093
+ ],
3094
+ "key": null,
3095
+ "_links": {
3096
+ "self": {
3097
+ "href": "http://localhost:3000/api/questions/53"
3098
+ }
3099
+ }
3100
+ },
3101
+ {
3102
+ "id": 54,
3103
+ "question_type": "boolean",
3104
+ "text": "Do you like poptarts?",
3105
+ "responses": [
3106
+ "t",
3107
+ "f"
3108
+ ],
3109
+ "key": null,
3110
+ "_links": {
3111
+ "self": {
3112
+ "href": "http://localhost:3000/api/questions/54"
3113
+ }
3114
+ }
3115
+ },
3116
+ {
3117
+ "id": 55,
3118
+ "question_type": "multiple",
3119
+ "text": "Where are you?",
3120
+ "responses": [
3121
+ "At Home",
3122
+ "At Work",
3123
+ "In a car",
3124
+ "Other"
3125
+ ],
3126
+ "key": null,
3127
+ "_links": {
3128
+ "self": {
3129
+ "href": "http://localhost:3000/api/questions/55"
3130
+ }
3131
+ }
3132
+ },
3133
+ {
3134
+ "id": 56,
3135
+ "question_type": "boolean",
3136
+ "text": "Do you like poptarts?",
3137
+ "responses": [
3138
+ "t",
3139
+ "f"
3140
+ ],
3141
+ "key": null,
3142
+ "_links": {
3143
+ "self": {
3144
+ "href": "http://localhost:3000/api/questions/56"
3145
+ }
3146
+ }
3147
+ },
3148
+ {
3149
+ "id": 57,
3150
+ "question_type": "multiple",
3151
+ "text": "Where are you?",
3152
+ "responses": [
3153
+ "At Home",
3154
+ "At Work",
3155
+ "In a car",
3156
+ "Other"
3157
+ ],
3158
+ "key": null,
3159
+ "_links": {
3160
+ "self": {
3161
+ "href": "http://localhost:3000/api/questions/57"
3162
+ }
3163
+ }
3164
+ },
3165
+ {
3166
+ "id": 58,
3167
+ "question_type": "boolean",
3168
+ "text": "Do you like poptarts?",
3169
+ "responses": [
3170
+ "t",
3171
+ "f"
3172
+ ],
3173
+ "key": null,
3174
+ "_links": {
3175
+ "self": {
3176
+ "href": "http://localhost:3000/api/questions/58"
3177
+ }
3178
+ }
3179
+ },
3180
+ {
3181
+ "id": 59,
3182
+ "question_type": "multiple",
3183
+ "text": "Where are you?",
3184
+ "responses": [
3185
+ "At Home",
3186
+ "At Work",
3187
+ "In a car",
3188
+ "Other"
3189
+ ],
3190
+ "key": null,
3191
+ "_links": {
3192
+ "self": {
3193
+ "href": "http://localhost:3000/api/questions/59"
3194
+ }
3195
+ }
3196
+ },
3197
+ {
3198
+ "id": 60,
3199
+ "question_type": "boolean",
3200
+ "text": "Do you like poptarts?",
3201
+ "responses": [
3202
+ "t",
3203
+ "f"
3204
+ ],
3205
+ "key": null,
3206
+ "_links": {
3207
+ "self": {
3208
+ "href": "http://localhost:3000/api/questions/60"
3209
+ }
3210
+ }
3211
+ },
3212
+ {
3213
+ "id": 61,
3214
+ "question_type": "multiple",
3215
+ "text": "Where are you?",
3216
+ "responses": [
3217
+ "At Home",
3218
+ "At Work",
3219
+ "In a car",
3220
+ "Other"
3221
+ ],
3222
+ "key": null,
3223
+ "_links": {
3224
+ "self": {
3225
+ "href": "http://localhost:3000/api/questions/61"
3226
+ }
3227
+ }
3228
+ }
3229
+ ]
3230
+ http_version:
3231
+ recorded_at: Sat, 17 Jan 2015 14:05:21 GMT
3232
+ - request:
3233
+ method: post
3234
+ uri: http://localhost:3000/api/surveys
3235
+ body:
3236
+ encoding: UTF-8
3237
+ string: "{}"
3238
+ headers:
3239
+ User-Agent:
3240
+ - Faraday v0.9.0
3241
+ Content-Type:
3242
+ - application/json
3243
+ Api-Token:
3244
+ - testing
3245
+ User-Token:
3246
+ - 56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3
3247
+ Service-User-Id:
3248
+ - a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597
3249
+ Accept-Encoding:
3250
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
3251
+ Accept:
3252
+ - "*/*"
3253
+ response:
3254
+ status:
3255
+ code: 201
3256
+ message: 'Created '
3257
+ headers:
3258
+ X-Frame-Options:
3259
+ - SAMEORIGIN
3260
+ X-Xss-Protection:
3261
+ - 1; mode=block
3262
+ X-Content-Type-Options:
3263
+ - nosniff
3264
+ X-Ua-Compatible:
3265
+ - chrome=1
3266
+ Content-Type:
3267
+ - application/json; charset=utf-8
3268
+ Etag:
3269
+ - '"cd4d7fedd30daf2037bd9ebca71ca991"'
3270
+ Cache-Control:
3271
+ - max-age=0, private, must-revalidate
3272
+ X-Request-Id:
3273
+ - cdaf2696-db3b-43a6-9439-9a38268ba557
3274
+ X-Runtime:
3275
+ - '0.012469'
3276
+ Server:
3277
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
3278
+ Date:
3279
+ - Sat, 17 Jan 2015 14:05:21 GMT
3280
+ Content-Length:
3281
+ - '471'
3282
+ Connection:
3283
+ - Keep-Alive
3284
+ body:
3285
+ encoding: UTF-8
3286
+ string: |-
3287
+ {
3288
+ "id": 55,
3289
+ "service_user_id": "a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597",
3290
+ "_links": {
3291
+ "self": {
3292
+ "href": "http://localhost:3000/api/surveys/55"
3293
+ },
3294
+ "survey_questions": {
3295
+ "post": {
3296
+ "href": "http://localhost:3000/api/surveys/55/survey_questions"
3297
+ },
3298
+ "put": {
3299
+ "href": "http://localhost:3000/api/surveys/55/survey_questions"
3300
+ }
3301
+ }
3302
+ },
3303
+ "completed": true,
3304
+ "survey_questions": [
3305
+
3306
+ ]
3307
+ }
3308
+ http_version:
3309
+ recorded_at: Sat, 17 Jan 2015 14:05:21 GMT
3310
+ - request:
3311
+ method: post
3312
+ uri: http://localhost:3000/api/questions
3313
+ body:
3314
+ encoding: UTF-8
3315
+ string: '{"question":{"question_type":"multiple","responses":["At Home","At
3316
+ Work","In a car","Other"],"text":"Where are you?","key":null}}'
3317
+ headers:
3318
+ User-Agent:
3319
+ - Faraday v0.9.0
3320
+ Content-Type:
3321
+ - application/json
3322
+ Api-Token:
3323
+ - testing
3324
+ User-Token:
3325
+ - 56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3
3326
+ Service-User-Id:
3327
+ - a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597
3328
+ Accept-Encoding:
3329
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
3330
+ Accept:
3331
+ - "*/*"
3332
+ response:
3333
+ status:
3334
+ code: 201
3335
+ message: 'Created '
3336
+ headers:
3337
+ X-Frame-Options:
3338
+ - SAMEORIGIN
3339
+ X-Xss-Protection:
3340
+ - 1; mode=block
3341
+ X-Content-Type-Options:
3342
+ - nosniff
3343
+ X-Ua-Compatible:
3344
+ - chrome=1
3345
+ Content-Type:
3346
+ - application/json; charset=utf-8
3347
+ Etag:
3348
+ - '"a38f06b379c3a84e8c2ae5256c10a325"'
3349
+ Cache-Control:
3350
+ - max-age=0, private, must-revalidate
3351
+ X-Request-Id:
3352
+ - 92ceb466-c537-4d95-ac8a-6b0d7a814073
3353
+ X-Runtime:
3354
+ - '0.009571'
3355
+ Server:
3356
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
3357
+ Date:
3358
+ - Sat, 17 Jan 2015 14:05:21 GMT
3359
+ Content-Length:
3360
+ - '262'
3361
+ Connection:
3362
+ - Keep-Alive
3363
+ body:
3364
+ encoding: UTF-8
3365
+ string: |-
3366
+ {
3367
+ "id": 62,
3368
+ "question_type": "multiple",
3369
+ "text": "Where are you?",
3370
+ "responses": [
3371
+ "At Home",
3372
+ "At Work",
3373
+ "In a car",
3374
+ "Other"
3375
+ ],
3376
+ "key": null,
3377
+ "_links": {
3378
+ "self": {
3379
+ "href": "http://localhost:3000/api/questions/62"
3380
+ }
3381
+ }
3382
+ }
3383
+ http_version:
3384
+ recorded_at: Sat, 17 Jan 2015 14:05:21 GMT
3385
+ - request:
3386
+ method: post
3387
+ uri: http://localhost:3000/api/surveys/55/survey_questions
3388
+ body:
3389
+ encoding: UTF-8
3390
+ string: '{"survey_question":{"question_id":62,"responses":null}}'
3391
+ headers:
3392
+ User-Agent:
3393
+ - Faraday v0.9.0
3394
+ Content-Type:
3395
+ - application/json
3396
+ Api-Token:
3397
+ - testing
3398
+ User-Token:
3399
+ - 56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3
3400
+ Service-User-Id:
3401
+ - a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597
3402
+ Accept-Encoding:
3403
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
3404
+ Accept:
3405
+ - "*/*"
3406
+ response:
3407
+ status:
3408
+ code: 201
3409
+ message: 'Created '
3410
+ headers:
3411
+ X-Frame-Options:
3412
+ - SAMEORIGIN
3413
+ X-Xss-Protection:
3414
+ - 1; mode=block
3415
+ X-Content-Type-Options:
3416
+ - nosniff
3417
+ X-Ua-Compatible:
3418
+ - chrome=1
3419
+ Content-Type:
3420
+ - application/json; charset=utf-8
3421
+ Etag:
3422
+ - '"4de09d33925c529ec7e323f6825fe336"'
3423
+ Cache-Control:
3424
+ - max-age=0, private, must-revalidate
3425
+ X-Request-Id:
3426
+ - 3fa0901c-7e10-4bc1-ab04-d243978a39dd
3427
+ X-Runtime:
3428
+ - '0.021257'
3429
+ Server:
3430
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
3431
+ Date:
3432
+ - Sat, 17 Jan 2015 14:05:22 GMT
3433
+ Content-Length:
3434
+ - '532'
3435
+ Connection:
3436
+ - Keep-Alive
3437
+ body:
3438
+ encoding: UTF-8
3439
+ string: |-
3440
+ {
3441
+ "id": 15,
3442
+ "text": "Where are you?",
3443
+ "question_type": "multiple",
3444
+ "responses": [
3445
+ "At Home",
3446
+ "At Work",
3447
+ "In a car",
3448
+ "Other"
3449
+ ],
3450
+ "answer": null,
3451
+ "_links": {
3452
+ "self": {
3453
+ "href": "http://localhost:3000/api/surveys/55/survey_questions/15"
3454
+ },
3455
+ "put": {
3456
+ "href": "http://localhost:3000/api/surveys/55/survey_questions/15"
3457
+ },
3458
+ "survey": {
3459
+ "href": "http://localhost:3000/api/surveys/55"
3460
+ }
3461
+ },
3462
+ "created_at": "2015-01-17T14:05:21.997Z",
3463
+ "key": null,
3464
+ "question_id": 62
3465
+ }
3466
+ http_version:
3467
+ recorded_at: Sat, 17 Jan 2015 14:05:22 GMT
3468
+ - request:
3469
+ method: post
3470
+ uri: http://localhost:3000/api/surveys/55/survey_questions
3471
+ body:
3472
+ encoding: UTF-8
3473
+ string: '{"survey_question":{"question_id":62,"responses":null}}'
3474
+ headers:
3475
+ User-Agent:
3476
+ - Faraday v0.9.0
3477
+ Content-Type:
3478
+ - application/json
3479
+ Api-Token:
3480
+ - testing
3481
+ User-Token:
3482
+ - 56872b7795c726cbf37cd03408461aa18432aebea7250da037f32a5c21869de3
3483
+ Service-User-Id:
3484
+ - a5ca5056ce004dc40632e68e12b2d7a58807616b852d11b308d0f45ca7ba9597
3485
+ Accept-Encoding:
3486
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
3487
+ Accept:
3488
+ - "*/*"
3489
+ response:
3490
+ status:
3491
+ code: 201
3492
+ message: 'Created '
3493
+ headers:
3494
+ X-Frame-Options:
3495
+ - SAMEORIGIN
3496
+ X-Xss-Protection:
3497
+ - 1; mode=block
3498
+ X-Content-Type-Options:
3499
+ - nosniff
3500
+ X-Ua-Compatible:
3501
+ - chrome=1
3502
+ Content-Type:
3503
+ - application/json; charset=utf-8
3504
+ Etag:
3505
+ - '"202e1e954689ada0ed45ea0bff4527cf"'
3506
+ Cache-Control:
3507
+ - max-age=0, private, must-revalidate
3508
+ X-Request-Id:
3509
+ - fe2a85f6-e194-467f-a61b-7631f3b7b65b
3510
+ X-Runtime:
3511
+ - '0.012462'
3512
+ Server:
3513
+ - WEBrick/1.3.1 (Ruby/2.1.3/2014-09-19)
3514
+ Date:
3515
+ - Sat, 17 Jan 2015 14:05:22 GMT
3516
+ Content-Length:
3517
+ - '532'
3518
+ Connection:
3519
+ - Keep-Alive
3520
+ body:
3521
+ encoding: UTF-8
3522
+ string: |-
3523
+ {
3524
+ "id": 16,
3525
+ "text": "Where are you?",
3526
+ "question_type": "multiple",
3527
+ "responses": [
3528
+ "At Home",
3529
+ "At Work",
3530
+ "In a car",
3531
+ "Other"
3532
+ ],
3533
+ "answer": null,
3534
+ "_links": {
3535
+ "self": {
3536
+ "href": "http://localhost:3000/api/surveys/55/survey_questions/16"
3537
+ },
3538
+ "put": {
3539
+ "href": "http://localhost:3000/api/surveys/55/survey_questions/16"
3540
+ },
3541
+ "survey": {
3542
+ "href": "http://localhost:3000/api/surveys/55"
3543
+ }
3544
+ },
3545
+ "created_at": "2015-01-17T14:05:22.026Z",
3546
+ "key": null,
3547
+ "question_id": 62
3548
+ }
3549
+ http_version:
3550
+ recorded_at: Sat, 17 Jan 2015 14:05:22 GMT
3551
+ recorded_with: VCR 2.9.3