jabber4r 0.8.0
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.
- data/CHANGES +8 -0
- data/LICENSE.txt +12 -0
- data/README +180 -0
- data/Rakefile.rb +143 -0
- data/lib/jabber4r/jabber4r.rb +22 -0
- data/lib/jabber4r/jid.rb +93 -0
- data/lib/jabber4r/protocol.rb +1384 -0
- data/lib/jabber4r/rexml_1.8_patch.rb +16 -0
- data/lib/jabber4r/roster.rb +322 -0
- data/lib/jabber4r/session.rb +615 -0
- data/lib/jabber4r/vcard.rb +42 -0
- metadata +55 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
# License: see LICENSE.txt
|
2
|
+
# Jabber4R - Jabber Instant Messaging Library for Ruby
|
3
|
+
# Copyright (C) 2002 Rich Kilmer <rich@infoether.com>
|
4
|
+
#
|
5
|
+
|
6
|
+
|
7
|
+
module Jabber
|
8
|
+
|
9
|
+
##
|
10
|
+
# The VCard class holds the parsed VCard data from the Jabber service.
|
11
|
+
#
|
12
|
+
class VCard
|
13
|
+
attr_accessor :given, :family, :middle, :nickname, :email
|
14
|
+
|
15
|
+
##
|
16
|
+
# Factory to create the VCard from the ParsedXMLElement
|
17
|
+
#
|
18
|
+
# je:: [ParsedXMLElement] The VCard as an xml element.
|
19
|
+
# return:: [Jabber::VCard] The newly created VCard.
|
20
|
+
#
|
21
|
+
def VCard.from_element(je)
|
22
|
+
card = VCard.new
|
23
|
+
return card unless je
|
24
|
+
card.given = je.N.GIVEN.element_data
|
25
|
+
card.family = je.N.FAMILY.element_data
|
26
|
+
card.middle = je.N.MIDDLE.element_data
|
27
|
+
card.email = je.EMAIL.element_data
|
28
|
+
card.nickname = je.NICKNAME.element_data
|
29
|
+
return card
|
30
|
+
end
|
31
|
+
|
32
|
+
##
|
33
|
+
# Dumps the attributes of the VCard
|
34
|
+
#
|
35
|
+
# return:: [String] The VCard as a string.
|
36
|
#
|
37
|
+
def to_s
|
38
|
+
"VCARD: [first=#{@given} last=#{@family} nick=#{@nickname} email=#{@email}]"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
metadata
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.8.10
|
3
|
+
specification_version: 1
|
4
|
+
name: jabber4r
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 0.8.0
|
7
|
+
date: 2005-08-14
|
8
|
+
summary: Jabber4r is a pure-Ruby Jabber client library
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
email: rich@infoether.com
|
12
|
+
homepage: http://jabber4r.rubyforge.org
|
13
|
+
rubyforge_project: jabber4r
|
14
|
+
description: "The purpose of this library is to allow Ruby applications to talk to a Jabber
|
15
|
+
IM system. Jabber is an open-source instant messaging service, which can be
|
16
|
+
learned about at http://www.jabber.org"
|
17
|
+
autorequire:
|
18
|
+
default_executable:
|
19
|
+
bindir: bin
|
20
|
+
has_rdoc: true
|
21
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
22
|
+
requirements:
|
23
|
+
-
|
24
|
+
- ">"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.0.0
|
27
|
+
version:
|
28
|
+
platform: ruby
|
29
|
+
authors:
|
30
|
+
- Richard Kilmer
|
31
|
+
files:
|
32
|
+
- CHANGES
|
33
|
+
- LICENSE.txt
|
34
|
+
- Rakefile.rb
|
35
|
+
- README
|
36
|
+
- lib/jabber4r/jabber4r.rb
|
37
|
+
- lib/jabber4r/jid.rb
|
38
|
+
- lib/jabber4r/protocol.rb
|
39
|
+
- lib/jabber4r/rexml_1.8_patch.rb
|
40
|
+
- lib/jabber4r/roster.rb
|
41
|
+
- lib/jabber4r/session.rb
|
42
|
+
- lib/jabber4r/vcard.rb
|
43
|
+
test_files: []
|
44
|
+
rdoc_options:
|
45
|
+
- "--title"
|
46
|
+
- Jabber4r
|
47
|
+
- "--main"
|
48
|
+
- README
|
49
|
+
- "--line-numbers"
|
50
|
+
extra_rdoc_files:
|
51
|
+
- README
|
52
|
+
executables: []
|
53
|
+
extensions: []
|
54
|
+
requirements: []
|
55
|
+
dependencies: []
|