contentful-management 1.10.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (303) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +3 -0
  3. data/CHANGELOG.md +48 -0
  4. data/README.md +92 -50
  5. data/lib/contentful/management/api_key.rb +25 -2
  6. data/lib/contentful/management/array.rb +3 -3
  7. data/lib/contentful/management/asset.rb +13 -8
  8. data/lib/contentful/management/client.rb +73 -60
  9. data/lib/contentful/management/client_api_key_methods_factory.rb +8 -0
  10. data/lib/contentful/management/client_asset_methods_factory.rb +0 -2
  11. data/lib/contentful/management/client_association_all_published_method_factory.rb +2 -3
  12. data/lib/contentful/management/client_association_methods_factory.rb +9 -9
  13. data/lib/contentful/management/client_content_type_methods_factory.rb +8 -2
  14. data/lib/contentful/management/client_editor_interface_methods_factory.rb +12 -6
  15. data/lib/contentful/management/client_entry_methods_factory.rb +1 -3
  16. data/lib/contentful/management/client_environment_methods_factory.rb +59 -0
  17. data/lib/contentful/management/client_organization_methods_factory.rb +1 -1
  18. data/lib/contentful/management/client_personal_access_tokens_methods_factory.rb +3 -3
  19. data/lib/contentful/management/client_role_methods_factory.rb +8 -0
  20. data/lib/contentful/management/client_snapshot_methods_factory.rb +8 -6
  21. data/lib/contentful/management/client_space_methods_factory.rb +2 -6
  22. data/lib/contentful/management/client_upload_methods_factory.rb +8 -0
  23. data/lib/contentful/management/client_user_methods_factory.rb +1 -1
  24. data/lib/contentful/management/client_webhook_call_methods_factory.rb +11 -6
  25. data/lib/contentful/management/client_webhook_health_methods_factory.rb +2 -2
  26. data/lib/contentful/management/client_webhook_methods_factory.rb +8 -0
  27. data/lib/contentful/management/content_type.rb +9 -7
  28. data/lib/contentful/management/content_type_editor_interface_methods_factory.rb +7 -3
  29. data/lib/contentful/management/content_type_entry_methods_factory.rb +2 -2
  30. data/lib/contentful/management/content_type_snapshot_methods_factory.rb +16 -2
  31. data/lib/contentful/management/dynamic_entry.rb +1 -1
  32. data/lib/contentful/management/editor_interface.rb +14 -6
  33. data/lib/contentful/management/entry.rb +12 -10
  34. data/lib/contentful/management/entry_association_methods_factory.rb +2 -2
  35. data/lib/contentful/management/environment.rb +138 -0
  36. data/lib/contentful/management/environment_asset_methods_factory.rb +11 -0
  37. data/lib/contentful/management/environment_association_methods_factory.rb +42 -0
  38. data/lib/contentful/management/environment_content_type_methods_factory.rb +11 -0
  39. data/lib/contentful/management/environment_editor_interface_methods_factory.rb +15 -0
  40. data/lib/contentful/management/environment_entry_methods_factory.rb +11 -0
  41. data/lib/contentful/management/environment_locale_methods_factory.rb +11 -0
  42. data/lib/contentful/management/environment_ui_extension_methods_factory.rb +11 -0
  43. data/lib/contentful/management/field.rb +3 -3
  44. data/lib/contentful/management/file.rb +2 -2
  45. data/lib/contentful/management/link.rb +21 -7
  46. data/lib/contentful/management/locale.rb +4 -2
  47. data/lib/contentful/management/organization.rb +1 -1
  48. data/lib/contentful/management/personal_access_token.rb +2 -2
  49. data/lib/contentful/management/resource.rb +34 -13
  50. data/lib/contentful/management/resource/all_published.rb +2 -2
  51. data/lib/contentful/management/resource/archiver.rb +12 -2
  52. data/lib/contentful/management/resource/environment_aware.rb +13 -0
  53. data/lib/contentful/management/resource/publisher.rb +12 -2
  54. data/lib/contentful/management/resource/refresher.rb +1 -1
  55. data/lib/contentful/management/resource_builder.rb +16 -14
  56. data/lib/contentful/management/response.rb +1 -1
  57. data/lib/contentful/management/role.rb +29 -2
  58. data/lib/contentful/management/snapshot.rb +13 -7
  59. data/lib/contentful/management/space.rb +14 -93
  60. data/lib/contentful/management/space_association_methods_factory.rb +1 -1
  61. data/lib/contentful/management/{space_locale_methods_factory.rb → space_environment_methods_factory.rb} +2 -6
  62. data/lib/contentful/management/space_membership.rb +3 -3
  63. data/lib/contentful/management/ui_extension.rb +4 -2
  64. data/lib/contentful/management/upload.rb +24 -1
  65. data/lib/contentful/management/user.rb +4 -4
  66. data/lib/contentful/management/validation.rb +5 -5
  67. data/lib/contentful/management/version.rb +1 -1
  68. data/lib/contentful/management/webhook.rb +26 -3
  69. data/lib/contentful/management/webhook_call.rb +8 -8
  70. data/lib/contentful/management/webhook_health.rb +2 -2
  71. data/spec/fixtures/vcr_cassettes/asset/143_assets_next_page.yml +2 -2
  72. data/spec/fixtures/vcr_cassettes/asset/all.yml +1 -1
  73. data/spec/fixtures/vcr_cassettes/asset/archive.yml +2 -2
  74. data/spec/fixtures/vcr_cassettes/asset/archive_published.yml +2 -2
  75. data/spec/fixtures/vcr_cassettes/asset/archived_false.yml +2 -2
  76. data/spec/fixtures/vcr_cassettes/asset/archived_true.yml +2 -2
  77. data/spec/fixtures/vcr_cassettes/asset/create.yml +2 -2
  78. data/spec/fixtures/vcr_cassettes/asset/create_with_already_used_id.yml +1 -1
  79. data/spec/fixtures/vcr_cassettes/asset/create_with_custom_id.yml +2 -2
  80. data/spec/fixtures/vcr_cassettes/asset/create_with_locale.yml +2 -2
  81. data/spec/fixtures/vcr_cassettes/asset/destroy.yml +2 -2
  82. data/spec/fixtures/vcr_cassettes/asset/destroy_published.yml +2 -2
  83. data/spec/fixtures/vcr_cassettes/asset/find.yml +1 -1
  84. data/spec/fixtures/vcr_cassettes/asset/find_not_found.yml +1 -1
  85. data/spec/fixtures/vcr_cassettes/asset/limited_assets_next_page.yml +2 -2
  86. data/spec/fixtures/vcr_cassettes/asset/locale.yml +1 -1
  87. data/spec/fixtures/vcr_cassettes/asset/process.yml +2 -2
  88. data/spec/fixtures/vcr_cassettes/asset/publish.yml +2 -2
  89. data/spec/fixtures/vcr_cassettes/asset/publish_after_create.yml +3 -3
  90. data/spec/fixtures/vcr_cassettes/asset/publish_already_published.yml +2 -2
  91. data/spec/fixtures/vcr_cassettes/asset/published_false.yml +2 -2
  92. data/spec/fixtures/vcr_cassettes/asset/published_true.yml +2 -2
  93. data/spec/fixtures/vcr_cassettes/asset/reload.yml +4 -4
  94. data/spec/fixtures/vcr_cassettes/asset/reload_with_fields.yml +2 -2
  95. data/spec/fixtures/vcr_cassettes/asset/save_update.yml +2 -2
  96. data/spec/fixtures/vcr_cassettes/asset/select_operator.yml +1 -1
  97. data/spec/fixtures/vcr_cassettes/asset/set_locale.yml +1 -1
  98. data/spec/fixtures/vcr_cassettes/asset/unarchive.yml +2 -2
  99. data/spec/fixtures/vcr_cassettes/asset/unarchive_already_unarchive.yml +2 -2
  100. data/spec/fixtures/vcr_cassettes/asset/unarchive_already_unarchived.yml +2 -2
  101. data/spec/fixtures/vcr_cassettes/asset/unpublish.yml +2 -2
  102. data/spec/fixtures/vcr_cassettes/asset/unpublish_already_unpublished.yml +2 -2
  103. data/spec/fixtures/vcr_cassettes/asset/update_file.yml +2 -2
  104. data/spec/fixtures/vcr_cassettes/asset/update_to_specified_locale.yml +2 -2
  105. data/spec/fixtures/vcr_cassettes/asset/update_with_default_locale_without_file.yml +2 -2
  106. data/spec/fixtures/vcr_cassettes/content_type/activate.yml +2 -2
  107. data/spec/fixtures/vcr_cassettes/content_type/activate_with_invalid_version.yml +2 -2
  108. data/spec/fixtures/vcr_cassettes/content_type/activated_false.yml +2 -2
  109. data/spec/fixtures/vcr_cassettes/content_type/activated_true.yml +2 -2
  110. data/spec/fixtures/vcr_cassettes/content_type/all.yml +1 -1
  111. data/spec/fixtures/vcr_cassettes/content_type/all_public.yml +1 -1
  112. data/spec/fixtures/vcr_cassettes/content_type/create.yml +1 -1
  113. data/spec/fixtures/vcr_cassettes/content_type/create_content_type_with_id.yml +1 -1
  114. data/spec/fixtures/vcr_cassettes/content_type/create_with_Array_field.yml +1 -1
  115. data/spec/fixtures/vcr_cassettes/content_type/create_with_Boolean_field.yml +1 -1
  116. data/spec/fixtures/vcr_cassettes/content_type/create_with_Date_field.yml +1 -1
  117. data/spec/fixtures/vcr_cassettes/content_type/create_with_Integer_field.yml +1 -1
  118. data/spec/fixtures/vcr_cassettes/content_type/create_with_Link_field.yml +1 -1
  119. data/spec/fixtures/vcr_cassettes/content_type/create_with_Location_field.yml +1 -1
  120. data/spec/fixtures/vcr_cassettes/content_type/create_with_Number_field.yml +1 -1
  121. data/spec/fixtures/vcr_cassettes/content_type/create_with_Object_field.yml +1 -1
  122. data/spec/fixtures/vcr_cassettes/content_type/create_with_Symbol_field.yml +1 -1
  123. data/spec/fixtures/vcr_cassettes/content_type/create_with_Text_field.yml +1 -1
  124. data/spec/fixtures/vcr_cassettes/content_type/deactivate.yml +2 -2
  125. data/spec/fixtures/vcr_cassettes/content_type/deactivate_already_deactivated.yml +2 -2
  126. data/spec/fixtures/vcr_cassettes/content_type/deactivate_with_entries.yml +2 -2
  127. data/spec/fixtures/vcr_cassettes/content_type/deactivate_with_version_change.yml +2 -2
  128. data/spec/fixtures/vcr_cassettes/content_type/destroy.yml +2 -2
  129. data/spec/fixtures/vcr_cassettes/content_type/destroy_activated.yml +2 -2
  130. data/spec/fixtures/vcr_cassettes/content_type/entry/all.yml +4 -4
  131. data/spec/fixtures/vcr_cassettes/content_type/entry/create.yml +4 -4
  132. data/spec/fixtures/vcr_cassettes/content_type/entry/create_only_with_localized_fields.yml +2 -2
  133. data/spec/fixtures/vcr_cassettes/content_type/entry/create_to_single_locale_only_with_localized_fields.yml +2 -2
  134. data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_camel_case_id_to_multiple_locales.yml +2 -2
  135. data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_entries.yml +3 -3
  136. data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_entries_for_multiple_locales.yml +9 -9
  137. data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_multiple_locales.yml +2 -2
  138. data/spec/fixtures/vcr_cassettes/content_type/entry/update_only_with_localized_fields.yml +3 -3
  139. data/spec/fixtures/vcr_cassettes/content_type/fields/add.yml +2 -2
  140. data/spec/fixtures/vcr_cassettes/content_type/fields/create.yml +2 -2
  141. data/spec/fixtures/vcr_cassettes/content_type/fields/create_array_types.yml +3 -3
  142. data/spec/fixtures/vcr_cassettes/content_type/fields/create_array_with_params.yml +2 -2
  143. data/spec/fixtures/vcr_cassettes/content_type/fields/create_with_params.yml +2 -2
  144. data/spec/fixtures/vcr_cassettes/content_type/fields/destroy.yml +2 -2
  145. data/spec/fixtures/vcr_cassettes/content_type/fields/update_field.yml +2 -2
  146. data/spec/fixtures/vcr_cassettes/content_type/find.yml +1 -1
  147. data/spec/fixtures/vcr_cassettes/content_type/find_not_found.yml +1 -1
  148. data/spec/fixtures/vcr_cassettes/content_type/issue_79.yml +3 -3
  149. data/spec/fixtures/vcr_cassettes/content_type/omitted_field.yml +4 -4
  150. data/spec/fixtures/vcr_cassettes/content_type/reload.yml +4 -4
  151. data/spec/fixtures/vcr_cassettes/content_type/save_new.yml +3 -3
  152. data/spec/fixtures/vcr_cassettes/content_type/save_updated.yml +2 -2
  153. data/spec/fixtures/vcr_cassettes/content_type/save_with_added_field.yml +2 -2
  154. data/spec/fixtures/vcr_cassettes/content_type/update.yml +2 -2
  155. data/spec/fixtures/vcr_cassettes/content_type/update_change_field_name.yml +2 -2
  156. data/spec/fixtures/vcr_cassettes/content_type/update_remove_field.yml +2 -2
  157. data/spec/fixtures/vcr_cassettes/content_type/update_with_fields.yml +2 -2
  158. data/spec/fixtures/vcr_cassettes/content_type/update_with_one_new_field.yml +2 -2
  159. data/spec/fixtures/vcr_cassettes/content_type/validation/in.yml +3 -3
  160. data/spec/fixtures/vcr_cassettes/content_type/validation/in_add.yml +3 -3
  161. data/spec/fixtures/vcr_cassettes/content_type/validation/in_update.yml +3 -3
  162. data/spec/fixtures/vcr_cassettes/content_type/validation/link_content_type.yml +3 -3
  163. data/spec/fixtures/vcr_cassettes/content_type/validation/link_field.yml +3 -3
  164. data/spec/fixtures/vcr_cassettes/content_type/validation/link_mimetype_group.yml +3 -3
  165. data/spec/fixtures/vcr_cassettes/content_type/validation/multiple_add.yml +3 -3
  166. data/spec/fixtures/vcr_cassettes/content_type/validation/present.yml +3 -3
  167. data/spec/fixtures/vcr_cassettes/content_type/validation/range.yml +3 -3
  168. data/spec/fixtures/vcr_cassettes/content_type/validation/range_update.yml +3 -3
  169. data/spec/fixtures/vcr_cassettes/content_type/validation/regexp.yml +3 -3
  170. data/spec/fixtures/vcr_cassettes/content_type/validation/size.yml +3 -3
  171. data/spec/fixtures/vcr_cassettes/content_type/validation/unique.yml +3 -3
  172. data/spec/fixtures/vcr_cassettes/editor_interfaces/default_for_space.yml +1 -1
  173. data/spec/fixtures/vcr_cassettes/editor_interfaces/update.yml +3 -3
  174. data/spec/fixtures/vcr_cassettes/entry/all.yml +1 -1
  175. data/spec/fixtures/vcr_cassettes/entry/archive.yml +2 -2
  176. data/spec/fixtures/vcr_cassettes/entry/archive_published.yml +2 -2
  177. data/spec/fixtures/vcr_cassettes/entry/archived_false.yml +2 -2
  178. data/spec/fixtures/vcr_cassettes/entry/archived_true.yml +2 -2
  179. data/spec/fixtures/vcr_cassettes/entry/content_type_entires.yml +1 -1
  180. data/spec/fixtures/vcr_cassettes/entry/create.yml +4 -4
  181. data/spec/fixtures/vcr_cassettes/entry/create_with_asset.yml +3 -3
  182. data/spec/fixtures/vcr_cassettes/entry/create_with_assets.yml +3 -3
  183. data/spec/fixtures/vcr_cassettes/entry/create_with_custom_id.yml +2 -2
  184. data/spec/fixtures/vcr_cassettes/entry/create_with_entries.yml +3 -3
  185. data/spec/fixtures/vcr_cassettes/entry/create_with_entry.yml +3 -3
  186. data/spec/fixtures/vcr_cassettes/entry/create_with_just_id.yml +4 -4
  187. data/spec/fixtures/vcr_cassettes/entry/create_with_location.yml +2 -2
  188. data/spec/fixtures/vcr_cassettes/entry/create_with_specified_locale.yml +3 -3
  189. data/spec/fixtures/vcr_cassettes/entry/create_with_symbols.yml +2 -2
  190. data/spec/fixtures/vcr_cassettes/entry/destory_published.yml +2 -2
  191. data/spec/fixtures/vcr_cassettes/entry/destroy.yml +2 -2
  192. data/spec/fixtures/vcr_cassettes/entry/fallback_undefined.yml +3 -3
  193. data/spec/fixtures/vcr_cassettes/entry/find-with-null-symbols.yml +2 -2
  194. data/spec/fixtures/vcr_cassettes/entry/find.yml +1 -1
  195. data/spec/fixtures/vcr_cassettes/entry/find_not_found.yml +1 -1
  196. data/spec/fixtures/vcr_cassettes/entry/issue_61_1.yml +6 -6
  197. data/spec/fixtures/vcr_cassettes/entry/issue_61_2.yml +6 -6
  198. data/spec/fixtures/vcr_cassettes/entry/issue_61_3.yml +6 -6
  199. data/spec/fixtures/vcr_cassettes/entry/issue_61_4.yml +6 -6
  200. data/spec/fixtures/vcr_cassettes/entry/issue_61_5.yml +305 -198
  201. data/spec/fixtures/vcr_cassettes/entry/issue_61_6.yml +5 -5
  202. data/spec/fixtures/vcr_cassettes/entry/issue_61_7.yml +6 -6
  203. data/spec/fixtures/vcr_cassettes/entry/issue_61_8.yml +6 -6
  204. data/spec/fixtures/vcr_cassettes/entry/issue_61_spaces.yml +143 -188
  205. data/spec/fixtures/vcr_cassettes/entry/issue_70.yml +3 -3
  206. data/spec/fixtures/vcr_cassettes/entry/issue_73.yml +4 -4
  207. data/spec/fixtures/vcr_cassettes/entry/issue_91.yml +2 -2
  208. data/spec/fixtures/vcr_cassettes/entry/limited_entries.yml +2 -2
  209. data/spec/fixtures/vcr_cassettes/entry/locales/fallback_to_default_locale.yml +2 -2
  210. data/spec/fixtures/vcr_cassettes/entry/locales/retrieve_localized.yml +2 -2
  211. data/spec/fixtures/vcr_cassettes/entry/locales/simple_assignments_use_default_locale.yml +2 -2
  212. data/spec/fixtures/vcr_cassettes/entry/locales/simple_assignments_use_specified_locale.yml +2 -2
  213. data/spec/fixtures/vcr_cassettes/entry/publish.yml +2 -2
  214. data/spec/fixtures/vcr_cassettes/entry/publish_already_published.yml +2 -2
  215. data/spec/fixtures/vcr_cassettes/entry/published_false.yml +2 -2
  216. data/spec/fixtures/vcr_cassettes/entry/published_true.yml +2 -2
  217. data/spec/fixtures/vcr_cassettes/entry/reload.yml +6 -6
  218. data/spec/fixtures/vcr_cassettes/entry/save_update.yml +2 -2
  219. data/spec/fixtures/vcr_cassettes/entry/search_filter/equality_operator.yml +2 -2
  220. data/spec/fixtures/vcr_cassettes/entry/search_filter/exclusion_operator.yml +2 -2
  221. data/spec/fixtures/vcr_cassettes/entry/search_filter/full_search.yml +2 -2
  222. data/spec/fixtures/vcr_cassettes/entry/search_filter/full_search_match_operator.yml +2 -2
  223. data/spec/fixtures/vcr_cassettes/entry/search_filter/including_linked_entries.yml +2 -2
  224. data/spec/fixtures/vcr_cassettes/entry/search_filter/inclusion_operator.yml +2 -2
  225. data/spec/fixtures/vcr_cassettes/entry/search_filter/inequality_operator.yml +2 -2
  226. data/spec/fixtures/vcr_cassettes/entry/search_filter/location_search_near_operator.yml +2 -2
  227. data/spec/fixtures/vcr_cassettes/entry/search_filter/location_search_within_operator.yml +2 -2
  228. data/spec/fixtures/vcr_cassettes/entry/search_filter/matching_array_fields.yml +2 -2
  229. data/spec/fixtures/vcr_cassettes/entry/search_filter/order_sys_createdAt.yml +2 -2
  230. data/spec/fixtures/vcr_cassettes/entry/search_filter/order_sys_updatedAt.yml +2 -2
  231. data/spec/fixtures/vcr_cassettes/entry/search_filter/range_operators_greater_than_or_equal.yml +2 -2
  232. data/spec/fixtures/vcr_cassettes/entry/search_filter/range_operators_less.yml +2 -2
  233. data/spec/fixtures/vcr_cassettes/entry/search_filter/reverse_order_sys_updatedAt.yml +2 -2
  234. data/spec/fixtures/vcr_cassettes/entry/select_operator.yml +1 -1
  235. data/spec/fixtures/vcr_cassettes/entry/service_unavailable.yml +1 -1
  236. data/spec/fixtures/vcr_cassettes/entry/too_many_requests.yml +5 -5
  237. data/spec/fixtures/vcr_cassettes/entry/too_many_requests_retry.yml +6 -6
  238. data/spec/fixtures/vcr_cassettes/entry/unarchive.yml +2 -2
  239. data/spec/fixtures/vcr_cassettes/entry/unarchive_already_unarchived.yml +2 -2
  240. data/spec/fixtures/vcr_cassettes/entry/unpublish.yml +2 -2
  241. data/spec/fixtures/vcr_cassettes/entry/unpublish_already_unpublished.yml +2 -2
  242. data/spec/fixtures/vcr_cassettes/entry/update.yml +4 -4
  243. data/spec/fixtures/vcr_cassettes/entry/update_bool_field.yml +4 -4
  244. data/spec/fixtures/vcr_cassettes/entry/update_unlocalized_field.yml +3 -3
  245. data/spec/fixtures/vcr_cassettes/entry/update_with_custom_locale.yml +3 -3
  246. data/spec/fixtures/vcr_cassettes/environment/all.yml +226 -0
  247. data/spec/fixtures/vcr_cassettes/environment/create.yml +155 -0
  248. data/spec/fixtures/vcr_cassettes/environment/destroy.yml +89 -0
  249. data/spec/fixtures/vcr_cassettes/environment/find.yml +155 -0
  250. data/spec/fixtures/vcr_cassettes/environment/find_2.yml +155 -0
  251. data/spec/fixtures/vcr_cassettes/environment/not_found.yml +98 -0
  252. data/spec/fixtures/vcr_cassettes/locale/all_for_space.yml +1 -1
  253. data/spec/fixtures/vcr_cassettes/locale/create_for_space.yml +2 -2
  254. data/spec/fixtures/vcr_cassettes/locale/destroy.yml +5 -5
  255. data/spec/fixtures/vcr_cassettes/locale/fallback_code.yml +3 -3
  256. data/spec/fixtures/vcr_cassettes/locale/find.yml +1 -1
  257. data/spec/fixtures/vcr_cassettes/locale/find_default.yml +1 -1
  258. data/spec/fixtures/vcr_cassettes/locale/find_for_space_not_found.yml +1 -1
  259. data/spec/fixtures/vcr_cassettes/locale/find_not_default.yml +1 -1
  260. data/spec/fixtures/vcr_cassettes/locale/find_not_optional.yml +1 -1
  261. data/spec/fixtures/vcr_cassettes/locale/find_optional.yml +1 -1
  262. data/spec/fixtures/vcr_cassettes/locale/reload.yml +3 -3
  263. data/spec/fixtures/vcr_cassettes/locale/update_both.yml +3 -3
  264. data/spec/fixtures/vcr_cassettes/locale/update_code.yml +3 -3
  265. data/spec/fixtures/vcr_cassettes/locale/update_name.yml +3 -3
  266. data/spec/fixtures/vcr_cassettes/snapshot/all.yml +1 -1
  267. data/spec/fixtures/vcr_cassettes/snapshot/ct_all.yml +1 -1
  268. data/spec/fixtures/vcr_cassettes/snapshot/ct_find.yml +1 -1
  269. data/spec/fixtures/vcr_cassettes/snapshot/ct_find_not_found.yml +1 -1
  270. data/spec/fixtures/vcr_cassettes/snapshot/find.yml +1 -1
  271. data/spec/fixtures/vcr_cassettes/snapshot/find_not_found.yml +1 -1
  272. data/spec/fixtures/vcr_cassettes/snapshot/properties.yml +2 -2
  273. data/spec/fixtures/vcr_cassettes/ui_extension/all.yml +1 -1
  274. data/spec/fixtures/vcr_cassettes/ui_extension/create.yml +1 -1
  275. data/spec/fixtures/vcr_cassettes/ui_extension/delete.yml +3 -3
  276. data/spec/fixtures/vcr_cassettes/ui_extension/find.yml +1 -1
  277. data/spec/fixtures/vcr_cassettes/upload/associate_with_asset.yml +3 -3
  278. data/spec/lib/contentful/management/api_key_spec.rb +7 -7
  279. data/spec/lib/contentful/management/asset_spec.rb +38 -57
  280. data/spec/lib/contentful/management/client_spec.rb +1 -1
  281. data/spec/lib/contentful/management/content_type_spec.rb +78 -78
  282. data/spec/lib/contentful/management/editor_interface_spec.rb +4 -4
  283. data/spec/lib/contentful/management/entry_spec.rb +104 -114
  284. data/spec/lib/contentful/management/environment_spec.rb +87 -0
  285. data/spec/lib/contentful/management/locale_spec.rb +22 -22
  286. data/spec/lib/contentful/management/role_spec.rb +11 -11
  287. data/spec/lib/contentful/management/snapshot_spec.rb +27 -27
  288. data/spec/lib/contentful/management/space_membership_spec.rb +6 -7
  289. data/spec/lib/contentful/management/space_spec.rb +0 -282
  290. data/spec/lib/contentful/management/ui_extension_spec.rb +8 -8
  291. data/spec/lib/contentful/management/upload_spec.rb +9 -9
  292. data/spec/lib/contentful/management/webhook_calls_spec.rb +6 -6
  293. data/spec/lib/contentful/management/webhook_health_spec.rb +3 -3
  294. data/spec/lib/contentful/management/webhook_spec.rb +14 -12
  295. metadata +28 -14
  296. data/lib/contentful/management/space_asset_methods_factory.rb +0 -13
  297. data/lib/contentful/management/space_association_all_published_method_factory.rb +0 -12
  298. data/lib/contentful/management/space_content_type_methods_factory.rb +0 -13
  299. data/lib/contentful/management/space_editor_interface_methods_factory.rb +0 -21
  300. data/lib/contentful/management/space_entry_methods_factory.rb +0 -21
  301. data/lib/contentful/management/space_ui_extension_methods_factory.rb +0 -15
  302. data/spec/fixtures/vcr_cassettes/asset/all_public.yml +0 -112
  303. data/spec/fixtures/vcr_cassettes/entry/all_public.yml +0 -102
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/content_types/someType
5
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/content_types/someType
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -121,7 +121,7 @@ http_interactions:
121
121
  recorded_at: Tue, 19 Jan 2016 13:48:57 GMT
