diff --git a/shard.yml b/shard.yml index 2ab70a9..5e48221 100644 --- a/shard.yml +++ b/shard.yml @@ -1,11 +1,11 @@ name: cr-xmpp -version: 0.1.0 +version: 0.1.1 description: | XMPP/Jabber Library for Crystal focusing on simplicity, simple automation, and IoT. authors: - Ali Naqvi -crystal: 0.30.1 +crystal: 0.31.1 license: MIT diff --git a/src/xmpp/stanza/component.cr b/src/xmpp/stanza/component.cr index 691a40a..e49d09d 100644 --- a/src/xmpp/stanza/component.cr +++ b/src/xmpp/stanza/component.cr @@ -30,7 +30,7 @@ module XMPP::Stanza end end - def name + def name : String "component:handshake" end end @@ -73,7 +73,7 @@ module XMPP::Stanza end end - def namespace + def namespace : String xml_name.space end diff --git a/src/xmpp/stanza/message/chat_markers.cr b/src/xmpp/stanza/message/chat_markers.cr index b22f1ec..43c7429 100644 --- a/src/xmpp/stanza/message/chat_markers.cr +++ b/src/xmpp/stanza/message/chat_markers.cr @@ -21,7 +21,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) end - def name + def name : String @@xml_name.local end end diff --git a/src/xmpp/stanza/message/chat_state.cr b/src/xmpp/stanza/message/chat_state.cr index 5417f32..5ff0a27 100644 --- a/src/xmpp/stanza/message/chat_state.cr +++ b/src/xmpp/stanza/message/chat_state.cr @@ -21,7 +21,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) end - def name + def name : String @@xml_name.local end end @@ -41,7 +41,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) end - def name + def name : String @@xml_name.local end end @@ -61,7 +61,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) end - def name + def name : String @@xml_name.local end end @@ -81,7 +81,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) end - def name + def name : String @@xml_name.local end end @@ -101,7 +101,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) end - def name + def name : String @@xml_name.local end end diff --git a/src/xmpp/stanza/message/hints.cr b/src/xmpp/stanza/message/hints.cr index 049c0cb..7791066 100644 --- a/src/xmpp/stanza/message/hints.cr +++ b/src/xmpp/stanza/message/hints.cr @@ -22,7 +22,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) end - def name + def name : String @@xml_name.local end end @@ -42,7 +42,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) end - def name + def name : String @@xml_name.local end end @@ -62,7 +62,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) end - def name + def name : String @@xml_name.local end end @@ -82,7 +82,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) end - def name + def name : String @@xml_name.local end end diff --git a/src/xmpp/stanza/message/receipts.cr b/src/xmpp/stanza/message/receipts.cr index 31ad7a3..9b79e29 100644 --- a/src/xmpp/stanza/message/receipts.cr +++ b/src/xmpp/stanza/message/receipts.cr @@ -23,7 +23,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) end - def name + def name : String @@xml_name.local end end @@ -51,7 +51,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, dict) end - def name + def name : String @@xml_name.local end end diff --git a/src/xmpp/stanza/packet.cr b/src/xmpp/stanza/packet.cr index 6297f56..52b70b1 100644 --- a/src/xmpp/stanza/packet.cr +++ b/src/xmpp/stanza/packet.cr @@ -7,9 +7,9 @@ module XMPP::Stanza module Packet abstract def name : String - abstract def to_xml(xml : XML::Builder) : String + abstract def to_xml(xml : XML::Builder) - def to_xml + def to_xml : String val = XML.build(indent: " ", quote_char: '"') do |xml| to_xml xml end diff --git a/src/xmpp/stanza/sasl_auth.cr b/src/xmpp/stanza/sasl_auth.cr index 82d9c45..7efc74a 100644 --- a/src/xmpp/stanza/sasl_auth.cr +++ b/src/xmpp/stanza/sasl_auth.cr @@ -35,7 +35,7 @@ module XMPP::Stanza end end - def name + def name : String "sasl:auth" end end @@ -60,7 +60,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) { elem.text body } end - def name + def name : String "sasl:success" end end @@ -94,7 +94,7 @@ module XMPP::Stanza end end - def name + def name : String "sasl:failure" end end @@ -117,7 +117,7 @@ module XMPP::Stanza elem.element(@@xml_name.local, xmlns: @@xml_name.space) { elem.text body } end - def name + def name : String "sasl:challenge" end end @@ -143,7 +143,7 @@ module XMPP::Stanza end end - def name + def name : String "sasl:response" end end