localwiki_client 0.2.0 → 0.3.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 (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
@@ -12,6 +12,7 @@ describe 'LocalwikiClient' do
12
12
  @path_matcher = lambda do |request_1, request_2|
13
13
  URI(request_1.uri).path.match(/TestPage/) && URI(request_2.uri).path.match(/TestPage/)
14
14
  end
15
+ @create_response = @wiki.create('page', {name: @pagename, content: '<p>Created!</p>'}.to_json)
15
16
  end
16
17
 
17
18
  after(:all) do
@@ -21,14 +22,20 @@ describe 'LocalwikiClient' do
21
22
  context "CRUD method" do
22
23
 
23
24
  it "#create('page', json) response.status is 201" do
24
- response = @wiki.create('page', {name: @pagename, content: '<p>Created!</p>'}.to_json)
25
- response.status.should eq 201
25
+ @create_response.status.should eq 201
26
26
  end
27
27
 
28
- it "#read('page', pagename) response.status should match(/Created!/)" do
28
+ it "#read('page', pagename) returns page content" do
29
29
  VCR.use_cassette 'basic_crud_read_success', :match_requests_on => [:method, @path_matcher] do
30
- response = @wiki.read('page', @pagename)
31
- response["content"].should match(/Created!/)
30
+ page = @wiki.read('page', @pagename)
31
+ page.content.should match(/Created!/)
32
+ end
33
+ end
34
+
35
+ it "#page_by_name(pagename) returns page content" do
36
+ VCR.use_cassette 'basic_crud_page_by_name_success', :match_requests_on => [:method, @path_matcher] do
37
+ page = @wiki.page_by_name(@pagename)
38
+ page.content.should match(/Created!/)
32
39
  end
33
40
  end
34
41
 
data/spec/basic_spec.rb CHANGED
@@ -24,8 +24,8 @@ describe 'LocalwikiClient' do
24
24
  end
25
25
  @wiki.create('page', {name: page_name, content: '<p>Created page with spaces!</p>'}.to_json)
26
26
  VCR.use_cassette 'basic_page_by_name_spaces', :match_requests_on => [:method, path_matcher] do
27
- response = @wiki.page_by_name(page_name)
28
- response["content"].should match(/Created page with spaces!/)
27
+ page = @wiki.page_by_name(page_name)
28
+ page.content.should match(/Created page with spaces!/)
29
29
  end
30
30
  end
31
31
 
@@ -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 01:07:51 GMT
22
+ - Fri, 29 Mar 2013 02:07:16 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,50 +42,52 @@ 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 01:07:20 GMT
45
+ recorded_at: Fri, 29 Mar 2013 02:06:32 GMT
46
46
  - request:
47
47
  method: post
48
48
  uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/
49
49
  body:
50
50
  encoding: UTF-8
51
- string: ! '{"name":"Test Page0c230d1d-7442-42f2-bbc9-e2768c5a562e","content":"<p>Created
51
+ string: '{"name":"Test Pagec2026982-a27d-414a-baff-8c23b703d958","content":"<p>Created
52
52
  page with spaces!</p>"}'
53
53
  headers:
54
+ User-Agent:
55
+ - Faraday v0.8.7
54
56
  Content-Type:
55
57
  - application/json
56
58
  Authorization:
57
59
  - ApiKey testuser:key
60
+ Accept-Encoding:
61
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
58
62
  Accept:
59
- - ! '*/*'
60
- User-Agent:
61
- - Ruby
63
+ - '*/*'
62
64
  response:
63
65
  status:
64
66
  code: 201
65
67
  message: CREATED
66
68
  headers:
67
69
  Date:
68
- - Sat, 16 Mar 2013 01:07:51 GMT
70
+ - Fri, 29 Mar 2013 02:07:16 GMT
69
71
  Server:
70
72
  - Apache/2.2.22 (Ubuntu)
71
73
  Vary:
72
74
  - Cookie,Accept-Encoding
73
75
  Access-Control-Allow-Origin:
74
- - ! '*'
76
+ - '*'
75
77
  Access-Control-Allow-Methods:
76
78
  - POST,GET,OPTIONS,PUT,DELETE
77
79
  Set-Cookie:
78
- - sessionid=c8e100346799ef6074dec276b229bac1; expires=Sat, 30-Mar-2013 01:07:52
80
+ - sessionid=27e0e18f9a79bb69dad291d0ac1fc3cb; expires=Fri, 12-Apr-2013 02:07:17
79
81
  GMT; Max-Age=1209600; Path=/
80
82
  Location:
81
- - http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/Test_Page0c230d1d-7442-42f2-bbc9-e2768c5a562e
83
+ - http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/Test_Pagec2026982-a27d-414a-baff-8c23b703d958
82
84
  Content-Length:
83
- - '0'
85
+ - '20'
84
86
  Content-Type:
85
87
  - text/html; charset=utf-8
86
88
  body:
87
- encoding: US-ASCII
89
+ encoding: UTF-8
88
90
  string: ''
89
91
  http_version:
90
- recorded_at: Sat, 16 Mar 2013 01:07:21 GMT
92
+ recorded_at: Fri, 29 Mar 2013 02:06:32 GMT
91
93
  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 01:07:50 GMT
22
+ - Fri, 29 Mar 2013 02:07:14 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,49 +42,51 @@ 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 01:07:19 GMT
45
+ recorded_at: Fri, 29 Mar 2013 02:06:29 GMT
46
46
  - request:
47
47
  method: post
48
48
  uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/
49
49
  body:
50
50
  encoding: UTF-8
51
- string: ! '{"name":"TestPage533b1957-d395-4edf-81a6-f38a60f1459c","content":"<p>Created!</p>"}'
51
+ string: '{"name":"TestPage16de81aa-036e-410f-a2c8-c96bddcdf39a","content":"<p>Created!</p>"}'
52
52
  headers:
53
+ User-Agent:
54
+ - Faraday v0.8.7
53
55
  Content-Type:
54
56
  - application/json
55
57
  Authorization:
56
58
  - ApiKey testuser:key
59
+ Accept-Encoding:
60
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
57
61
  Accept:
58
- - ! '*/*'
59
- User-Agent:
60
- - Ruby
62
+ - '*/*'
61
63
  response:
62
64
  status:
63
65
  code: 201
64
66
  message: CREATED
65
67
  headers:
66
68
  Date:
67
- - Sat, 16 Mar 2013 01:07:50 GMT
69
+ - Fri, 29 Mar 2013 02:07:14 GMT
68
70
  Server:
69
71
  - Apache/2.2.22 (Ubuntu)
70
72
  Vary:
71
73
  - Cookie,Accept-Encoding
72
74
  Access-Control-Allow-Origin:
73
- - ! '*'
75
+ - '*'
74
76
  Access-Control-Allow-Methods:
75
77
  - POST,GET,OPTIONS,PUT,DELETE
76
78
  Set-Cookie:
77
- - sessionid=e6ca591c90fc5bb8964c53dd2e6436eb; expires=Sat, 30-Mar-2013 01:07:50
79
+ - sessionid=b7d912565459dbec5668a08d4a10f2f5; expires=Fri, 12-Apr-2013 02:07:14
78
80
  GMT; Max-Age=1209600; Path=/
79
81
  Location:
80
- - http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage533b1957-d395-4edf-81a6-f38a60f1459c
82
+ - http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage16de81aa-036e-410f-a2c8-c96bddcdf39a
81
83
  Content-Length:
82
- - '0'
84
+ - '20'
83
85
  Content-Type:
84
86
  - text/html; charset=utf-8
85
87
  body:
86
- encoding: US-ASCII
88
+ encoding: UTF-8
87
89
  string: ''
88
90
  http_version:
89
- recorded_at: Sat, 16 Mar 2013 01:07:19 GMT
91
+ recorded_at: Fri, 29 Mar 2013 02:06:30 GMT
90
92
  recorded_with: VCR 2.4.0
@@ -2,41 +2,43 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: delete
5
- uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage506da7d1-4cb8-4aa1-bc50-455e7ed8ef02
5
+ uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage16de81aa-036e-410f-a2c8-c96bddcdf39a
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
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: 404
21
23
  message: NOT FOUND
22
24
  headers:
23
25
  Date:
24
- - Sat, 16 Mar 2013 01:17:55 GMT
26
+ - Fri, 29 Mar 2013 02:07:16 GMT
25
27
  Server:
26
28
  - Apache/2.2.22 (Ubuntu)
27
29
  Access-Control-Allow-Origin:
28
- - ! '*'
30
+ - '*'
29
31
  Access-Control-Allow-Methods:
30
32
  - POST,GET,OPTIONS,PUT,DELETE
31
33
  Vary:
32
34
  - Accept-Encoding
33
35
  Content-Length:
34
- - '0'
36
+ - '20'
35
37
  Content-Type:
36
38
  - text/html; charset=utf-8
37
39
  body:
38
- encoding: US-ASCII
40
+ encoding: UTF-8
39
41
  string: ''
40
42
  http_version:
41
- recorded_at: Sat, 16 Mar 2013 01:17:24 GMT
43
+ recorded_at: Fri, 29 Mar 2013 02:06:31 GMT
42
44
  recorded_with: VCR 2.4.0
@@ -2,30 +2,32 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: delete
5
- uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage533b1957-d395-4edf-81a6-f38a60f1459c
5
+ uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage16de81aa-036e-410f-a2c8-c96bddcdf39a
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
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: 204
21
23
  message: NO CONTENT
22
24
  headers:
23
25
  Date:
24
- - Sat, 16 Mar 2013 01:07:51 GMT
26
+ - Fri, 29 Mar 2013 02:07:15 GMT
25
27
  Server:
26
28
  - Apache/2.2.22 (Ubuntu)
27
29
  Access-Control-Allow-Origin:
28
- - ! '*'
30
+ - '*'
29
31
  Access-Control-Allow-Methods:
30
32
  - POST,GET,OPTIONS,PUT,DELETE
31
33
  Content-Length:
@@ -35,8 +37,8 @@ http_interactions:
35
37
  Content-Type:
36
38
  - text/html; charset=utf-8
37
39
  body:
38
- encoding: US-ASCII
40
+ encoding: UTF-8
39
41
  string: ''
40
42
  http_version:
41
- recorded_at: Sat, 16 Mar 2013 01:07:20 GMT
43
+ recorded_at: Fri, 29 Mar 2013 02:06:31 GMT
42
44
  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/page/TestPage16de81aa-036e-410f-a2c8-c96bddcdf39a?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:15 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: '{"content": "<p>Created!</p>", "id": 364, "map": null, "name": "TestPage16de81aa-036e-410f-a2c8-c96bddcdf39a",
36
+ "page_tags": null, "resource_uri": "/api/page/TestPage16de81aa-036e-410f-a2c8-c96bddcdf39a",
37
+ "slug": "testpage16de81aa-036e-410f-a2c8-c96bddcdf39a"}'
38
+ http_version:
39
+ recorded_at: Fri, 29 Mar 2013 02:06:30 GMT
40
+ recorded_with: VCR 2.4.0
@@ -2,51 +2,39 @@
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/TestPage506da7d1-4cb8-4aa1-bc50-455e7ed8ef02?format=json
5
+ uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage16de81aa-036e-410f-a2c8-c96bddcdf39a?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: 404
19
- message: !binary |-
20
- Tk9UIEZPVU5E
19
+ message: NOT FOUND
21
20
  headers:
22
- !binary "RGF0ZQ==":
23
- - !binary |-
24
- U2F0LCAxNiBNYXIgMjAxMyAwMToxNzo1NSBHTVQ=
25
- !binary "U2VydmVy":
26
- - !binary |-
27
- QXBhY2hlLzIuMi4yMiAoVWJ1bnR1KQ==
28
- !binary "QWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2lu":
29
- - !binary |-
30
- Kg==
31
- !binary "QWNjZXNzLUNvbnRyb2wtQWxsb3ctTWV0aG9kcw==":
32
- - !binary |-
33
- UE9TVCxHRVQsT1BUSU9OUyxQVVQsREVMRVRF
34
- !binary "VmFyeQ==":
35
- - !binary |-
36
- QWNjZXB0LUVuY29kaW5n
37
- !binary "Q29udGVudC1FbmNvZGluZw==":
38
- - !binary |-
39
- Z3ppcA==
40
- !binary "Q29udGVudC1MZW5ndGg=":
41
- - !binary |-
42
- MjA=
43
- !binary "Q29udGVudC1UeXBl":
44
- - !binary |-
45
- dGV4dC9odG1sOyBjaGFyc2V0PXV0Zi04
21
+ Date:
22
+ - Fri, 29 Mar 2013 02:07:16 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
+ Vary:
30
+ - Accept-Encoding
31
+ Content-Length:
32
+ - '20'
33
+ Content-Type:
34
+ - text/html; charset=utf-8
46
35
  body:
47
- encoding: ASCII-8BIT
48
- string: !binary |-
49
- H4sIAAAAAAAAAwMAAAAAAAAAAAA=
36
+ encoding: UTF-8
37
+ string: ''
50
38
  http_version:
51
- recorded_at: Sat, 16 Mar 2013 01:17:24 GMT
39
+ recorded_at: Fri, 29 Mar 2013 02:06:31 GMT
52
40
  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/TestPage533b1957-d395-4edf-81a6-f38a60f1459c?format=json
5
+ uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage16de81aa-036e-410f-a2c8-c96bddcdf39a?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:50 GMT
22
+ - Fri, 29 Mar 2013 02:07:14 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,10 +31,10 @@ 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!</p>", "id": 254, "map": null, "name": "TestPage533b1957-d395-4edf-81a6-f38a60f1459c",
36
- "page_tags": null, "resource_uri": "/api/page/TestPage533b1957-d395-4edf-81a6-f38a60f1459c",
37
- "slug": "testpage533b1957-d395-4edf-81a6-f38a60f1459c"}'
34
+ encoding: UTF-8
35
+ string: '{"content": "<p>Created!</p>", "id": 364, "map": null, "name": "TestPage16de81aa-036e-410f-a2c8-c96bddcdf39a",
36
+ "page_tags": null, "resource_uri": "/api/page/TestPage16de81aa-036e-410f-a2c8-c96bddcdf39a",
37
+ "slug": "testpage16de81aa-036e-410f-a2c8-c96bddcdf39a"}'
38
38
  http_version:
39
- recorded_at: Sat, 16 Mar 2013 01:07:19 GMT
39
+ recorded_at: Fri, 29 Mar 2013 02:06:30 GMT
40
40
  recorded_with: VCR 2.4.0
@@ -2,30 +2,32 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: put
5
- uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage533b1957-d395-4edf-81a6-f38a60f1459c
5
+ uri: http://ec2-54-234-151-52.compute-1.amazonaws.com/api/page/TestPage16de81aa-036e-410f-a2c8-c96bddcdf39a
6
6
  body:
7
7
  encoding: UTF-8
8
- string: ! '{"content":"<foo>"}'
8
+ string: '{"content":"<foo>"}'
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: 204
21
23
  message: NO CONTENT
22
24
  headers:
23
25
  Date:
24
- - Sat, 16 Mar 2013 01:07:50 GMT
26
+ - Fri, 29 Mar 2013 02:07:15 GMT
25
27
  Server:
26
28
  - Apache/2.2.22 (Ubuntu)
27
29
  Access-Control-Allow-Origin:
28
- - ! '*'
30
+ - '*'
29
31
  Access-Control-Allow-Methods:
30
32
  - POST,GET,OPTIONS,PUT,DELETE
31
33
  Content-Length:
@@ -35,8 +37,8 @@ http_interactions:
35
37
  Content-Type:
36
38
  - text/html; charset=utf-8
37
39
  body:
38
- encoding: US-ASCII
40
+ encoding: UTF-8
39
41
  string: ''
40
42
  http_version:
41
- recorded_at: Sat, 16 Mar 2013 01:07:20 GMT
43
+ recorded_at: Fri, 29 Mar 2013 02:06:31 GMT
42
44
  recorded_with: VCR 2.4.0