122
122
  - request:
123
123
  method: put
124
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/issue61_3
124
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/issue61_3
125
125
  body:
126
126
  encoding: UTF-8
127
127
  string: '{"fields":{"value":{"en-GB":"hello"}}}'
@@ -224,7 +224,7 @@ http_interactions:
224
224
  recorded_at: Tue, 19 Jan 2016 13:48:59 GMT
225
225
  - request:
226
226
  method: get
227
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/issue61_3
227
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/issue61_3
228
228
  body:
229
229
  encoding: US-ASCII
230
230
  string: ''
@@ -327,7 +327,7 @@ http_interactions:
327
327
  recorded_at: Tue, 19 Jan 2016 13:48:59 GMT
328
328
  - request:
329
329
  method: put
330
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/issue61_3
330
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/issue61_3
331
331
  body:
332
332
  encoding: UTF-8
333
333
  string: '{"fields":{"value":{"en-GB":"goodbye"}}}'
@@ -430,7 +430,7 @@ http_interactions:
430
430
  recorded_at: Tue, 19 Jan 2016 13:49:00 GMT
431
431
  - request:
432
432
  method: put
433
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/issue61_3/published
433
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/issue61_3/published
434
434
  body:
435
435
  encoding: US-ASCII
436
436
  string: ''
