contentful-management 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/Gemfile +1 -0
  4. data/README.md +245 -151
  5. data/lib/contentful/management/client.rb +20 -0
  6. data/lib/contentful/management/client_association_all_published_method_factory.rb +4 -0
  7. data/lib/contentful/management/client_content_type_methods_factory.rb +4 -0
  8. data/lib/contentful/management/client_editor_interface_methods_factory.rb +35 -0
  9. data/lib/contentful/management/client_role_methods_factory.rb +15 -0
  10. data/lib/contentful/management/client_webhook_methods_factory.rb +1 -1
  11. data/lib/contentful/management/content_type.rb +12 -0
  12. data/lib/contentful/management/content_type_editor_interface_methods_factory.rb +22 -0
  13. data/lib/contentful/management/editor_interface.rb +85 -0
  14. data/lib/contentful/management/field.rb +1 -0
  15. data/lib/contentful/management/resource/all_published.rb +1 -0
  16. data/lib/contentful/management/resource/refresher.rb +7 -3
  17. data/lib/contentful/management/resource_builder.rb +5 -1
  18. data/lib/contentful/management/role.rb +33 -0
  19. data/lib/contentful/management/space.rb +28 -0
  20. data/lib/contentful/management/space_association_all_published_method_factory.rb +1 -0
  21. data/lib/contentful/management/space_editor_interface_methods_factory.rb +21 -0
  22. data/lib/contentful/management/space_role_methods_factory.rb +15 -0
  23. data/lib/contentful/management/version.rb +1 -1
  24. data/lib/contentful/management/webhook.rb +4 -1
  25. data/spec/fixtures/vcr_cassettes/content_type/omitted_field.yml +640 -0
  26. data/spec/fixtures/vcr_cassettes/editor_interfaces/default_for_space.yml +252 -0
  27. data/spec/fixtures/vcr_cassettes/editor_interfaces/update.yml +348 -0
  28. data/spec/fixtures/vcr_cassettes/roles/all_for_space.yml +238 -0
  29. data/spec/fixtures/vcr_cassettes/roles/create_for_space.yml +143 -0
  30. data/spec/fixtures/vcr_cassettes/roles/destroy.yml +430 -0
  31. data/spec/fixtures/vcr_cassettes/roles/find.yml +155 -0
  32. data/spec/fixtures/vcr_cassettes/roles/find_for_space_not_found.yml +82 -0
  33. data/spec/fixtures/vcr_cassettes/roles/update.yml +459 -0
  34. data/spec/fixtures/vcr_cassettes/webhook/create_with_name_and_headers.yml +119 -0
  35. data/spec/fixtures/vcr_cassettes/webhook/topics.yml +117 -0
  36. data/spec/lib/contentful/management/asset_spec.rb +4 -0
  37. data/spec/lib/contentful/management/content_type_spec.rb +36 -0
  38. data/spec/lib/contentful/management/editor_interface_spec.rb +57 -0
  39. data/spec/lib/contentful/management/entry_spec.rb +5 -0
  40. data/spec/lib/contentful/management/role_spec.rb +125 -0
  41. data/spec/lib/contentful/management/webhook_spec.rb +37 -0
  42. metadata +35 -2
