diff --git a/.gitignore b/.gitignore index c26f755..d1ee9ea 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ doc/ pkg/ tmp/ features/conformance +vendor/ diff --git a/lib/cloud_events/content_type.rb b/lib/cloud_events/content_type.rb index 6e20736..1faa42b 100644 --- a/lib/cloud_events/content_type.rb +++ b/lib/cloud_events/content_type.rb @@ -131,7 +131,7 @@ def parse(str) @subtype_base, @subtype_format = @subtype.split("+", 2) until str.empty? str = consume_special(str, ";") - name, str = consume_token(str, downcase: true, error_message: "Faled to parse attribute name") + name, str = consume_token(str, downcase: true, error_message: "Failed to parse attribute name") str = consume_special(str, "=", error_message: "Failed to find value for attribute #{name}") val, str = consume_token_or_quoted(str, error_message: "Failed to parse value for attribute #{name}") @params << [name, val] diff --git a/lib/cloud_events/event/opaque.rb b/lib/cloud_events/event/opaque.rb index aa05bfe..0d02413 100644 --- a/lib/cloud_events/event/opaque.rb +++ b/lib/cloud_events/event/opaque.rb @@ -8,7 +8,7 @@ module Event # single event or a batch of events. # # The event data is retained in a form that can be reserialized (in a - # structured cotent mode in the same format) but cannot otherwise be + # structured content mode in the same format) but cannot otherwise be # inspected. # # This object is immutable, and Ractor-shareable on Ruby 3. diff --git a/lib/cloud_events/format.rb b/lib/cloud_events/format.rb index b1b7dc5..f406efe 100644 --- a/lib/cloud_events/format.rb +++ b/lib/cloud_events/format.rb @@ -30,7 +30,7 @@ module CloudEvents # # Both the keyword arguments recognized and the returned hash members may # vary from formatter to formatter; similarly, the keyword arguments provided - # and the resturned hash members recognized may also vary for different + # and the returned hash members recognized may also vary for different # callers. This interface will define a set of common argument and result key # names, but both callers and formatters must gracefully handle the case of # missing or extra information. For example, if a formatter expects a certain diff --git a/lib/cloud_events/text_format.rb b/lib/cloud_events/text_format.rb index 889e229..0e1ab09 100644 --- a/lib/cloud_events/text_format.rb +++ b/lib/cloud_events/text_format.rb @@ -37,7 +37,7 @@ def decode_data(content: nil, content_type: nil, **_other_kwargs) end ## - # Trivially an event data object using text format. + # Trivially encode an event data object using text format. # See {CloudEvents::Format#encode_data} for a general description. # # Expects `:data` and `:content_type` arguments, and will decline the diff --git a/test/test_content_type.rb b/test/test_content_type.rb index 73c35ec..f08066a 100644 --- a/test/test_content_type.rb +++ b/test/test_content_type.rb @@ -41,7 +41,7 @@ assert Ractor.shareable?(content_type) if defined? Ractor end - it "recognizes charseet param" do + it "recognizes charset param" do content_type = CloudEvents::ContentType.new("application/json; charset=utf-8") assert_equal [["charset", "utf-8"]], content_type.params assert_equal "utf-8", content_type.charset