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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/History.txt +5 -0
  4. data/README.md +17 -9
  5. data/Rakefile +6 -0
  6. data/integration/helper.rb +1 -1
  7. data/integration/live_saltlake_wiki_spec.rb +2 -2
  8. data/integration/live_test_wiki_spec.rb +26 -11
  9. data/lib/localwiki/client.rb +143 -115
  10. data/lib/localwiki/resource.rb +76 -0
  11. data/lib/localwiki/version.rb +1 -1
  12. data/lib/localwiki_client.rb +1 -0
  13. data/localwiki_client.gemspec +1 -0
  14. data/spec/basic_crud_spec.rb +12 -5
  15. data/spec/basic_spec.rb +2 -2
  16. data/spec/fixtures/cassettes/basic.yml +21 -19
  17. data/spec/fixtures/cassettes/basic_crud.yml +21 -19
  18. data/spec/fixtures/cassettes/basic_crud_delete_fail.yml +11 -9
  19. data/spec/fixtures/cassettes/basic_crud_delete_success.yml +10 -8
  20. data/spec/fixtures/cassettes/basic_crud_page_by_name_success.yml +40 -0
  21. data/spec/fixtures/cassettes/basic_crud_read_fail.yml +22 -34
  22. data/spec/fixtures/cassettes/basic_crud_read_success.yml +11 -11
  23. data/spec/fixtures/cassettes/basic_crud_update_success.yml +11 -9
  24. data/spec/fixtures/cassettes/basic_fetch_version_success.yml +41 -37
  25. data/spec/fixtures/cassettes/basic_page_by_name_spaces.yml +12 -12
  26. data/spec/fixtures/cassettes/basic_unique_authors_success.yml +41 -37
  27. data/spec/fixtures/cassettes/fetch.yml +8 -8
  28. data/spec/fixtures/cassettes/list.yml +93 -0
  29. data/spec/fixtures/cassettes/list_file_success.yml +40 -0
  30. data/spec/fixtures/cassettes/list_limit_success.yml +124 -0
  31. data/spec/fixtures/cassettes/list_map_success.yml +42 -0
  32. data/spec/fixtures/cassettes/list_page_success.yml +1108 -0
  33. data/spec/fixtures/cassettes/list_page_tags_success.yml +42 -0
  34. data/spec/fixtures/cassettes/list_site_success.yml +46 -0
  35. data/spec/fixtures/cassettes/list_tag_success.yml +43 -0
  36. data/spec/fixtures/cassettes/list_user_success.yml +56 -0
  37. data/spec/fixtures/cassettes/localwiki_client.yml +121 -115
  38. data/spec/fixtures/cassettes/slug.yml +8 -8
  39. data/spec/helper.rb +7 -0
  40. data/spec/list_spec.rb +47 -0
  41. data/spec/localwiki_client_spec.rb +4 -12
  42. data/spec/localwiki_spec.rb +17 -0
  43. data/spec/map_spec.rb +135 -0
  44. data/spec/resource_spec.rb +60 -0
  45. 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: ! '{"name":"TestPagec741d8ca-a27c-44b4-a77e-9539688a2695","content":"<p>Created!</p>"}'
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
- - Sat, 16 Mar 2013 05:14:51 GMT
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=78e682d36fda5707c22f0c1cf3acf820; expires=Sat, 30-Mar-2013 05:14:51
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/TestPagec741d8ca-a27c-44b4-a77e-9539688a2695
39
+ - http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage52af28ba-1234-47b4-896a-3874268ea8e7
38
40
  Content-Length:
39
- - '0'
41
+ - '20'
40
42
  Content-Type:
41
43
  - text/html; charset=utf-8
42
44
  body:
43
- encoding: US-ASCII
45
+ encoding: UTF-8
44
46
  string: ''
45
47
  http_version:
46
- recorded_at: Sat, 16 Mar 2013 05:14:20 GMT
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/TestPagec741d8ca-a27c-44b4-a77e-9539688a2695
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: ! '{"content":"<p>foo</p>"}'
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
- - Sat, 16 Mar 2013 05:14:51 GMT
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: US-ASCII
86
+ encoding: UTF-8
83
87
  string: ''
84
88
  http_version:
85
- recorded_at: Sat, 16 Mar 2013 05:14:20 GMT
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=TestPagec741d8ca-a27c-44b4-a77e-9539688a2695
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
- - Sat, 16 Mar 2013 05:14:51 GMT
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: US-ASCII
118
- string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
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-16T00:14:51.669749", "history_id": 718, "history_type":
121
- 1, "history_user": "/api/user/2", "history_user_ip": "70.89.154.169", "id":
122
- 285, "name": "TestPagec741d8ca-a27c-44b4-a77e-9539688a2695", "resource_uri":
123
- "/api/page_version/718", "slug": "testpagec741d8ca-a27c-44b4-a77e-9539688a2695"},
124
- {"content": "<p>Created!</p>", "history_comment": null, "history_date": "2013-03-16T00:14:51.249885",
125
- "history_id": 717, "history_type": 0, "history_user": "/api/user/2", "history_user_ip":
126
- "70.89.154.169", "id": 285, "name": "TestPagec741d8ca-a27c-44b4-a77e-9539688a2695",
127
- "resource_uri": "/api/page_version/717", "slug": "testpagec741d8ca-a27c-44b4-a77e-9539688a2695"}]}'
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: Sat, 16 Mar 2013 05:14:21 GMT
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/Test_Page0c230d1d-7442-42f2-bbc9-e2768c5a562e?format=json
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
- - Sat, 16 Mar 2013 01:07:52 GMT
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: US-ASCII
35
- string: ! '{"content": "<p>Created page with spaces!</p>", "id": 255, "map":
36
- null, "name": "Test Page0c230d1d-7442-42f2-bbc9-e2768c5a562e", "page_tags":
37
- null, "resource_uri": "/api/page/Test_Page0c230d1d-7442-42f2-bbc9-e2768c5a562e",
38
- "slug": "test page0c230d1d-7442-42f2-bbc9-e2768c5a562e"}'
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: Sat, 16 Mar 2013 01:07:21 GMT
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: ! '{"name":"TestPage72aa8993-bc09-4010-af55-e161b64929bb","content":"<p>Created!</p>"}'
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
- - Sat, 16 Mar 2013 05:14:52 GMT
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=4718abd955b8a9a6ad1fe1508702c92b; expires=Sat, 30-Mar-2013 05:14:52
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/TestPage72aa8993-bc09-4010-af55-e161b64929bb
39
+ - http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage2b11303c-bca4-4f0b-9a81-47f8f3457a6c
38
40
  Content-Length:
39
- - '0'
41
+ - '20'
40
42
  Content-Type:
41
43
  - text/html; charset=utf-8
42
44
  body:
43
- encoding: US-ASCII
45
+ encoding: UTF-8
44
46
  string: ''
45
47
  http_version:
46
- recorded_at: Sat, 16 Mar 2013 05:14:21 GMT
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/TestPage72aa8993-bc09-4010-af55-e161b64929bb
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: ! '{"content":"<p>foo</p>"}'
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
- - Sat, 16 Mar 2013 05:14:52 GMT
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: US-ASCII
86
+ encoding: UTF-8
83
87
  string: ''
84
88
  http_version:
85
- recorded_at: Sat, 16 Mar 2013 05:14:21 GMT
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=TestPage72aa8993-bc09-4010-af55-e161b64929bb
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
- - Sat, 16 Mar 2013 05:14:53 GMT
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: US-ASCII
118
- string: ! '{"meta": {"limit": 20, "next": null, "offset": 0, "previous": null,
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-16T00:14:52.750925", "history_id": 720, "history_type":
121
- 1, "history_user": "/api/user/2", "history_user_ip": "70.89.154.169", "id":
122
- 286, "name": "TestPage72aa8993-bc09-4010-af55-e161b64929bb", "resource_uri":
123
- "/api/page_version/720", "slug": "testpage72aa8993-bc09-4010-af55-e161b64929bb"},
124
- {"content": "<p>Created!</p>", "history_comment": null, "history_date": "2013-03-16T00:14:52.322231",
125
- "history_id": 719, "history_type": 0, "history_user": "/api/user/2", "history_user_ip":
126
- "70.89.154.169", "id": 286, "name": "TestPage72aa8993-bc09-4010-af55-e161b64929bb",
127
- "resource_uri": "/api/page_version/719", "slug": "testpage72aa8993-bc09-4010-af55-e161b64929bb"}]}'
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: Sat, 16 Mar 2013 05:14:22 GMT
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
- - Sat, 16 Mar 2013 05:14:50 GMT
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: US-ASCII
35
- string: ! '{"domain": "example.com", "id": 1, "language_code": "en-us", "license":
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: Sat, 16 Mar 2013 05:14:19 GMT
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