poptart 0.0.5 → 0.0.6
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.
- checksums.yaml +4 -4
 - data/Gemfile.lock +4 -3
 - data/lib/poptart/model.rb +49 -1
 - data/lib/poptart/question.rb +1 -2
 - data/lib/poptart/request.rb +1 -1
 - data/lib/poptart/root.rb +0 -5
 - data/lib/poptart/survey.rb +5 -6
 - data/lib/poptart/survey_question.rb +2 -1
 - data/lib/poptart/user.rb +16 -12
 - data/lib/poptart.rb +2 -1
 - data/lib/version.rb +1 -1
 - data/poptart.gemspec +1 -0
 - data/spec/requests/answering_survey_questions_spec.rb +32 -9
 - data/spec/requests/root_spec.rb +6 -3
 - data/spec/requests/user_management_spec.rb +8 -8
 - data/spec/vcr/answering/survey_questions_answers_a_multiple_choice_question.yml +5444 -274
 - data/spec/vcr/answering/survey_questions_answers_a_survey_question.yml +10066 -450
 - data/spec/vcr/answering/survey_questions_creates_and_returns_a_random_question_survey.yml +883 -69
 - data/spec/vcr/answering/survey_questions_creates_and_returns_an_empty_survey.yml +665 -56
 - data/spec/vcr/answering/survey_questions_finds_survey_question_for_id.yml +1072 -74
 - data/spec/vcr/answering/survey_questions_returns_all_answered_survey_questions_for_a_question.yml +5009 -0
 - data/spec/vcr/poptart/root/builds_top_level_uri.yml +72 -0
 - data/spec/vcr/poptart/root/builds_urls.yml +72 -0
 - data/spec/vcr/user/management_creates_a_user.yml +63 -0
 - data/spec/vcr/user/management_returns_a_user.yml +201 -14
 - metadata +22 -2
 
| 
         @@ -0,0 +1,72 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            http_interactions:
         
     | 
| 
      
 3 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: http://localhost:3000/
         
     | 
| 
      
 6 
     | 
    
         
            +
                body:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 9 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 10 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  - Faraday v0.9.0
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 14 
     | 
    
         
            +
                  Api-Token:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  - testing
         
     | 
| 
      
 16 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 17 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 18 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - "*/*"
         
     | 
| 
      
 20 
     | 
    
         
            +
              response:
         
     | 
| 
      
 21 
     | 
    
         
            +
                status:
         
     | 
| 
      
 22 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 23 
     | 
    
         
            +
                  message: 'OK '
         
     | 
| 
      
 24 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 25 
     | 
    
         
            +
                  X-Frame-Options:
         
     | 
| 
      
 26 
     | 
    
         
            +
                  - SAMEORIGIN
         
     | 
| 
      
 27 
     | 
    
         
            +
                  X-Xss-Protection:
         
     | 
| 
      
 28 
     | 
    
         
            +
                  - 1; mode=block
         
     | 
| 
      
 29 
     | 
    
         
            +
                  X-Content-Type-Options:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  - nosniff
         
     | 
| 
      
 31 
     | 
    
         
            +
                  X-Ua-Compatible:
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - chrome=1
         
     | 
| 
      
 33 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 34 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 35 
     | 
    
         
            +
                  Etag:
         
     | 
| 
      
 36 
     | 
    
         
            +
                  - '"9919e710755aaa6bd4dd5a9a4682d210"'
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  - max-age=0, private, must-revalidate
         
     | 
| 
      
 39 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 40 
     | 
    
         
            +
                  - 1e37810d-3def-4899-824b-ab7e9576c009
         
     | 
| 
      
 41 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 42 
     | 
    
         
            +
                  - '0.004290'
         
     | 
| 
      
 43 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 44 
     | 
    
         
            +
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
      
 45 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 46 
     | 
    
         
            +
                  - Sat, 13 Sep 2014 14:44:53 GMT
         
     | 
| 
      
 47 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 48 
     | 
    
         
            +
                  - '302'
         
     | 
| 
      
 49 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 50 
     | 
    
         
            +
                  - Keep-Alive
         
     | 
| 
      
 51 
     | 
    
         
            +
                body:
         
     | 
| 
      
 52 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 53 
     | 
    
         
            +
                  string: |-
         
     | 
