cloud_events 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e92a0db6d57da2784f958e81f3416ade3c4c6c1e5e7830571be444c84a1001a0
4
- data.tar.gz: e48bad4cf6cf8797c6f5a16817f6951a1c3b2138778fa2e6779b58fd49f28f21
3
+ metadata.gz: 5e5bb2b1e01aef9e34dca014ee2be62da7b2abaea1337c3db3f51c4dc9b6b790
4
+ data.tar.gz: 1c439ec71a81da471e67ebcc9de437b34be067c18a293790f0f9a098b3f0862b
5
5
  SHA512:
6
- metadata.gz: 4429473d95e6150514f796a907f74a96741ab9378e2c833ed6945fbe4f5d85fe654d0bb6502960900c349721b167f90fc62994a2525a3fd372bc7ea9468c66f6
7
- data.tar.gz: 91f22bf6c0b20357326166d896e0036dd90ae32f66b7c233a63cb3e060abac51827b2a9d560f6324830db2b5240e436d0f942c99a41bf8a1c711a48fe6af8d80
6
+ metadata.gz: 69a9b60f9d6d2a10ca5b22bbe171eba142d1864e90eed97bc8db8318d54070a64f916093ba92674eb08076e113f421584249bf114a6293f61c864ec48576e97a
7
+ data.tar.gz: ff8ac3a95310bbd915ee96efdb767575b4f094ae01a4b2e136a2e52e407b2c1c62d31e8dc4216c12ccb1267dec279a596eaeba7e16927d7a0768758e356817e7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ### v0.8.1 / 2025-11-10
4
+
5
+ * DOCS: Some minor updates and corrections to the README and examples
6
+
3
7
  ### v0.8.0 / 2025-11-04
4
8
 
5
9
  * BREAKING CHANGE: Raise AttributeError if an illegal attribute name is used
data/README.md CHANGED
@@ -13,11 +13,11 @@ Features:
13
13
  JSON Batch Format.
14
14
  * Support for sending and receiving CloudEvents via HTTP Bindings.
