openstax_exchange 0.0.0 → 0.0.1

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 (77) hide show
  1. data/.gitignore +15 -0
  2. data/.rspec +1 -0
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +8 -0
  6. data/Gemfile +4 -0
  7. data/MIT-LICENSE +3 -1
  8. data/README.md +58 -20
  9. data/Rakefile +5 -13
  10. data/exchange-client.gemspec +30 -0
  11. data/lib/openstax/exchange/client_instance.rb +23 -0
  12. data/lib/openstax/exchange/configuration.rb +12 -0
  13. data/lib/openstax/exchange/exceptions.rb +21 -0
  14. data/lib/openstax/exchange/exchange.rb +65 -0
  15. data/lib/openstax/exchange/fake_client/configuration.rb +13 -0
  16. data/lib/openstax/exchange/fake_client/fake_client.rb +71 -0
  17. data/lib/openstax/exchange/real_client/real_client.rb +76 -0
  18. data/lib/openstax/exchange/version.rb +1 -1
  19. data/lib/openstax_exchange.rb +8 -112
  20. data/spec/cassettes/OpenStax_Exchange/client_instance_configuration/can_be_configured_to_use_a_real_exchange_client.yml +48 -0
  21. data/spec/cassettes/OpenStax_Exchange/internal_client_instance/_client_defaults_to_a_real_exchange_client.yml +48 -0
  22. data/spec/cassettes/OpenStax_Exchange/internal_client_instance/_reset_causes_a_new_client_object_to_be_returned_by_client.yml +48 -0
  23. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_create_identifier/success/creates_a_distinct_identifer_per_invokation.yml +146 -0
  24. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_create_identifier/success/creates_and_returns_a_new_identifier.yml +97 -0
  25. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_initialize/invalid_platform_id/raises_an_exception.yml +52 -0
  26. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_initialize/invalid_platform_secret/raises_an_exception.yml +52 -0
  27. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_initialize/success/initializes_the_authentication_token.yml +48 -0
  28. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_record_multiple_choice_answer/duplicate_identifer_resource_trial_triplet/raises_an_exception.yml +194 -0
  29. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_record_multiple_choice_answer/invalid_resource_string/raises_an_exception.yml +145 -0
  30. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_record_multiple_choice_answer/success/allows_answers_with_distinct_identifiers_to_be_saved.yml +244 -0
  31. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_record_multiple_choice_answer/success/allows_answers_with_distinct_resources_to_be_saved.yml +195 -0
  32. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_record_multiple_choice_answer/success/allows_answers_with_distinct_trials_to_be_saved.yml +195 -0
  33. data/spec/cassettes/OpenStax_Exchange_RealClient/behaves_like_exchange_client_api_v1/_record_multiple_choice_answer/success/creates_a_multiple_choice_answer_associated_with_the_given_identifier.yml +146 -0
  34. data/spec/lib/openstax/exchange/client_configuration_spec.rb +58 -0
  35. data/spec/lib/openstax/exchange/fake_client_v1_spec.rb +14 -0
  36. data/spec/lib/openstax/exchange/real_client_v1_spec.rb +9 -0
  37. data/spec/lib/openstax/exchange/shared_examples_for_exchange_client_v1.rb +208 -0
  38. data/spec/spec_helper.rb +52 -38
  39. metadata +97 -100
  40. checksums.yaml +0 -15
  41. data/spec/dummy/README.md +0 -1
  42. data/spec/dummy/Rakefile +0 -7
  43. data/spec/dummy/app/assets/javascripts/application.js +0 -15
  44. data/spec/dummy/app/assets/stylesheets/application.css +0 -13
  45. data/spec/dummy/app/controllers/api/dummy_controller.rb +0 -11
  46. data/spec/dummy/app/controllers/api/events_controller.rb +0 -7
  47. data/spec/dummy/app/controllers/application_controller.rb +0 -7
  48. data/spec/dummy/app/controllers/oauth_controller.rb +0 -8
  49. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  50. data/spec/dummy/config.ru +0 -4
  51. data/spec/dummy/config/application.rb +0 -55
  52. data/spec/dummy/config/boot.rb +0 -10
  53. data/spec/dummy/config/database.yml +0 -25
  54. data/spec/dummy/config/environment.rb +0 -5
  55. data/spec/dummy/config/environments/development.rb +0 -29
  56. data/spec/dummy/config/environments/production.rb +0 -69
  57. data/spec/dummy/config/environments/test.rb +0 -35
  58. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  59. data/spec/dummy/config/initializers/inflections.rb +0 -15
  60. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  61. data/spec/dummy/config/initializers/openstax_exchange.rb +0 -10
  62. data/spec/dummy/config/initializers/secret_token.rb +0 -7
  63. data/spec/dummy/config/initializers/session_store.rb +0 -8
  64. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  65. data/spec/dummy/config/locales/en.yml +0 -5
  66. data/spec/dummy/config/routes.rb +0 -11
  67. data/spec/dummy/db/development.sqlite3 +0 -0
  68. data/spec/dummy/db/schema.rb +0 -16
  69. data/spec/dummy/db/test.sqlite3 +0 -0
  70. data/spec/dummy/log/development.log +0 -929
  71. data/spec/dummy/log/test.log +0 -46753
  72. data/spec/dummy/public/404.html +0 -26
  73. data/spec/dummy/public/422.html +0 -26
  74. data/spec/dummy/public/500.html +0 -25
  75. data/spec/dummy/public/favicon.ico +0 -0
  76. data/spec/dummy/script/rails +0 -6
  77. data/spec/lib/openstax_exchange_spec.rb +0 -23
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Exchange
3
- VERSION = "0.0.0"
3
+ VERSION = "0.0.1"
4
4
  end
