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