@@ -546,7 +546,7 @@ http_interactions:
546
546
  recorded_at: Tue, 19 Jan 2016 13:49:01 GMT
547
547
  - request:
548
548
  method: delete
549
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/issue61_3
549
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/issue61_3
550
550
  body:
551
551
  encoding: US-ASCII
552
552
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/content_types/someType
5
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/content_types/someType
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -121,7 +121,7 @@ http_interactions:
121
121
  recorded_at: Tue, 19 Jan 2016 13:49:03 GMT
122
122
  - request:
123
123
  method: put
124
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/issue61_4
124
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/issue61_4
125
125
  body:
126
126
  encoding: UTF-8
127
127
  string: '{"fields":{}}'
@@ -220,7 +220,7 @@ http_interactions:
220
220
  recorded_at: Tue, 19 Jan 2016 13:49:04 GMT
221
221
  - request:
222
222
  method: get
223
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/issue61_4
223
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/issue61_4
224
224
  body:
225
225
  encoding: US-ASCII
226
226
  string: ''
@@ -319,7 +319,7 @@ http_interactions:
319
319
  recorded_at: Tue, 19 Jan 2016 13:49:04 GMT
320
320
  - request:
321
321
  method: put
322
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/issue61_4
322
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/issue61_4
323
323
  body:
324
324
  encoding: UTF-8
325
325
  string: '{"fields":{"value":{"en-GB":"goodbye"}}}'
@@ -422,7 +422,7 @@ http_interactions:
422
422
  recorded_at: Tue, 19 Jan 2016 13:49:05 GMT
423
423
  - request:
424
424
  method: put
425
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/issue61_4/published
425
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/issue61_4/published
426
426
  body:
427
427
  encoding: US-ASCII
428
428
  string: ''
@@ -538,7 +538,7 @@ http_interactions:
538
538
  recorded_at: Tue, 19 Jan 2016 13:49:06 GMT
539
539
  - request:
540
540
  method: delete
541
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/issue61_4
541
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/issue61_4
542
542
  body:
543
543
  encoding: US-ASCII
544
544
  string: ''
@@ -2,30 +2,30 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/fIpsfQSOd22IsqMQCiG0K
5
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/fIpsfQSOd22IsqMQCiG0K
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
- User-Agent:
11
- - RubyContentfulManagementGem/0.7.3
10
+ X-Contentful-User-Agent:
11
+ - sdk contentful-management.rb/1.10.1; platform ruby/2.4.1; os macOS/16;
12
12
  Authorization:
13
13
  - Bearer <ACCESS_TOKEN>
14
14
  Content-Type:
15
15
  - application/vnd.contentful.management.v1+json
16
- Content-Length:
17
- - '0'
18
16
  Connection:
19
17
  - close
20
18
  Host:
21
19
  - api.contentful.com
20
+ User-Agent:
21
+ - http.rb/2.2.2
22
22
  response:
23
23
  status:
24
24
  code: 200
25
25
  message: OK
26
26
  headers:
27
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
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,X-Contentful-Enable-Alpha-Feature
29
29
  Access-Control-Allow-Methods:
30
30
  - DELETE,GET,HEAD,POST,PUT,OPTIONS
31
31
  Access-Control-Allow-Origin:
@@ -39,31 +39,58 @@ http_interactions:
39
39
  Content-Type:
40
40
  - application/vnd.contentful.management.v1+json
41
41
  Date:
42
- - Tue, 19 Jan 2016 14:15:51 GMT
42
+ - Thu, 15 Mar 2018 14:45:39 GMT
43
43
  Etag:
44
- - '"4e1c0066d19c963ced7d05d0b41e4e0e"'
44
+ - '"6a30a8afac0d8a347c4fc909a3fae60e"'
45
45
  Server:
46
- - nginx
46
+ - Contentful
47
47
  Strict-Transport-Security:
48
48
  - max-age=15768000
49
49
  X-Content-Type-Options:
50
50
  - nosniff
