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.
- checksums.yaml +5 -5
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +48 -0
- data/README.md +92 -50
- data/lib/contentful/management/api_key.rb +25 -2
- data/lib/contentful/management/array.rb +3 -3
- data/lib/contentful/management/asset.rb +13 -8
- data/lib/contentful/management/client.rb +73 -60
- data/lib/contentful/management/client_api_key_methods_factory.rb +8 -0
- data/lib/contentful/management/client_asset_methods_factory.rb +0 -2
- data/lib/contentful/management/client_association_all_published_method_factory.rb +2 -3
- data/lib/contentful/management/client_association_methods_factory.rb +9 -9
- data/lib/contentful/management/client_content_type_methods_factory.rb +8 -2
- data/lib/contentful/management/client_editor_interface_methods_factory.rb +12 -6
- data/lib/contentful/management/client_entry_methods_factory.rb +1 -3
- data/lib/contentful/management/client_environment_methods_factory.rb +59 -0
- data/lib/contentful/management/client_organization_methods_factory.rb +1 -1
- data/lib/contentful/management/client_personal_access_tokens_methods_factory.rb +3 -3
- data/lib/contentful/management/client_role_methods_factory.rb +8 -0
- data/lib/contentful/management/client_snapshot_methods_factory.rb +8 -6
- data/lib/contentful/management/client_space_methods_factory.rb +2 -6
- data/lib/contentful/management/client_upload_methods_factory.rb +8 -0
- data/lib/contentful/management/client_user_methods_factory.rb +1 -1
- data/lib/contentful/management/client_webhook_call_methods_factory.rb +11 -6
- data/lib/contentful/management/client_webhook_health_methods_factory.rb +2 -2
- data/lib/contentful/management/client_webhook_methods_factory.rb +8 -0
- data/lib/contentful/management/content_type.rb +9 -7
- data/lib/contentful/management/content_type_editor_interface_methods_factory.rb +7 -3
- data/lib/contentful/management/content_type_entry_methods_factory.rb +2 -2
- data/lib/contentful/management/content_type_snapshot_methods_factory.rb +16 -2
- data/lib/contentful/management/dynamic_entry.rb +1 -1
- data/lib/contentful/management/editor_interface.rb +14 -6
- data/lib/contentful/management/entry.rb +12 -10
- data/lib/contentful/management/entry_association_methods_factory.rb +2 -2
- data/lib/contentful/management/environment.rb +138 -0
- data/lib/contentful/management/environment_asset_methods_factory.rb +11 -0
- data/lib/contentful/management/environment_association_methods_factory.rb +42 -0
- data/lib/contentful/management/environment_content_type_methods_factory.rb +11 -0
- data/lib/contentful/management/environment_editor_interface_methods_factory.rb +15 -0
- data/lib/contentful/management/environment_entry_methods_factory.rb +11 -0
- data/lib/contentful/management/environment_locale_methods_factory.rb +11 -0
- data/lib/contentful/management/environment_ui_extension_methods_factory.rb +11 -0
- data/lib/contentful/management/field.rb +3 -3
- data/lib/contentful/management/file.rb +2 -2
- data/lib/contentful/management/link.rb +21 -7
- data/lib/contentful/management/locale.rb +4 -2
- data/lib/contentful/management/organization.rb +1 -1
- data/lib/contentful/management/personal_access_token.rb +2 -2
- data/lib/contentful/management/resource.rb +34 -13
- data/lib/contentful/management/resource/all_published.rb +2 -2
- data/lib/contentful/management/resource/archiver.rb +12 -2
- data/lib/contentful/management/resource/environment_aware.rb +13 -0
- data/lib/contentful/management/resource/publisher.rb +12 -2
- data/lib/contentful/management/resource/refresher.rb +1 -1
- data/lib/contentful/management/resource_builder.rb +16 -14
- data/lib/contentful/management/response.rb +1 -1
- data/lib/contentful/management/role.rb +29 -2
- data/lib/contentful/management/snapshot.rb +13 -7
- data/lib/contentful/management/space.rb +14 -93
- data/lib/contentful/management/space_association_methods_factory.rb +1 -1
- data/lib/contentful/management/{space_locale_methods_factory.rb → space_environment_methods_factory.rb} +2 -6
- data/lib/contentful/management/space_membership.rb +3 -3
- data/lib/contentful/management/ui_extension.rb +4 -2
- data/lib/contentful/management/upload.rb +24 -1
- data/lib/contentful/management/user.rb +4 -4
- data/lib/contentful/management/validation.rb +5 -5
- data/lib/contentful/management/version.rb +1 -1
- data/lib/contentful/management/webhook.rb +26 -3
- data/lib/contentful/management/webhook_call.rb +8 -8
- data/lib/contentful/management/webhook_health.rb +2 -2
- data/spec/fixtures/vcr_cassettes/asset/143_assets_next_page.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/all.yml +1 -1
- data/spec/fixtures/vcr_cassettes/asset/archive.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/archive_published.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/archived_false.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/archived_true.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/create.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/create_with_already_used_id.yml +1 -1
- data/spec/fixtures/vcr_cassettes/asset/create_with_custom_id.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/create_with_locale.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/destroy.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/destroy_published.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/find.yml +1 -1
- data/spec/fixtures/vcr_cassettes/asset/find_not_found.yml +1 -1
- data/spec/fixtures/vcr_cassettes/asset/limited_assets_next_page.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/locale.yml +1 -1
- data/spec/fixtures/vcr_cassettes/asset/process.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/publish.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/publish_after_create.yml +3 -3
- data/spec/fixtures/vcr_cassettes/asset/publish_already_published.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/published_false.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/published_true.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/reload.yml +4 -4
- data/spec/fixtures/vcr_cassettes/asset/reload_with_fields.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/save_update.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/select_operator.yml +1 -1
- data/spec/fixtures/vcr_cassettes/asset/set_locale.yml +1 -1
- data/spec/fixtures/vcr_cassettes/asset/unarchive.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/unarchive_already_unarchive.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/unarchive_already_unarchived.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/unpublish.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/unpublish_already_unpublished.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/update_file.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/update_to_specified_locale.yml +2 -2
- data/spec/fixtures/vcr_cassettes/asset/update_with_default_locale_without_file.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/activate.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/activate_with_invalid_version.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/activated_false.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/activated_true.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/all.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/all_public.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/create.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/create_content_type_with_id.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Array_field.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Boolean_field.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Date_field.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Integer_field.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Link_field.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Location_field.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Number_field.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Object_field.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Symbol_field.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/create_with_Text_field.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/deactivate.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/deactivate_already_deactivated.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/deactivate_with_entries.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/deactivate_with_version_change.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/destroy.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/destroy_activated.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/entry/all.yml +4 -4
- data/spec/fixtures/vcr_cassettes/content_type/entry/create.yml +4 -4
- data/spec/fixtures/vcr_cassettes/content_type/entry/create_only_with_localized_fields.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/entry/create_to_single_locale_only_with_localized_fields.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_camel_case_id_to_multiple_locales.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_entries.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_entries_for_multiple_locales.yml +9 -9
- data/spec/fixtures/vcr_cassettes/content_type/entry/create_with_multiple_locales.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/entry/update_only_with_localized_fields.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/fields/add.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/fields/create.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/fields/create_array_types.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/fields/create_array_with_params.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/fields/create_with_params.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/fields/destroy.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/fields/update_field.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/find.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/find_not_found.yml +1 -1
- data/spec/fixtures/vcr_cassettes/content_type/issue_79.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/omitted_field.yml +4 -4
- data/spec/fixtures/vcr_cassettes/content_type/reload.yml +4 -4
- data/spec/fixtures/vcr_cassettes/content_type/save_new.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/save_updated.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/save_with_added_field.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/update.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/update_change_field_name.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/update_remove_field.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/update_with_fields.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/update_with_one_new_field.yml +2 -2
- data/spec/fixtures/vcr_cassettes/content_type/validation/in.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/validation/in_add.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/validation/in_update.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/validation/link_content_type.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/validation/link_field.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/validation/link_mimetype_group.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/validation/multiple_add.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/validation/present.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/validation/range.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/validation/range_update.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/validation/regexp.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/validation/size.yml +3 -3
- data/spec/fixtures/vcr_cassettes/content_type/validation/unique.yml +3 -3
- data/spec/fixtures/vcr_cassettes/editor_interfaces/default_for_space.yml +1 -1
- data/spec/fixtures/vcr_cassettes/editor_interfaces/update.yml +3 -3
- data/spec/fixtures/vcr_cassettes/entry/all.yml +1 -1
- data/spec/fixtures/vcr_cassettes/entry/archive.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/archive_published.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/archived_false.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/archived_true.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/content_type_entires.yml +1 -1
- data/spec/fixtures/vcr_cassettes/entry/create.yml +4 -4
- data/spec/fixtures/vcr_cassettes/entry/create_with_asset.yml +3 -3
- data/spec/fixtures/vcr_cassettes/entry/create_with_assets.yml +3 -3
- data/spec/fixtures/vcr_cassettes/entry/create_with_custom_id.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/create_with_entries.yml +3 -3
- data/spec/fixtures/vcr_cassettes/entry/create_with_entry.yml +3 -3
- data/spec/fixtures/vcr_cassettes/entry/create_with_just_id.yml +4 -4
- data/spec/fixtures/vcr_cassettes/entry/create_with_location.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/create_with_specified_locale.yml +3 -3
- data/spec/fixtures/vcr_cassettes/entry/create_with_symbols.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/destory_published.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/destroy.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/fallback_undefined.yml +3 -3
- data/spec/fixtures/vcr_cassettes/entry/find-with-null-symbols.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/find.yml +1 -1
- data/spec/fixtures/vcr_cassettes/entry/find_not_found.yml +1 -1
- data/spec/fixtures/vcr_cassettes/entry/issue_61_1.yml +6 -6
- data/spec/fixtures/vcr_cassettes/entry/issue_61_2.yml +6 -6
- data/spec/fixtures/vcr_cassettes/entry/issue_61_3.yml +6 -6
- data/spec/fixtures/vcr_cassettes/entry/issue_61_4.yml +6 -6
- data/spec/fixtures/vcr_cassettes/entry/issue_61_5.yml +305 -198
- data/spec/fixtures/vcr_cassettes/entry/issue_61_6.yml +5 -5
- data/spec/fixtures/vcr_cassettes/entry/issue_61_7.yml +6 -6
- data/spec/fixtures/vcr_cassettes/entry/issue_61_8.yml +6 -6
- data/spec/fixtures/vcr_cassettes/entry/issue_61_spaces.yml +143 -188
- data/spec/fixtures/vcr_cassettes/entry/issue_70.yml +3 -3
- data/spec/fixtures/vcr_cassettes/entry/issue_73.yml +4 -4
- data/spec/fixtures/vcr_cassettes/entry/issue_91.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/limited_entries.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/locales/fallback_to_default_locale.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/locales/retrieve_localized.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/locales/simple_assignments_use_default_locale.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/locales/simple_assignments_use_specified_locale.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/publish.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/publish_already_published.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/published_false.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/published_true.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/reload.yml +6 -6
- data/spec/fixtures/vcr_cassettes/entry/save_update.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/equality_operator.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/exclusion_operator.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/full_search.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/full_search_match_operator.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/including_linked_entries.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/inclusion_operator.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/inequality_operator.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/location_search_near_operator.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/location_search_within_operator.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/matching_array_fields.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/order_sys_createdAt.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/order_sys_updatedAt.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/range_operators_greater_than_or_equal.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/range_operators_less.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/search_filter/reverse_order_sys_updatedAt.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/select_operator.yml +1 -1
- data/spec/fixtures/vcr_cassettes/entry/service_unavailable.yml +1 -1
- data/spec/fixtures/vcr_cassettes/entry/too_many_requests.yml +5 -5
- data/spec/fixtures/vcr_cassettes/entry/too_many_requests_retry.yml +6 -6
- data/spec/fixtures/vcr_cassettes/entry/unarchive.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/unarchive_already_unarchived.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/unpublish.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/unpublish_already_unpublished.yml +2 -2
- data/spec/fixtures/vcr_cassettes/entry/update.yml +4 -4
- data/spec/fixtures/vcr_cassettes/entry/update_bool_field.yml +4 -4
- data/spec/fixtures/vcr_cassettes/entry/update_unlocalized_field.yml +3 -3
- data/spec/fixtures/vcr_cassettes/entry/update_with_custom_locale.yml +3 -3
- data/spec/fixtures/vcr_cassettes/environment/all.yml +226 -0
- data/spec/fixtures/vcr_cassettes/environment/create.yml +155 -0
- data/spec/fixtures/vcr_cassettes/environment/destroy.yml +89 -0
- data/spec/fixtures/vcr_cassettes/environment/find.yml +155 -0
- data/spec/fixtures/vcr_cassettes/environment/find_2.yml +155 -0
- data/spec/fixtures/vcr_cassettes/environment/not_found.yml +98 -0
- data/spec/fixtures/vcr_cassettes/locale/all_for_space.yml +1 -1
- data/spec/fixtures/vcr_cassettes/locale/create_for_space.yml +2 -2
- data/spec/fixtures/vcr_cassettes/locale/destroy.yml +5 -5
- data/spec/fixtures/vcr_cassettes/locale/fallback_code.yml +3 -3
- data/spec/fixtures/vcr_cassettes/locale/find.yml +1 -1
- data/spec/fixtures/vcr_cassettes/locale/find_default.yml +1 -1
- data/spec/fixtures/vcr_cassettes/locale/find_for_space_not_found.yml +1 -1
- data/spec/fixtures/vcr_cassettes/locale/find_not_default.yml +1 -1
- data/spec/fixtures/vcr_cassettes/locale/find_not_optional.yml +1 -1
- data/spec/fixtures/vcr_cassettes/locale/find_optional.yml +1 -1
- data/spec/fixtures/vcr_cassettes/locale/reload.yml +3 -3
- data/spec/fixtures/vcr_cassettes/locale/update_both.yml +3 -3
- data/spec/fixtures/vcr_cassettes/locale/update_code.yml +3 -3
- data/spec/fixtures/vcr_cassettes/locale/update_name.yml +3 -3
- data/spec/fixtures/vcr_cassettes/snapshot/all.yml +1 -1
- data/spec/fixtures/vcr_cassettes/snapshot/ct_all.yml +1 -1
- data/spec/fixtures/vcr_cassettes/snapshot/ct_find.yml +1 -1
- data/spec/fixtures/vcr_cassettes/snapshot/ct_find_not_found.yml +1 -1
- data/spec/fixtures/vcr_cassettes/snapshot/find.yml +1 -1
- data/spec/fixtures/vcr_cassettes/snapshot/find_not_found.yml +1 -1
- data/spec/fixtures/vcr_cassettes/snapshot/properties.yml +2 -2
- data/spec/fixtures/vcr_cassettes/ui_extension/all.yml +1 -1
- data/spec/fixtures/vcr_cassettes/ui_extension/create.yml +1 -1
- data/spec/fixtures/vcr_cassettes/ui_extension/delete.yml +3 -3
- data/spec/fixtures/vcr_cassettes/ui_extension/find.yml +1 -1
- data/spec/fixtures/vcr_cassettes/upload/associate_with_asset.yml +3 -3
- data/spec/lib/contentful/management/api_key_spec.rb +7 -7
- data/spec/lib/contentful/management/asset_spec.rb +38 -57
- data/spec/lib/contentful/management/client_spec.rb +1 -1
- data/spec/lib/contentful/management/content_type_spec.rb +78 -78
- data/spec/lib/contentful/management/editor_interface_spec.rb +4 -4
- data/spec/lib/contentful/management/entry_spec.rb +104 -114
- data/spec/lib/contentful/management/environment_spec.rb +87 -0
- data/spec/lib/contentful/management/locale_spec.rb +22 -22
- data/spec/lib/contentful/management/role_spec.rb +11 -11
- data/spec/lib/contentful/management/snapshot_spec.rb +27 -27
- data/spec/lib/contentful/management/space_membership_spec.rb +6 -7
- data/spec/lib/contentful/management/space_spec.rb +0 -282
- data/spec/lib/contentful/management/ui_extension_spec.rb +8 -8
- data/spec/lib/contentful/management/upload_spec.rb +9 -9
- data/spec/lib/contentful/management/webhook_calls_spec.rb +6 -6
- data/spec/lib/contentful/management/webhook_health_spec.rb +3 -3
- data/spec/lib/contentful/management/webhook_spec.rb +14 -12
- metadata +28 -14
- data/lib/contentful/management/space_asset_methods_factory.rb +0 -13
- data/lib/contentful/management/space_association_all_published_method_factory.rb +0 -12
- data/lib/contentful/management/space_content_type_methods_factory.rb +0 -13
- data/lib/contentful/management/space_editor_interface_methods_factory.rb +0 -21
- data/lib/contentful/management/space_entry_methods_factory.rb +0 -21
- data/lib/contentful/management/space_ui_extension_methods_factory.rb +0 -15
- data/spec/fixtures/vcr_cassettes/asset/all_public.yml +0 -112
- data/spec/fixtures/vcr_cassettes/entry/all_public.yml +0 -102
@@ -11,7 +11,7 @@ module Contentful
|
|
11
11
|
let(:pixel_path) { ::File.join('spec', 'fixtures', 'pixel.jpg') }
|
12
12
|
let!(:client) { Client.new(token) }
|
13
13
|
|
14
|
-
subject { client.uploads }
|
14
|
+
subject { client.uploads(space_id) }
|
15
15
|
|
16
16
|
describe '.find' do
|
17
17
|
it 'class method also works' do
|
@@ -23,21 +23,21 @@ module Contentful
|
|
23
23
|
end
|
24
24
|
it 'returns a Contentful::Management::Upload' do
|
25
25
|
vcr('upload/find') {
|
26
|
-
upload = subject.find(
|
26
|
+
upload = subject.find(upload_id)
|
27
27
|
expect(upload).to be_kind_of Contentful::Management::Upload
|
28
28
|
expect(upload.id).to eq upload_id
|
29
29
|
}
|
30
30
|
end
|
31
31
|
it 'returns upload for a given key' do
|
32
32
|
vcr('upload/find') do
|
33
|
-
upload = subject.find(
|
33
|
+
upload = subject.find(upload_id)
|
34
34
|
expect(upload).to be_kind_of Contentful::Management::Upload
|
35
35
|
expect(upload.id).to eq upload_id
|
36
36
|
end
|
37
37
|
end
|
38
38
|
it 'returns an error when upload does not exist' do
|
39
39
|
vcr('upload/find_not_found') do
|
40
|
-
result = subject.find(
|
40
|
+
result = subject.find('not_exist')
|
41
41
|
expect(result).to be_kind_of Contentful::Management::NotFound
|
42
42
|
end
|
43
43
|
end
|
@@ -47,7 +47,7 @@ module Contentful
|
|
47
47
|
it 'creates an upload from a ::File' do
|
48
48
|
vcr('upload/create_file') do
|
49
49
|
::File.open(pixel_path, 'rb') do |f|
|
50
|
-
upload = subject.create(
|
50
|
+
upload = subject.create(f)
|
51
51
|
expect(upload).to be_kind_of Contentful::Management::Upload
|
52
52
|
end
|
53
53
|
end
|
@@ -55,21 +55,21 @@ module Contentful
|
|
55
55
|
|
56
56
|
it 'creates an upload from a /path/to/file' do
|
57
57
|
vcr('upload/create_path') do
|
58
|
-
upload = subject.create(
|
58
|
+
upload = subject.create(pixel_path)
|
59
59
|
expect(upload).to be_kind_of Contentful::Management::Upload
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
63
|
it 'an upload can be associated to an asset' do
|
64
64
|
vcr('upload/associate_with_asset') do
|
65
|
-
upload = subject.create(
|
65
|
+
upload = subject.create(pixel_path)
|
66
66
|
|
67
67
|
file = Contentful::Management::File.new
|
68
68
|
file.properties[:contentType] = 'image/jpeg'
|
69
69
|
file.properties[:fileName] = 'pixel'
|
70
70
|
file.properties[:uploadFrom] = upload.to_link_json
|
71
71
|
|
72
|
-
asset = client.assets
|
72
|
+
asset = client.assets(space_id, 'master').create(title: 'pixel', file: file)
|
73
73
|
asset.process_file
|
74
74
|
asset.reload
|
75
75
|
|
@@ -81,7 +81,7 @@ module Contentful
|
|
81
81
|
describe '#destroy' do
|
82
82
|
it 'returns true' do
|
83
83
|
vcr('upload/destroy') do
|
84
|
-
upload = subject.find(
|
84
|
+
upload = subject.find(upload_id)
|
85
85
|
result = upload.destroy
|
86
86
|
expect(result).to eq true
|
87
87
|
end
|
@@ -11,18 +11,18 @@ module Contentful
|
|
11
11
|
let(:webhook_call_id) { '6r2EQ0iVBmYyyq0UMWKoge' }
|
12
12
|
let!(:client) { Client.new(token) }
|
13
13
|
|
14
|
-
subject { client.webhook_calls }
|
14
|
+
subject { client.webhook_calls(space_id, webhook_id) }
|
15
15
|
|
16
16
|
describe '.all' do
|
17
17
|
it 'class method also works' do
|
18
18
|
vcr('webhook_call/all') { expect(Contentful::Management::WebhookCall.all(client, space_id, webhook_id)).to be_kind_of Contentful::Management::Array }
|
19
19
|
end
|
20
20
|
it 'returns a Contentful::Array' do
|
21
|
-
vcr('webhook_call/all') { expect(subject.all
|
21
|
+
vcr('webhook_call/all') { expect(subject.all).to be_kind_of Contentful::Management::Array }
|
22
22
|
end
|
23
23
|
it 'builds a Contentful::Management::WebhookCall object' do
|
24
24
|
vcr('webhook_call/all') {
|
25
|
-
webhook_call = subject.all
|
25
|
+
webhook_call = subject.all.first
|
26
26
|
|
27
27
|
expect(webhook_call).to be_kind_of Contentful::Management::WebhookCall
|
28
28
|
expect(webhook_call.id).to be_truthy
|
@@ -41,11 +41,11 @@ module Contentful
|
|
41
41
|
vcr('webhook_call/find') { expect(Contentful::Management::WebhookCall.find(client, space_id, webhook_id, webhook_call_id)).to be_kind_of Contentful::Management::WebhookCall }
|
42
42
|
end
|
43
43
|
it 'returns a Contentful::Management::WebhookCall' do
|
44
|
-
vcr('webhook_call/find') { expect(subject.find(
|
44
|
+
vcr('webhook_call/find') { expect(subject.find(webhook_call_id)).to be_kind_of Contentful::Management::WebhookCall }
|
45
45
|
end
|
46
46
|
it 'returns webhook for a given id' do
|
47
47
|
vcr('webhook_call/find') do
|
48
|
-
webhook_call = subject.find(
|
48
|
+
webhook_call = subject.find(webhook_call_id)
|
49
49
|
expect(webhook_call.id).to eq webhook_call_id
|
50
50
|
expect(webhook_call.status_code).to eq 201
|
51
51
|
expect(webhook_call.event_type).to eq "publish"
|
@@ -59,7 +59,7 @@ module Contentful
|
|
59
59
|
end
|
60
60
|
it 'returns an error when call does not exists' do
|
61
61
|
vcr('webhook_call/find_not_found') do
|
62
|
-
result = subject.find(
|
62
|
+
result = subject.find('not_exist')
|
63
63
|
expect(result).to be_kind_of Contentful::Management::NotFound
|
64
64
|
end
|
65
65
|
end
|
@@ -10,7 +10,7 @@ module Contentful
|
|
10
10
|
let(:webhook_id) { '16ypL3XjNK6oreLPPoVBxI' }
|
11
11
|
let!(:client) { Client.new(token) }
|
12
12
|
|
13
|
-
subject { client.webhook_health }
|
13
|
+
subject { client.webhook_health(space_id) }
|
14
14
|
|
15
15
|
describe '.all' do
|
16
16
|
it 'is not supported' do
|
@@ -29,11 +29,11 @@ module Contentful
|
|
29
29
|
}
|
30
30
|
end
|
31
31
|
it 'returns a Contentful::Management::WebhookHealth' do
|
32
|
-
vcr('webhook_health/find') { expect(subject.find(
|
32
|
+
vcr('webhook_health/find') { expect(subject.find(webhook_id)).to be_kind_of Contentful::Management::WebhookHealth }
|
33
33
|
end
|
34
34
|
it 'returns webhook for a given id' do
|
35
35
|
vcr('webhook_health/find') do
|
36
|
-
webhook_health = subject.find(
|
36
|
+
webhook_health = subject.find(webhook_id)
|
37
37
|
expect(webhook_health.calls).to be_a ::Hash
|
38
38
|
|
39
39
|
expect(webhook_health.calls['total']).to eq 2
|
@@ -10,17 +10,17 @@ module Contentful
|
|
10
10
|
let(:webhook_id) { '0rK8ZNEOWLgYnO5gaah2pp' }
|
11
11
|
let!(:client) { Client.new(token) }
|
12
12
|
|
13
|
-
subject { client.webhooks }
|
13
|
+
subject { client.webhooks(space_id) }
|
14
14
|
|
15
15
|
describe '.all' do
|
16
16
|
it 'class method also works' do
|
17
17
|
vcr('webhook/all') { expect(Contentful::Management::Webhook.all(client, space_id)).to be_kind_of Contentful::Management::Array }
|
18
18
|
end
|
19
19
|
it 'returns a Contentful::Array' do
|
20
|
-
vcr('webhook/all') { expect(subject.all
|
20
|
+
vcr('webhook/all') { expect(subject.all).to be_kind_of Contentful::Management::Array }
|
21
21
|
end
|
22
22
|
it 'builds a Contentful::Management::Webhook object' do
|
23
|
-
vcr('webhook/all') { expect(subject.all
|
23
|
+
vcr('webhook/all') { expect(subject.all.first).to be_kind_of Contentful::Management::Webhook }
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -29,17 +29,17 @@ module Contentful
|
|
29
29
|
vcr('webhook/find') { expect(Contentful::Management::Webhook.find(client, space_id, webhook_id)).to be_kind_of Contentful::Management::Webhook }
|
30
30
|
end
|
31
31
|
it 'returns a Contentful::Management::Webhook' do
|
32
|
-
vcr('webhook/find') { expect(subject.find(
|
32
|
+
vcr('webhook/find') { expect(subject.find(webhook_id)).to be_kind_of Contentful::Management::Webhook }
|
33
33
|
end
|
34
34
|
it 'returns webhook for a given key' do
|
35
35
|
vcr('webhook/find') do
|
36
|
-
webhook = subject.find(
|
36
|
+
webhook = subject.find(webhook_id)
|
37
37
|
expect(webhook.id).to eql webhook_id
|
38
38
|
end
|
39
39
|
end
|
40
40
|
it 'returns an error when content_type does not exists' do
|
41
41
|
vcr('webhook/find_not_found') do
|
42
|
-
result = subject.find(
|
42
|
+
result = subject.find('not_exist')
|
43
43
|
expect(result).to be_kind_of Contentful::Management::NotFound
|
44
44
|
end
|
45
45
|
end
|
@@ -48,20 +48,21 @@ module Contentful
|
|
48
48
|
describe '.create' do
|
49
49
|
it 'builds Contentful::Management::Webhook object' do
|
50
50
|
vcr('webhook/create') do
|
51
|
-
webhook = subject.create(
|
51
|
+
webhook = subject.create(id: 'test_webhook', url: 'https://www.example3.com')
|
52
52
|
expect(webhook).to be_kind_of Contentful::Management::Webhook
|
53
53
|
expect(webhook.url).to eq 'https://www.example3.com'
|
54
54
|
end
|
55
55
|
end
|
56
56
|
it 'return error if url is already taken' do
|
57
57
|
vcr('webhook/create_with_taken_url') do
|
58
|
-
webhook = subject.create(
|
58
|
+
webhook = subject.create(id: 'taken_webhook', url: 'https://www.example3.com')
|
59
59
|
expect(webhook).to be_kind_of Contentful::Management::Error
|
60
60
|
end
|
61
61
|
end
|
62
62
|
it 'can create webhooks with name and custom headers' do
|
63
63
|
vcr('webhook/create_with_name_and_headers') do
|
64
|
-
webhook =
|
64
|
+
webhook = described_class.create(
|
65
|
+
client,
|
65
66
|
'zjvxmotjud5s',
|
66
67
|
name: 'some_webhook',
|
67
68
|
id: 'some_id',
|
@@ -81,7 +82,8 @@ module Contentful
|
|
81
82
|
end
|
82
83
|
it 'can create webhooks with specific topics' do
|
83
84
|
vcr('webhook/topics') do
|
84
|
-
webhook =
|
85
|
+
webhook = described_class.create(
|
86
|
+
client,
|
85
87
|
'zjvxmotjud5s',
|
86
88
|
name: 'test_topics',
|
87
89
|
url: 'https://www.example3.com',
|
@@ -101,7 +103,7 @@ module Contentful
|
|
101
103
|
describe '#update' do
|
102
104
|
it 'all parameters' do
|
103
105
|
vcr('webhook/update') do
|
104
|
-
webhook = subject.find(
|
106
|
+
webhook = subject.find('test_webhook')
|
105
107
|
updated_webhook = webhook.update(url: 'https://www.example5.com',
|
106
108
|
httpBasicUsername: 'test_username',
|
107
109
|
httpBasicPassword: 'test_password')
|
@@ -115,7 +117,7 @@ module Contentful
|
|
115
117
|
describe '#destroy' do
|
116
118
|
it 'returns true' do
|
117
119
|
vcr('webhook/destroy') do
|
118
|
-
webhook = subject.find(
|
120
|
+
webhook = subject.find('test_webhook')
|
119
121
|
result = webhook.destroy
|
120
122
|
expect(result).to eq true
|
121
123
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contentful-management
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Protas
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-04-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: http
|
@@ -303,6 +303,7 @@ files:
|
|
303
303
|
- lib/contentful/management/client_content_type_methods_factory.rb
|
304
304
|
- lib/contentful/management/client_editor_interface_methods_factory.rb
|
305
305
|
- lib/contentful/management/client_entry_methods_factory.rb
|
306
|
+
- lib/contentful/management/client_environment_methods_factory.rb
|
306
307
|
- lib/contentful/management/client_locale_methods_factory.rb
|
307
308
|
- lib/contentful/management/client_organization_methods_factory.rb
|
308
309
|
- lib/contentful/management/client_personal_access_tokens_methods_factory.rb
|
@@ -325,6 +326,14 @@ files:
|
|
325
326
|
- lib/contentful/management/entry.rb
|
326
327
|
- lib/contentful/management/entry_association_methods_factory.rb
|
327
328
|
- lib/contentful/management/entry_snapshot_methods_factory.rb
|
329
|
+
- lib/contentful/management/environment.rb
|
330
|
+
- lib/contentful/management/environment_asset_methods_factory.rb
|
331
|
+
- lib/contentful/management/environment_association_methods_factory.rb
|
332
|
+
- lib/contentful/management/environment_content_type_methods_factory.rb
|
333
|
+
- lib/contentful/management/environment_editor_interface_methods_factory.rb
|
334
|
+
- lib/contentful/management/environment_entry_methods_factory.rb
|
335
|
+
- lib/contentful/management/environment_locale_methods_factory.rb
|
336
|
+
- lib/contentful/management/environment_ui_extension_methods_factory.rb
|
328
337
|
- lib/contentful/management/error.rb
|
329
338
|
- lib/contentful/management/field.rb
|
330
339
|
- lib/contentful/management/file.rb
|
@@ -340,6 +349,7 @@ files:
|
|
340
349
|
- lib/contentful/management/resource/array_like.rb
|
341
350
|
- lib/contentful/management/resource/asset_fields.rb
|
342
351
|
- lib/contentful/management/resource/entry_fields.rb
|
352
|
+
- lib/contentful/management/resource/environment_aware.rb
|
343
353
|
- lib/contentful/management/resource/field_aware.rb
|
344
354
|
- lib/contentful/management/resource/fields.rb
|
345
355
|
- lib/contentful/management/resource/publisher.rb
|
@@ -352,17 +362,11 @@ files:
|
|
352
362
|
- lib/contentful/management/snapshot.rb
|
353
363
|
- lib/contentful/management/space.rb
|
354
364
|
- lib/contentful/management/space_api_key_methods_factory.rb
|
355
|
-
- lib/contentful/management/space_asset_methods_factory.rb
|
356
|
-
- lib/contentful/management/space_association_all_published_method_factory.rb
|
357
365
|
- lib/contentful/management/space_association_methods_factory.rb
|
358
|
-
- lib/contentful/management/
|
359
|
-
- lib/contentful/management/space_editor_interface_methods_factory.rb
|
360
|
-
- lib/contentful/management/space_entry_methods_factory.rb
|
361
|
-
- lib/contentful/management/space_locale_methods_factory.rb
|
366
|
+
- lib/contentful/management/space_environment_methods_factory.rb
|
362
367
|
- lib/contentful/management/space_membership.rb
|
363
368
|
- lib/contentful/management/space_role_methods_factory.rb
|
364
369
|
- lib/contentful/management/space_space_membership_methods_factory.rb
|
365
|
-
- lib/contentful/management/space_ui_extension_methods_factory.rb
|
366
370
|
- lib/contentful/management/space_webhook_methods_factory.rb
|
367
371
|
- lib/contentful/management/support.rb
|
368
372
|
- lib/contentful/management/ui_extension.rb
|
@@ -408,7 +412,6 @@ files:
|
|
408
412
|
- spec/fixtures/vcr_cassettes/array_page_1.yml
|
409
413
|
- spec/fixtures/vcr_cassettes/asset/143_assets_next_page.yml
|
410
414
|
- spec/fixtures/vcr_cassettes/asset/all.yml
|
411
|
-
- spec/fixtures/vcr_cassettes/asset/all_public.yml
|
412
415
|
- spec/fixtures/vcr_cassettes/asset/archive.yml
|
413
416
|
- spec/fixtures/vcr_cassettes/asset/archive_published.yml
|
414
417
|
- spec/fixtures/vcr_cassettes/asset/archived_false.yml
|
@@ -512,7 +515,6 @@ files:
|
|
512
515
|
- spec/fixtures/vcr_cassettes/editor_interfaces/default_for_space.yml
|
513
516
|
- spec/fixtures/vcr_cassettes/editor_interfaces/update.yml
|
514
517
|
- spec/fixtures/vcr_cassettes/entry/all.yml
|
515
|
-
- spec/fixtures/vcr_cassettes/entry/all_public.yml
|
516
518
|
- spec/fixtures/vcr_cassettes/entry/archive.yml
|
517
519
|
- spec/fixtures/vcr_cassettes/entry/archive_published.yml
|
518
520
|
- spec/fixtures/vcr_cassettes/entry/archived_false.yml
|
@@ -584,6 +586,12 @@ files:
|
|
584
586
|
- spec/fixtures/vcr_cassettes/entry/update_bool_field.yml
|
585
587
|
- spec/fixtures/vcr_cassettes/entry/update_unlocalized_field.yml
|
586
588
|
- spec/fixtures/vcr_cassettes/entry/update_with_custom_locale.yml
|
589
|
+
- spec/fixtures/vcr_cassettes/environment/all.yml
|
590
|
+
- spec/fixtures/vcr_cassettes/environment/create.yml
|
591
|
+
- spec/fixtures/vcr_cassettes/environment/destroy.yml
|
592
|
+
- spec/fixtures/vcr_cassettes/environment/find.yml
|
593
|
+
- spec/fixtures/vcr_cassettes/environment/find_2.yml
|
594
|
+
- spec/fixtures/vcr_cassettes/environment/not_found.yml
|
587
595
|
- spec/fixtures/vcr_cassettes/get_request.yml
|
588
596
|
- spec/fixtures/vcr_cassettes/locale/all_for_space.yml
|
589
597
|
- spec/fixtures/vcr_cassettes/locale/create_for_space.yml
|
@@ -703,6 +711,7 @@ files:
|
|
703
711
|
- spec/lib/contentful/management/content_type_spec.rb
|
704
712
|
- spec/lib/contentful/management/editor_interface_spec.rb
|
705
713
|
- spec/lib/contentful/management/entry_spec.rb
|
714
|
+
- spec/lib/contentful/management/environment_spec.rb
|
706
715
|
- spec/lib/contentful/management/error_class_spec.rb
|
707
716
|
- spec/lib/contentful/management/locale_spec.rb
|
708
717
|
- spec/lib/contentful/management/organization_spec.rb
|
@@ -740,7 +749,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
740
749
|
version: '0'
|
741
750
|
requirements: []
|
742
751
|
rubyforge_project:
|
743
|
-
rubygems_version: 2.6
|
752
|
+
rubygems_version: 2.7.6
|
744
753
|
signing_key:
|
745
754
|
specification_version: 4
|
746
755
|
summary: contentful management api
|
@@ -778,7 +787,6 @@ test_files:
|
|
778
787
|
- spec/fixtures/vcr_cassettes/array_page_1.yml
|
779
788
|
- spec/fixtures/vcr_cassettes/asset/143_assets_next_page.yml
|
780
789
|
- spec/fixtures/vcr_cassettes/asset/all.yml
|
781
|
-
- spec/fixtures/vcr_cassettes/asset/all_public.yml
|
782
790
|
- spec/fixtures/vcr_cassettes/asset/archive.yml
|
783
791
|
- spec/fixtures/vcr_cassettes/asset/archive_published.yml
|
784
792
|
- spec/fixtures/vcr_cassettes/asset/archived_false.yml
|
@@ -882,7 +890,6 @@ test_files:
|
|
882
890
|
- spec/fixtures/vcr_cassettes/editor_interfaces/default_for_space.yml
|
883
891
|
- spec/fixtures/vcr_cassettes/editor_interfaces/update.yml
|
884
892
|
- spec/fixtures/vcr_cassettes/entry/all.yml
|
885
|
-
- spec/fixtures/vcr_cassettes/entry/all_public.yml
|
886
893
|
- spec/fixtures/vcr_cassettes/entry/archive.yml
|
887
894
|
- spec/fixtures/vcr_cassettes/entry/archive_published.yml
|
888
895
|
- spec/fixtures/vcr_cassettes/entry/archived_false.yml
|
@@ -954,6 +961,12 @@ test_files:
|
|
954
961
|
- spec/fixtures/vcr_cassettes/entry/update_bool_field.yml
|
955
962
|
- spec/fixtures/vcr_cassettes/entry/update_unlocalized_field.yml
|
956
963
|
- spec/fixtures/vcr_cassettes/entry/update_with_custom_locale.yml
|
964
|
+
- spec/fixtures/vcr_cassettes/environment/all.yml
|
965
|
+
- spec/fixtures/vcr_cassettes/environment/create.yml
|
966
|
+
- spec/fixtures/vcr_cassettes/environment/destroy.yml
|
967
|
+
- spec/fixtures/vcr_cassettes/environment/find.yml
|
968
|
+
- spec/fixtures/vcr_cassettes/environment/find_2.yml
|
969
|
+
- spec/fixtures/vcr_cassettes/environment/not_found.yml
|
957
970
|
- spec/fixtures/vcr_cassettes/get_request.yml
|
958
971
|
- spec/fixtures/vcr_cassettes/locale/all_for_space.yml
|
959
972
|
- spec/fixtures/vcr_cassettes/locale/create_for_space.yml
|
@@ -1073,6 +1086,7 @@ test_files:
|
|
1073
1086
|
- spec/lib/contentful/management/content_type_spec.rb
|
1074
1087
|
- spec/lib/contentful/management/editor_interface_spec.rb
|
1075
1088
|
- spec/lib/contentful/management/entry_spec.rb
|
1089
|
+
- spec/lib/contentful/management/environment_spec.rb
|
1076
1090
|
- spec/lib/contentful/management/error_class_spec.rb
|
1077
1091
|
- spec/lib/contentful/management/locale_spec.rb
|
1078
1092
|
- spec/lib/contentful/management/organization_spec.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require_relative 'space_association_methods_factory'
|
2
|
-
require_relative 'space_association_all_published_method_factory'
|
3
|
-
|
4
|
-
module Contentful
|
5
|
-
module Management
|
6
|
-
# Wrapper for Asset API for usage from within Space
|
7
|
-
# @private
|
8
|
-
class SpaceAssetMethodsFactory
|
9
|
-
include Contentful::Management::SpaceAssociationMethodsFactory
|
10
|
-
include Contentful::Management::SpaceAssociationAllPublishedMethodsFactory
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
module Contentful
|
2
|
-
module Management
|
3
|
-
# Wrapper for /public API for usage from within Space Wrapper Classes
|
4
|
-
# @private
|
5
|
-
# @deprecated This call will be soon removed from the API except for Content Types
|
6
|
-
module SpaceAssociationAllPublishedMethodsFactory
|
7
|
-
def all_published(params = {})
|
8
|
-
associated_class.all_published(space.client, space.id, params)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require_relative 'space_association_methods_factory'
|
2
|
-
require_relative 'space_association_all_published_method_factory'
|
3
|
-
|
4
|
-
module Contentful
|
5
|
-
module Management
|
6
|
-
# Wrapper for ContentType API for usage from within Space
|
7
|
-
# @private
|
8
|
-
class SpaceContentTypeMethodsFactory
|
9
|
-
include Contentful::Management::SpaceAssociationMethodsFactory
|
10
|
-
include Contentful::Management::SpaceAssociationAllPublishedMethodsFactory
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require_relative 'client_editor_interface_methods_factory'
|
2
|
-
require_relative 'editor_interface'
|
3
|
-
|
4
|
-
module Contentful
|
5
|
-
module Management
|
6
|
-
# Wrapper for EditorInterface API for usage from within Space
|
7
|
-
# @private
|
8
|
-
class SpaceEditorInterfaceMethodsFactory
|
9
|
-
attr_reader :space, :editor_interfaces_client
|
10
|
-
|
11
|
-
def initialize(space)
|
12
|
-
@space = space
|
13
|
-
@editor_interfaces_client = ClientEditorInterfaceMethodsFactory.new(space.client)
|
14
|
-
end
|
15
|
-
|
16
|
-
def default(content_type_id)
|
17
|
-
editor_interfaces_client.default(space.id, content_type_id)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require_relative 'space_association_methods_factory'
|
2
|
-
require_relative 'space_association_all_published_method_factory'
|
3
|
-
|
4
|
-
module Contentful
|
5
|
-
module Management
|
6
|
-
# Wrapper for Entry API for usage from within Space
|
7
|
-
# @private
|
8
|
-
class SpaceEntryMethodsFactory
|
9
|
-
include Contentful::Management::SpaceAssociationMethodsFactory
|
10
|
-
include Contentful::Management::SpaceAssociationAllPublishedMethodsFactory
|
11
|
-
|
12
|
-
def create(_attributes)
|
13
|
-
fail 'Not supported'
|
14
|
-
end
|
15
|
-
|
16
|
-
def new
|
17
|
-
fail 'Not supported'
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|