| 
      
 54 
     | 
    
         
            +
                    {
         
     | 
| 
      
 55 
     | 
    
         
            +
                      "_links": {
         
     | 
| 
      
 56 
     | 
    
         
            +
                        "self": {
         
     | 
| 
      
 57 
     | 
    
         
            +
                          "href": "http://localhost:3000/"
         
     | 
| 
      
 58 
     | 
    
         
            +
                        },
         
     | 
| 
      
 59 
     | 
    
         
            +
                        "surveys": {
         
     | 
| 
      
 60 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/surveys"
         
     | 
| 
      
 61 
     | 
    
         
            +
                        },
         
     | 
| 
      
 62 
     | 
    
         
            +
                        "users": {
         
     | 
| 
      
 63 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/users"
         
     | 
| 
      
 64 
     | 
    
         
            +
                        },
         
     | 
| 
      
 65 
     | 
    
         
            +
                        "questions": {
         
     | 
| 
      
 66 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/questions"
         
     | 
| 
      
 67 
     | 
    
         
            +
                        }
         
     | 
| 
      
 68 
     | 
    
         
            +
                      }
         
     | 
| 
      
 69 
     | 
    
         
            +
                    }
         
     | 
| 
      
 70 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 71 
     | 
    
         
            +
              recorded_at: Sat, 13 Sep 2014 14:44:53 GMT
         
     | 
| 
      
 72 
     | 
    
         
            +
            recorded_with: VCR 2.6.0
         
     | 
| 
         @@ -0,0 +1,72 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ---
         
     | 
| 
      
 2 
     | 
    
         
            +
            http_interactions:
         
     | 
| 
      
 3 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 4 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 5 
     | 
    
         
            +
                uri: http://localhost:3000/
         
     | 
| 
      
 6 
     | 
    
         
            +
                body:
         
     | 
| 
      
 7 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 8 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 9 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 10 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 11 
     | 
    
         
            +
                  - Faraday v0.9.0
         
     | 
| 
      
 12 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 13 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 14 
     | 
    
         
            +
                  Api-Token:
         
     | 
| 
      
 15 
     | 
    
         
            +
                  - testing
         
     | 
| 
      
 16 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 17 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 18 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 19 
     | 
    
         
            +
                  - "*/*"
         
     | 
| 
      
 20 
     | 
    
         
            +
              response:
         
     | 
| 
      
 21 
     | 
    
         
            +
                status:
         
     | 
| 
      
 22 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 23 
     | 
    
         
            +
                  message: 'OK '
         
     | 
| 
      
 24 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 25 
     | 
    
         
            +
                  X-Frame-Options:
         
     | 
| 
      
 26 
     | 
    
         
            +
                  - SAMEORIGIN
         
     | 
| 
      
 27 
     | 
    
         
            +
                  X-Xss-Protection:
         
     | 
| 
      
 28 
     | 
    
         
            +
                  - 1; mode=block
         
     | 
| 
      
 29 
     | 
    
         
            +
                  X-Content-Type-Options:
         
     | 
| 
      
 30 
     | 
    
         
            +
                  - nosniff
         
     | 
| 
      
 31 
     | 
    
         
            +
                  X-Ua-Compatible:
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - chrome=1
         
     | 
| 
      
 33 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 34 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 35 
     | 
    
         
            +
                  Etag:
         
     | 
| 
      
 36 
     | 
    
         
            +
                  - '"c4942090acbc96722cba50e4cecfde73"'
         
     | 
| 
      
 37 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 38 
     | 
    
         
            +
                  - max-age=0, private, must-revalidate
         
     | 
| 
      
 39 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 40 
     | 
    
         
            +
                  - f936ef17-f0d6-4d74-ac41-4980b55d4b09
         
     | 
| 
      
 41 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 42 
     | 
    
         
            +
                  - '0.004051'
         
     | 
| 
      
 43 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 44 
     | 
    
         
            +
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
      
 45 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 46 
     | 
    
         
            +
                  - Sun, 14 Sep 2014 17:30:34 GMT
         
     | 
| 
      
 47 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 48 
     | 
    
         
            +
                  - '236'
         
     | 
| 
      
 49 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 50 
     | 
    
         
            +
                  - Keep-Alive
         
     | 
| 
      
 51 
     | 
    
         
            +
                body:
         
     | 
| 
      
 52 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 53 
     | 
    
         
            +
                  string: |-
         
     | 