51
+ X-Contentful-Ratelimit-Hour-Limit:
52
+ - '36000'
53
+ X-Contentful-Ratelimit-Hour-Remaining:
54
+ - '35988'
55
+ X-Contentful-Ratelimit-Reset:
56
+ - '0'
57
+ X-Contentful-Ratelimit-Second-Limit:
58
+ - '10'
59
+ X-Contentful-Ratelimit-Second-Remaining:
60
+ - '9'
51
61
  X-Contentful-Request-Id:
52
- - content-api:4RDHYoSV9SIMeYkquwIQGM
53
- X-Powered-By:
54
- - Express
62
+ - 8cbe4441e924b0f92b22ad4b90e223be
55
63
  Content-Length:
56
64
  - '1156'
57
65
  Connection:
58
66
  - Close
67
+ Set-Cookie:
68
+ - incap_ses_765_673446=xHLgKCCMNkiwyAhBv9OdChKHqloAAAAAHYK6Ukvd1SBajehiaXm0vA==;
69
+ path=/; Domain=.contentful.com
70
+ - nlbi_673446=p4WbcqqmWXCqO3946lKYhQAAAACPBKF7mncWinb+ybmSq4+r; path=/; Domain=.contentful.com
71
+ - visid_incap_673446=6I1oGvtfRESl/Du/OPwClxKHqloAAAAAQUIPAAAAAAATEQed2xa+UXxlkx3h6xj+;
72
+ expires=Fri, 15 Mar 2019 07:37:28 GMT; path=/; Domain=.contentful.com
73
+ X-Iinfo:
74
+ - 12-49814338-49814353 NNNN CT(101 99 0) RT(1521125137593 45) q(0 0 2 -1) r(9
75
+ 9) U5
76
+ X-Cdn:
77
+ - Incapsula
59
78
  body:
60
- encoding: UTF-8
79
+ encoding: ASCII-8BIT
61
80
  string: |
