localwiki_client 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/History.txt +5 -0
- data/README.md +17 -9
- data/Rakefile +6 -0
- data/integration/helper.rb +1 -1
- data/integration/live_saltlake_wiki_spec.rb +2 -2
- data/integration/live_test_wiki_spec.rb +26 -11
- data/lib/localwiki/client.rb +143 -115
- data/lib/localwiki/resource.rb +76 -0
- data/lib/localwiki/version.rb +1 -1
- data/lib/localwiki_client.rb +1 -0
- data/localwiki_client.gemspec +1 -0
- data/spec/basic_crud_spec.rb +12 -5
- data/spec/basic_spec.rb +2 -2
- data/spec/fixtures/cassettes/basic.yml +21 -19
- data/spec/fixtures/cassettes/basic_crud.yml +21 -19
- data/spec/fixtures/cassettes/basic_crud_delete_fail.yml +11 -9
- data/spec/fixtures/cassettes/basic_crud_delete_success.yml +10 -8
- data/spec/fixtures/cassettes/basic_crud_page_by_name_success.yml +40 -0
- data/spec/fixtures/cassettes/basic_crud_read_fail.yml +22 -34
- data/spec/fixtures/cassettes/basic_crud_read_success.yml +11 -11
- data/spec/fixtures/cassettes/basic_crud_update_success.yml +11 -9
- data/spec/fixtures/cassettes/basic_fetch_version_success.yml +41 -37
- data/spec/fixtures/cassettes/basic_page_by_name_spaces.yml +12 -12
- data/spec/fixtures/cassettes/basic_unique_authors_success.yml +41 -37
- data/spec/fixtures/cassettes/fetch.yml +8 -8
- data/spec/fixtures/cassettes/list.yml +93 -0
- data/spec/fixtures/cassettes/list_file_success.yml +40 -0
- data/spec/fixtures/cassettes/list_limit_success.yml +124 -0
- data/spec/fixtures/cassettes/list_map_success.yml +42 -0
- data/spec/fixtures/cassettes/list_page_success.yml +1108 -0
- data/spec/fixtures/cassettes/list_page_tags_success.yml +42 -0
- data/spec/fixtures/cassettes/list_site_success.yml +46 -0
- data/spec/fixtures/cassettes/list_tag_success.yml +43 -0
- data/spec/fixtures/cassettes/list_user_success.yml +56 -0
- data/spec/fixtures/cassettes/localwiki_client.yml +121 -115
- data/spec/fixtures/cassettes/slug.yml +8 -8
- data/spec/helper.rb +7 -0
- data/spec/list_spec.rb +47 -0
- data/spec/localwiki_client_spec.rb +4 -12
- data/spec/localwiki_spec.rb +17 -0
- data/spec/map_spec.rb +135 -0
- data/spec/resource_spec.rb +60 -0
- metadata +33 -4
@@ -5,71 +5,75 @@ http_interactions:
|
|
5
5
|
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: '{"name":"TestPage52af28ba-1234-47b4-896a-3874268ea8e7","content":"<p>Created!</p>"}'
|
9
9
|
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
10
12
|
Content-Type:
|
11
13
|
- application/json
|
12
14
|
Authorization:
|
13
15
|
- ApiKey testuser:key
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
18
|
Accept:
|
15
|
-
-
|
16
|
-
User-Agent:
|
17
|
-
- Ruby
|
19
|
+
- '*/*'
|
18
20
|
response:
|
19
21
|
status:
|
20
22
|
code: 201
|
21
23
|
message: CREATED
|
22
24
|
headers:
|
23
25
|
Date:
|
24
|
-
-
|
26
|
+
- Fri, 29 Mar 2013 02:07:17 GMT
|
25
27
|
Server:
|
26
28
|
- Apache/2.2.22 (Ubuntu)
|
27
29
|
Vary:
|
28
30
|
- Cookie,Accept-Encoding
|
29
31
|
Access-Control-Allow-Origin:
|
30
|
-
-
|
32
|
+
- '*'
|
31
33
|
Access-Control-Allow-Methods:
|
32
34
|
- POST,GET,OPTIONS,PUT,DELETE
|
33
35
|
Set-Cookie:
|
34
|
-
- sessionid=
|
36
|
+
- sessionid=86f58436fb5c0159aaabbed31f4dd501; expires=Fri, 12-Apr-2013 02:07:17
|
35
37
|
GMT; Max-Age=1209600; Path=/
|
36
38
|
Location:
|
37
|
-
- http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/
|
39
|
+
- http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage52af28ba-1234-47b4-896a-3874268ea8e7
|
38
40
|
Content-Length:
|
39
|
-
- '
|
41
|
+
- '20'
|
40
42
|
Content-Type:
|
41
43
|
- text/html; charset=utf-8
|
42
44
|
body:
|
43
|
-
encoding:
|
45
|
+
encoding: UTF-8
|
44
46
|
string: ''
|
45
47
|
http_version:
|
46
|
-
recorded_at:
|
48
|
+
recorded_at: Fri, 29 Mar 2013 02:06:33 GMT
|
47
49
|
- request:
|
48
50
|
method: put
|
49
|
-
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/
|
51
|
+
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage52af28ba-1234-47b4-896a-3874268ea8e7
|
50
52
|
body:
|
51
53
|
encoding: UTF-8
|
52
|
-
string:
|
54
|
+
string: '{"content":"<p>foo</p>"}'
|
53
55
|
headers:
|
56
|
+
User-Agent:
|
57
|
+
- Faraday v0.8.7
|
54
58
|
Content-Type:
|
55
59
|
- application/json
|
56
60
|
Authorization:
|
57
61
|
- ApiKey testuser:key
|
62
|
+
Accept-Encoding:
|
63
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
58
64
|
Accept:
|
59
|
-
-
|
60
|
-
User-Agent:
|
61
|
-
- Ruby
|
65
|
+
- '*/*'
|
62
66
|
response:
|
63
67
|
status:
|
64
68
|
code: 204
|
65
69
|
message: NO CONTENT
|
66
70
|
headers:
|
67
71
|
Date:
|
68
|
-
-
|
72
|
+
- Fri, 29 Mar 2013 02:07:18 GMT
|
69
73
|
Server:
|
70
74
|
- Apache/2.2.22 (Ubuntu)
|
71
75
|
Access-Control-Allow-Origin:
|
72
|
-
-
|
76
|
+
- '*'
|
73
77
|
Access-Control-Allow-Methods:
|
74
78
|
- POST,GET,OPTIONS,PUT,DELETE
|
75
79
|
Content-Length:
|
@@ -79,34 +83,34 @@ http_interactions:
|
|
79
83
|
Content-Type:
|
80
84
|
- text/html; charset=utf-8
|
81
85
|
body:
|
82
|
-
encoding:
|
86
|
+
encoding: UTF-8
|
83
87
|
string: ''
|
84
88
|
http_version:
|
85
|
-
recorded_at:
|
89
|
+
recorded_at: Fri, 29 Mar 2013 02:06:33 GMT
|
86
90
|
- request:
|
87
91
|
method: get
|
88
|
-
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page_version?format=json&name=
|
92
|
+
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page_version?format=json&name=TestPage52af28ba-1234-47b4-896a-3874268ea8e7
|
89
93
|
body:
|
90
94
|
encoding: US-ASCII
|
91
95
|
string: ''
|
92
96
|
headers:
|
97
|
+
User-Agent:
|
98
|
+
- Faraday v0.8.7
|
93
99
|
Accept-Encoding:
|
94
100
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
95
101
|
Accept:
|
96
|
-
-
|
97
|
-
User-Agent:
|
98
|
-
- Ruby
|
102
|
+
- '*/*'
|
99
103
|
response:
|
100
104
|
status:
|
101
105
|
code: 200
|
102
106
|
message: OK
|
103
107
|
headers:
|
104
108
|
Date:
|
105
|
-
-
|
109
|
+
- Fri, 29 Mar 2013 02:07:18 GMT
|
106
110
|
Server:
|
107
111
|
- Apache/2.2.22 (Ubuntu)
|
108
112
|
Access-Control-Allow-Origin:
|
109
|
-
-
|
113
|
+
- '*'
|
110
114
|
Access-Control-Allow-Methods:
|
111
115
|
- POST,GET,OPTIONS,PUT,DELETE
|
112
116
|
Transfer-Encoding:
|
@@ -114,17 +118,17 @@ http_interactions:
|
|
114
118
|
Content-Type:
|
115
119
|
- application/vnd.api.v1+json; charset=utf-8
|
116
120
|
body:
|
117
|
-
encoding:
|
118
|
-
string:
|
121
|
+
encoding: UTF-8
|
122
|
+
string: '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
|
119
123
|
"total_count": 2}, "objects": [{"content": "<p>foo</p>", "history_comment":
|
120
|
-
null, "history_date": "2013-03-
|
121
|
-
1, "history_user": "/api/user/
|
122
|
-
|
123
|
-
"/api/page_version/
|
124
|
-
{"content": "<p>Created!</p>", "history_comment": null, "history_date": "2013-03-
|
125
|
-
"history_id":
|
126
|
-
"70.89.154.169", "id":
|
127
|
-
"resource_uri": "/api/page_version/
|
124
|
+
null, "history_date": "2013-03-28T21:07:18.287320", "history_id": 870, "history_type":
|
125
|
+
1, "history_user": "/api/user/9", "history_user_ip": "70.89.154.169", "id":
|
126
|
+
366, "name": "TestPage52af28ba-1234-47b4-896a-3874268ea8e7", "resource_uri":
|
127
|
+
"/api/page_version/870", "slug": "testpage52af28ba-1234-47b4-896a-3874268ea8e7"},
|
128
|
+
{"content": "<p>Created!</p>", "history_comment": null, "history_date": "2013-03-28T21:07:17.844399",
|
129
|
+
"history_id": 869, "history_type": 0, "history_user": "/api/user/9", "history_user_ip":
|
130
|
+
"70.89.154.169", "id": 366, "name": "TestPage52af28ba-1234-47b4-896a-3874268ea8e7",
|
131
|
+
"resource_uri": "/api/page_version/869", "slug": "testpage52af28ba-1234-47b4-896a-3874268ea8e7"}]}'
|
128
132
|
http_version:
|
129
|
-
recorded_at:
|
133
|
+
recorded_at: Fri, 29 Mar 2013 02:06:34 GMT
|
130
134
|
recorded_with: VCR 2.4.0
|
@@ -2,28 +2,28 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/
|
5
|
+
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/Test_Pagec2026982-a27d-414a-baff-8c23b703d958?format=json
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
10
12
|
Accept-Encoding:
|
11
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
14
|
Accept:
|
13
|
-
-
|
14
|
-
User-Agent:
|
15
|
-
- Ruby
|
15
|
+
- '*/*'
|
16
16
|
response:
|
17
17
|
status:
|
18
18
|
code: 200
|
19
19
|
message: OK
|
20
20
|
headers:
|
21
21
|
Date:
|
22
|
-
-
|
22
|
+
- Fri, 29 Mar 2013 02:07:17 GMT
|
23
23
|
Server:
|
24
24
|
- Apache/2.2.22 (Ubuntu)
|
25
25
|
Access-Control-Allow-Origin:
|
26
|
-
-
|
26
|
+
- '*'
|
27
27
|
Access-Control-Allow-Methods:
|
28
28
|
- POST,GET,OPTIONS,PUT,DELETE
|
29
29
|
Transfer-Encoding:
|
@@ -31,11 +31,11 @@ http_interactions:
|
|
31
31
|
Content-Type:
|
32
32
|
- application/vnd.api.v1+json; charset=utf-8
|
33
33
|
body:
|
34
|
-
encoding:
|
35
|
-
string:
|
36
|
-
|
37
|
-
|
38
|
-
"slug": "test
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"content": "<p>Created page with spaces!</p>", "id": 365, "map": null,
|
36
|
+
"name": "Test Pagec2026982-a27d-414a-baff-8c23b703d958", "page_tags": null,
|
37
|
+
"resource_uri": "/api/page/Test_Pagec2026982-a27d-414a-baff-8c23b703d958",
|
38
|
+
"slug": "test pagec2026982-a27d-414a-baff-8c23b703d958"}'
|
39
39
|
http_version:
|
40
|
-
recorded_at:
|
40
|
+
recorded_at: Fri, 29 Mar 2013 02:06:32 GMT
|
41
41
|
recorded_with: VCR 2.4.0
|
@@ -5,71 +5,75 @@ http_interactions:
|
|
5
5
|
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
|
-
string:
|
8
|
+
string: '{"name":"TestPage2b11303c-bca4-4f0b-9a81-47f8f3457a6c","content":"<p>Created!</p>"}'
|
9
9
|
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
10
12
|
Content-Type:
|
11
13
|
- application/json
|
12
14
|
Authorization:
|
13
15
|
- ApiKey testuser:key
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
18
|
Accept:
|
15
|
-
-
|
16
|
-
User-Agent:
|
17
|
-
- Ruby
|
19
|
+
- '*/*'
|
18
20
|
response:
|
19
21
|
status:
|
20
22
|
code: 201
|
21
23
|
message: CREATED
|
22
24
|
headers:
|
23
25
|
Date:
|
24
|
-
-
|
26
|
+
- Fri, 29 Mar 2013 02:07:18 GMT
|
25
27
|
Server:
|
26
28
|
- Apache/2.2.22 (Ubuntu)
|
27
29
|
Vary:
|
28
30
|
- Cookie,Accept-Encoding
|
29
31
|
Access-Control-Allow-Origin:
|
30
|
-
-
|
32
|
+
- '*'
|
31
33
|
Access-Control-Allow-Methods:
|
32
34
|
- POST,GET,OPTIONS,PUT,DELETE
|
33
35
|
Set-Cookie:
|
34
|
-
- sessionid=
|
36
|
+
- sessionid=30b53a8ed6b896c255a20dfc7f16cdff; expires=Fri, 12-Apr-2013 02:07:19
|
35
37
|
GMT; Max-Age=1209600; Path=/
|
36
38
|
Location:
|
37
|
-
- http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/
|
39
|
+
- http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage2b11303c-bca4-4f0b-9a81-47f8f3457a6c
|
38
40
|
Content-Length:
|
39
|
-
- '
|
41
|
+
- '20'
|
40
42
|
Content-Type:
|
41
43
|
- text/html; charset=utf-8
|
42
44
|
body:
|
43
|
-
encoding:
|
45
|
+
encoding: UTF-8
|
44
46
|
string: ''
|
45
47
|
http_version:
|
46
|
-
recorded_at:
|
48
|
+
recorded_at: Fri, 29 Mar 2013 02:06:34 GMT
|
47
49
|
- request:
|
48
50
|
method: put
|
49
|
-
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/
|
51
|
+
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage2b11303c-bca4-4f0b-9a81-47f8f3457a6c
|
50
52
|
body:
|
51
53
|
encoding: UTF-8
|
52
|
-
string:
|
54
|
+
string: '{"content":"<p>foo</p>"}'
|
53
55
|
headers:
|
56
|
+
User-Agent:
|
57
|
+
- Faraday v0.8.7
|
54
58
|
Content-Type:
|
55
59
|
- application/json
|
56
60
|
Authorization:
|
57
61
|
- ApiKey testuser:key
|
62
|
+
Accept-Encoding:
|
63
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
58
64
|
Accept:
|
59
|
-
-
|
60
|
-
User-Agent:
|
61
|
-
- Ruby
|
65
|
+
- '*/*'
|
62
66
|
response:
|
63
67
|
status:
|
64
68
|
code: 204
|
65
69
|
message: NO CONTENT
|
66
70
|
headers:
|
67
71
|
Date:
|
68
|
-
-
|
72
|
+
- Fri, 29 Mar 2013 02:07:19 GMT
|
69
73
|
Server:
|
70
74
|
- Apache/2.2.22 (Ubuntu)
|
71
75
|
Access-Control-Allow-Origin:
|
72
|
-
-
|
76
|
+
- '*'
|
73
77
|
Access-Control-Allow-Methods:
|
74
78
|
- POST,GET,OPTIONS,PUT,DELETE
|
75
79
|
Content-Length:
|
@@ -79,34 +83,34 @@ http_interactions:
|
|
79
83
|
Content-Type:
|
80
84
|
- text/html; charset=utf-8
|
81
85
|
body:
|
82
|
-
encoding:
|
86
|
+
encoding: UTF-8
|
83
87
|
string: ''
|
84
88
|
http_version:
|
85
|
-
recorded_at:
|
89
|
+
recorded_at: Fri, 29 Mar 2013 02:06:35 GMT
|
86
90
|
- request:
|
87
91
|
method: get
|
88
|
-
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page_version?format=json&name=
|
92
|
+
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page_version?format=json&name=TestPage2b11303c-bca4-4f0b-9a81-47f8f3457a6c
|
89
93
|
body:
|
90
94
|
encoding: US-ASCII
|
91
95
|
string: ''
|
92
96
|
headers:
|
97
|
+
User-Agent:
|
98
|
+
- Faraday v0.8.7
|
93
99
|
Accept-Encoding:
|
94
100
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
95
101
|
Accept:
|
96
|
-
-
|
97
|
-
User-Agent:
|
98
|
-
- Ruby
|
102
|
+
- '*/*'
|
99
103
|
response:
|
100
104
|
status:
|
101
105
|
code: 200
|
102
106
|
message: OK
|
103
107
|
headers:
|
104
108
|
Date:
|
105
|
-
-
|
109
|
+
- Fri, 29 Mar 2013 02:07:19 GMT
|
106
110
|
Server:
|
107
111
|
- Apache/2.2.22 (Ubuntu)
|
108
112
|
Access-Control-Allow-Origin:
|
109
|
-
-
|
113
|
+
- '*'
|
110
114
|
Access-Control-Allow-Methods:
|
111
115
|
- POST,GET,OPTIONS,PUT,DELETE
|
112
116
|
Transfer-Encoding:
|
@@ -114,17 +118,17 @@ http_interactions:
|
|
114
118
|
Content-Type:
|
115
119
|
- application/vnd.api.v1+json; charset=utf-8
|
116
120
|
body:
|
117
|
-
encoding:
|
118
|
-
string:
|
121
|
+
encoding: UTF-8
|
122
|
+
string: '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
|
119
123
|
"total_count": 2}, "objects": [{"content": "<p>foo</p>", "history_comment":
|
120
|
-
null, "history_date": "2013-03-
|
121
|
-
1, "history_user": "/api/user/
|
122
|
-
|
123
|
-
"/api/page_version/
|
124
|
-
{"content": "<p>Created!</p>", "history_comment": null, "history_date": "2013-03-
|
125
|
-
"history_id":
|
126
|
-
"70.89.154.169", "id":
|
127
|
-
"resource_uri": "/api/page_version/
|
124
|
+
null, "history_date": "2013-03-28T21:07:19.378560", "history_id": 872, "history_type":
|
125
|
+
1, "history_user": "/api/user/9", "history_user_ip": "70.89.154.169", "id":
|
126
|
+
367, "name": "TestPage2b11303c-bca4-4f0b-9a81-47f8f3457a6c", "resource_uri":
|
127
|
+
"/api/page_version/872", "slug": "testpage2b11303c-bca4-4f0b-9a81-47f8f3457a6c"},
|
128
|
+
{"content": "<p>Created!</p>", "history_comment": null, "history_date": "2013-03-28T21:07:18.963960",
|
129
|
+
"history_id": 871, "history_type": 0, "history_user": "/api/user/9", "history_user_ip":
|
130
|
+
"70.89.154.169", "id": 367, "name": "TestPage2b11303c-bca4-4f0b-9a81-47f8f3457a6c",
|
131
|
+
"resource_uri": "/api/page_version/871", "slug": "testpage2b11303c-bca4-4f0b-9a81-47f8f3457a6c"}]}'
|
128
132
|
http_version:
|
129
|
-
recorded_at:
|
133
|
+
recorded_at: Fri, 29 Mar 2013 02:06:35 GMT
|
130
134
|
recorded_with: VCR 2.4.0
|
@@ -7,23 +7,23 @@ http_interactions:
|
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
10
12
|
Accept-Encoding:
|
11
13
|
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
12
14
|
Accept:
|
13
|
-
-
|
14
|
-
User-Agent:
|
15
|
-
- Ruby
|
15
|
+
- '*/*'
|
16
16
|
response:
|
17
17
|
status:
|
18
18
|
code: 200
|
19
19
|
message: OK
|
20
20
|
headers:
|
21
21
|
Date:
|
22
|
-
-
|
22
|
+
- Fri, 29 Mar 2013 02:07:17 GMT
|
23
23
|
Server:
|
24
24
|
- Apache/2.2.22 (Ubuntu)
|
25
25
|
Access-Control-Allow-Origin:
|
26
|
-
-
|
26
|
+
- '*'
|
27
27
|
Access-Control-Allow-Methods:
|
28
28
|
- POST,GET,OPTIONS,PUT,DELETE
|
29
29
|
Transfer-Encoding:
|
@@ -31,8 +31,8 @@ http_interactions:
|
|
31
31
|
Content-Type:
|
32
32
|
- application/vnd.api.v1+json; charset=utf-8
|
33
33
|
body:
|
34
|
-
encoding:
|
35
|
-
string:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"domain": "example.com", "id": 1, "language_code": "en-us", "license":
|
36
36
|
"<p>Except where otherwise noted, this content is licensed under a <a rel=\"license\"
|
37
37
|
href=\"http://creativecommons.org/licenses/by/3.0/\">Creative Commons Attribution
|
38
38
|
License</a>. See <a href=\"/Copyrights\">Copyrights.</p>", "name": "example.com",
|
@@ -42,5 +42,5 @@ http_interactions:
|
|
42
42
|
See <a href=\"/Copyrights\" target=\"_blank\">Copyrights</a>.", "time_zone":
|
43
43
|
"America/Chicago"}'
|
44
44
|
http_version:
|
45
|
-
recorded_at:
|
45
|
+
recorded_at: Fri, 29 Mar 2013 02:06:33 GMT
|
46
46
|
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,93 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/site/1?format=json
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Fri, 29 Mar 2013 02:07:20 GMT
|
23
|
+
Server:
|
24
|
+
- Apache/2.2.22 (Ubuntu)
|
25
|
+
Access-Control-Allow-Origin:
|
26
|
+
- '*'
|
27
|
+
Access-Control-Allow-Methods:
|
28
|
+
- POST,GET,OPTIONS,PUT,DELETE
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Content-Type:
|
32
|
+
- application/vnd.api.v1+json; charset=utf-8
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"domain": "example.com", "id": 1, "language_code": "en-us", "license":
|
36
|
+
"<p>Except where otherwise noted, this content is licensed under a <a rel=\"license\"
|
37
|
+
href=\"http://creativecommons.org/licenses/by/3.0/\">Creative Commons Attribution
|
38
|
+
License</a>. See <a href=\"/Copyrights\">Copyrights.</p>", "name": "example.com",
|
39
|
+
"resource_uri": "/api/site/1", "signup_tos": "I agree to release my contributions
|
40
|
+
under the <a rel=\"license\" href=\"http://creativecommons.org/licenses/by/3.0/\"
|
41
|
+
target=\"_blank\">Creative Commons-By license</a>, unless noted otherwise.
|
42
|
+
See <a href=\"/Copyrights\" target=\"_blank\">Copyrights</a>.", "time_zone":
|
43
|
+
"America/Chicago"}'
|
44
|
+
http_version:
|
45
|
+
recorded_at: Fri, 29 Mar 2013 02:06:35 GMT
|
46
|
+
- request:
|
47
|
+
method: post
|
48
|
+
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/
|
49
|
+
body:
|
50
|
+
encoding: UTF-8
|
51
|
+
string: '{"name":"TestPageForListing1919d719-92ed-43e1-8fa8-70db2967ba4b","content":"<p>Created
|
52
|
+
List Test Page TestPageForListing1919d719-92ed-43e1-8fa8-70db2967ba4b!</p>"}'
|
53
|
+
headers:
|
54
|
+
User-Agent:
|
55
|
+
- Faraday v0.8.7
|
56
|
+
Content-Type:
|
57
|
+
- application/json
|
58
|
+
Authorization:
|
59
|
+
- ApiKey testuser:key
|
60
|
+
Accept-Encoding:
|
61
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
62
|
+
Accept:
|
63
|
+
- '*/*'
|
64
|
+
response:
|
65
|
+
status:
|
66
|
+
code: 201
|
67
|
+
message: CREATED
|
68
|
+
headers:
|
69
|
+
Date:
|
70
|
+
- Fri, 29 Mar 2013 02:07:20 GMT
|
71
|
+
Server:
|
72
|
+
- Apache/2.2.22 (Ubuntu)
|
73
|
+
Vary:
|
74
|
+
- Cookie,Accept-Encoding
|
75
|
+
Access-Control-Allow-Origin:
|
76
|
+
- '*'
|
77
|
+
Access-Control-Allow-Methods:
|
78
|
+
- POST,GET,OPTIONS,PUT,DELETE
|
79
|
+
Set-Cookie:
|
80
|
+
- sessionid=b3db2d56154b260ffb2ee89de2f35693; expires=Fri, 12-Apr-2013 02:07:20
|
81
|
+
GMT; Max-Age=1209600; Path=/
|
82
|
+
Location:
|
83
|
+
- http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPageForListing1919d719-92ed-43e1-8fa8-70db2967ba4b
|
84
|
+
Content-Length:
|
85
|
+
- '20'
|
86
|
+
Content-Type:
|
87
|
+
- text/html; charset=utf-8
|
88
|
+
body:
|
89
|
+
encoding: UTF-8
|
90
|
+
string: ''
|
91
|
+
http_version:
|
92
|
+
recorded_at: Fri, 29 Mar 2013 02:06:36 GMT
|
93
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/file?format=json&limit=0
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- '*/*'
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Date:
|
22
|
+
- Fri, 29 Mar 2013 02:07:22 GMT
|
23
|
+
Server:
|
24
|
+
- Apache/2.2.22 (Ubuntu)
|
25
|
+
Access-Control-Allow-Origin:
|
26
|
+
- '*'
|
27
|
+
Access-Control-Allow-Methods:
|
28
|
+
- POST,GET,OPTIONS,PUT,DELETE
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Content-Type:
|
32
|
+
- application/vnd.api.v1+json; charset=utf-8
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: '{"meta": {"limit": 0, "offset": 0, "total_count": 1}, "objects": [{"file":
|
36
|
+
"/media/pages/files/lkl77lz3z0csg0tx.gif", "id": 1, "name": "ajax-loader(2).gif",
|
37
|
+
"resource_uri": "/api/file/1", "slug": "front page"}]}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 29 Mar 2013 02:06:37 GMT
|
40
|
+
recorded_with: VCR 2.4.0
|