| 
      
 54 
     | 
    
         
            +
                    {
         
     | 
| 
      
 55 
     | 
    
         
            +
                      "_links": {
         
     | 
| 
      
 56 
     | 
    
         
            +
                        "self": {
         
     | 
| 
      
 57 
     | 
    
         
            +
                          "href": "http://localhost:3000/"
         
     | 
| 
      
 58 
     | 
    
         
            +
                        },
         
     | 
| 
      
 59 
     | 
    
         
            +
                        "surveys": {
         
     | 
| 
      
 60 
     | 
    
         
            +
                          "href": "api/surveys"
         
     | 
| 
      
 61 
     | 
    
         
            +
                        },
         
     | 
| 
      
 62 
     | 
    
         
            +
                        "users": {
         
     | 
| 
      
 63 
     | 
    
         
            +
                          "href": "api/users"
         
     | 
| 
      
 64 
     | 
    
         
            +
                        },
         
     | 
| 
      
 65 
     | 
    
         
            +
                        "questions": {
         
     | 
| 
      
 66 
     | 
    
         
            +
                          "href": "api/questions"
         
     | 
| 
      
 67 
     | 
    
         
            +
                        }
         
     | 
| 
      
 68 
     | 
    
         
            +
                      }
         
     | 
| 
      
 69 
     | 
    
         
            +
                    }
         
     | 
| 
      
 70 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 71 
     | 
    
         
            +
              recorded_at: Sun, 14 Sep 2014 17:30:34 GMT
         
     | 
| 
      
 72 
     | 
    
         
            +
            recorded_with: VCR 2.6.0
         
     | 
| 
         @@ -132,4 +132,67 @@ http_interactions: 
     | 
|
| 
       132 
132 
     | 
    
         
             
                    }
         
     | 
| 
       133 
133 
     | 
    
         
             
                http_version: 
         
     | 
| 
       134 
134 
     | 
    
         
             
              recorded_at: Sat, 05 Jul 2014 20:53:45 GMT
         
     | 
| 
      
 135 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 136 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 137 
     | 
    
         
            +
                uri: http://localhost:3000/api/users/
         
     | 
| 
      
 138 
     | 
    
         
            +
                body:
         
     | 
| 
      
 139 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 140 
     | 
    
         
            +
                  string: "{}"
         
     | 
| 
      
 141 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 142 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 143 
     | 
    
         
            +
                  - Faraday v0.9.0
         
     | 
| 
      
 144 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 145 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 146 
     | 
    
         
            +
                  Api-Token:
         
     | 
| 
      
 147 
     | 
    
         
            +
                  - testing
         
     | 
| 
      
 148 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 149 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 150 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 151 
     | 
    
         
            +
                  - "*/*"
         
     | 
| 
      
 152 
     | 
    
         
            +
              response:
         
     | 
| 
      
 153 
     | 
    
         
            +
                status:
         
     | 
| 
      
 154 
     | 
    
         
            +
                  code: 201
         
     | 
| 
      
 155 
     | 
    
         
            +
                  message: 'Created '
         
     | 
| 
      
 156 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 157 
     | 
    
         
            +
                  X-Frame-Options:
         
     | 
| 
      
 158 
     | 
    
         
            +
                  - SAMEORIGIN
         
     | 
| 
      
 159 
     | 
    
         
            +
                  X-Xss-Protection:
         
     | 
| 
      
 160 
     | 
    
         
            +
                  - 1; mode=block
         
     | 
| 
      
 161 
     | 
    
         
            +
                  X-Content-Type-Options:
         
     | 
| 
      
 162 
     | 
    
         
            +
                  - nosniff
         
     | 
| 
      
 163 
     | 
    
         
            +
                  X-Ua-Compatible:
         
     | 
| 
      
 164 
     | 
    
         
            +
                  - chrome=1
         
     | 
| 
      
 165 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 166 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 167 
     | 
    
         
            +
                  Etag:
         
     | 
| 
      
 168 
     | 
    
         
            +
                  - '"903006ae2ce12ab6070ee76670a487bb"'
         
     | 
| 
      
 169 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 170 
     | 
    
         
            +
                  - max-age=0, private, must-revalidate
         
     | 
| 
      
 171 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 172 
     | 
    
         
            +
                  - 5bcdbb1e-8c13-46f0-aab2-482c64577c0e
         
     | 
| 
      
 173 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 174 
     | 
    
         
            +
                  - '0.006907'
         
     | 
| 
      
 175 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 176 
     | 
    
         
            +
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
      
 177 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 178 
     | 
    
         
            +
                  - Sat, 20 Sep 2014 14:14:34 GMT
         
     | 
| 
      
 179 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 180 
     | 
    
         
            +
                  - '272'
         
     | 
| 
      
 181 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 182 
     | 
    
         
            +
                  - Keep-Alive
         
     | 
| 
      
 183 
     | 
    
         
            +
                body:
         
     | 
