cloudevents / sdk-ruby Goto Github PK
View Code? Open in Web Editor NEWRuby SDK for CloudEvents
License: Apache License 2.0
Ruby SDK for CloudEvents
License: Apache License 2.0
When extra attributes are added to the CloudEvent, they are not being checked for compliance.
The spec says:
CloudEvents attribute names MUST consist of lower-case letters ('a' to 'z') or digits ('0' to '9') from the ASCII character set. Attribute names SHOULD be descriptive and terse and SHOULD NOT exceed 20 characters in length.
But currently anything can be added and it is accepted. It should throw an AttributeException as listed in the errors.rb
file.
This SDK appears to have stalled at 0.7, do you need some help?
๐ https://github.com/cloudevents/spec/blob/main/cloudevents/bindings/kafka-protocol-binding.md contains a few intricacies which differ from the http specification, making the existing bindings this sdk supports unsuitable for kafka transport. Currently our org extends the http binding and transforms attributes to fit the above specification, however we would be interested in contributing back a specific kafka binding to standardise on approaches. Would you be open to such contribution?
I try to import ruby cloudevent sdk into my project, and I have already installed sinatra and cloudevents using gem, but unfortunately, it reports require error as following:
/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- cloudevents (LoadError) from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
require'
from rubydownserver.rb:10:in `
the installed package is under following
root@xxx05422:~/mytest# gem list --local
*** LOCAL GEMS ***
bigdecimal (1.2.8)
bundle (0.0.1)
bundler (1.11.2)
cloudevents (0.0.0)
did_you_mean (1.0.0)
httpclient (2.8.3)
io-console (0.4.5)
json (1.8.3)
minitest (5.11.3, 5.8.4)
molinillo (0.4.3)
mustermann (1.0.3)
net-http-persistent (2.9.4)
net-telnet (0.1.1)
power_assert (0.2.7)
psych (2.0.17)
rack (2.0.6)
rack-protection (2.0.5)
rake (12.3.2, 10.5.0)
rdoc (4.2.1)
rubyzip (1.2.2)
sinatra (2.0.5)
soap4r (1.5.8)
test-unit (3.1.7)
thor (0.19.1)
tilt (2.0.9)
zip-zip (0.3)
A list of the items to remove:
HttpContentError
HttpBinding#decode_rack_env
HttpBinding#encode_structured_content
HttpBinding#encode_batched_content
HttpBinding#encode_binary_content
:attributes
keyword argument for V0 and V1 event classesdeprecated_name
positional argument for HttpBinding#register_formatter
When calling to_h
on an event, if the data
attribute contains a nested hash, the nested hashes will remain frozen. To fix this we can use Marshal.load(Marshal.dump(@attributes))
instead of @attributes.dup
. Alternatively, we could clone deep_dup
from Rails, though it does miss some edge cases.
I have a PR prepared if you would like me to submit it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.