Skip to content

Commit 9d3506a

Browse files
authored
docs: Fixed a few typos in documentation and error messages (#103)
1 parent c21a47b commit 9d3506a

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ doc/
77
pkg/
88
tmp/
99
features/conformance
10+
vendor/

lib/cloud_events/content_type.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def parse(str)
131131
@subtype_base, @subtype_format = @subtype.split("+", 2)
132132
until str.empty?
133133
str = consume_special(str, ";")
134-
name, str = consume_token(str, downcase: true, error_message: "Faled to parse attribute name")
134+
name, str = consume_token(str, downcase: true, error_message: "Failed to parse attribute name")
135135
str = consume_special(str, "=", error_message: "Failed to find value for attribute #{name}")
136136
val, str = consume_token_or_quoted(str, error_message: "Failed to parse value for attribute #{name}")
137137
@params << [name, val]

lib/cloud_events/event/opaque.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Event
88
# single event or a batch of events.
99
#
1010
# The event data is retained in a form that can be reserialized (in a
11-
# structured cotent mode in the same format) but cannot otherwise be
11+
# structured content mode in the same format) but cannot otherwise be
1212
# inspected.
1313
#
1414
# This object is immutable, and Ractor-shareable on Ruby 3.

lib/cloud_events/format.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module CloudEvents
3030
#
3131
# Both the keyword arguments recognized and the returned hash members may
3232
# vary from formatter to formatter; similarly, the keyword arguments provided
33-
# and the resturned hash members recognized may also vary for different
33+
# and the returned hash members recognized may also vary for different
3434
# callers. This interface will define a set of common argument and result key
3535
# names, but both callers and formatters must gracefully handle the case of
3636
# missing or extra information. For example, if a formatter expects a certain

lib/cloud_events/text_format.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def decode_data(content: nil, content_type: nil, **_other_kwargs)
3737
end
3838

3939
##
40-
# Trivially an event data object using text format.
40+
# Trivially encode an event data object using text format.
4141
# See {CloudEvents::Format#encode_data} for a general description.
4242
#
4343
# Expects `:data` and `:content_type` arguments, and will decline the

test/test_content_type.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
assert Ractor.shareable?(content_type) if defined? Ractor
4242
end
4343

44-
it "recognizes charseet param" do
44+
it "recognizes charset param" do
4545
content_type = CloudEvents::ContentType.new("application/json; charset=utf-8")
4646
assert_equal [["charset", "utf-8"]], content_type.params
4747
assert_equal "utf-8", content_type.charset

0 commit comments

Comments
 (0)