| 
      
 184 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 185 
     | 
    
         
            +
                  string: |-
         
     | 
| 
      
 186 
     | 
    
         
            +
                    {
         
     | 
| 
      
 187 
     | 
    
         
            +
                      "id": 13,
         
     | 
| 
      
 188 
     | 
    
         
            +
                      "service_user_id": "3aa49be2db36a85fe4c6b19e6345c8379836716ee035c972e748c7c71195864c",
         
     | 
| 
      
 189 
     | 
    
         
            +
                      "_links": {
         
     | 
| 
      
 190 
     | 
    
         
            +
                        "self": {
         
     | 
| 
      
 191 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/users/13"
         
     | 
| 
      
 192 
     | 
    
         
            +
                        }
         
     | 
| 
      
 193 
     | 
    
         
            +
                      },
         
     | 
| 
      
 194 
     | 
    
         
            +
                      "token": "2965f424f516ad23160aecf4bb6c9131c31439a129a976981237b1b0fbd8754b"
         
     | 
| 
      
 195 
     | 
    
         
            +
                    }
         
     | 
| 
      
 196 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 197 
     | 
    
         
            +
              recorded_at: Sat, 20 Sep 2014 14:14:34 GMT
         
     | 
| 
       135 
198 
     | 
    
         
             
            recorded_with: VCR 2.6.0
         
     | 
| 
         @@ -234,34 +234,221 @@ http_interactions: 
     | 
|
| 
       234 
234 
     | 
    
         
             
                  Content-Type:
         
     | 
| 
       235 
235 
     | 
    
         
             
                  - application/json; charset=utf-8
         
     | 
| 
       236 
236 
     | 
    
         
             
                  Etag:
         
     | 
| 
       237 
     | 
    
         
            -
                  - '" 
     | 
| 
      
 237 
     | 
    
         
            +
                  - '"fe4c6f31bb1792df33abcefb313948a7"'
         
     | 
| 
       238 
238 
     | 
    
         
             
                  Cache-Control:
         
     | 
| 
       239 
239 
     | 
    
         
             
                  - max-age=0, private, must-revalidate
         
     | 
| 
       240 
240 
     | 
    
         
             
                  X-Request-Id:
         
     | 
| 
       241 
     | 
    
         
            -
                  -  
     | 
| 
      
 241 
     | 
    
         
            +
                  - ee2f6789-87a9-4dfc-aafc-5ec6ba486965
         
     | 
| 
       242 
242 
     | 
    
         
             
                  X-Runtime:
         
     | 
| 
       243 
     | 
    
         
            -
                  - '0. 
     | 
| 
      
 243 
     | 
    
         
            +
                  - '0.005270'
         
     | 
| 
       244 
244 
     | 
    
         
             
                  Server:
         
     | 
| 
       245 
245 
     | 
    
         
             
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
       246 
246 
     | 
    
         
             
                  Date:
         
     | 
| 
       247 
     | 
    
         
            -
                  - Sat,  
     | 
| 
      
 247 
     | 
    
         
            +
                  - Sat, 13 Sep 2014 15:38:46 GMT
         
     | 
| 
       248 
248 
     | 
    
         
             
                  Content-Length:
         
     | 
| 
       249 
     | 
    
         
            -
                  - ' 
     | 
| 
      
 249 
     | 
    
         
            +
                  - '134'
         
     | 
| 
       250 
250 
     | 
    
         
             
                  Connection:
         
     | 
| 
       251 
251 
     | 
    
         
             
                  - Keep-Alive
         
     | 
| 
       252 
252 
     | 
    
         
             
                body:
         
     | 
| 
       253 
253 
     | 
    
         
             
                  encoding: UTF-8
         
     | 
| 
       254 
254 
     | 
    
         
             
                  string: |-
         
     | 
| 
       255 
255 
     | 
    
         
             
                    {
         
     | 
| 
       256 
     | 
    
         
            -
                      "id":  
     | 
| 
       257 
     | 
    
         
            -
                      " 
     | 
| 
       258 
     | 
    
         
            -
                      " 
     | 
| 
       259 
     | 
    
         
            -
             
     | 
| 
       260 
     | 
    
         
            -
             
     | 
| 
       261 
     | 
    
         
            -
             
     | 
| 
       262 
     | 
    
         
            -
                       
     | 
| 
       263 
     | 
    
         
            -
                      "external_user_id": 43
         
     | 
| 
      
 256 
     | 
    
         
            +
                      "id": 122,
         
     | 
| 
      
 257 
     | 
    
         
            +
                      "external_user_id": "43",
         
     | 
| 
      
 258 
     | 
    
         
            +
                      "_links": {
         
     | 
| 
      
 259 
     | 
    
         
            +
                        "self": {
         
     | 
| 
      
 260 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/users/122"
         
     | 
| 
      
 261 
     | 
    
         
            +
                        }
         
     | 
| 
      
 262 
     | 
    
         
            +
                      }
         
     | 
| 
       264 
263 
     | 
    
         
             
                    }
         
     | 
