datacentred 0.1.0pre

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 (66) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +35 -0
  4. data/README.md +2 -0
  5. data/Rakefile +10 -0
  6. data/circle.yml +5 -0
  7. data/datacentred.gemspec +23 -0
  8. data/lib/datacentred/error.rb +28 -0
  9. data/lib/datacentred/model/project.rb +44 -0
  10. data/lib/datacentred/model/role.rb +44 -0
  11. data/lib/datacentred/model/usage.rb +15 -0
  12. data/lib/datacentred/model/user.rb +32 -0
  13. data/lib/datacentred/model/version.rb +14 -0
  14. data/lib/datacentred/request/base.rb +46 -0
  15. data/lib/datacentred/request/projects.rb +38 -0
  16. data/lib/datacentred/request/roles.rb +38 -0
  17. data/lib/datacentred/request/usage.rb +10 -0
  18. data/lib/datacentred/request/users.rb +26 -0
  19. data/lib/datacentred/request/versions.rb +10 -0
  20. data/lib/datacentred/response.rb +12 -0
  21. data/lib/datacentred.rb +40 -0
  22. data/test/integration/projects_test.rb +117 -0
  23. data/test/integration/roles_test.rb +128 -0
  24. data/test/integration/usage_test.rb +24 -0
  25. data/test/integration/users_test.rb +128 -0
  26. data/test/integration/versions_test.rb +15 -0
  27. data/test/test_helper.rb +14 -0
  28. data/test/vcr_cassettes/add_user_to_project.yml +140 -0
  29. data/test/vcr_cassettes/add_user_to_role.yml +187 -0
  30. data/test/vcr_cassettes/create_project.yml +58 -0
  31. data/test/vcr_cassettes/create_role_with_invalid_permissions.yml +51 -0
  32. data/test/vcr_cassettes/create_role_with_permissions.yml +51 -0
  33. data/test/vcr_cassettes/create_role_without_permissions.yml +50 -0
  34. data/test/vcr_cassettes/create_user.yml +50 -0
  35. data/test/vcr_cassettes/delete_project.yml +103 -0
  36. data/test/vcr_cassettes/delete_role.yml +183 -0
  37. data/test/vcr_cassettes/delete_user.yml +136 -0
  38. data/test/vcr_cassettes/find_role.yml +97 -0
  39. data/test/vcr_cassettes/list_project_users.yml +58 -0
  40. data/test/vcr_cassettes/list_projects.yml +58 -0
  41. data/test/vcr_cassettes/list_role_users.yml +97 -0
  42. data/test/vcr_cassettes/list_roles.yml +50 -0
  43. data/test/vcr_cassettes/list_users.yml +58 -0
  44. data/test/vcr_cassettes/project_create_failed_validation.yml +56 -0
  45. data/test/vcr_cassettes/project_not_found.yml +54 -0
  46. data/test/vcr_cassettes/project_update_failed_validation.yml +55 -0
  47. data/test/vcr_cassettes/project_update_not_found.yml +54 -0
  48. data/test/vcr_cassettes/remove_user_from_project.yml +138 -0
  49. data/test/vcr_cassettes/remove_user_from_role.yml +228 -0
  50. data/test/vcr_cassettes/remove_user_from_role_not_found.yml +95 -0
  51. data/test/vcr_cassettes/show_project.yml +58 -0
  52. data/test/vcr_cassettes/show_usage.yml +51 -0
  53. data/test/vcr_cassettes/show_user.yml +97 -0
  54. data/test/vcr_cassettes/show_version.yml +50 -0
  55. data/test/vcr_cassettes/update_project.yml +58 -0
  56. data/test/vcr_cassettes/update_role.yml +98 -0
  57. data/test/vcr_cassettes/update_role_with_invalid_permissions.yml +98 -0
  58. data/test/vcr_cassettes/update_user.yml +97 -0
  59. data/test/vcr_cassettes/usage_not_found.yml +54 -0
  60. data/test/vcr_cassettes/user_create_failed_validation.yml +54 -0
  61. data/test/vcr_cassettes/user_delete_failed_validation.yml +54 -0
  62. data/test/vcr_cassettes/user_delete_not_found.yml +54 -0
  63. data/test/vcr_cassettes/user_show_not_found.yml +54 -0
  64. data/test/vcr_cassettes/user_update_failed_validation.yml +96 -0
  65. data/test/vcr_cassettes/user_update_not_found.yml +48 -0
  66. metadata +165 -0
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://my.datacentred.io/api/roles
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"role":{"name":"Genghis Khan","permissions":["fighting"]}}'
9
+ headers:
10
+ Accept:
11
+ - application/vnd.datacentred.api+json; version=1
12
+ Authorization:
13
+ - Token token=access_key:secret_key
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Faraday v0.9.2
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 422
23
+ message: Unprocessable Entity
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Api-Version:
32
+ - '1'
33
+ Content-Type:
34
+ - application/json; charset=utf-8
35
+ Cache-Control:
36
+ - no-cache
37
+ X-Request-Id:
38
+ - 5ea49fc1-7e50-4694-bf70-58a8ca754da2
39
+ X-Runtime:
40
+ - '0.102730'
41
+ Transfer-Encoding:
42
+ - chunked
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"errors":[{"resource":"role","detail":"Role permissions must be one
46
+ of: ''access requests.raise for others'', ''access requests.raise for self'',
47
+ ''api.read'', ''cloud.read'', ''roles.modify'', ''roles.read'', ''storage.read'',
48
+ ''tickets.modify'', ''usage.read''. ''fighting'' is not allowed.","field":"permissions"}],"links":[{"href":"https://my.datacentred.io/api","rel":"help"}]}'
49
+ http_version:
50
+ recorded_at: Tue, 05 Sep 2017 15:30:53 GMT
51
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://my.datacentred.io/api/roles
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"role":{"name":"Historical Figures","permissions":["usage.read","tickets.modify"]}}'
9
+ headers:
10
+ Accept:
11
+ - application/vnd.datacentred.api+json; version=1
12
+ Authorization:
13
+ - Token token=access_key:secret_key
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Faraday v0.9.2
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Api-Version:
32
+ - '1'
33
+ Content-Type:
34
+ - application/vnd.datacentred.api+json; charset=utf-8
35
+ Etag:
36
+ - W/"58fbc2acd5012da79f2345aab145f3b3"
37
+ Cache-Control:
38
+ - max-age=0, private, must-revalidate
39
+ X-Request-Id:
40
+ - dbe6ca37-dd5a-40ce-9bdd-c326a7df1c71
41
+ X-Runtime:
42
+ - '0.117976'
43
+ Transfer-Encoding:
44
+ - chunked
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"role":{"id":"91673b37-99ee-4ff5-bd61-d64af4b8be8c","name":"Historical
48
+ Figures","admin":false,"permissions":["usage.read","tickets.modify"],"created_at":"2017-09-05T15:30:35Z","updated_at":"2017-09-05T15:30:35Z","links":[{"href":"https://my.datacentred.io/api/roles/91673b37-99ee-4ff5-bd61-d64af4b8be8c","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/role","rel":"schema"}]}}'
49
+ http_version:
50
+ recorded_at: Tue, 05 Sep 2017 15:30:35 GMT
51
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://my.datacentred.io/api/roles
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"role":{"name":"New Role"}}'
9
+ headers:
10
+ Accept:
11
+ - application/vnd.datacentred.api+json; version=1
12
+ Authorization:
13
+ - Token token=access_key:secret_key
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Faraday v0.9.2
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Api-Version:
32
+ - '1'
33
+ Content-Type:
34
+ - application/vnd.datacentred.api+json; charset=utf-8
35
+ Etag:
36
+ - W/"7626678cc07b1ae3b09aa70d3180de56"
37
+ Cache-Control:
38
+ - max-age=0, private, must-revalidate
39
+ X-Request-Id:
40
+ - a7f593a8-8bb4-47a7-9906-ee689c8ec63a
41
+ X-Runtime:
42
+ - '0.120183'
43
+ Transfer-Encoding:
44
+ - chunked
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"role":{"id":"b172c64b-3b52-4d1f-ac84-a20e7c7cf07a","name":"New Role","admin":false,"permissions":[],"created_at":"2017-09-05T15:30:21Z","updated_at":"2017-09-05T15:30:21Z","links":[{"href":"https://my.datacentred.io/api/roles/b172c64b-3b52-4d1f-ac84-a20e7c7cf07a","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/role","rel":"schema"}]}}'
48
+ http_version:
49
+ recorded_at: Tue, 05 Sep 2017 15:30:21 GMT
50
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://my.datacentred.io/api/users
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"user":{"email":"death@afterlife.com","password":"melvin11","first_name":"Foo","last_name":"Bar"}}'
9
+ headers:
10
+ Accept:
11
+ - application/vnd.datacentred.api+json; version=1
12
+ Authorization:
13
+ - Token token=access_key:secret_key
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Faraday v0.9.2
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Api-Version:
32
+ - '1'
33
+ Content-Type:
34
+ - application/vnd.datacentred.api+json; charset=utf-8
35
+ Etag:
36
+ - W/"e9c6b91f64295188613937075fc50980"
37
+ Cache-Control:
38
+ - max-age=0, private, must-revalidate
39
+ X-Request-Id:
40
+ - b4b62753-383b-4d93-9cc7-3741c58ae7f9
41
+ X-Runtime:
42
+ - '3.579128'
43
+ Transfer-Encoding:
44
+ - chunked
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"user":{"id":"7d44860f4ace4fb8b63b622f6d5cdc43","email":"death@afterlife.com","first_name":"Foo","last_name":"Bar","created_at":"2017-09-05T18:39:07Z","updated_at":"2017-09-05T18:39:07Z","links":[{"href":"https://my.datacentred.io/api/users/7d44860f4ace4fb8b63b622f6d5cdc43","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/user","rel":"schema"}]}}'
48
+ http_version:
49
+ recorded_at: Tue, 05 Sep 2017 18:39:09 GMT
50
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,103 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://my.datacentred.io/api/projects/project_id2
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - application/vnd.datacentred.api+json; version=1
12
+ Authorization:
13
+ - Token token=access_key:secret_key
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Faraday v0.9.2
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 204
23
+ message: No Content
24
+ headers:
25
+ Server:
26
+ - nginx/1.10.3
27
+ Date:
28
+ - Wed, 30 Aug 2017 13:58:20 GMT
29
+ Connection:
30
+ - keep-alive
31
+ X-Frame-Options:
32
+ - SAMEORIGIN
33
+ X-Xss-Protection:
34
+ - 1; mode=block
35
+ X-Content-Type-Options:
36
+ - nosniff
37
+ X-Api-Version:
38
+ - '1'
39
+ Cache-Control:
40
+ - no-cache
41
+ X-Request-Id:
42
+ - 62ce7a0a-e819-4ec8-b069-00051ff526b8
43
+ X-Runtime:
44
+ - '19.705669'
45
+ Strict-Transport-Security:
46
+ - max-age=31536000; includeSubdomains; preload
47
+ body:
48
+ encoding: UTF-8
49
+ string: ''
50
+ http_version:
51
+ recorded_at: Wed, 30 Aug 2017 13:58:20 GMT
52
+ - request:
53
+ method: get
54
+ uri: https://my.datacentred.io/api/projects/project_id2
55
+ body:
56
+ encoding: US-ASCII
57
+ string: ''
58
+ headers:
59
+ Accept:
60
+ - application/vnd.datacentred.api+json; version=1
61
+ Authorization:
62
+ - Token token=b11f243efc6bc2207be97f966200ddea:7b4a1c0e2870782588291350929f3f1f
63
+ Content-Type:
64
+ - application/json
65
+ User-Agent:
66
+ - Faraday v0.9.2
67
+ Accept-Encoding:
68
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
69
+ response:
70
+ status:
71
+ code: 404
72
+ message: Not Found
73
+ headers:
74
+ Server:
75
+ - nginx/1.10.3
76
+ Date:
77
+ - Wed, 30 Aug 2017 13:58:20 GMT
78
+ Content-Type:
79
+ - application/vnd.datacentred.api+json
80
+ Transfer-Encoding:
81
+ - chunked
82
+ Connection:
83
+ - keep-alive
84
+ X-Frame-Options:
85
+ - SAMEORIGIN
86
+ X-Xss-Protection:
87
+ - 1; mode=block
88
+ X-Content-Type-Options:
89
+ - nosniff
90
+ X-Api-Version:
91
+ - '1'
92
+ Cache-Control:
93
+ - no-cache
94
+ X-Request-Id:
95
+ - 0c24a1ed-45b2-4bfc-b6e9-4ad0475b36e9
96
+ X-Runtime:
97
+ - '0.118475'
98
+ body:
99
+ encoding: UTF-8
100
+ string: ''
101
+ http_version:
102
+ recorded_at: Wed, 30 Aug 2017 13:58:20 GMT
103
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,183 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://my.datacentred.io/api/roles
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"role":{"name":"New Role"}}'
9
+ headers:
10
+ Accept:
11
+ - application/vnd.datacentred.api+json; version=1
12
+ Authorization:
13
+ - Token token=access_key:secret_key
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Faraday v0.9.2
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Api-Version:
32
+ - '1'
33
+ Content-Type:
34
+ - application/vnd.datacentred.api+json; charset=utf-8
35
+ Etag:
36
+ - W/"3d9d7b9b0d051504bae9bef4a082ee70"
37
+ Cache-Control:
38
+ - max-age=0, private, must-revalidate
39
+ X-Request-Id:
40
+ - 3f5fbfa5-3080-44a1-9041-adfea7d9681f
41
+ X-Runtime:
42
+ - '0.121715'
43
+ Transfer-Encoding:
44
+ - chunked
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"role":{"id":"2145d700-906e-453f-a10c-0d2c74b77ca3","name":"New Role","admin":false,"permissions":[],"created_at":"2017-09-05T15:37:22Z","updated_at":"2017-09-05T15:37:22Z","links":[{"href":"https://my.datacentred.io/api/roles/2145d700-906e-453f-a10c-0d2c74b77ca3","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/role","rel":"schema"}]}}'
48
+ http_version:
49
+ recorded_at: Tue, 05 Sep 2017 15:37:22 GMT
50
+ - request:
51
+ method: get
52
+ uri: https://my.datacentred.io/api/roles/2145d700-906e-453f-a10c-0d2c74b77ca3
53
+ body:
54
+ encoding: US-ASCII
55
+ string: ''
56
+ headers:
57
+ Accept:
58
+ - application/vnd.datacentred.api+json; version=1
59
+ Authorization:
60
+ - Token token=e9d2d4cd37adf1634e2a65b9e18a8fcb:821fac118e7675f28fa42ab79ace57de
61
+ Content-Type:
62
+ - application/json
63
+ User-Agent:
64
+ - Faraday v0.9.2
65
+ Accept-Encoding:
66
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
67
+ response:
68
+ status:
69
+ code: 200
70
+ message: OK
71
+ headers:
72
+ X-Frame-Options:
73
+ - SAMEORIGIN
74
+ X-Xss-Protection:
75
+ - 1; mode=block
76
+ X-Content-Type-Options:
77
+ - nosniff
78
+ X-Api-Version:
79
+ - '1'
80
+ Content-Type:
81
+ - application/vnd.datacentred.api+json; charset=utf-8
82
+ Etag:
83
+ - W/"3d9d7b9b0d051504bae9bef4a082ee70"
84
+ Cache-Control:
85
+ - max-age=0, private, must-revalidate
86
+ X-Request-Id:
87
+ - 449f0bd9-bf75-4c52-b410-072878ff792c
88
+ X-Runtime:
89
+ - '0.095518'
90
+ Transfer-Encoding:
91
+ - chunked
92
+ body:
93
+ encoding: UTF-8
94
+ string: '{"role":{"id":"2145d700-906e-453f-a10c-0d2c74b77ca3","name":"New Role","admin":false,"permissions":[],"created_at":"2017-09-05T15:37:22Z","updated_at":"2017-09-05T15:37:22Z","links":[{"href":"https://my.datacentred.io/api/roles/2145d700-906e-453f-a10c-0d2c74b77ca3","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/role","rel":"schema"}]}}'
95
+ http_version:
96
+ recorded_at: Tue, 05 Sep 2017 15:37:23 GMT
97
+ - request:
98
+ method: delete
99
+ uri: https://my.datacentred.io/api/roles/2145d700-906e-453f-a10c-0d2c74b77ca3
100
+ body:
101
+ encoding: US-ASCII
102
+ string: ''
103
+ headers:
104
+ Accept:
105
+ - application/vnd.datacentred.api+json; version=1
106
+ Authorization:
107
+ - Token token=e9d2d4cd37adf1634e2a65b9e18a8fcb:821fac118e7675f28fa42ab79ace57de
108
+ Content-Type:
109
+ - application/json
110
+ User-Agent:
111
+ - Faraday v0.9.2
112
+ Accept-Encoding:
113
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
114
+ response:
115
+ status:
116
+ code: 204
117
+ message: No Content
118
+ headers:
119
+ X-Frame-Options:
120
+ - SAMEORIGIN
121
+ X-Xss-Protection:
122
+ - 1; mode=block
123
+ X-Content-Type-Options:
124
+ - nosniff
125
+ X-Api-Version:
126
+ - '1'
127
+ Cache-Control:
128
+ - no-cache
129
+ X-Request-Id:
130
+ - b526442a-b806-46c0-a907-ca43eb8a3440
131
+ X-Runtime:
132
+ - '0.110964'
133
+ body:
134
+ encoding: UTF-8
135
+ string: ''
136
+ http_version:
137
+ recorded_at: Tue, 05 Sep 2017 15:37:23 GMT
138
+ - request:
139
+ method: get
140
+ uri: https://my.datacentred.io/api/roles/2145d700-906e-453f-a10c-0d2c74b77ca3
141
+ body:
142
+ encoding: US-ASCII
143
+ string: ''
144
+ headers:
145
+ Accept:
146
+ - application/vnd.datacentred.api+json; version=1
147
+ Authorization:
148
+ - Token token=e9d2d4cd37adf1634e2a65b9e18a8fcb:821fac118e7675f28fa42ab79ace57de
149
+ Content-Type:
150
+ - application/json
151
+ User-Agent:
152
+ - Faraday v0.9.2
153
+ Accept-Encoding:
154
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
155
+ response:
156
+ status:
157
+ code: 404
158
+ message: Not Found
159
+ headers:
160
+ X-Frame-Options:
161
+ - SAMEORIGIN
162
+ X-Xss-Protection:
163
+ - 1; mode=block
164
+ X-Content-Type-Options:
165
+ - nosniff
166
+ X-Api-Version:
167
+ - '1'
168
+ Content-Type:
169
+ - application/vnd.datacentred.api+json
170
+ Cache-Control:
171
+ - no-cache
172
+ X-Request-Id:
173
+ - 962e32dd-210d-4ad9-90c5-c274c5f7a26f
174
+ X-Runtime:
175
+ - '0.093949'
176
+ Transfer-Encoding:
177
+ - chunked
178
+ body:
179
+ encoding: UTF-8
180
+ string: ''
181
+ http_version:
182
+ recorded_at: Tue, 05 Sep 2017 15:37:23 GMT
183
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,136 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://my.datacentred.io/api/users
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"user":{"email":"death@afterlife.com","password":"melvin11","first_name":"Foo","last_name":"Bar"}}'
9
+ headers:
10
+ Accept:
11
+ - application/vnd.datacentred.api+json; version=1
12
+ Authorization:
13
+ - Token token=access_key:secret_key
14
+ Content-Type:
15
+ - application/json
16
+ User-Agent:
17
+ - Faraday v0.9.2
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ X-Frame-Options:
26
+ - SAMEORIGIN
27
+ X-Xss-Protection:
28
+ - 1; mode=block
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Api-Version:
32
+ - '1'
33
+ Content-Type:
34
+ - application/vnd.datacentred.api+json; charset=utf-8
35
+ Etag:
36
+ - W/"1eb58dc07fce8b495b7aecad1f884e0f"
37
+ Cache-Control:
38
+ - max-age=0, private, must-revalidate
39
+ X-Request-Id:
40
+ - 9ad38f32-53ce-44a9-b302-c99dd61bc160
41
+ X-Runtime:
42
+ - '1.779575'
43
+ Transfer-Encoding:
44
+ - chunked
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"user":{"id":"6c2fbda5f5964b3a80f9ed0fafe558ef","email":"death@afterlife.com","first_name":"Foo","last_name":"Bar","created_at":"2017-09-05T18:44:12Z","updated_at":"2017-09-05T18:44:12Z","links":[{"href":"https://my.datacentred.io/api/users/6c2fbda5f5964b3a80f9ed0fafe558ef","rel":"self"},{"href":"https://my.datacentred.io/api/schemas/user","rel":"schema"}]}}'
48
+ http_version:
49
+ recorded_at: Tue, 05 Sep 2017 18:44:14 GMT
50
+ - request:
51
+ method: delete
52
+ uri: https://my.datacentred.io/api/users/6c2fbda5f5964b3a80f9ed0fafe558ef
53
+ body:
54
+ encoding: US-ASCII
55
+ string: ''
56
+ headers:
57
+ Accept:
58
+ - application/vnd.datacentred.api+json; version=1
59
+ Authorization:
60
+ - Token token=e9d2d4cd37adf1634e2a65b9e18a8fcb:821fac118e7675f28fa42ab79ace57de
61
+ Content-Type:
62
+ - application/json
63
+ User-Agent:
64
+ - Faraday v0.9.2
65
+ Accept-Encoding:
66
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
67
+ response:
68
+ status:
69
+ code: 204
70
+ message: No Content
71
+ headers:
72
+ X-Frame-Options:
73
+ - SAMEORIGIN
74
+ X-Xss-Protection:
75
+ - 1; mode=block
76
+ X-Content-Type-Options:
77
+ - nosniff
78
+ X-Api-Version:
79
+ - '1'
80
+ Cache-Control:
81
+ - no-cache
82
+ X-Request-Id:
83
+ - 20ae248a-108a-41f0-bdc7-81e0799f2f46
84
+ X-Runtime:
85
+ - '0.611460'
86
+ body:
87
+ encoding: UTF-8
88
+ string: ''
89
+ http_version:
90
+ recorded_at: Tue, 05 Sep 2017 18:44:14 GMT
91
+ - request:
92
+ method: get
93
+ uri: https://my.datacentred.io/api/users/6c2fbda5f5964b3a80f9ed0fafe558ef
94
+ body:
95
+ encoding: US-ASCII
96
+ string: ''
97
+ headers:
98
+ Accept:
99
+ - application/vnd.datacentred.api+json; version=1
100
+ Authorization:
101
+ - Token token=e9d2d4cd37adf1634e2a65b9e18a8fcb:821fac118e7675f28fa42ab79ace57de
102
+ Content-Type:
103
+ - application/json
104
+ User-Agent:
105
+ - Faraday v0.9.2
106
+ Accept-Encoding:
107
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
108
+ response:
109
+ status:
110
+ code: 404
111
+ message: Not Found
112
+ headers:
113
+ X-Frame-Options:
114
+ - SAMEORIGIN
115
+ X-Xss-Protection:
116
+ - 1; mode=block
117
+ X-Content-Type-Options:
118
+ - nosniff
119
+ X-Api-Version:
120
+ - '1'
121
+ Content-Type:
122
+ - application/vnd.datacentred.api+json
123
+ Cache-Control:
124
+ - no-cache
125
+ X-Request-Id:
126
+ - 4a77451c-1092-4e63-a976-b8bcc87cf208
127
+ X-Runtime:
128
+ - '0.095931'
129
+ Transfer-Encoding:
130
+ - chunked
131
+ body:
132
+ encoding: UTF-8
133
+ string: ''
134
+ http_version:
135
+ recorded_at: Tue, 05 Sep 2017 18:44:14 GMT
136
+ recorded_with: VCR 2.8.0