@@ -0,0 +1,238 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.contentful.com/spaces/03vrieuz7eun/roles
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - RubyContentfulManagementGem/1.0.1
12
+ Authorization:
13
+ - Bearer <ACCESS_TOKEN>
14
+ Content-Type:
15
+ - application/vnd.contentful.management.v1+json
16
+ Content-Length:
17
+ - '0'
18
+ Connection:
19
+ - close
20
+ Host:
21
+ - api.contentful.com
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Accept-Ranges:
28
+ - bytes
29
+ Access-Control-Allow-Headers:
30
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
31
+ Access-Control-Allow-Methods:
32
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
33
+ Access-Control-Allow-Origin:
34
+ - "*"
35
+ Access-Control-Expose-Headers:
36
+ - Etag
37
+ Access-Control-Max-Age:
38
+ - '1728000'
39
+ Cache-Control:
40
+ - max-age=0
41
+ Content-Type:
42
+ - application/vnd.contentful.management.v1+json
43
+ Date:
44
+ - Thu, 07 Apr 2016 20:37:07 GMT
45
+ Etag:
46
+ - '"826d394824b7fdbe680076044ea55aed"'
47
+ Server:
48
+ - nginx
49
+ Status:
50
+ - 200 OK
51
+ Strict-Transport-Security:
52
+ - max-age=15768000
53
+ X-Content-Type-Options:
54
+ - nosniff
55
+ X-Contentful-Request-Id:
56
+ - 9e1-1105907941
57
+ Content-Length:
58
+ - '3320'
59
+ Connection:
60
+ - Close
61
+ Set-Cookie:
62
+ - incap_ses_298_673446=qXQ6PLPCBFtJNM69KrYiBPLEBlcAAAAAOTb9E0NmIZowhYVeyQxJwA==;
63
+ path=/; Domain=.contentful.com
64
+ - nlbi_673446=pIt1MAhMz2MsyVataoBaJgAAAAA6cMarc4e1NXabk7drWpp5; path=/; Domain=.contentful.com
65
+ - visid_incap_673446=nt0hjDzYTPyW9LLLkd+c8fLEBlcAAAAAQUIPAAAAAABvL3JQw7PeNqrnCe/wHmZ2;
66
+ expires=Fri, 07 Apr 2017 09:48:46 GMT; path=/; Domain=.contentful.com
67
+ X-Iinfo:
68
+ - 9-31704324-31704353 NNNN CT(138 158 0) RT(1460061426035 99) q(0 0 3 -1) r(5
69
+ 5) U5
70
+ X-Cdn:
71
+ - Incapsula
72
+ body:
73
+ encoding: UTF-8
74
+ string: |+
75
+ {
76
+ "total":2,
77
+ "limit":25,
78
+ "skip":0,
79
+ "sys":{
80
+ "type":"Array"
81
+ },
82
+ "items":[
83
+ {
84
+ "name":"Editor",
85
+ "description":"Allows editing of all Entries",
86
+ "policies":[
87
+ {
88
+ "effect":"allow",
89
+ "actions":"all",
90
+ "constraint":{
91
+ "and":[
92
+ {
93
+ "equals":[
94
+ {
95
+ "doc":"sys.type"
96
+ },
97
+ "Asset"
98
+ ]
99
+ }
100
+ ]
101
+ }
102
+ },
103
+ {
104
+ "effect":"allow",
105
+ "actions":"all",
106
+ "constraint":{
107
+ "and":[
108
+ {
109
+ "equals":[
110
+ {
111
+ "doc":"sys.type"
112
+ },
113
+ "Entry"
114
+ ]
115
+ }
116
+ ]
117
+ }
118
+ }
119
+ ],
120
+ "permissions":{
121
+ "ContentModel":[
122
+ "read"
123
+ ],
124
+ "Settings":[],
125
+ "ContentDelivery":[]
126
+ },
127
+ "sys":{
128
+ "type":"Role",
129
+ "id":"0rMuBQPQ2NCOE1bAFU5FSw",
130
+ "version":0,
131
+ "space":{
132
+ "sys":{
133
+ "type":"Link",
134
+ "linkType":"Space",
135
+ "id":"03vrieuz7eun"
136
+ }
137
+ },
138
+ "createdBy":{
139
+ "sys":{
140
+ "type":"Link",
141
+ "linkType":"User",
142
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
143
+ }
144
+ },
145
+ "createdAt":"2016-04-07T20:34:32Z",
146
+ "updatedBy":{
147
+ "sys":{
148
+ "type":"Link",
149
+ "linkType":"User",
150
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
151
+ }
152
+ },
153
+ "updatedAt":"2016-04-07T20:34:32Z"
154
+ }
155
+ },
156
+ {
157
+ "name":"Developer",
158
+ "description":"Allows reading Entries and managing API Keys",
159
+ "policies":[
160
+ {
161
+ "effect":"allow",
162
+ "actions":[
163
+ "read"
164
+ ],
165
+ "constraint":{
166
+ "and":[
167
+ {
168
+ "equals":[
169
+ {
170
+ "doc":"sys.type"
171
+ },
172
+ "Asset"
173
+ ]
174
+ }
175
+ ]
176
+ }
177
+ },
178
+ {
179
+ "effect":"allow",
180
+ "actions":[
181
+ "read"
182
+ ],
183
+ "constraint":{
184
+ "and":[
185
+ {
186
+ "equals":[
187
+ {
188
+ "doc":"sys.type"
189
+ },
190
+ "Entry"
191
+ ]
192
+ }
193
+ ]
194
+ }
195
+ }
196
+ ],
197
+ "permissions":{
198
+ "ContentModel":[
199
+ "read"
200
+ ],
201
+ "Settings":[],
202
+ "ContentDelivery":"all"
203
+ },
204
+ "sys":{
205
+ "type":"Role",
206
+ "id":"0rQMQMd6ZTgeF7hxjz7JDi",
207
+ "version":0,
208
+ "space":{
209
+ "sys":{
210
+ "type":"Link",
211
+ "linkType":"Space",
212
+ "id":"03vrieuz7eun"
213
+ }
214
+ },
215
+ "createdBy":{
216
+ "sys":{
217
+ "type":"Link",
218
+ "linkType":"User",
219
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
220
+ }
221
+ },
222
+ "createdAt":"2016-04-07T20:34:32Z",
223
+ "updatedBy":{
224
+ "sys":{
225
+ "type":"Link",
226
+ "linkType":"User",
227
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
228
+ }
229
+ },
230
+ "updatedAt":"2016-04-07T20:34:32Z"
231
+ }
232
+ }
233
+ ]
234
+ }
235
+
236
+ http_version:
237
+ recorded_at: Thu, 07 Apr 2016 20:37:07 GMT
238
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,143 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.contentful.com/spaces/03vrieuz7eun/roles
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"testRoleCreate","description":"test role","permissions":{"ContentDelivery":"all","ContentModel":["read"],"Settings":[]},"policies":[{"effect":"allow","actions":"all","constraint":{"and":[{"equals":[{"doc":"sys.type"},"Entry"]},{"equals":[{"doc":"sys.type"},"Asset"]}]}}]}'
9
+ headers:
10
+ User-Agent:
11
+ - RubyContentfulManagementGem/1.0.1
12
+ Authorization:
13
+ - Bearer <ACCESS_TOKEN>
14
+ Content-Type:
15
+ - application/vnd.contentful.management.v1+json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.contentful.com
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ Accept-Ranges:
26
+ - bytes
27
+ Access-Control-Allow-Headers:
28
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
29
+ Access-Control-Allow-Methods:
30
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Expose-Headers:
34
+ - Etag
35
+ Access-Control-Max-Age:
36
+ - '1728000'
37
+ Cache-Control:
38
+ - max-age=0
39
+ Content-Type:
40
+ - application/vnd.contentful.management.v1+json
41
+ Date:
42
+ - Thu, 07 Apr 2016 20:46:45 GMT
43
+ Etag:
44
+ - '"a11450a142c9a5ffb5c0051df2b66418"'
45
+ Location:
46
+ - https://api.contentful.com/spaces/03vrieuz7eun/roles/5Xa7djFog5vBBeAOkp1z20
47
+ Server:
48
+ - nginx
49
+ Status:
50
+ - 201 Created
51
+ Strict-Transport-Security:
52
+ - max-age=15768000
53
+ X-Content-Type-Options:
54
+ - nosniff
55
+ X-Contentful-Request-Id:
56
+ - 0b5-375596131
57
+ Content-Length:
58
+ - '1161'
59
+ Connection:
60
+ - Close
61
+ Set-Cookie:
62
+ - incap_ses_298_673446=bq85TqrgW0oZPdO9KrYiBDTHBlcAAAAA3JTTULqMfoaW45mL/QaMzw==;
63
+ path=/; Domain=.contentful.com
64
+ - nlbi_673446=xH5pdQv/dQRxhR82aoBaJgAAAAA/iG+U1kXsE68KYs+SrUmW; path=/; Domain=.contentful.com
65
+ - visid_incap_673446=pizGtGm7Q3SbDG3mUinjzzTHBlcAAAAAQUIPAAAAAACqs4/MeF0nZnlhZOy2wJPd;
66
+ expires=Fri, 07 Apr 2017 09:48:45 GMT; path=/; Domain=.contentful.com
67
+ X-Iinfo:
68
+ - 5-24696761-24696791 NNNN CT(139 140 0) RT(1460062003983 101) q(0 0 3 -1) r(6
69
+ 6) U5
70
+ X-Cdn:
71
+ - Incapsula
72
+ body:
73
+ encoding: UTF-8
74
+ string: |+
75
+ {
76
+ "name":"testRoleCreate",
77
+ "description":"test role",
78
+ "policies":[
79
+ {
80
+ "effect":"allow",
81
+ "actions":"all",
82
+ "constraint":{
83
+ "and":[
84
+ {
85
+ "equals":[
86
+ {
87
+ "doc":"sys.type"
88
+ },
89
+ "Entry"
90
+ ]
91
+ },
92
+ {
93
+ "equals":[
94
+ {
95
+ "doc":"sys.type"
96
+ },
97
+ "Asset"
98
+ ]
99
+ }
100
+ ]
101
+ }
102
+ }
103
+ ],
104
+ "permissions":{
105
+ "ContentModel":[
106
+ "read"
107
+ ],
108
+ "Settings":[],
109
+ "ContentDelivery":"all"
110
+ },
111
+ "sys":{
112
+ "type":"Role",
113
+ "id":"5Xa7djFog5vBBeAOkp1z20",
114
+ "version":0,
115
+ "space":{
116
+ "sys":{
117
+ "type":"Link",
118
+ "linkType":"Space",
119
+ "id":"03vrieuz7eun"
120
+ }
121
+ },
122
+ "createdBy":{
123
+ "sys":{
124
+ "type":"Link",
125
+ "linkType":"User",
126
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
127
+ }
128
+ },
129
+ "createdAt":"2016-04-07T20:46:45Z",
130
+ "updatedBy":{
131
+ "sys":{
132
+ "type":"Link",
133
+ "linkType":"User",
134
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
135
+ }
136
+ },
137
+ "updatedAt":"2016-04-07T20:46:45Z"
138
+ }
139
+ }
140
+
141
+ http_version:
142
+ recorded_at: Thu, 07 Apr 2016 20:46:45 GMT
143
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,430 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.contentful.com/spaces/03vrieuz7eun/roles
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"name":"ToDelete","description":"test role","permissions":{"ContentDelivery":"all","ContentModel":["read"],"Settings":[]},"policies":[{"effect":"allow","actions":"all","constraint":{"and":[{"equals":[{"doc":"sys.type"},"Entry"]},{"equals":[{"doc":"sys.type"},"Asset"]}]}}]}'
9
+ headers:
10
+ User-Agent:
11
+ - RubyContentfulManagementGem/1.0.1
12
+ Authorization:
13
+ - Bearer <ACCESS_TOKEN>
14
+ Content-Type:
15
+ - application/vnd.contentful.management.v1+json
16
+ Connection:
17
+ - close
18
+ Host:
19
+ - api.contentful.com
20
+ response:
21
+ status:
22
+ code: 201
23
+ message: Created
24
+ headers:
25
+ Accept-Ranges:
26
+ - bytes
27
+ Access-Control-Allow-Headers:
28
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
29
+ Access-Control-Allow-Methods:
30
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
31
+ Access-Control-Allow-Origin:
32
+ - "*"
33
+ Access-Control-Expose-Headers:
34
+ - Etag
35
+ Access-Control-Max-Age:
36
+ - '1728000'
37
+ Cache-Control:
38
+ - max-age=0
39
+ Content-Type:
40
+ - application/vnd.contentful.management.v1+json
41
+ Date:
42
+ - Thu, 07 Apr 2016 20:54:14 GMT
43
+ Etag:
44
+ - '"4c5b03ff2f2cfcdb28b1062784455074"'
45
+ Location:
46
+ - https://api.contentful.com/spaces/03vrieuz7eun/roles/6jpmmcJTQ0nQfaPeOqJTnH
47
+ Server:
48
+ - nginx
49
+ Status:
50
+ - 201 Created
51
+ Strict-Transport-Security:
52
+ - max-age=15768000
53
+ X-Content-Type-Options:
54
+ - nosniff
55
+ X-Contentful-Request-Id:
56
+ - 9e1-1105921568
57
+ Content-Length:
58
+ - '1155'
59
+ Connection:
60
+ - Close
61
+ Set-Cookie:
62
+ - incap_ses_298_673446=850kO3ftsBDYO9e9KrYiBPXIBlcAAAAAadxpdX2M/6bXMwSGIEUtlw==;
63
+ path=/; Domain=.contentful.com
64
+ - nlbi_673446=YCTtf7In/gB6bO0taoBaJgAAAADvt/fE92ssKL+IThrG6AKO; path=/; Domain=.contentful.com
65
+ - visid_incap_673446=gtVDWKoCTf6jvAlHYx3o2vXIBlcAAAAAQUIPAAAAAACyN3oieq/8dvieBJHkVM+/;
66
+ expires=Fri, 07 Apr 2017 09:48:46 GMT; path=/; Domain=.contentful.com
67
+ X-Iinfo:
68
+ - 9-31994409-31994441 NNNN CT(170 176 0) RT(1460062453196 96) q(0 0 4 -1) r(7
69
+ 7) U5
70
+ X-Cdn:
71
+ - Incapsula
72
+ body:
73
+ encoding: UTF-8
74
+ string: |+
75
+ {
76
+ "name":"ToDelete",
77
+ "description":"test role",
78
+ "policies":[
79
+ {
80
+ "effect":"allow",
81
+ "actions":"all",
82
+ "constraint":{
83
+ "and":[
84
+ {
85
+ "equals":[
86
+ {
87
+ "doc":"sys.type"
88
+ },
89
+ "Entry"
90
+ ]
91
+ },
92
+ {
93
+ "equals":[
94
+ {
95
+ "doc":"sys.type"
96
+ },
97
+ "Asset"
98
+ ]
99
+ }
100
+ ]
101
+ }
102
+ }
103
+ ],
104
+ "permissions":{
105
+ "ContentModel":[
106
+ "read"
107
+ ],
108
+ "Settings":[],
109
+ "ContentDelivery":"all"
110
+ },
111
+ "sys":{
112
+ "type":"Role",
113
+ "id":"6jpmmcJTQ0nQfaPeOqJTnH",
114
+ "version":0,
115
+ "space":{
116
+ "sys":{
117
+ "type":"Link",
118
+ "linkType":"Space",
119
+ "id":"03vrieuz7eun"
120
+ }
121
+ },
122
+ "createdBy":{
123
+ "sys":{
124
+ "type":"Link",
125
+ "linkType":"User",
126
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
127
+ }
128
+ },
129
+ "createdAt":"2016-04-07T20:54:14Z",
130
+ "updatedBy":{
131
+ "sys":{
132
+ "type":"Link",
133
+ "linkType":"User",
134
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
135
+ }
136
+ },
137
+ "updatedAt":"2016-04-07T20:54:14Z"
138
+ }
139
+ }
140
+
141
+ http_version:
142
+ recorded_at: Thu, 07 Apr 2016 20:54:14 GMT
143
+ - request:
144
+ method: get
145
+ uri: https://api.contentful.com/spaces/03vrieuz7eun/roles/6jpmmcJTQ0nQfaPeOqJTnH
146
+ body:
147
+ encoding: US-ASCII
148
+ string: ''
149
+ headers:
150
+ User-Agent:
151
+ - RubyContentfulManagementGem/1.0.1
152
+ Authorization:
153
+ - Bearer <ACCESS_TOKEN>
154
+ Content-Type:
155
+ - application/vnd.contentful.management.v1+json
156
+ Content-Length:
157
+ - '0'
158
+ Connection:
159
+ - close
160
+ Host:
161
+ - api.contentful.com
162
+ response:
163
+ status:
164
+ code: 200
165
+ message: OK
166
+ headers:
167
+ Accept-Ranges:
168
+ - bytes
169
+ Access-Control-Allow-Headers:
170
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
171
+ Access-Control-Allow-Methods:
172
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
173
+ Access-Control-Allow-Origin:
174
+ - "*"
175
+ Access-Control-Expose-Headers:
176
+ - Etag
177
+ Access-Control-Max-Age:
178
+ - '1728000'
179
+ Cache-Control:
180
+ - max-age=0
181
+ Content-Type:
182
+ - application/vnd.contentful.management.v1+json
183
+ Date:
184
+ - Thu, 07 Apr 2016 20:54:15 GMT
185
+ Etag:
186
+ - '"4c5b03ff2f2cfcdb28b1062784455074"'
187
+ Server:
188
+ - nginx
189
+ Status:
190
+ - 200 OK
191
+ Strict-Transport-Security:
192
+ - max-age=15768000
193
+ X-Content-Type-Options:
194
+ - nosniff
195
+ X-Contentful-Request-Id:
196
+ - 0b5-375601608
197
+ Content-Length:
198
+ - '1155'
199
+ Connection:
200
+ - Close
201
+ Set-Cookie:
202
+ - incap_ses_298_673446=9LzRDx926XnePde9KrYiBPbIBlcAAAAAz+rB+UUXFAXeBUwnLryLOg==;
203
+ path=/; Domain=.contentful.com
204
+ - nlbi_673446=bipoCH2EBCEXnvpMaoBaJgAAAABjt2fx8B3J5FYCHJR05Tlm; path=/; Domain=.contentful.com
205
+ - visid_incap_673446=G5NMB7aMQAi4zpKtc92GPfbIBlcAAAAAQUIPAAAAAADg/g4XFLk1VixNZ6M0U+Od;
206
+ expires=Fri, 07 Apr 2017 09:48:46 GMT; path=/; Domain=.contentful.com
207
+ X-Iinfo:
208
+ - 2-14694086-14694099 NNNN CT(168 168 0) RT(1460062454114 97) q(0 0 3 -1) r(5
209
+ 5) U5
210
+ X-Cdn:
211
+ - Incapsula
212
+ body:
213
+ encoding: UTF-8
214
+ string: |+
215
+ {
216
+ "name":"ToDelete",
217
+ "description":"test role",
218
+ "policies":[
219
+ {
220
+ "effect":"allow",
221
+ "actions":"all",
222
+ "constraint":{
223
+ "and":[
224
+ {
225
+ "equals":[
226
+ {
227
+ "doc":"sys.type"
228
+ },
229
+ "Entry"
230
+ ]
231
+ },
232
+ {
233
+ "equals":[
234
+ {
235
+ "doc":"sys.type"
236
+ },
237
+ "Asset"
238
+ ]
239
+ }
240
+ ]
241
+ }
242
+ }
243
+ ],
244
+ "permissions":{
245
+ "ContentModel":[
246
+ "read"
247
+ ],
248
+ "Settings":[],
249
+ "ContentDelivery":"all"
250
+ },
251
+ "sys":{
252
+ "type":"Role",
253
+ "id":"6jpmmcJTQ0nQfaPeOqJTnH",
254
+ "version":0,
255
+ "space":{
256
+ "sys":{
257
+ "type":"Link",
258
+ "linkType":"Space",
259
+ "id":"03vrieuz7eun"
260
+ }
261
+ },
262
+ "createdBy":{
263
+ "sys":{
264
+ "type":"Link",
265
+ "linkType":"User",
266
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
267
+ }
268
+ },
269
+ "createdAt":"2016-04-07T20:54:14Z",
270
+ "updatedBy":{
271
+ "sys":{
272
+ "type":"Link",
273
+ "linkType":"User",
274
+ "id":"4SejVrWT96dvL9IV4Nb7sQ"
275
+ }
276
+ },
277
+ "updatedAt":"2016-04-07T20:54:14Z"
278
+ }
279
+ }
280
+
281
+ http_version:
282
+ recorded_at: Thu, 07 Apr 2016 20:54:15 GMT
283
+ - request:
284
+ method: delete
285
+ uri: https://api.contentful.com/spaces/03vrieuz7eun/roles/6jpmmcJTQ0nQfaPeOqJTnH
286
+ body:
287
+ encoding: US-ASCII
288
+ string: ''
289
+ headers:
290
+ User-Agent:
291
+ - RubyContentfulManagementGem/1.0.1
292
+ Authorization:
293
+ - Bearer <ACCESS_TOKEN>
294
+ Content-Type:
295
+ - application/vnd.contentful.management.v1+json
296
+ Content-Length:
297
+ - '0'
298
+ Connection:
299
+ - close
300
+ Host:
301
+ - api.contentful.com
302
+ response:
303
+ status:
304
+ code: 204
305
+ message: No Content
306
+ headers:
307
+ Accept-Ranges:
308
+ - bytes
309
+ Access-Control-Allow-Headers:
310
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
311
+ Access-Control-Allow-Methods:
312
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
313
+ Access-Control-Allow-Origin:
314
+ - "*"
315
+ Access-Control-Expose-Headers:
316
+ - Etag
317
+ Access-Control-Max-Age:
318
+ - '1728000'
319
+ Cache-Control:
320
+ - max-age=0
321
+ Date:
322
+ - Thu, 07 Apr 2016 20:54:16 GMT
323
+ Server:
324
+ - nginx
325
+ Status:
326
+ - 204 No Content
327
+ Strict-Transport-Security:
328
+ - max-age=15768000
329
+ X-Content-Type-Options:
330
+ - nosniff
331
+ X-Contentful-Request-Id:
332
+ - 9e1-1105921587
333
+ Connection:
334
+ - Close
335
+ Set-Cookie:
336
+ - incap_ses_298_673446=38J+KNdzuTPAP9e9KrYiBPfIBlcAAAAAreOsLLtCoVTzVUG+ocmzlg==;
337
+ path=/; Domain=.contentful.com
338
+ - nlbi_673446=k0IKIiJM8VnhtWNjaoBaJgAAAADGxiceeKDXxPYGhHjqq6R4; path=/; Domain=.contentful.com
339
+ - visid_incap_673446=rlUERArsQI2ZU6tq/KKSJPfIBlcAAAAAQUIPAAAAAAAGHo3zrjy3UXXXwApaoGz8;
340
+ expires=Fri, 07 Apr 2017 09:48:17 GMT; path=/; Domain=.contentful.com
341
+ X-Iinfo:
342
+ - 4-20653137-20653158 NNNN CT(172 172 0) RT(1460062454894 99) q(0 0 4 -1) r(7
343
+ 7) U5
344
+ X-Cdn:
345
+ - Incapsula
346
+ body:
347
+ encoding: UTF-8
348
+ string: ''
349
+ http_version:
350
+ recorded_at: Thu, 07 Apr 2016 20:54:16 GMT
351
+ - request:
352
+ method: get
353
+ uri: https://api.contentful.com/spaces/03vrieuz7eun/roles/6jpmmcJTQ0nQfaPeOqJTnH
354
+ body:
355
+ encoding: US-ASCII
356
+ string: ''
357
+ headers:
358
+ User-Agent:
359
+ - RubyContentfulManagementGem/1.0.1
360
+ Authorization:
361
+ - Bearer <ACCESS_TOKEN>
362
+ Content-Type:
363
+ - application/vnd.contentful.management.v1+json
364
+ Content-Length:
365
+ - '0'
366
+ Connection:
367
+ - close
368
+ Host:
369
+ - api.contentful.com
370
+ response:
371
+ status:
372
+ code: 404
373
+ message: Not Found
374
+ headers:
375
+ Accept-Ranges:
376
+ - bytes
377
+ Access-Control-Allow-Headers:
378
+ - Accept,Accept-Language,Authorization,Cache-Control,Content-Length,Content-Range,Content-Type,DNT,Destination,Expires,If-Match,If-Modified-Since,If-None-Match,Keep-Alive,Last-Modified,Origin,Pragma,Range,User-Agent,X-Http-Method-Override,X-Mx-ReqToken,X-Requested-With,X-Contentful-Version,X-Contentful-Content-Type,X-Contentful-Organization,X-Contentful-Skip-Transformation,X-Contentful-User-Agent
379
+ Access-Control-Allow-Methods:
380
+ - DELETE,GET,HEAD,POST,PUT,OPTIONS
381
+ Access-Control-Allow-Origin:
382
+ - "*"
383
+ Access-Control-Expose-Headers:
384
+ - Etag
385
+ Access-Control-Max-Age:
386
+ - '1728000'
387
+ Cache-Control:
388
+ - max-age=0
389
+ Content-Type:
390
+ - application/vnd.contentful.management.v1+json
391
+ Date:
392
+ - Thu, 07 Apr 2016 20:54:16 GMT
393
+ Server:
394
+ - nginx
395
+ Status:
396
+ - 404 Not Found
397
+ X-Contentful-Request-Id:
398
+ - b89-583999760
399
+ X-Ua-Compatible:
400
+ - IE=Edge,chrome=1
401
+ Content-Length:
402
+ - '138'
403
+ Connection:
404
+ - Close
405
+ Set-Cookie:
406
+ - incap_ses_298_673446=H8mYVbYE1C+NQde9KrYiBPjIBlcAAAAAnuJs8E+xqeJtANN4UoQQtw==;
407
+ path=/; Domain=.contentful.com
408
+ - nlbi_673446=rSm4XT1xd1kdsm01aoBaJgAAAACGmt7N3zR6pJWCGGMJXVXR; path=/; Domain=.contentful.com
409
+ - visid_incap_673446=FQAQZFSJTqG5S0YQ974wGfjIBlcAAAAAQUIPAAAAAACgnMC27Z/vRCtb+wnxRVob;
410
+ expires=Fri, 07 Apr 2017 09:48:46 GMT; path=/; Domain=.contentful.com
411
+ X-Iinfo:
412
+ - 7-26367695-26367728 NNNN CT(167 169 0) RT(1460062455769 98) q(0 0 4 -1) r(6
413
+ 6) U5
414
+ X-Cdn:
415
+ - Incapsula
416
+ body:
417
+ encoding: UTF-8
418
+ string: |+
419
+ {
420
+ "requestId":"b89-583999760",
421
+ "message":"The resource could not be found.",
422
+ "sys":{
423
+ "type":"Error",
424
+ "id":"NotFound"
425
+ }
426
+ }
427
+
428
+ http_version:
429
+ recorded_at: Thu, 07 Apr 2016 20:54:17 GMT
430
+ recorded_with: VCR 2.9.3