15
15
  * Supports the [CloudEvent 0.3](https://github.com/cloudevents/spec/tree/v0.3)
16
- and [CloudEvents 1.0](https://github.com/cloudevents/spec/tree/v1.0.1)
16
+ and [CloudEvents 1.0](https://github.com/cloudevents/spec/tree/v1.0.2)
17
17
  specifications.
18
18
  * Extensible to additional formats and protocol bindings, and future
19
19
  specification versions.
20
- * Compatible with Ruby 2.5 or later, or JRuby 9.2.x or later. No runtime gem
20
+ * Compatible with Ruby 2.7 or later, or JRuby 9.2.x or later. No runtime gem
21
21
  dependencies.
22
22
 
23
23
  ## Quickstart
@@ -35,8 +35,10 @@ A simple [Sinatra](https://sinatrarb.com) app that receives CloudEvents:
35
35
  ```ruby
36
36
  # examples/server/Gemfile
37
37
  source "https://rubygems.org"
38
- gem "cloud_events", "~> 0.6"
39
- gem "sinatra", "~> 2.0"
38
+ gem "cloud_events", "~> 0.8"
39
+ gem "sinatra", "~> 4.0"
40
+ gem "rackup"
41
+ gem "puma"
40
42
  ```
41
43
 
42
44
  ```ruby
@@ -46,9 +48,9 @@ require "cloud_events"
46
48
 
47
49
  cloud_events_http = CloudEvents::HttpBinding.default
48
50
 
49
- post "/" do
50
- event = cloud_events_http.decode_event request.env
51
- logger.info "Received CloudEvent: #{event.to_h}"
51
+ post("/") do
52
+ event = cloud_events_http.decode_event(request.env)
53
+ logger.info("Received CloudEvent: #{event.to_h}")
52
54
  end
53
55
  ```
54
56
 
@@ -59,7 +61,7 @@ A simple Ruby script that sends a CloudEvent:
59
61
  ```ruby
60
62
  # examples/client/Gemfile
61
63
  source "https://rubygems.org"
62
- gem "cloud_events", "~> 0.6"
64
+ gem "cloud_events", "~> 0.8"
63
65
  ```
64
66
 
65
67
  ```ruby
@@ -69,17 +71,18 @@ require "net/http"
69
71
  require "uri"
70
72
 
71
73
  data = { message: "Hello, CloudEvents!" }
72
- event = CloudEvents::Event.create \
74
+ event = CloudEvents::Event.create(
73
75
  spec_version: "1.0",
74
76
  id: "1234-1234-1234",
75
77
  source: "/mycontext",
76
78
  type: "com.example.someevent",
77
79
  data_content_type: "application/json",
78
80
  data: data
81
+ )
79
82
 
80
83
  cloud_events_http = CloudEvents::HttpBinding.default
81
- headers, body = cloud_events_http.encode_event event
82
- Net::HTTP.post URI("http://localhost:4567"), body, headers
84
+ headers, body = cloud_events_http.encode_event(event)
85
+ Net::HTTP.post(URI("http://localhost:4567"), body, headers)
83
86
  ```
84
87
 
85
88
  ### Putting it together
@@ -108,7 +111,8 @@ Hit `CTRL+C` to stop the server.
108
111
 
109
112
  ## Contributing
110
113
 
111
- Bug reports and pull requests are welcome on GitHub at https://github.com/cloudevents/sdk-ruby.
114
+ Bug reports and pull requests are welcome on GitHub at
115
+ https://github.com/cloudevents/sdk-ruby.
112
116
 
113
117
  ### Development
114
118
 
@@ -145,11 +149,15 @@ toys test --help
145
149
 
146
150
  ### Code style
147
151
 
148
- Ruby code in this library generally follows the
149
- [Google Ruby Style Guide](https://github.com/googleapis/ruby-style), which is
150
- based on "Seattle Style" Ruby.
152
+ Ruby code style is enforced by Rubocop rules. We've left the configuration
153
+ largely on the Rubocop defaults, with a few exceptions, notably:
151
154
 
152
- Style is enforced by Rubocop rules. You can run rubocop directly using the
155
+ * We prefer double-quoted strings rather than single-quoted strings.
156
+ * We prefer trailing commas in multi-line array and hash literals.
157
+ * Line length limit is 120
158
+ * We've loosened a few additional checks that we felt were not helpful.
159
+
160
+ You can run rubocop directly using the
153
161
  `rubocop` binary:
154
162
 
155
163
  ```sh
data/RELEASING.md CHANGED
@@ -22,4 +22,3 @@ locally. See `toys release request --help` and `toys release perform --help`
22
22
  for more information.
23
23
 
24
24
  If a release fails, you may need to delete the release tag before retrying.
25
-
@@ -5,5 +5,5 @@ module CloudEvents
5
5
  # Version of the Ruby CloudEvents SDK
6
6
  # @return [String]
7
7
  #
8
- VERSION = "0.8.0"
8
+ VERSION = "0.8.1"
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud_events
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
@@ -42,10 +42,10 @@ homepage: https://github.com/cloudevents/sdk-ruby
42
42
  licenses:
43
43
  - Apache-2.0
44
44
  metadata:
45
- changelog_uri: https://cloudevents.github.io/sdk-ruby/v0.8.0/file.CHANGELOG.html
45
+ changelog_uri: https://cloudevents.github.io/sdk-ruby/v0.8.1/file.CHANGELOG.html
46
46
  source_code_uri: https://github.com/cloudevents/sdk-ruby
47
47
  bug_tracker_uri: https://github.com/cloudevents/sdk-ruby/issues
48
- documentation_uri: https://cloudevents.github.io/sdk-ruby/v0.8.0
48
+ documentation_uri: https://cloudevents.github.io/sdk-ruby/v0.8.1
49
49
  rdoc_options: []
50
50
  require_paths:
51
51
  - lib