ruby-resty 0.1.0 → 0.2.0

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 (48) hide show
  1. data/README.md +26 -8
  2. data/Rakefile +7 -0
  3. data/lib/resty/cli.rb +21 -13
  4. data/lib/resty/commands/method_command.rb +27 -12
  5. data/lib/resty/{cli_options.rb → options.rb} +20 -12
  6. data/lib/resty/override_pry_help.rb +17 -0
  7. data/lib/resty/pretty_printer.rb +59 -0
  8. data/lib/resty/repl.rb +6 -4
  9. data/lib/resty/request.rb +18 -10
  10. data/lib/resty.rb +6 -3
  11. data/lib/version.rb +1 -1
  12. data/ruby-resty.gemspec +5 -1
  13. data/spec/lib/resty/commands/method_command_spec.rb +22 -14
  14. data/spec/lib/resty/options_spec.rb +111 -0
  15. data/spec/lib/resty/pretty_printer_spec.rb +110 -0
  16. data/spec/lib/resty/request_spec.rb +69 -45
  17. data/spec/requests/commands/method_command_request_spec.rb +150 -0
  18. data/spec/server.rb +34 -0
  19. data/spec/spec_helper.rb +48 -0
  20. data/spec/vcr/method_command/delete_returns_200.yml +79 -0
  21. data/spec/vcr/method_command/delete_sends_headers.yml +46 -0
  22. data/spec/vcr/method_command/get_non_json_response_returns_200.yml +89 -0
  23. data/spec/vcr/method_command/get_non_json_response_returns_response.yml +89 -0
  24. data/spec/vcr/method_command/get_non_json_response_sends_headers.yml +89 -0
  25. data/spec/vcr/method_command/get_returns_200.yml +79 -0
  26. data/spec/vcr/method_command/get_returns_response.yml +79 -0
  27. data/spec/vcr/method_command/get_sends_headers.yml +44 -0
  28. data/spec/vcr/method_command/get_with_per_request_headers_returns_200.yml +46 -0
  29. data/spec/vcr/method_command/get_with_per_request_headers_returns_response.yml +46 -0
  30. data/spec/vcr/method_command/get_with_per_request_headers_sends_headers.yml +46 -0
  31. data/spec/vcr/method_command/get_without_per_request_headers_returns_200.yml +46 -0
  32. data/spec/vcr/method_command/get_without_per_request_headers_returns_response.yml +46 -0
  33. data/spec/vcr/method_command/get_without_per_request_headers_sends_headers.yml +46 -0
  34. data/spec/vcr/method_command/head_returns_200.yml +79 -0
  35. data/spec/vcr/method_command/head_sends_headers.yml +46 -0
  36. data/spec/vcr/method_command/options_returns_200.yml +79 -0
  37. data/spec/vcr/method_command/options_sends_headers.yml +46 -0
  38. data/spec/vcr/method_command/patch_returns_204.yml +87 -0
  39. data/spec/vcr/method_command/patch_sends_headers.yml +50 -0
  40. data/spec/vcr/method_command/post_returns_200.yml +87 -0
  41. data/spec/vcr/method_command/post_returns_created_object.yml +87 -0
  42. data/spec/vcr/method_command/post_sends_headers.yml +50 -0
  43. data/spec/vcr/method_command/put_returns_204.yml +79 -0
  44. data/spec/vcr/method_command/put_sends_headers.yml +42 -0
  45. metadata +135 -16
  46. data/lib/resty/commands/method_output.rb +0 -43
  47. data/spec/lib/resty/cli_options_spec.rb +0 -103
  48. data/spec/lib/resty/commands/method_output_spec.rb +0 -58