| 
       265 
264 
     | 
    
         
             
                http_version: 
         
     | 
| 
       266 
     | 
    
         
            -
              recorded_at: Sat,  
     | 
| 
      
 265 
     | 
    
         
            +
              recorded_at: Sat, 13 Sep 2014 15:38:46 GMT
         
     | 
| 
      
 266 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 267 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 268 
     | 
    
         
            +
                uri: http://localhost:3000/api/users/143
         
     | 
| 
      
 269 
     | 
    
         
            +
                body:
         
     | 
| 
      
 270 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 271 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 272 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 273 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 274 
     | 
    
         
            +
                  - Faraday v0.9.0
         
     | 
| 
      
 275 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 276 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 277 
     | 
    
         
            +
                  Api-Token:
         
     | 
| 
      
 278 
     | 
    
         
            +
                  - testing
         
     | 
| 
      
 279 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 280 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 281 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 282 
     | 
    
         
            +
                  - "*/*"
         
     | 
| 
      
 283 
     | 
    
         
            +
              response:
         
     | 
| 
      
 284 
     | 
    
         
            +
                status:
         
     | 
| 
      
 285 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 286 
     | 
    
         
            +
                  message: 'OK '
         
     | 
| 
      
 287 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 288 
     | 
    
         
            +
                  X-Frame-Options:
         
     | 
| 
      
 289 
     | 
    
         
            +
                  - SAMEORIGIN
         
     | 
| 
      
 290 
     | 
    
         
            +
                  X-Xss-Protection:
         
     | 
| 
      
 291 
     | 
    
         
            +
                  - 1; mode=block
         
     | 
| 
      
 292 
     | 
    
         
            +
                  X-Content-Type-Options:
         
     | 
| 
      
 293 
     | 
    
         
            +
                  - nosniff
         
     | 
| 
      
 294 
     | 
    
         
            +
                  X-Ua-Compatible:
         
     | 
| 
      
 295 
     | 
    
         
            +
                  - chrome=1
         
     | 
| 
      
 296 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 297 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 298 
     | 
    
         
            +
                  Etag:
         
     | 
| 
      
 299 
     | 
    
         
            +
                  - '"db325a6c9171e4791060a4802541c922"'
         
     | 
| 
      
 300 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 301 
     | 
    
         
            +
                  - max-age=0, private, must-revalidate
         
     | 
| 
      
 302 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 303 
     | 
    
         
            +
                  - 47f0bef9-6c79-462e-b3cd-a35c44252cc1
         
     | 
| 
      
 304 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 305 
     | 
    
         
            +
                  - '0.005074'
         
     | 
| 
      
 306 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 307 
     | 
    
         
            +
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
      
 308 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 309 
     | 
    
         
            +
                  - Sat, 13 Sep 2014 15:39:44 GMT
         
     | 
| 
      
 310 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 311 
     | 
    
         
            +
                  - '135'
         
     | 
| 
      
 312 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 313 
     | 
    
         
            +
                  - Keep-Alive
         
     | 
| 
      
 314 
     | 
    
         
            +
                body:
         
     | 
| 
      
 315 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 316 
     | 
    
         
            +
                  string: |-
         
     | 
| 
      
 317 
     | 
    
         
            +
                    {
         
     | 
| 
      
 318 
     | 
    
         
            +
                      "id": 124,
         
     | 
| 
      
 319 
     | 
    
         
            +
                      "external_user_id": "143",
         
     | 
| 
      
 320 
     | 
    
         
            +
                      "_links": {
         
     | 
| 
      
 321 
     | 
    
         
            +
                        "self": {
         
     | 
| 
      
 322 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/users/124"
         
     | 
| 
      
 323 
     | 
    
         
            +
                        }
         
     | 
| 
      
 324 
     | 
    
         
            +
                      }
         
     | 
| 
      
 325 
     | 
    
         
            +
                    }
         
     | 
| 
      
 326 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 327 
     | 
    
         
            +
              recorded_at: Sat, 13 Sep 2014 15:39:44 GMT
         
     | 
| 
      
 328 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 329 
     | 
    
         
            +
                method: post
         
     | 
