Skip to content

Releases: cloudevents/sdk-ruby

cloud_events 0.7.1

04 Oct 17:51
a500b4c
Compare
Choose a tag to compare

v0.7.1 / 2023-10-04

  • DOCS: Governance docs per CE PR 1226

cloud_events 0.7.0

14 Jan 02:42
95590bf
Compare
Choose a tag to compare

v0.7.0 / 2022-01-14

  • HttpBinding#probable_event? returns false if the request method is GET or HEAD.
  • HttpBinding#decode_event raises NotCloudEventError if the request method is GET or HEAD.
  • Fixed a NoMethodError if nil content was passed to the ContentType constructor.

cloud_events 0.6.0

23 Aug 04:03
688ec7d
Compare
Choose a tag to compare

v0.6.0 / 2021-08-23

This update further clarifies and cleans up the encoding behavior of event payloads. In particular, the event object now includes explicitly encoded data in the new data_encoded field, and provides information on whether the existing data field contains an encoded or decoded form of the payload.

  • Added data_encoded, data_decoded? and data? methods to CloudEvents::Event::V1, added :data_encoded as an input attribute, and clarified the encoding semantics of each field.
  • Changed :attributes keyword argument in event constructors to :set_attributes, to avoid any possible collision with a real extension attribute name. (The old argument name is deprecated and will be removed in 1.0.)
  • Fixed various inconsistencies in the data encoding behavior of JsonFormat and HttpBinding.
  • Support passing a data content encoder/decoder into JsonFormat#encode_event and JsonFormat#decode_event.
  • Provided TextFormat to handle media types with trivial encoding.
  • Provided Format::Multi to handle checking a series of encoders/decoders.

cloud_events 0.5.1

28 Jun 04:44
8091189
Compare
Choose a tag to compare

v0.5.1 / 2021-06-28

  • ADDED: Add HttpBinding#probable_event?
  • FIXED: Fixed a NoMethodError when a format declined to decode an http request

cloud_events 0.5.0

28 Jun 01:31
44d02be
Compare
Choose a tag to compare

v0.5.0 / 2021-06-28

This is a significant update that reworks the interface of the JSON formatter and applies fixes to of its payload encoding behavior. There are several breaking changes to internal interfaces, as well as breaking fixes to the encoding/decoding behavior of HttpBinding class, and a few deprecations.

  • FIXED: HttpBinding#decode_rack_env in binary content mode now parses JSON content-types and exposes the data attribute as a JSON value. Similarly, encoding in binary content mode serializes a JSON document even if the payload is string-typed. (BREAKING CHANGE)
  • CHANGED: HttpBinding#decode_rack_env raises CloudEvents::NotCloudEventError (rather than returning nil) if given an HTTP request that does not seem to have been intended as a CloudEvent. (BREAKING CHANGE)
  • CHANGED: The JsonFormat class interface was reworked to be more generic, combine the structured and batched calls, and add calls to handle data payloads. A Format module has been added to specify the interface used by JsonFormat and future formatters. (Breaking change of internal interfaces)
  • ADDED: It is now possible to tell HttpBinding#decode_rack_env to return an opaque object if the request specifies a format that is not known by the SDK. This opaque object cannot have its fields inspected, but can be reserialized for retransmission to another event handler.
  • CHANGED: If opaque objects are disabled and an input request has an unknown format, HttpBinding#decode_rack_env now raises UnsupportedFormatError instead of HttpContentError. (The old exception name is aliased to the new name for backward compatibility, but is deprecated and will be removed in version 1.0.)
  • CHANGED: If format-driven parsing fails, HttpBinding#decode_rack_env will raise FormatSyntaxError instead of, for example, a JSON-specific error. The lower-level parser error can still be accessed as the "cause".
  • CHANGED: Consolidated HttpBinding encoding entrypoints into one HttpBinding#encode_event call. The older encode_structured_content, encode_batched_content, and encode_binary_content calls are now deprecated.
  • FIXED: JsonFormat now sets the datacontenttype attribute explicitly to "application/json" if it isn't otherwise set.

cloud_events 0.4.0

26 May 21:37
e518565
Compare
Choose a tag to compare

v0.4.0 / 2021-05-26

  • ADDED: ContentType can take an optional default charset
  • FIXED: Binary HTTP format parses quoted tokens according to RFC 7230 section 3.2.6
  • FIXED: When encoding structured events for HTTP transport, the content-type now includes the charset

cloud_events 0.3.1

25 Apr 00:44
14d2ffa
Compare
Choose a tag to compare

v0.3.1 / 2021-04-25

  • FIXED: Fixed exception when decoding from a rack source that uses InputWrapper
  • FIXED: Fixed equality checking for V0 events

cloud_events 0.3.0

02 Mar 21:19
77b7380
Compare
Choose a tag to compare

v0.3.0 / 2021-03-02

  • ADDED: Require Ruby 2.5 or later
  • FIXED: Deep-duplicated event attributes in to_h to avoid returning frozen objects

cloud_events 0.2.0

25 Jan 21:11
2855c15
Compare
Choose a tag to compare

v0.2.0 / 2021-01-25

  • ADDED: Freeze event objects to make them Ractor-shareable
  • DOCS: Fix formatting of Apache license

cloud_events 0.1.2

02 Sep 03:06
57206ff
Compare
Choose a tag to compare

v0.1.2 / 2020-09-02

  • Fix: Convert extension attributes to strings, and ignore nils
  • Documentation: Add code of conduct link to readme