@@ -0,0 +1,79 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://nyan:cat@localhost:4567/api/nyan
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: "OK "
20
+ headers:
21
+ Content-Type:
22
+ - text/html;charset=utf-8
23
+ Content-Length:
24
+ - "0"
25
+ X-Xss-Protection:
26
+ - 1; mode=block
27
+ X-Content-Type-Options:
28
+ - nosniff
29
+ X-Frame-Options:
30
+ - SAMEORIGIN
31
+ Server:
32
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
33
+ Date:
34
+ - Sun, 07 Jul 2013 19:42:37 GMT
35
+ Connection:
36
+ - Keep-Alive
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ""
40
+ http_version:
41
+ recorded_at: Sun, 07 Jul 2013 19:42:37 GMT
42
+ - request:
43
+ method: delete
44
+ uri: http://localhost:4567/api/nyan
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ""
48
+ headers:
49
+ Accept:
50
+ - "*/*; q=0.5, application/xml"
51
+ Accept-Encoding:
52
+ - gzip, deflate
53
+ User-Agent:
54
+ - Ruby
55
+ response:
56
+ status:
57
+ code: 401
58
+ message: "Unauthorized "
59
+ headers:
60
+ Content-Type:
61
+ - text/plain
62
+ Content-Length:
63
+ - "0"
64
+ Www-Authenticate:
65
+ - Basic realm=""
66
+ X-Content-Type-Options:
67
+ - nosniff
68
+ Server:
69
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
70
+ Date:
71
+ - Sun, 07 Jul 2013 19:43:10 GMT
72
+ Connection:
73
+ - Keep-Alive
74
+ body:
75
+ encoding: US-ASCII
76
+ string: ""
77
+ http_version:
78
+ recorded_at: Sun, 07 Jul 2013 19:43:10 GMT
79
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: http://nyan:cat@localhost:4567/api/nyan
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Name:
15
+ - nyaaa
16
+ Color:
17
+ - green
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: "OK "
24
+ headers:
25
+ Content-Type:
26
+ - text/html;charset=utf-8
27
+ Content-Length:
28
+ - "0"
29
+ X-Xss-Protection:
30
+ - 1; mode=block
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ Server:
36
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
37
+ Date:
38
+ - Mon, 08 Jul 2013 15:08:38 GMT
39
+ Connection:
40
+ - Keep-Alive
41
+ body:
42
+ encoding: US-ASCII
43
+ string: ""
44
+ http_version:
45
+ recorded_at: Mon, 08 Jul 2013 15:08:38 GMT
46
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://nyan:cat@localhost:4567/api/nyan
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Name:
15
+ - nyaaa
16
+ Color:
17
+ - green
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: "OK "
24
+ headers:
25
+ Content-Type:
26
+ - text/html;charset=utf-8
27
+ Content-Length:
28
+ - "14"
29
+ X-Xss-Protection:
30
+ - 1; mode=block
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ Server:
36
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
37
+ Date:
38
+ - Tue, 09 Jul 2013 20:25:55 GMT
39
+ Connection:
40
+ - Keep-Alive
41
+ body:
42
+ encoding: US-ASCII
43
+ string: "{\"nyan\":\"cat\"}"
44
+ http_version:
45
+ recorded_at: Tue, 09 Jul 2013 20:25:55 GMT
46
+ - request:
47
+ method: get
48
+ uri: http://nyan:cat@localhost:4567/api/nyan?format=xml
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ""
52
+ headers:
53
+ Accept:
54
+ - "*/*; q=0.5, application/xml"
55
+ Accept-Encoding:
56
+ - gzip, deflate
57
+ Name:
58
+ - nyaaa
59
+ Color:
60
+ - green
61
+ User-Agent:
62
+ - Ruby
63
+ response:
64
+ status:
65
+ code: 200
66
+ message: "OK "
67
+ headers:
68
+ Content-Type:
69
+ - text/html;charset=utf-8
70
+ Content-Length:
71
+ - "16"
72
+ X-Xss-Protection:
73
+ - 1; mode=block
74
+ X-Content-Type-Options:
75
+ - nosniff
76
+ X-Frame-Options:
77
+ - SAMEORIGIN
78
+ Server:
79
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
80
+ Date:
81
+ - Tue, 09 Jul 2013 20:27:03 GMT
82
+ Connection:
83
+ - Keep-Alive
84
+ body:
85
+ encoding: US-ASCII
86
+ string: <nyan>cat</nyan>
87
+ http_version:
88
+ recorded_at: Tue, 09 Jul 2013 20:27:03 GMT
89
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://nyan:cat@localhost:4567/api/nyan
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Name:
15
+ - nyaaa
16
+ Color:
17
+ - green
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: "OK "
24
+ headers:
25
+ Content-Type:
26
+ - text/html;charset=utf-8
27
+ Content-Length:
28
+ - "14"
29
+ X-Xss-Protection:
30
+ - 1; mode=block
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ Server:
36
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
37
+ Date:
38
+ - Tue, 09 Jul 2013 20:26:11 GMT
39
+ Connection:
40
+ - Keep-Alive
41
+ body:
42
+ encoding: US-ASCII
43
+ string: "{\"nyan\":\"cat\"}"
44
+ http_version:
45
+ recorded_at: Tue, 09 Jul 2013 20:26:11 GMT
46
+ - request:
47
+ method: get
48
+ uri: http://nyan:cat@localhost:4567/api/nyan?format=xml
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ""
52
+ headers:
53
+ Accept:
54
+ - "*/*; q=0.5, application/xml"
55
+ Accept-Encoding:
56
+ - gzip, deflate
57
+ Name:
58
+ - nyaaa
59
+ Color:
60
+ - green
61
+ User-Agent:
62
+ - Ruby
63
+ response:
64
+ status:
65
+ code: 200
66
+ message: "OK "
67
+ headers:
68
+ Content-Type:
69
+ - text/html;charset=utf-8
70
+ Content-Length:
71
+ - "16"
72
+ X-Xss-Protection:
73
+ - 1; mode=block
74
+ X-Content-Type-Options:
75
+ - nosniff
76
+ X-Frame-Options:
77
+ - SAMEORIGIN
78
+ Server:
79
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
80
+ Date:
81
+ - Tue, 09 Jul 2013 20:27:03 GMT
82
+ Connection:
83
+ - Keep-Alive
84
+ body:
85
+ encoding: US-ASCII
86
+ string: <nyan>cat</nyan>
87
+ http_version:
88
+ recorded_at: Tue, 09 Jul 2013 20:27:03 GMT
89
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://nyan:cat@localhost:4567/api/nyan
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Name:
15
+ - nyaaa
16
+ Color:
17
+ - green
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: "OK "
24
+ headers:
25
+ Content-Type:
26
+ - text/html;charset=utf-8
27
+ Content-Length:
28
+ - "14"
29
+ X-Xss-Protection:
30
+ - 1; mode=block
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ Server:
36
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
37
+ Date:
38
+ - Tue, 09 Jul 2013 20:25:54 GMT
39
+ Connection:
40
+ - Keep-Alive
41
+ body:
42
+ encoding: US-ASCII
43
+ string: "{\"nyan\":\"cat\"}"
44
+ http_version:
45
+ recorded_at: Tue, 09 Jul 2013 20:25:54 GMT
46
+ - request:
47
+ method: get
48
+ uri: http://nyan:cat@localhost:4567/api/nyan?format=xml
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ""
52
+ headers:
53
+ Accept:
54
+ - "*/*; q=0.5, application/xml"
55
+ Accept-Encoding:
56
+ - gzip, deflate
57
+ Name:
58
+ - nyaaa
59
+ Color:
60
+ - green
61
+ User-Agent:
62
+ - Ruby
63
+ response:
64
+ status:
65
+ code: 200
66
+ message: "OK "
67
+ headers:
68
+ Content-Type:
69
+ - text/html;charset=utf-8
70
+ Content-Length:
71
+ - "16"
72
+ X-Xss-Protection:
73
+ - 1; mode=block
74
+ X-Content-Type-Options:
75
+ - nosniff
76
+ X-Frame-Options:
77
+ - SAMEORIGIN
78
+ Server:
79
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
80
+ Date:
81
+ - Tue, 09 Jul 2013 20:27:03 GMT
82
+ Connection:
83
+ - Keep-Alive
84
+ body:
85
+ encoding: US-ASCII
86
+ string: <nyan>cat</nyan>
87
+ http_version:
88
+ recorded_at: Tue, 09 Jul 2013 20:27:03 GMT
89
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,79 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://nyan:cat@localhost:4567/api/nyan
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: "OK "
20
+ headers:
21
+ Content-Type:
22
+ - text/html;charset=utf-8
23
+ Content-Length:
24
+ - "14"
25
+ X-Xss-Protection:
26
+ - 1; mode=block
27
+ X-Content-Type-Options:
28
+ - nosniff
29
+ X-Frame-Options:
30
+ - SAMEORIGIN
31
+ Server:
32
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
33
+ Date:
34
+ - Sun, 07 Jul 2013 19:42:36 GMT
35
+ Connection:
36
+ - Keep-Alive
37
+ body:
38
+ encoding: US-ASCII
39
+ string: "{\"nyan\":\"cat\"}"
40
+ http_version:
41
+ recorded_at: Sun, 07 Jul 2013 19:42:36 GMT
42
+ - request:
43
+ method: get
44
+ uri: http://localhost:4567/api/nyan
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ""
48
+ headers:
49
+ Accept:
50
+ - "*/*; q=0.5, application/xml"
51
+ Accept-Encoding:
52
+ - gzip, deflate
53
+ User-Agent:
54
+ - Ruby
55
+ response:
56
+ status:
57
+ code: 401
58
+ message: "Unauthorized "
59
+ headers:
60
+ Content-Type:
61
+ - text/plain
62
+ Content-Length:
63
+ - "0"
64
+ Www-Authenticate:
65
+ - Basic realm=""
66
+ X-Content-Type-Options:
67
+ - nosniff
68
+ Server:
69
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
70
+ Date:
71
+ - Sun, 07 Jul 2013 19:43:09 GMT
72
+ Connection:
73
+ - Keep-Alive
74
+ body:
75
+ encoding: US-ASCII
76
+ string: ""
77
+ http_version:
78
+ recorded_at: Sun, 07 Jul 2013 19:43:09 GMT
79
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,79 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://nyan:cat@localhost:4567/api/nyan
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ User-Agent:
15
+ - Ruby
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: "OK "
20
+ headers:
21
+ Content-Type:
22
+ - text/html;charset=utf-8
23
+ Content-Length:
24
+ - "14"
25
+ X-Xss-Protection:
26
+ - 1; mode=block
27
+ X-Content-Type-Options:
28
+ - nosniff
29
+ X-Frame-Options:
30
+ - SAMEORIGIN
31
+ Server:
32
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
33
+ Date:
34
+ - Sun, 07 Jul 2013 19:42:36 GMT
35
+ Connection:
36
+ - Keep-Alive
37
+ body:
38
+ encoding: US-ASCII
39
+ string: "{\"nyan\":\"cat\"}"
40
+ http_version:
41
+ recorded_at: Sun, 07 Jul 2013 19:42:36 GMT
42
+ - request:
43
+ method: get
44
+ uri: http://localhost:4567/api/nyan
45
+ body:
46
+ encoding: US-ASCII
47
+ string: ""
48
+ headers:
49
+ Accept:
50
+ - "*/*; q=0.5, application/xml"
51
+ Accept-Encoding:
52
+ - gzip, deflate
53
+ User-Agent:
54
+ - Ruby
55
+ response:
56
+ status:
57
+ code: 401
58
+ message: "Unauthorized "
59
+ headers:
60
+ Content-Type:
61
+ - text/plain
62
+ Content-Length:
63
+ - "0"
64
+ Www-Authenticate:
65
+ - Basic realm=""
66
+ X-Content-Type-Options:
67
+ - nosniff
68
+ Server:
69
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
70
+ Date:
71
+ - Sun, 07 Jul 2013 19:43:10 GMT
72
+ Connection:
73
+ - Keep-Alive
74
+ body:
75
+ encoding: US-ASCII
76
+ string: ""
77
+ http_version:
78
+ recorded_at: Sun, 07 Jul 2013 19:43:10 GMT
79
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,44 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://nyan:cat@localhost:4567/api/nyan
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Name:
15
+ - nyaaa
16
+ User-Agent:
17
+ - Ruby
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: "OK "
22
+ headers:
23
+ Content-Type:
24
+ - text/html;charset=utf-8
25
+ Content-Length:
26
+ - "14"
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Frame-Options:
32
+ - SAMEORIGIN
33
+ Server:
34
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
35
+ Date:
36
+ - Mon, 08 Jul 2013 15:06:58 GMT
37
+ Connection:
38
+ - Keep-Alive
39
+ body:
40
+ encoding: US-ASCII
41
+ string: "{\"nyan\":\"cat\"}"
42
+ http_version:
43
+ recorded_at: Mon, 08 Jul 2013 15:06:58 GMT
44
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://nyan:cat@localhost:4567/api/nyan
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Name:
15
+ - nyaaa
16
+ Color:
17
+ - green
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: "OK "
24
+ headers:
25
+ Content-Type:
26
+ - text/html;charset=utf-8
27
+ Content-Length:
28
+ - "14"
29
+ X-Xss-Protection:
30
+ - 1; mode=block
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ Server:
36
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
37
+ Date:
38
+ - Mon, 08 Jul 2013 15:10:55 GMT
39
+ Connection:
40
+ - Keep-Alive
41
+ body:
42
+ encoding: US-ASCII
43
+ string: "{\"nyan\":\"cat\"}"
44
+ http_version:
45
+ recorded_at: Mon, 08 Jul 2013 15:10:55 GMT
46
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://nyan:cat@localhost:4567/api/nyan
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ""
9
+ headers:
10
+ Accept:
11
+ - "*/*; q=0.5, application/xml"
12
+ Accept-Encoding:
13
+ - gzip, deflate
14
+ Name:
15
+ - nyaaa
16
+ Color:
17
+ - green
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: "OK "
24
+ headers:
25
+ Content-Type:
26
+ - text/html;charset=utf-8
27
+ Content-Length:
28
+ - "14"
29
+ X-Xss-Protection:
30
+ - 1; mode=block
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ X-Frame-Options:
34
+ - SAMEORIGIN
35
+ Server:
36
+ - WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20)
37
+ Date:
38
+ - Mon, 08 Jul 2013 15:10:55 GMT
39
+ Connection:
40
+ - Keep-Alive
41
+ body:
42
+ encoding: US-ASCII
43
+ string: "{\"nyan\":\"cat\"}"
44
+ http_version:
45
+ recorded_at: Mon, 08 Jul 2013 15:10:55 GMT
46
+ recorded_with: VCR 2.5.0