| 
      
 330 
     | 
    
         
            +
                uri: http://localhost:3000/api/users/
         
     | 
| 
      
 331 
     | 
    
         
            +
                body:
         
     | 
| 
      
 332 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 333 
     | 
    
         
            +
                  string: "{}"
         
     | 
| 
      
 334 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 335 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 336 
     | 
    
         
            +
                  - Faraday v0.9.0
         
     | 
| 
      
 337 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 338 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 339 
     | 
    
         
            +
                  Api-Token:
         
     | 
| 
      
 340 
     | 
    
         
            +
                  - testing
         
     | 
| 
      
 341 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 342 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 343 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 344 
     | 
    
         
            +
                  - "*/*"
         
     | 
| 
      
 345 
     | 
    
         
            +
              response:
         
     | 
| 
      
 346 
     | 
    
         
            +
                status:
         
     | 
| 
      
 347 
     | 
    
         
            +
                  code: 201
         
     | 
| 
      
 348 
     | 
    
         
            +
                  message: 'Created '
         
     | 
| 
      
 349 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 350 
     | 
    
         
            +
                  X-Frame-Options:
         
     | 
| 
      
 351 
     | 
    
         
            +
                  - SAMEORIGIN
         
     | 
| 
      
 352 
     | 
    
         
            +
                  X-Xss-Protection:
         
     | 
| 
      
 353 
     | 
    
         
            +
                  - 1; mode=block
         
     | 
| 
      
 354 
     | 
    
         
            +
                  X-Content-Type-Options:
         
     | 
| 
      
 355 
     | 
    
         
            +
                  - nosniff
         
     | 
| 
      
 356 
     | 
    
         
            +
                  X-Ua-Compatible:
         
     | 
| 
      
 357 
     | 
    
         
            +
                  - chrome=1
         
     | 
| 
      
 358 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 359 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 360 
     | 
    
         
            +
                  Etag:
         
     | 
| 
      
 361 
     | 
    
         
            +
                  - '"4c24f02fd8652981bd215cc2291fa5ab"'
         
     | 
| 
      
 362 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 363 
     | 
    
         
            +
                  - max-age=0, private, must-revalidate
         
     | 
| 
      
 364 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 365 
     | 
    
         
            +
                  - 81e0537c-a2f4-4449-9fc9-224a032a759e
         
     | 
| 
      
 366 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 367 
     | 
    
         
            +
                  - '0.009047'
         
     | 
| 
      
 368 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 369 
     | 
    
         
            +
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
      
 370 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 371 
     | 
    
         
            +
                  - Sat, 20 Sep 2014 14:14:34 GMT
         
     | 
| 
      
 372 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 373 
     | 
    
         
            +
                  - '272'
         
     | 
| 
      
 374 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 375 
     | 
    
         
            +
                  - Keep-Alive
         
     | 
| 
      
 376 
     | 
    
         
            +
                body:
         
     | 
| 
      
 377 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 378 
     | 
    
         
            +
                  string: |-
         
     | 
| 
      
 379 
     | 
    
         
            +
                    {
         
     | 
| 
      
 380 
     | 
    
         
            +
                      "id": 14,
         
     | 
| 
      
 381 
     | 
    
         
            +
                      "service_user_id": "3aa49be2db36a85fe4c6b19e6345c8379836716ee035c972e748c7c71195864c",
         
     | 
| 
      
 382 
     | 
    
         
            +
                      "_links": {
         
     | 
| 
      
 383 
     | 
    
         
            +
                        "self": {
         
     | 
| 
      
 384 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/users/14"
         
     | 
| 
      
 385 
     | 
    
         
            +
                        }
         
     | 
| 
      
 386 
     | 
    
         
            +
                      },
         
     | 
| 
      
 387 
     | 
    
         
            +
                      "token": "2965f424f516ad23160aecf4bb6c9131c31439a129a976981237b1b0fbd8754b"
         
     | 
| 
      
 388 
     | 
    
         
            +
                    }
         
     | 
| 
      
 389 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 390 
     | 
    
         
            +
              recorded_at: Sat, 20 Sep 2014 14:14:34 GMT
         
     | 
| 
      
 391 
     | 
    
         
            +
            - request:
         
     | 
| 
      
 392 
     | 
    
         
            +
                method: get
         
     | 
| 
      
 393 
     | 
    
         
            +
                uri: http://localhost:3000/api/users/3aa49be2db36a85fe4c6b19e6345c8379836716ee035c972e748c7c71195864c
         
     | 
