- Fixed typo in documentation
- Fixed changelog discrepancies
- Updated
json
gem version
- Added ruby versions 3.1, 3.2 and 3.3 to CI. Removed 2.6 and 2.7.
- Updated
http
gem version
- CI/CD vendor from travis to circleci
- Refactored
includes
to be a model (Contentful::Includes
) with a lookup table instead of a plain Ruby array, for improved performance wheninclude_level
is set. Two related methods fromSupport
have been moved to this new class. Any code that uses the undocumentedincludes_for_single
option to any method will need to be updated. #235
- Fixed an issue where
raw['metadata']
was unexpectedly overwritten byBaseResource#hydrate_metadata
method.
- Fixed an issue where entry's
raw['fields']
was unexpectedly overwritten byFieldsResource#raw_with_links
method.
- Removed unncessary files from gem release package.
- Added
Contentful::ArrayLike#to_ary
. #200 - Added
_metadata[:tags]
to read metadata tags onentry
andasset
.
- Fixed an issue where the
log_level
ofLogger
was changed unintentionally #222 - Fixed an issue cause by a
Logger
not being correctly thrown away, causing an exception. #220 - Added
title
field to assets to prevent Error raising when the field is empty. #218 - Fixed an issue with
ArrayLike
not taking multiple arguments leading to Errors when using it with pagination libraries. #215
- Fixed a deprecation warning in Ruby 2.7.0 for
URI::escape
and replaced it with a backwards compatible mechanism. #217
- Fixed unresolvable single linked entries and assets returning a JSON Link rather than being
nil
, the same way they are filtered from Link arrays.
- Fixed how
entry_mapping
is cached in order to avoid errors when deserializing resources that have been serialized with previously deleted mapping classes. #212
- Added the capability for
Array#next_page
to support carry-over of query parameters.
- Allow user defined methods to override properties created by the SDK, if you want to access overriden fields or sys properties use
#fields[]
or#sys[]
as accessors. #210
- Fixed unfiltered unresolvable entries and assets from re-marshalled entries. #207
- Removed unnecessary object dups and moved some static arrays that were regenerated each time to constants.
- Fixed detection of empty fields when
:use_camel_case
istrue
. #203
- Updated HTTP gem version limits. #202
- Add HTTP timeout configuration. #196
- Fixed coercion error when same entry was included more than once in the same RichText field. #194
- Added
:raise_for_empty_fields
configuration option. #190
- Links in
RichText
fields, that are published but unreachable, due to not having enough include depth on the request, are now returned asLink
objects.
- Included resources for embedded entries and assets in Rich Text fields are now properly serialized to
data.target
instead of the top leveldata
.
- Fixed
Marshal.load
for entries with unpublished related entries.
As RichText
moves from alpha
to beta
, we're treating this as a feature release.
- Renamed
StructuredText
toRichText
.
- Fixed incorrect default error message for
503 Service Unavailable
errors. #183
- Added safeguard for re-serialization of
StructuredText
nodes.
- Added support for
StructuredText
inline Entry include resolution.
Note: This release includes support for StructuredText
, this is an alpha feature and changes are to be expected. Further releases of this feature
will not increase a major version even if changes are breaking.
- Added support for
StructuredText
field type.
- Fixed
DateCoercion
when value is already aDate
,DateTime
orTime
object. contentful_model/#121
Yanked due to faulty release
- Fixed deeply nested resources now also filter unresolvable entries. #177
- Added support for
sync
on environments other thanmaster
.
- Added support for
radius
cropping on the Asset#url
.
- Makes all routes environment aware. This change is not backwards incompatible.
- Added
locales
endpoint to retrieve locales from an environment.
- Add filtering of invalid entries from API responses.
- Added
reuse_entries
option to client configuration. This is a performance improvement, which is disabled by default due to backwards compatibility. All users are highly encouraged to enable it and test it in their applications. #164
- Support for the new query parameters to find incoming links to a specific entry or to a specific asset in a space.
- Fixes coercion issue when
DateTime
values arenil
. #148
- Fixed 404 error when
details
object contains a top levelsys
key.
- Fixed an edge case of 404 error having details as a string.
- Added
:use_camel_case
option to client. #142 - Added better error handling for all error types.
- Fixed JSON field coercion when field contains other valid JSON elements other than objects at the top level.
- Fixed Marshalling for custom resources in Arrays. #138
- Fixed Marshalling for Arrays with deeply nested resources. #138
- Fixed Marshalling for resources that have deeply nested resources. #138
- Added
X-Contentful-User-Agent
header for more information.
Contentful::Array
now marshalls properly, respecting all properties #132
- Asset File Mapping now uses
#internal_resource_locale
to useResource#sys[:locale]
if available jekyll-contentful-data-import #46
ATTENTION: Breaking Changes introduces in order to simplify code and improve the ability to add new features.
- The removal of the Client and Request objects from the Resource objects, means that for example: Link#resolve and Array#next_page now require the client as a parameter.
- Client#entry now uses /entries?sys.id=ENTRY_ID instead of /entries/ENTRY_ID to properly resolve includes.
- Refactor locale handling code
- Refactor ResourceBuilder
- Update all specs to RSpec 3
- Removed DynamicEntry and Resource
- Moved ContentTypeCache outside of the client into it's own class
- Added new base BaseResource and FieldsResource classes to handle common resource attributes and fields related attributes respectively
- Coercions are now part of ContentType, each Field knows which coercion should be applied depending on Field#type
- Resource #inspect now provides a clearer and better output, without all the noise that was previously there
- CustomResource was removed, now subclasses of Entry should be used instead.
max_include_resolution_depth
option added to the client, defaults to 20.sys
properties now match accessors.fields
properties now match accessors.- Updated LICENSE
- Updated examples
- Fixed Symbol/Text field serialization when value is
null
#117
- Update dependency versions
- Add alias for
image_url
- Fix Re-Marshalling of already Un-Marshalled objects
- Add support for
select
operator in#entries
and#assets
call
- Fix Link resolution for Arrays on localized content
- Add
entry?
method to resources to easily detect entries - Add missing documentation for
#locales
method
- Fix Link resolution on localized content
- Removed dependency lock specific for Ruby < 2.0 support
ATTENTION: Breaking changes on how JSON Fields are parsed. All keys are now symbolized, including
nested hashes. Parsing errors have been fixed, particularly for array
, null
and boolean
present on the first
level of the JSON field. Also, on release 0.11.0, it was fixed that JSON Fields were being treated as locales.
This change increases consistency for the SDK, treating everything the same way. We strive for consistency and
quality in our tools.
The following diff
shows previous and current state. This is the contents of the JSON Field we test this feature against.
- {:null=>"",
- :text=>"some text",
- :array=>"[1, 2, 3]",
- :number=>123,
- :object=>
- {"null"=>nil,
- "text"=>"bar",
- "array"=>[1, 2, 3],
- "number"=>123,
- "object"=>{"foo"=>"bar"},
- "boolean"=>false},
- :boolean=>"true"}
+ {:null=>nil,
+ :text=>"some text",
+ :array=>[1, 2, 3],
+ :number=>123,
+ :object=>
+ {:null=>nil,
+ :text=>"bar",
+ :array=>[1, 2, 3],
+ :number=>123,
+ :object=>{:foo=>"bar"},
+ :boolean=>false},
+ :boolean=>true}
- Fixed JSON Field Parsing #96
- Added Rate Limit automatic handling
- Fixed Locale handling #98
- Added
:fl
parameter toAsset#image_url
to supportprogressive
File Layering - Added Marshalling methods to
Asset
#88
- Changed 503 error message to a less confusing one.
- Added
Contentful::Resource::CustomResource
to automatically map fields to accessors #79 - Added
#raw
toContentful::Resource
for easier Marshalling - Added documentation regarding locales
- Changed Documentation Format to YARD
- Fixed Marshalling for Custom Resource Classes #80
- Unified Locale Handling #73
- Add support for querying a field's
linkType
#75 - Handles multiple locales when requesting with
locale: "*"
contentful_middleman/#39
- Fix Custom Resource creation parameters #69
Sync API
now works with:raw_mode
enabled #68- Bugfix for
Field.items
#76
- Parse nested locales in
AssetFields
#66
- Update http.rb dependency to v0.8.0
- Fix typo in service unavailable error message #61
- Enable gzip encoding by default #62
focus
andfit
to image handling parameters #44
- Proxy support
- Logging of requests
- Cleaner and better error handling
- Code cleanup
- Remove encoding strings from the source code files
- Optional gzip compression
- Fix: handle 503 errors from the API
- Default property to locale, #23
- Return nil when a value is not supplied, fixes #18
- Do not parse empty responses
- Remove CGI dependency for http Gem
- Support Synchronization
- Introduce new :entry_mapping configuration to enable custom Entry classes based on ContentTypes
- Update HTTP gem dependency to 0.6
- Convert arrays in query values to strings, separated by comma
- Better link inclusion processing, prevents "stack level to deep" errors
- The way all content types are retrieved
- Bug that prevented fields with multiple resources to be parsed correctly
- Restrict HTTP gem dependency to < 0.6
- Initial release.