5
5
  end
@@ -1,112 +1,8 @@
1
- require 'openstax/exchange/version'
2
-
3
- require 'oauth2'
4
- require 'uri'
5
-
6
- module OpenStax
7
- module Exchange
8
-
9
- DEFAULT_API_VERSION = :v1
10
-
11
- class << self
12
-
13
- ###########################################################################
14
- #
15
- # Configuration machinery.
16
- #
17
- # To configure OpenStax Exchange, put the following code in your
18
- # application's initialization logic
19
- # (eg. in the config/initializers in a Rails app)
20
- #
21
- # OpenStax::Exchange.configure do |config|
22
- # config.<parameter name> = <parameter value>
23
- # ...
24
- # end
25
- #
26
-
27
- def configure
28
- yield configuration
29
- end
30
-
31
- def configuration
32
- @configuration ||= Configuration.new
33
- end
34
-
35
- class Configuration
36
- # openstax_exchange_url
37
- # Base URL for OpenStax Exchange
38
- attr_reader :openstax_exchange_url
39
-
40
- # openstax_exchange_platform_id
41
- # OAuth client_id received from OpenStax Exchange
42
- attr_accessor :openstax_exchange_platform_id
43
-
44
- # openstax_exchange_platform_secret
45
- # OAuth client_secret received from OpenStax Exchange
46
- attr_accessor :openstax_exchange_platform_secret
47
-
48
- def openstax_exchange_url=(url)
49
- url.gsub!(/https|http/,'https') if !(url =~ /localhost/)
50
- url = url + "/" if url[url.size-1] != '/'
51
- @openstax_exchange_url = url
52
- end
53
-
54
- def initialize
55
- @openstax_exchange_platform_id = 'SET ME!'
56
- @openstax_exchange_platform_secret = 'SET ME!'
57
- @openstax_exchange_url = 'https://exchange.openstax.org/'
58
- super
59
- end
60
- end
61
-
62
- # Executes an OpenStax Exchange API call, using the given HTTP method,
63
- # API url and request options.
64
- # Any options accepted by OAuth2 requests can be used, such as
65
- # :params, :body, :headers, etc, plus the :access_token option, which can
66
- # be used to manually specify an OAuth access token.
67
- # On failure, it can throw Faraday::ConnectionFailed for connection errors
68
- # or OAuth2::Error if Exchange returns an HTTP 400 error,
69
- # such as 422 Unprocessable Entity.
70
- # On success, returns an OAuth2::Response object.
71
- def api_call(http_method, url, options = {})
72
- version = options.delete(:api_version)
73
- unless version.blank?
74
- options[:headers] ||= {}
75
- options[:headers].merge!({
76
- 'Accept' => "application/vnd.exchange.openstax.#{version.to_s}"
77
- })
78
- end
79
-
80
- token_string = options.delete(:access_token)
81
- token = token_string.blank? ? client.client_credentials.get_token :
82
- OAuth2::AccessToken.new(client, token_string)
83
-
84
- api_url = URI.join(configuration.openstax_exchange_url, 'api/', url)
85
-
86
- token.request(http_method, api_url, options)
87
- end
88
-
89
- # Performs an event search in the Exchange server.
90
- # Results are limited to events created by this app.
91
- # Takes a query parameter and an optional API version parameter.
92
- # API version currently defaults to :v1 (may change in the future).
93
- # On failure, throws an Exception, just like api_call.
94
- # On success, returns an OAuth2::Response object.
95
- def search_events(query, version = DEFAULT_API_VERSION)
96
- options = {:params => {:q => query},
97
- :api_version => version}
98
- api_call(:get, 'events', options)
99
- end
100
-
101
- protected
102
-
103
- def client
104
- @client ||= OAuth2::Client.new(configuration.openstax_exchange_platform_id,
105
- configuration.openstax_exchange_platform_secret,
106
- :site => configuration.openstax_exchange_url)
107
- end
108
-
109
- end
110
-
111
- end
112
- end
1
+ require "openstax/exchange/version"
2
+ require "openstax/exchange/exchange"
3
+ require "openstax/exchange/configuration"
4
+ require "openstax/exchange/client_instance"
5
+ require "openstax/exchange/real_client/real_client"
6
+ require "openstax/exchange/fake_client/fake_client"
7
+ require "openstax/exchange/fake_client/configuration"
8
+ require "openstax/exchange/exceptions"
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://123:abc@localhost:3003/oauth/token
6
+ body:
7
+ encoding: US-ASCII
8
+ string: grant_type=client_credentials
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept:
15
+ - ! '*/*'
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ X-Frame-Options:
22
+ - SAMEORIGIN
23
+ X-Xss-Protection:
24
+ - 1; mode=block
25
+ X-Content-Type-Options:
26
+ - nosniff
27
+ Cache-Control:
28
+ - no-store
29
+ Pragma:
30
+ - no-cache
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ Etag:
34
+ - W/"030ffc34c73241d72d05aca483ddd03f"
35
+ X-Request-Id:
36
+ - f9eeabfc-3bbc-4194-9f5e-5933e57c1220
37
+ X-Runtime:
38
+ - '0.015146'
39
+ Connection:
40
+ - close
41
+ Server:
42
+ - thin
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"access_token":"42ad7558a7079e5ffe21572066a090693e5da796fcd64c762ef24c74de196f82","token_type":"bearer"}'
46
+ http_version:
47
+ recorded_at: Mon, 12 Jan 2015 21:08:51 GMT
48
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://123:abc@localhost:3003/oauth/token
6
+ body:
7
+ encoding: US-ASCII
8
+ string: grant_type=client_credentials
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept:
15
+ - ! '*/*'
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ X-Frame-Options:
22
+ - SAMEORIGIN
23
+ X-Xss-Protection:
24
+ - 1; mode=block
25
+ X-Content-Type-Options:
26
+ - nosniff
27
+ Cache-Control:
28
+ - no-store
29
+ Pragma:
30
+ - no-cache
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ Etag:
34
+ - W/"57e1ddda4cd18e6de20628d2f695579f"
35
+ X-Request-Id:
36
+ - 849eb09a-9f9f-4c4b-86bc-91ee21d1788c
37
+ X-Runtime:
38
+ - '0.016357'
39
+ Connection:
40
+ - close
41
+ Server:
42
+ - thin
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"access_token":"3540d986644ae0492996b05dc584a1ec545b66f14099d70a12e8914fad30651a","token_type":"bearer"}'
46
+ http_version:
47
+ recorded_at: Mon, 12 Jan 2015 21:08:51 GMT
48
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://123:abc@localhost:3003/oauth/token
6
+ body:
7
+ encoding: US-ASCII
8
+ string: grant_type=client_credentials
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept:
15
+ - ! '*/*'
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ X-Frame-Options:
22
+ - SAMEORIGIN
23
+ X-Xss-Protection:
24
+ - 1; mode=block
25
+ X-Content-Type-Options:
26
+ - nosniff
27
+ Cache-Control:
28
+ - no-store
29
+ Pragma:
30
+ - no-cache
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ Etag:
34
+ - W/"8224c57e32a05bf41b410f079e81d6dd"
35
+ X-Request-Id:
36
+ - 1a70559c-c97b-4c33-9c33-e0ad700bfee7
37
+ X-Runtime:
38
+ - '0.015211'
39
+ Connection:
40
+ - close
41
+ Server:
42
+ - thin
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"access_token":"46e1d7f015769193cfb7a5f5691ae601282010d0cfb540b745a810bd9749868f","token_type":"bearer"}'
46
+ http_version:
47
+ recorded_at: Mon, 12 Jan 2015 21:08:51 GMT
48
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,146 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://123:abc@localhost:3003/oauth/token
6
+ body:
7
+ encoding: US-ASCII
8
+ string: grant_type=client_credentials
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept:
15
+ - ! '*/*'
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ X-Frame-Options:
22
+ - SAMEORIGIN
23
+ X-Xss-Protection:
24
+ - 1; mode=block
25
+ X-Content-Type-Options:
26
+ - nosniff
27
+ Cache-Control:
28
+ - no-store
29
+ Pragma:
30
+ - no-cache
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ Etag:
34
+ - W/"78a764ea7b6f5c5a842411f5857c9fca"
35
+ X-Request-Id:
36
+ - 167f3bf7-4087-4a93-a227-e9402d4f10e1
37
+ X-Runtime:
38
+ - '0.014904'
39
+ Connection:
40
+ - close
41
+ Server:
42
+ - thin
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"access_token":"4b75ee3427beb3b486def357c3d7e6aa97ca948a8bfb7528c0a09913525795d9","token_type":"bearer"}'
46
+ http_version:
47
+ recorded_at: Mon, 12 Jan 2015 21:08:52 GMT
48
+ - request:
49
+ method: post
50
+ uri: http://localhost:3003/api/identifiers
51
+ body:
52
+ encoding: US-ASCII
53
+ string: ''
54
+ headers:
55
+ User-Agent:
56
+ - Faraday v0.9.0
57
+ Accept:
58
+ - application/vnd.exchange.openstax.v1
59
+ Authorization:
60
+ - Bearer 4b75ee3427beb3b486def357c3d7e6aa97ca948a8bfb7528c0a09913525795d9
61
+ Content-Length:
62
+ - '0'
63
+ response:
64
+ status:
65
+ code: 201
66
+ message: Created
67
+ headers:
68
+ X-Frame-Options:
69
+ - SAMEORIGIN
70
+ X-Xss-Protection:
71
+ - 1; mode=block
72
+ X-Content-Type-Options:
73
+ - nosniff
74
+ Content-Type:
75
+ - application/json; charset=utf-8
76
+ Etag:
77
+ - W/"827945503ecf81b1c4c910bee932d933"
78
+ Cache-Control:
79
+ - max-age=0, private, must-revalidate
80
+ Set-Cookie:
81
+ - _exercises_session=c0cyWnNJeUZSUVQ1MVJ6QUdYUjJKakNSbFRweFQwdnovVms3dm42dDRqMFdSSTJwM2dVTU5GelFPNjhSRXdRVkQxYUlNN0Jpek5Nd2RtenlkNUV0VlE9PS0tdkxMWVV4dUgvVFd3YzFTZzJkNUFXQT09--10f51958af22134ccfe27073cd381c0faf434a35;
82
+ path=/; HttpOnly
83
+ - request_method=POST; path=/
84
+ X-Request-Id:
85
+ - 4911b91c-7fb5-49ec-9f91-0772d50ef84c
86
+ X-Runtime:
87
+ - '0.078438'
88
+ Connection:
89
+ - close
90
+ Server:
91
+ - thin
92
+ body:
93
+ encoding: US-ASCII
94
+ string: ! '{"identifier":"d8626248d8781ea4a079810bbc2414194335fdab7658b7ba2fab8986b80b7b05"}'
95
+ http_version:
96
+ recorded_at: Mon, 12 Jan 2015 21:08:52 GMT
97
+ - request:
98
+ method: post
99
+ uri: http://localhost:3003/api/identifiers
100
+ body:
101
+ encoding: US-ASCII
102
+ string: ''
103
+ headers:
104
+ User-Agent:
105
+ - Faraday v0.9.0
106
+ Accept:
107
+ - application/vnd.exchange.openstax.v1
108
+ Authorization:
109
+ - Bearer 4b75ee3427beb3b486def357c3d7e6aa97ca948a8bfb7528c0a09913525795d9
110
+ Content-Length:
111
+ - '0'
112
+ response:
113
+ status:
114
+ code: 201
115
+ message: Created
116
+ headers:
117
+ X-Frame-Options:
118
+ - SAMEORIGIN
119
+ X-Xss-Protection:
120
+ - 1; mode=block
121
+ X-Content-Type-Options:
122
+ - nosniff
123
+ Content-Type:
124
+ - application/json; charset=utf-8
125
+ Etag:
126
+ - W/"8d46bbfacc4812d2aafea6655fc6ea42"
127
+ Cache-Control:
128
+ - max-age=0, private, must-revalidate
129
+ Set-Cookie:
130
+ - _exercises_session=LzR6d09ZRE1CUjZlR2Jac1FpMlkzeDl2VWFNYTJyQ1NGeGkxWjRxVHdVS095ckpwUFZMcytxUFByOXVJOHoxUFR1d3ozSzNycFBYYVUrOEY3TVU3eVE9PS0tb29QaldpV2lkaWZEZHlRblZjQVBjdz09--c93e2fa442d933cb679336585b1670ebf60fdb09;
131
+ path=/; HttpOnly
132
+ - request_method=POST; path=/
133
+ X-Request-Id:
134
+ - dca250e2-9c45-4f64-b584-a0f8f264a3f3
135
+ X-Runtime:
136
+ - '0.040383'
137
+ Connection:
138
+ - close
139
+ Server:
140
+ - thin
141
+ body:
142
+ encoding: US-ASCII
143
+ string: ! '{"identifier":"c2e144cf2fa6db7fe45015b20fe117293a75d8c778204507095e03e8fa60ebf9"}'
144
+ http_version:
145
+ recorded_at: Mon, 12 Jan 2015 21:08:52 GMT
146
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,97 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://123:abc@localhost:3003/oauth/token
6
+ body:
7
+ encoding: US-ASCII
8
+ string: grant_type=client_credentials
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.0
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept:
15
+ - ! '*/*'
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ X-Frame-Options:
22
+ - SAMEORIGIN
23
+ X-Xss-Protection:
24
+ - 1; mode=block
25
+ X-Content-Type-Options:
26
+ - nosniff
27
+ Cache-Control:
28
+ - no-store
29
+ Pragma:
30
+ - no-cache
31
+ Content-Type:
32
+ - application/json; charset=utf-8
33
+ Etag:
34
+ - W/"f04b2cfc92d51ad3cc0806eeea34ae39"
35
+ X-Request-Id:
36
+ - 0ade458e-d6b6-47ff-88af-36a192d55ed4
37
+ X-Runtime:
38
+ - '0.029061'
39
+ Connection:
40
+ - close
41
+ Server:
42
+ - thin
43
+ body:
44
+ encoding: US-ASCII
45
+ string: ! '{"access_token":"bcf348f1e3d1b3422422671a2c940d59351bad44b3b95ed3b2296c16f57675a2","token_type":"bearer"}'
46
+ http_version:
47
+ recorded_at: Mon, 12 Jan 2015 21:08:52 GMT
48
+ - request:
49
+ method: post
50
+ uri: http://localhost:3003/api/identifiers
51
+ body:
52
+ encoding: US-ASCII
53
+ string: ''
54
+ headers:
55
+ User-Agent:
56
+ - Faraday v0.9.0
57
+ Accept:
58
+ - application/vnd.exchange.openstax.v1
59
+ Authorization:
60
+ - Bearer bcf348f1e3d1b3422422671a2c940d59351bad44b3b95ed3b2296c16f57675a2
61
+ Content-Length:
62
+ - '0'
63
+ response:
64
+ status:
65
+ code: 201
66
+ message: Created
67
+ headers:
68
+ X-Frame-Options:
69
+ - SAMEORIGIN
70
+ X-Xss-Protection:
71
+ - 1; mode=block
72
+ X-Content-Type-Options:
73
+ - nosniff
74
+ Content-Type:
75
+ - application/json; charset=utf-8
76
+ Etag:
77
+ - W/"0ca26961ce9d51f60f5a467cfe7ba4c2"
78
+ Cache-Control:
79
+ - max-age=0, private, must-revalidate
80
+ Set-Cookie:
81
+ - _exercises_session=TnZoWHNTaWdjZmJJUXg2VHdOdERvcTA5a2R6WURqQkJub1FMYlZYdEpKZ3hCQjJiekx2ZVdDL2ZBcWMwOW53Y3lFVHYzWHJYTFlhdW02MUVKMXdZY2c9PS0tQ1VnN1EzSmxad1BjY1d5UVNHR29xdz09--e0ce290be622c8641bdc4072f45e8f23b596a233;
82
+ path=/; HttpOnly
83
+ - request_method=POST; path=/
84
+ X-Request-Id:
85
+ - 15464bd1-b133-4c40-9e36-17a4b3a43ebc
86
+ X-Runtime:
87
+ - '0.047932'
88
+ Connection:
89
+ - close
90
+ Server:
91
+ - thin
92
+ body:
93
+ encoding: US-ASCII
94
+ string: ! '{"identifier":"e4b89fa467a1f56272ab3d4440cd784b9a8eaa377f55997c74a452c3e084bf69"}'
95
+ http_version:
96
+ recorded_at: Mon, 12 Jan 2015 21:08:52 GMT
97
+ recorded_with: VCR 2.9.3