62
81
  {
63
82
  "sys": {
83
+ "space": {
84
+ "sys": {
85
+ "type": "Link",
86
+ "linkType": "Space",
87
+ "id": "u2viwgfeal0o"
88
+ }
89
+ },
64
90
  "id": "fIpsfQSOd22IsqMQCiG0K",
65
91
  "type": "Entry",
66
92
  "createdAt": "2016-01-19T13:51:58.820Z",
93
+ "updatedAt": "2016-01-20T13:08:55.068Z",
67
94
  "createdBy": {
68
95
  "sys": {
69
96
  "type": "Link",
@@ -71,23 +98,15 @@ http_interactions:
71
98
  "id": "4SejVrWT96dvL9IV4Nb7sQ"
72
99
  }
73
100
  },
74
- "space": {
75
- "sys": {
76
- "type": "Link",
77
- "linkType": "Space",
78
- "id": "u2viwgfeal0o"
79
- }
80
- },
81
- "contentType": {
101
+ "updatedBy": {
82
102
  "sys": {
83
103
  "type": "Link",
84
- "linkType": "ContentType",
85
- "id": "someType"
104
+ "linkType": "User",
105
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
86
106
  }
87
107
  },
88
- "firstPublishedAt": "2016-01-19T13:52:13.524Z",
89
- "publishedCounter": 1,
90
- "publishedAt": "2016-01-19T13:52:13.524Z",
108
+ "publishedCounter": 6,
109
+ "version": 45,
91
110
  "publishedBy": {
92
111
  "sys": {
93
112
  "type": "Link",
@@ -95,14 +114,14 @@ http_interactions:
95
114
  "id": "4SejVrWT96dvL9IV4Nb7sQ"
96
115
  }
97
116
  },
98
- "publishedVersion": 34,
99
- "version": 35,
100
- "updatedAt": "2016-01-19T13:52:13.539Z",
101
- "updatedBy": {
117
+ "publishedVersion": 44,
118
+ "firstPublishedAt": "2016-01-19T13:52:13.524Z",
119
+ "publishedAt": "2016-01-20T13:08:55.061Z",
120
+ "contentType": {
102
121
  "sys": {
103
122
  "type": "Link",
104
- "linkType": "User",
105
- "id": "4SejVrWT96dvL9IV4Nb7sQ"
123
+ "linkType": "ContentType",
124
+ "id": "someType"
106
125
  }
107
126
  }
108
127
  },
@@ -116,33 +135,37 @@ http_interactions:
116
135
  }
117
136
  }
118
137
  http_version:
119
- recorded_at: Tue, 19 Jan 2016 14:15:47 GMT
138
+ recorded_at: Thu, 15 Mar 2018 14:45:38 GMT
120
139
  - request:
121
140
  method: put
122
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/fIpsfQSOd22IsqMQCiG0K
141
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/fIpsfQSOd22IsqMQCiG0K
123
142
  body:
124
143
  encoding: UTF-8
125
144
  string: '{"fields":{"name":{"en-GB":"Test With Already Populated Field"},"value":{"en-GB":"goodbye"}}}'
126
145
  headers:
127
- User-Agent:
128
- - RubyContentfulManagementGem/0.7.3
146
+ X-Contentful-User-Agent:
147
+ - sdk contentful-management.rb/1.10.1; platform ruby/2.4.1; os macOS/16;
129
148
  Authorization:
130
149
  - Bearer <ACCESS_TOKEN>
131
150
  Content-Type:
132
151
  - application/vnd.contentful.management.v1+json
133
152
  X-Contentful-Version:
134
- - '35'
153
+ - '45'
154
+ Version:
155
+ - '45'
135
156
  Connection:
136
157
  - close
137
158
  Host:
138
159
  - api.contentful.com
160
+ User-Agent:
161
+ - http.rb/2.2.2
139
162
  response:
140
163
  status:
141
164
  code: 200
142
165
  message: OK
143
166
  headers:
144
167
  Access-Control-Allow-Headers:
145
- - 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
168
+ - 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,X-Contentful-Enable-Alpha-Feature
146
169
  Access-Control-Allow-Methods:
147
170
  - DELETE,GET,HEAD,POST,PUT,OPTIONS
148
171
  Access-Control-Allow-Origin:
@@ -156,39 +179,58 @@ http_interactions:
156
179
  Content-Type:
157
180
  - application/vnd.contentful.management.v1+json
158
181
  Date:
159
- - Tue, 19 Jan 2016 14:15:52 GMT
182
+ - Thu, 15 Mar 2018 14:45:39 GMT
160
183
  Etag:
161
- - '"70a99177055547fd292104481d82a2c0"'
184
+ - '"e025e1e2b2269a2416f9511a65c42de0"'
162
185
  Server:
163
- - nginx
186
+ - Contentful
164
187
  Strict-Transport-Security:
165
188
  - max-age=15768000
166
189
  X-Content-Type-Options:
167
190
  - nosniff
191
+ X-Contentful-Ratelimit-Hour-Limit:
192
+ - '36000'
193
+ X-Contentful-Ratelimit-Hour-Remaining:
194
+ - '35987'
195
+ X-Contentful-Ratelimit-Reset:
196
+ - '0'
197
+ X-Contentful-Ratelimit-Second-Limit:
198
+ - '10'
199
+ X-Contentful-Ratelimit-Second-Remaining:
200
+ - '9'
168
201
  X-Contentful-Request-Id:
169
- - content-api:2y8OaGog5Oc068e8cQEiGi
170
- X-Powered-By:
171
- - Express
202
+ - 75ade9a1b167447d7cc6c5358e6a9afa
172
203
  Content-Length:
173
204
  - '1158'
174
205
  Connection:
175
206
  - Close
207
+ Set-Cookie:
208
+ - incap_ses_765_673446=KrC9aFzzE0zMyQhBv9OdChOHqloAAAAAn9+F5G8ha4vGUcntjTjjww==;
209
+ path=/; Domain=.contentful.com
210
+ - nlbi_673446=6SLrdDhEEBprPrrj6lKYhQAAAAD2XnWshaavUxQZZV1nBxdD; path=/; Domain=.contentful.com
211
+ - visid_incap_673446=sWb4xG3aSFGvUnaSqd1QLxOHqloAAAAAQUIPAAAAAABC0nnEk6RJsMOLap1MLwwz;
212
+ expires=Fri, 15 Mar 2019 07:37:36 GMT; path=/; Domain=.contentful.com
213
+ X-Iinfo:
214
+ - 9-33287724-33287730 NNNN CT(93 95 0) RT(1521125138645 41) q(0 0 2 -1) r(5
215
+ 5) U5
216
+ X-Cdn:
217
+ - Incapsula
176
218
  body:
177
- encoding: UTF-8
219
+ encoding: ASCII-8BIT
178
220
  string: |
179
221
  {
180
- "fields": {
181
- "name": {
182
- "en-GB": "Test With Already Populated Field"
183
- },
184
- "value": {
185
- "en-GB": "goodbye"
186
- }
187
- },
188
222
  "sys": {
223
+ "space": {
224
+ "sys": {
225
+ "type": "Link",
226
+ "linkType": "Space",
227
+ "id": "u2viwgfeal0o"
228
+ }
229
+ },
189
230
  "id": "fIpsfQSOd22IsqMQCiG0K",
190
231
  "type": "Entry",
191
232
  "createdAt": "2016-01-19T13:51:58.820Z",
233
+ "updatedAt": "2018-03-15T14:45:39.605Z",
192
234
  "createdBy": {
193
235
  "sys": {
194
236
  "type": "Link",
@@ -196,23 +238,15 @@ http_interactions:
196
238
  "id": "4SejVrWT96dvL9IV4Nb7sQ"
197
239
  }
198
240
  },
199
- "space": {
200
- "sys": {
201
- "type": "Link",
202
- "linkType": "Space",
203
- "id": "u2viwgfeal0o"
204
- }
205
- },
206
- "contentType": {
241
+ "updatedBy": {
207
242
  "sys": {
208
243
  "type": "Link",
209
- "linkType": "ContentType",
210
- "id": "someType"
244
+ "linkType": "User",
245
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
211
246
  }
212
247
  },
213
- "firstPublishedAt": "2016-01-19T13:52:13.524Z",
214
- "publishedCounter": 1,
215
- "publishedAt": "2016-01-19T13:52:13.524Z",
248
+ "publishedCounter": 6,
249
+ "version": 46,
216
250
  "publishedBy": {
217
251
  "sys": {
218
252
  "type": "Link",
@@ -220,48 +254,58 @@ http_interactions:
220
254
  "id": "4SejVrWT96dvL9IV4Nb7sQ"
221
255
  }
222
256
  },
223
- "publishedVersion": 34,
224
- "version": 36,
225
- "updatedAt": "2016-01-19T14:15:52.329Z",
226
- "updatedBy": {
257
+ "publishedVersion": 44,
258
+ "firstPublishedAt": "2016-01-19T13:52:13.524Z",
259
+ "publishedAt": "2016-01-20T13:08:55.061Z",
260
+ "contentType": {
227
261
  "sys": {
228
262
  "type": "Link",
229
- "linkType": "User",
230
- "id": "4SejVrWT96dvL9IV4Nb7sQ"
263
+ "linkType": "ContentType",
264
+ "id": "someType"
231
265
  }
232
266
  }
267
+ },
268
+ "fields": {
269
+ "name": {
270
+ "en-GB": "Test With Already Populated Field"
271
+ },
272
+ "value": {
273
+ "en-GB": "goodbye"
274
+ }
233
275
  }
234
276
  }
235
277
  http_version:
236
- recorded_at: Tue, 19 Jan 2016 14:15:48 GMT
278
+ recorded_at: Thu, 15 Mar 2018 14:45:38 GMT
237
279
  - request:
238
280
  method: put
239
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/fIpsfQSOd22IsqMQCiG0K/published
281
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/fIpsfQSOd22IsqMQCiG0K/published
240
282
  body:
241
283
  encoding: US-ASCII
242
284
  string: ''
243
285
  headers:
244
- User-Agent:
245
- - RubyContentfulManagementGem/0.7.3
286
+ X-Contentful-User-Agent:
287
+ - sdk contentful-management.rb/1.10.1; platform ruby/2.4.1; os macOS/16;
246
288
  Authorization:
247
289
  - Bearer <ACCESS_TOKEN>
248
290
  Content-Type:
249
291
  - application/vnd.contentful.management.v1+json
250
292
  X-Contentful-Version:
251
- - '36'
252
- Content-Length:
253
- - '0'
293
+ - '46'
294
+ Version:
295
+ - '46'
254
296
  Connection:
255
297
  - close
256
298
  Host:
257
299
  - api.contentful.com
300
+ User-Agent:
301
+ - http.rb/2.2.2
258
302
  response:
259
303
  status:
260
304
  code: 200
261
305
  message: OK
262
306
  headers:
263
307
  Access-Control-Allow-Headers:
264
- - 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
308
+ - 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,X-Contentful-Enable-Alpha-Feature
265
309
  Access-Control-Allow-Methods:
266
310
  - DELETE,GET,HEAD,POST,PUT,OPTIONS
267
311
  Access-Control-Allow-Origin:
@@ -275,39 +319,58 @@ http_interactions:
275
319
  Content-Type:
276
320
  - application/vnd.contentful.management.v1+json
277
321
  Date:
278
- - Tue, 19 Jan 2016 14:15:53 GMT
322
+ - Thu, 15 Mar 2018 14:45:40 GMT
279
323
  Etag:
280
- - '"f460a8e2480eabe40a6dbf4c1cdc1082"'
324
+ - '"1c8610e5f9e69edc85251c5cac8b37b8"'
281
325
  Server:
282
- - nginx
326
+ - Contentful
283
327
  Strict-Transport-Security:
284
328
  - max-age=15768000
285
329
  X-Content-Type-Options:
286
330
  - nosniff
331
+ X-Contentful-Ratelimit-Hour-Limit:
332
+ - '36000'
333
+ X-Contentful-Ratelimit-Hour-Remaining:
334
+ - '35986'
335
+ X-Contentful-Ratelimit-Reset:
336
+ - '0'
337
+ X-Contentful-Ratelimit-Second-Limit:
338
+ - '10'
339
+ X-Contentful-Ratelimit-Second-Remaining:
340
+ - '9'
287
341
  X-Contentful-Request-Id:
288
- - content-api:21AwenjeW86wcQGcQ8wcyO
289
- X-Powered-By:
290
- - Express
342
+ - b49620e53d4446109053dc983b019fd1
291
343
  Content-Length:
292
344
  - '1158'
293
345
  Connection:
294
346
  - Close
347
+ Set-Cookie:
348
+ - incap_ses_765_673446=XMNgF7zpyT3SywhBv9OdChSHqloAAAAAhpmWlrbDBOMxEIdRTBHAaQ==;
349
+ path=/; Domain=.contentful.com
350
+ - nlbi_673446=AmMXKUNc4hckxpGW6lKYhQAAAACBR2EMrxJ6czgHa2L9UHOb; path=/; Domain=.contentful.com
351
+ - visid_incap_673446=OQRomcuwQMW0Z7NlA2m0hxSHqloAAAAAQUIPAAAAAACTc/NkWrPJaQiKy8OCbauu;
352
+ expires=Fri, 15 Mar 2019 07:37:37 GMT; path=/; Domain=.contentful.com
353
+ X-Iinfo:
354
+ - 0-10079321-10079322 NNNN CT(87 87 0) RT(1521125139246 44) q(0 0 2 -1) r(12
355
+ 12) U5
356
+ X-Cdn:
357
+ - Incapsula
295
358
  body:
296
- encoding: UTF-8
359
+ encoding: ASCII-8BIT
297
360
  string: |
298
361
  {
299
- "fields": {
300
- "name": {
301
- "en-GB": "Test With Already Populated Field"
302
- },
303
- "value": {
304
- "en-GB": "goodbye"
305
- }
306
- },
307
362
  "sys": {
363
+ "space": {
364
+ "sys": {
365
+ "type": "Link",
366
+ "linkType": "Space",
367
+ "id": "u2viwgfeal0o"
368
+ }
369
+ },
308
370
  "id": "fIpsfQSOd22IsqMQCiG0K",
309
371
  "type": "Entry",
310
372
  "createdAt": "2016-01-19T13:51:58.820Z",
373
+ "updatedAt": "2018-03-15T14:45:40.711Z",
311
374
  "createdBy": {
312
375
  "sys": {
313
376
  "type": "Link",
@@ -315,23 +378,15 @@ http_interactions:
315
378
  "id": "4SejVrWT96dvL9IV4Nb7sQ"
316
379
  }
317
380
  },
318
- "space": {
319
- "sys": {
320
- "type": "Link",
321
- "linkType": "Space",
322
- "id": "u2viwgfeal0o"
323
- }
324
- },
325
- "contentType": {
381
+ "updatedBy": {
326
382
  "sys": {
327
383
  "type": "Link",
328
- "linkType": "ContentType",
329
- "id": "someType"
384
+ "linkType": "User",
385
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
330
386
  }
331
387
  },
332
- "firstPublishedAt": "2016-01-19T13:52:13.524Z",
333
- "publishedCounter": 2,
334
- "publishedAt": "2016-01-19T14:15:53.082Z",
388
+ "publishedCounter": 7,
389
+ "version": 47,
335
390
  "publishedBy": {
336
391
  "sys": {
337
392
  "type": "Link",
@@ -339,46 +394,58 @@ http_interactions:
339
394
  "id": "4SejVrWT96dvL9IV4Nb7sQ"
340
395
  }
341
396
  },
342
- "publishedVersion": 36,
343
- "version": 37,
344
- "updatedAt": "2016-01-19T14:15:53.082Z",
345
- "updatedBy": {
397
+ "publishedVersion": 46,
398
+ "firstPublishedAt": "2016-01-19T13:52:13.524Z",
399
+ "publishedAt": "2018-03-15T14:45:40.711Z",
400
+ "contentType": {
346
401
  "sys": {
347
402
  "type": "Link",
348
- "linkType": "User",
349
- "id": "4SejVrWT96dvL9IV4Nb7sQ"
403
+ "linkType": "ContentType",
404
+ "id": "someType"
350
405
  }
351
406
  }
407
+ },
408
+ "fields": {
409
+ "name": {
410
+ "en-GB": "Test With Already Populated Field"
411
+ },
412
+ "value": {
413
+ "en-GB": "goodbye"
414
+ }
352
415
  }
353
416
  }
354
417
  http_version:
355
- recorded_at: Tue, 19 Jan 2016 14:15:49 GMT
418
+ recorded_at: Thu, 15 Mar 2018 14:45:39 GMT
356
419
  - request:
357
420
  method: put
358
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/fIpsfQSOd22IsqMQCiG0K
421
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/fIpsfQSOd22IsqMQCiG0K
359
422
  body:
360
423
  encoding: UTF-8
361
424
  string: '{"fields":{"name":{"en-GB":"Test With Already Populated Field"},"value":{"en-GB":"hello"}}}'
362
425
  headers:
363
- User-Agent:
364
- - RubyContentfulManagementGem/0.7.3
426
+ X-Contentful-User-Agent:
427
+ - sdk contentful-management.rb/1.10.1; platform ruby/2.4.1; os macOS/16;
365
428
  Authorization:
366
429
  - Bearer <ACCESS_TOKEN>
367
430
  Content-Type:
368
431
  - application/vnd.contentful.management.v1+json
369
432
  X-Contentful-Version:
370
- - '37'
433
+ - '47'
434
+ Version:
435
+ - '47'
371
436
  Connection:
372
437
  - close
373
438
  Host:
374
439
  - api.contentful.com
440
+ User-Agent:
441
+ - http.rb/2.2.2
375
442
  response:
376
443
  status:
377
444
  code: 200
378
445
  message: OK
379
446
  headers:
380
447
  Access-Control-Allow-Headers:
381
- - 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
448
+ - 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,X-Contentful-Enable-Alpha-Feature
382
449
  Access-Control-Allow-Methods:
383
450
  - DELETE,GET,HEAD,POST,PUT,OPTIONS
384
451
  Access-Control-Allow-Origin:
@@ -392,39 +459,58 @@ http_interactions:
392
459
  Content-Type:
393
460
  - application/vnd.contentful.management.v1+json
394
461
  Date:
395
- - Tue, 19 Jan 2016 14:15:54 GMT
462
+ - Thu, 15 Mar 2018 14:45:41 GMT
396
463
  Etag:
397
- - '"bb4787d70e09cb1c16c8ea94c8c94c01"'
464
+ - '"cc15010614196dc61d4e4f5316c4a688"'
398
465
  Server:
399
- - nginx
466
+ - Contentful
400
467
  Strict-Transport-Security:
401
468
  - max-age=15768000
402
469
  X-Content-Type-Options:
403
470
  - nosniff
471
+ X-Contentful-Ratelimit-Hour-Limit:
472
+ - '36000'
473
+ X-Contentful-Ratelimit-Hour-Remaining:
474
+ - '35985'
475
+ X-Contentful-Ratelimit-Reset:
476
+ - '0'
477
+ X-Contentful-Ratelimit-Second-Limit:
478
+ - '10'
479
+ X-Contentful-Ratelimit-Second-Remaining:
480
+ - '9'
404
481
  X-Contentful-Request-Id:
405
- - content-api:3cXw6aXSVqko80aiqs6gGi
406
- X-Powered-By:
407
- - Express
482
+ - 24f22251137f34a33b215d86eec85f87
408
483
  Content-Length:
409
484
  - '1156'
410
485
  Connection:
411
486
  - Close
487
+ Set-Cookie:
488
+ - incap_ses_765_673446=bqTefLdgDyfzzAhBv9OdChWHqloAAAAA09DszDL5qV9ZjlpttjzJ2A==;
489
+ path=/; Domain=.contentful.com
490
+ - nlbi_673446=XNHIXB0TL0Gtl2dy6lKYhQAAAAA35c+6z1VvNeb/8HCjOz6K; path=/; Domain=.contentful.com
491
+ - visid_incap_673446=UEqVodPrTFOJ6c+Tj8FyfxWHqloAAAAAQUIPAAAAAAAjfXle9N/z6VG1AjYyrmyq;
492
+ expires=Fri, 15 Mar 2019 07:37:36 GMT; path=/; Domain=.contentful.com
493
+ X-Iinfo:
494
+ - 7-32106278-32106282 NNNN CT(105 106 0) RT(1521125140479 81) q(0 0 2 -1) r(5
495
+ 5) U5
496
+ X-Cdn:
497
+ - Incapsula
412
498
  body:
413
- encoding: UTF-8
499
+ encoding: ASCII-8BIT
414
500
  string: |
415
501
  {
416
- "fields": {
417
- "name": {
418
- "en-GB": "Test With Already Populated Field"
419
- },
420
- "value": {
421
- "en-GB": "hello"
422
- }
423
- },
424
502
  "sys": {
503
+ "space": {
504
+ "sys": {
505
+ "type": "Link",
506
+ "linkType": "Space",
507
+ "id": "u2viwgfeal0o"
508
+ }
509
+ },
425
510
  "id": "fIpsfQSOd22IsqMQCiG0K",
426
511
  "type": "Entry",
427
512
  "createdAt": "2016-01-19T13:51:58.820Z",
513
+ "updatedAt": "2018-03-15T14:45:41.495Z",
428
514
  "createdBy": {
429
515
  "sys": {
430
516
  "type": "Link",
@@ -432,23 +518,15 @@ http_interactions:
432
518
  "id": "4SejVrWT96dvL9IV4Nb7sQ"
433
519
  }
434
520
  },
435
- "space": {
436
- "sys": {
437
- "type": "Link",
438
- "linkType": "Space",
439
- "id": "u2viwgfeal0o"
440
- }
441
- },
442
- "contentType": {
521
+ "updatedBy": {
443
522
  "sys": {
444
523
  "type": "Link",
445
- "linkType": "ContentType",
446
- "id": "someType"
524
+ "linkType": "User",
525
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
447
526
  }
448
527
  },
449
- "firstPublishedAt": "2016-01-19T13:52:13.524Z",
450
- "publishedCounter": 2,
451
- "publishedAt": "2016-01-19T14:15:53.082Z",
528
+ "publishedCounter": 7,
529
+ "version": 48,
452
530
  "publishedBy": {
453
531
  "sys": {
454
532
  "type": "Link",
@@ -456,48 +534,58 @@ http_interactions:
456
534
  "id": "4SejVrWT96dvL9IV4Nb7sQ"
457
535
  }
458
536
  },
459
- "publishedVersion": 36,
460
- "version": 38,
461
- "updatedAt": "2016-01-19T14:15:54.095Z",
462
- "updatedBy": {
537
+ "publishedVersion": 46,
538
+ "firstPublishedAt": "2016-01-19T13:52:13.524Z",
539
+ "publishedAt": "2018-03-15T14:45:40.711Z",
540
+ "contentType": {
463
541
  "sys": {
464
542
  "type": "Link",
465
- "linkType": "User",
466
- "id": "4SejVrWT96dvL9IV4Nb7sQ"
543
+ "linkType": "ContentType",
544
+ "id": "someType"
467
545
  }
468
546
  }
547
+ },
548
+ "fields": {
549
+ "name": {
550
+ "en-GB": "Test With Already Populated Field"
551
+ },
552
+ "value": {
553
+ "en-GB": "hello"
554
+ }
469
555
  }
470
556
  }
471
557
  http_version:
472
- recorded_at: Tue, 19 Jan 2016 14:15:50 GMT
558
+ recorded_at: Thu, 15 Mar 2018 14:45:40 GMT
473
559
  - request:
474
560
  method: put
475
- uri: https://api.contentful.com/spaces/u2viwgfeal0o/entries/fIpsfQSOd22IsqMQCiG0K/published
561
+ uri: https://api.contentful.com/spaces/u2viwgfeal0o/environments/master/entries/fIpsfQSOd22IsqMQCiG0K/published
476
562
  body:
477
563
  encoding: US-ASCII
478
564
  string: ''
479
565
  headers:
480
- User-Agent:
481
- - RubyContentfulManagementGem/0.7.3
566
+ X-Contentful-User-Agent:
567
+ - sdk contentful-management.rb/1.10.1; platform ruby/2.4.1; os macOS/16;
482
568
  Authorization:
483
569
  - Bearer <ACCESS_TOKEN>
484
570
  Content-Type:
485
571
  - application/vnd.contentful.management.v1+json
486
572
  X-Contentful-Version:
487
- - '38'
488
- Content-Length:
489
- - '0'
573
+ - '48'
574
+ Version:
575
+ - '48'
490
576
  Connection:
491
577
  - close
492
578
  Host:
493
579
  - api.contentful.com
580
+ User-Agent:
581
+ - http.rb/2.2.2
494
582
  response:
495
583
  status:
496
584
  code: 200
497
585
  message: OK
498
586
  headers:
499
587
  Access-Control-Allow-Headers:
500
- - 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
588
+ - 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,X-Contentful-Enable-Alpha-Feature
501
589
  Access-Control-Allow-Methods:
502
590
  - DELETE,GET,HEAD,POST,PUT,OPTIONS
503
591
  Access-Control-Allow-Origin:
@@ -511,39 +599,58 @@ http_interactions:
511
599
  Content-Type:
512
600
  - application/vnd.contentful.management.v1+json
513
601
  Date:
514
- - Tue, 19 Jan 2016 14:15:54 GMT
602
+ - Thu, 15 Mar 2018 14:45:42 GMT
515
603
  Etag:
516
- - '"9ef690ebc05f2d03e6b911b0fa377ada"'
604
+ - '"7ffb1540a04c25c62533427c6b849e41"'
517
605
  Server:
518
- - nginx
606
+ - Contentful
519
607
  Strict-Transport-Security:
520
608
  - max-age=15768000
521
609
  X-Content-Type-Options:
522
610
  - nosniff
611
+ X-Contentful-Ratelimit-Hour-Limit:
612
+ - '36000'
613
+ X-Contentful-Ratelimit-Hour-Remaining:
614
+ - '35984'
615
+ X-Contentful-Ratelimit-Reset:
616
+ - '0'
617
+ X-Contentful-Ratelimit-Second-Limit:
618
+ - '10'
619
+ X-Contentful-Ratelimit-Second-Remaining:
620
+ - '9'
523
621
  X-Contentful-Request-Id:
524
- - content-api:27oLCn8vMwmoCKYucwSAcc
525
- X-Powered-By:
526
- - Express
622
+ - 314593c5bb63c00e0f43e5aa308bb559
527
623
  Content-Length:
528
624
  - '1156'
529
625
  Connection:
530
626
  - Close
627
+ Set-Cookie:
628
+ - incap_ses_765_673446=fRGJWZ94q1aAzghBv9OdChWHqloAAAAAidY94uWd1XaPwqCVbhnJbA==;
629
+ path=/; Domain=.contentful.com
630
+ - nlbi_673446=yKm4LkpM4FWbIbTB6lKYhQAAAACjaQ8gnFP9Qax4Wup5q0kK; path=/; Domain=.contentful.com
631
+ - visid_incap_673446=JEr0akPbSi6RuLyLs7IJdhWHqloAAAAAQUIPAAAAAABNK4s/IRS26G4y3PsYDdYJ;
632
+ expires=Fri, 15 Mar 2019 07:37:36 GMT; path=/; Domain=.contentful.com
633
+ X-Iinfo:
634
+ - 14-59028787-59028794 NNNN CT(92 93 0) RT(1521125141300 43) q(0 0 2 -1) r(6
635
+ 6) U5
636
+ X-Cdn:
637
+ - Incapsula
531
638
  body:
532
- encoding: UTF-8
639
+ encoding: ASCII-8BIT
533
640
  string: |
534
641
  {
535
- "fields": {
536
- "name": {
537
- "en-GB": "Test With Already Populated Field"
538
- },
539
- "value": {
540
- "en-GB": "hello"
541
- }
542
- },
543
642
  "sys": {
643
+ "space": {
644
+ "sys": {
645
+ "type": "Link",
646
+ "linkType": "Space",
647
+ "id": "u2viwgfeal0o"
648
+ }
649
+ },
544
650
  "id": "fIpsfQSOd22IsqMQCiG0K",
545
651
  "type": "Entry",
546
652
  "createdAt": "2016-01-19T13:51:58.820Z",
653
+ "updatedAt": "2018-03-15T14:45:42.338Z",
547
654
  "createdBy": {
548
655
  "sys": {
549
656
  "type": "Link",
@@ -551,23 +658,15 @@ http_interactions:
551
658
  "id": "4SejVrWT96dvL9IV4Nb7sQ"
552
659
  }
553
660
  },
554
- "space": {
555
- "sys": {
556
- "type": "Link",
557
- "linkType": "Space",
558
- "id": "u2viwgfeal0o"
559
- }
560
- },
561
- "contentType": {
661
+ "updatedBy": {
562
662
  "sys": {
563
663
  "type": "Link",
564
- "linkType": "ContentType",
565
- "id": "someType"
664
+ "linkType": "User",
665
+ "id": "4SejVrWT96dvL9IV4Nb7sQ"
566
666
  }
567
667
  },
568
- "firstPublishedAt": "2016-01-19T13:52:13.524Z",
569
- "publishedCounter": 3,
570
- "publishedAt": "2016-01-19T14:15:54.805Z",
668
+ "publishedCounter": 8,
669
+ "version": 49,
571
670
  "publishedBy": {
572
671
  "sys": {
573
672
  "type": "Link",
@@ -575,18 +674,26 @@ http_interactions:
575
674
  "id": "4SejVrWT96dvL9IV4Nb7sQ"
576
675
  }
577
676
  },
578
- "publishedVersion": 38,
579
- "version": 39,
580
- "updatedAt": "2016-01-19T14:15:54.805Z",
581
- "updatedBy": {
677
+ "publishedVersion": 48,
678
+ "firstPublishedAt": "2016-01-19T13:52:13.524Z",
679
+ "publishedAt": "2018-03-15T14:45:42.338Z",
680
+ "contentType": {
582
681
  "sys": {
583
682
  "type": "Link",
584
- "linkType": "User",
585
- "id": "4SejVrWT96dvL9IV4Nb7sQ"
683
+ "linkType": "ContentType",
684
+ "id": "someType"
586
685
  }
587
686
  }
687
+ },
688
+ "fields": {
689
+ "name": {
690
+ "en-GB": "Test With Already Populated Field"
691
+ },
692
+ "value": {
693
+ "en-GB": "hello"
694
+ }
588
695
  }
589
696
  }
590
697
  http_version:
591
- recorded_at: Tue, 19 Jan 2016 14:15:51 GMT
592
- recorded_with: VCR 2.9.3
698
+ recorded_at: Thu, 15 Mar 2018 14:45:41 GMT
699
+ recorded_with: VCR 4.0.0