| 
      
 394 
     | 
    
         
            +
                body:
         
     | 
| 
      
 395 
     | 
    
         
            +
                  encoding: US-ASCII
         
     | 
| 
      
 396 
     | 
    
         
            +
                  string: ''
         
     | 
| 
      
 397 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 398 
     | 
    
         
            +
                  User-Agent:
         
     | 
| 
      
 399 
     | 
    
         
            +
                  - Faraday v0.9.0
         
     | 
| 
      
 400 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 401 
     | 
    
         
            +
                  - application/json
         
     | 
| 
      
 402 
     | 
    
         
            +
                  Api-Token:
         
     | 
| 
      
 403 
     | 
    
         
            +
                  - testing
         
     | 
| 
      
 404 
     | 
    
         
            +
                  Accept-Encoding:
         
     | 
| 
      
 405 
     | 
    
         
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         
     | 
| 
      
 406 
     | 
    
         
            +
                  Accept:
         
     | 
| 
      
 407 
     | 
    
         
            +
                  - "*/*"
         
     | 
| 
      
 408 
     | 
    
         
            +
              response:
         
     | 
| 
      
 409 
     | 
    
         
            +
                status:
         
     | 
| 
      
 410 
     | 
    
         
            +
                  code: 200
         
     | 
| 
      
 411 
     | 
    
         
            +
                  message: 'OK '
         
     | 
| 
      
 412 
     | 
    
         
            +
                headers:
         
     | 
| 
      
 413 
     | 
    
         
            +
                  X-Frame-Options:
         
     | 
| 
      
 414 
     | 
    
         
            +
                  - SAMEORIGIN
         
     | 
| 
      
 415 
     | 
    
         
            +
                  X-Xss-Protection:
         
     | 
| 
      
 416 
     | 
    
         
            +
                  - 1; mode=block
         
     | 
| 
      
 417 
     | 
    
         
            +
                  X-Content-Type-Options:
         
     | 
| 
      
 418 
     | 
    
         
            +
                  - nosniff
         
     | 
| 
      
 419 
     | 
    
         
            +
                  X-Ua-Compatible:
         
     | 
| 
      
 420 
     | 
    
         
            +
                  - chrome=1
         
     | 
| 
      
 421 
     | 
    
         
            +
                  Content-Type:
         
     | 
| 
      
 422 
     | 
    
         
            +
                  - application/json; charset=utf-8
         
     | 
| 
      
 423 
     | 
    
         
            +
                  Etag:
         
     | 
| 
      
 424 
     | 
    
         
            +
                  - '"4c24f02fd8652981bd215cc2291fa5ab"'
         
     | 
| 
      
 425 
     | 
    
         
            +
                  Cache-Control:
         
     | 
| 
      
 426 
     | 
    
         
            +
                  - max-age=0, private, must-revalidate
         
     | 
| 
      
 427 
     | 
    
         
            +
                  X-Request-Id:
         
     | 
| 
      
 428 
     | 
    
         
            +
                  - b815d7ac-f9e4-4d73-a55e-1cc14d1cf833
         
     | 
| 
      
 429 
     | 
    
         
            +
                  X-Runtime:
         
     | 
| 
      
 430 
     | 
    
         
            +
                  - '0.005549'
         
     | 
| 
      
 431 
     | 
    
         
            +
                  Server:
         
     | 
| 
      
 432 
     | 
    
         
            +
                  - WEBrick/1.3.1 (Ruby/2.1.2/2014-05-08)
         
     | 
| 
      
 433 
     | 
    
         
            +
                  Date:
         
     | 
| 
      
 434 
     | 
    
         
            +
                  - Sat, 20 Sep 2014 14:14:34 GMT
         
     | 
| 
      
 435 
     | 
    
         
            +
                  Content-Length:
         
     | 
| 
      
 436 
     | 
    
         
            +
                  - '272'
         
     | 
| 
      
 437 
     | 
    
         
            +
                  Connection:
         
     | 
| 
      
 438 
     | 
    
         
            +
                  - Keep-Alive
         
     | 
| 
      
 439 
     | 
    
         
            +
                body:
         
     | 
| 
      
 440 
     | 
    
         
            +
                  encoding: UTF-8
         
     | 
| 
      
 441 
     | 
    
         
            +
                  string: |-
         
     | 
| 
      
 442 
     | 
    
         
            +
                    {
         
     | 
| 
      
 443 
     | 
    
         
            +
                      "id": 14,
         
     | 
| 
      
 444 
     | 
    
         
            +
                      "service_user_id": "3aa49be2db36a85fe4c6b19e6345c8379836716ee035c972e748c7c71195864c",
         
     | 
| 
      
 445 
     | 
    
         
            +
                      "_links": {
         
     | 
| 
      
 446 
     | 
    
         
            +
                        "self": {
         
     | 
| 
      
 447 
     | 
    
         
            +
                          "href": "http://localhost:3000/api/users/14"
         
     | 
| 
      
 448 
     | 
    
         
            +
                        }
         
     | 
| 
      
 449 
     | 
    
         
            +
                      },
         
     | 
| 
      
 450 
     | 
    
         
            +
                      "token": "2965f424f516ad23160aecf4bb6c9131c31439a129a976981237b1b0fbd8754b"
         
     | 
| 
      
 451 
     | 
    
         
            +
                    }
         
     | 
| 
      
 452 
     | 
    
         
            +
                http_version: 
         
     | 
| 
      
 453 
     | 
    
         
            +
              recorded_at: Sat, 20 Sep 2014 14:14:34 GMT
         
     | 
| 
       267 
454 
     | 
    
         
             
            recorded_with: VCR 2.6.0
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: poptart
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.6
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Austen Ito
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014-09- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-09-20 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: activesupport
         
     | 
| 
         @@ -52,6 +52,20 @@ dependencies: 
     | 
|
| 
       52 
52 
     | 
    
         
             
                - - ">="
         
     | 
| 
       53 
53 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       54 
54 
     | 
    
         
             
                    version: '0'
         
     | 
| 
      
 55 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 56 
     | 
    
         
            +
              name: addressable
         
     | 
| 
      
 57 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 58 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 59 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 60 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 61 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 62 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 63 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 64 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 65 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 66 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 67 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 68 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       55 
69 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       56 
70 
     | 
    
         
             
              name: bourne
         
     | 
| 
       57 
71 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -213,6 +227,9 @@ files: 
     | 
|
| 
       213 
227 
     | 
    
         
             
            - spec/vcr/answering/survey_questions_creates_and_returns_a_random_question_survey.yml
         
     | 
| 
       214 
228 
     | 
    
         
             
            - spec/vcr/answering/survey_questions_creates_and_returns_an_empty_survey.yml
         
     | 
| 
       215 
229 
     | 
    
         
             
            - spec/vcr/answering/survey_questions_finds_survey_question_for_id.yml
         
     | 
| 
      
 230 
     | 
    
         
            +
            - spec/vcr/answering/survey_questions_returns_all_answered_survey_questions_for_a_question.yml
         
     | 
| 
      
 231 
     | 
    
         
            +
            - spec/vcr/poptart/root/builds_top_level_uri.yml
         
     | 
| 
      
 232 
     | 
    
         
            +
            - spec/vcr/poptart/root/builds_urls.yml
         
     | 
| 
       216 
233 
     | 
    
         
             
            - spec/vcr/poptart/root/returns_survey_links.yml
         
     | 
| 
       217 
234 
     | 
    
         
             
            - spec/vcr/user/management_creates_a_user.yml
         
     | 
| 
       218 
235 
     | 
    
         
             
            - spec/vcr/user/management_returns_a_user.yml
         
     | 
| 
         @@ -251,6 +268,9 @@ test_files: 
     | 
|
| 
       251 
268 
     | 
    
         
             
            - spec/vcr/answering/survey_questions_creates_and_returns_a_random_question_survey.yml
         
     | 
| 
       252 
269 
     | 
    
         
             
            - spec/vcr/answering/survey_questions_creates_and_returns_an_empty_survey.yml
         
     | 
| 
       253 
270 
     | 
    
         
             
            - spec/vcr/answering/survey_questions_finds_survey_question_for_id.yml
         
     | 
| 
      
 271 
     | 
    
         
            +
            - spec/vcr/answering/survey_questions_returns_all_answered_survey_questions_for_a_question.yml
         
     | 
| 
      
 272 
     | 
    
         
            +
            - spec/vcr/poptart/root/builds_top_level_uri.yml
         
     | 
| 
      
 273 
     | 
    
         
            +
            - spec/vcr/poptart/root/builds_urls.yml
         
     | 
| 
       254 
274 
     | 
    
         
             
            - spec/vcr/poptart/root/returns_survey_links.yml
         
     | 
| 
       255 
275 
     | 
    
         
             
            - spec/vcr/user/management_creates_a_user.yml
         
     | 
| 
       256 
276 
     | 
    
         
             
            - spec/vcr/user/management_returns_a_user.yml
         
     |