blather 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/lib/blather/stanza/presence/muc.rb +12 -6
- data/lib/blather/version.rb +1 -1
- data/spec/blather/stanza/presence/muc_spec.rb +14 -0
- metadata +30 -30
data/CHANGELOG
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
develop
|
2
2
|
|
3
|
+
v0.6.1
|
4
|
+
Bugfix(benlangfeld): Ensure MUC presence nodes (joining) have a form element on creation
|
5
|
+
|
3
6
|
v0.6.0
|
4
7
|
Feature(benlangfeld): Very basic MUC and delayed message support
|
5
8
|
Bugfix(theozaurus): Disable connection timeout timer if client deliberately disconnects
|
@@ -5,13 +5,19 @@ class Presence
|
|
5
5
|
class MUC < Status
|
6
6
|
register :muc_join, :x, "http://jabber.org/protocol/muc"
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
def self.new(*args)
|
9
|
+
new_node = super
|
10
|
+
new_node.muc
|
11
|
+
new_node
|
12
|
+
end
|
13
|
+
|
14
|
+
def muc
|
15
|
+
unless muc = find_first('ns:x', :ns => self.class.registered_ns)
|
16
|
+
self << (muc = XMPPNode.new('x', self.document))
|
17
|
+
muc.namespace = self.class.registered_ns
|
14
18
|
end
|
19
|
+
muc
|
20
|
+
end
|
15
21
|
end # MUC
|
16
22
|
|
17
23
|
end # Presence
|
data/lib/blather/version.rb
CHANGED
@@ -18,4 +18,18 @@ describe 'Blather::Stanza::Presence::MUC' do
|
|
18
18
|
it 'must be importable' do
|
19
19
|
c = Blather::XMPPNode.import(parse_stanza(muc_xml).root).must_be_instance_of Blather::Stanza::Presence::MUC
|
20
20
|
end
|
21
|
+
|
22
|
+
it 'ensures a form node is present on create' do
|
23
|
+
c = Blather::Stanza::Presence::MUC.new
|
24
|
+
c.xpath('ns:x', :ns => Blather::Stanza::Presence::MUC.registered_ns).wont_be_empty
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'ensures a form node exists when calling #muc' do
|
28
|
+
c = Blather::Stanza::Presence::MUC.new
|
29
|
+
c.remove_children :x
|
30
|
+
c.xpath('ns:x', :ns => Blather::Stanza::Presence::MUC.registered_ns).must_be_empty
|
31
|
+
|
32
|
+
c.muc.wont_be_nil
|
33
|
+
c.xpath('ns:x', :ns => Blather::Stanza::Presence::MUC.registered_ns).wont_be_empty
|
34
|
+
end
|
21
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
16
|
-
requirement: &
|
16
|
+
requirement: &2164385480 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.12.6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2164385480
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: nokogiri
|
27
|
-
requirement: &
|
27
|
+
requirement: &2164384740 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.4.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2164384740
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: niceogiri
|
38
|
-
requirement: &
|
38
|
+
requirement: &2164384120 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 0.1.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2164384120
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: activesupport
|
49
|
-
requirement: &
|
49
|
+
requirement: &2164383500 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 3.0.7
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2164383500
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: minitest
|
60
|
-
requirement: &
|
60
|
+
requirement: &2164382640 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.7.1
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2164382640
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mocha
|
71
|
-
requirement: &
|
71
|
+
requirement: &2164381420 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.9.12
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2164381420
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: bundler
|
82
|
-
requirement: &
|
82
|
+
requirement: &2164380680 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 1.0.0
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2164380680
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rcov
|
93
|
-
requirement: &
|
93
|
+
requirement: &2164379680 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 0.9.9
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2164379680
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: yard
|
104
|
-
requirement: &
|
104
|
+
requirement: &2164378720 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: 0.6.1
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *2164378720
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: rake
|
115
|
-
requirement: &
|
115
|
+
requirement: &2164378200 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *2164378200
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: guard-minitest
|
126
|
-
requirement: &
|
126
|
+
requirement: &2164377560 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *2164377560
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: bluecloth
|
137
|
-
requirement: &
|
137
|
+
requirement: &2164376360 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,10 +142,10 @@ dependencies:
|
|
142
142
|
version: '0'
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *2164376360
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: growl_notify
|
148
|
-
requirement: &
|
148
|
+
requirement: &2164373280 !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
151
151
|
- - ! '>='
|
@@ -153,10 +153,10 @@ dependencies:
|
|
153
153
|
version: '0'
|
154
154
|
type: :development
|
155
155
|
prerelease: false
|
156
|
-
version_requirements: *
|
156
|
+
version_requirements: *2164373280
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: rb-fsevent
|
159
|
-
requirement: &
|
159
|
+
requirement: &2164372620 !ruby/object:Gem::Requirement
|
160
160
|
none: false
|
161
161
|
requirements:
|
162
162
|
- - ! '>='
|
@@ -164,7 +164,7 @@ dependencies:
|
|
164
164
|
version: '0'
|
165
165
|
type: :development
|
166
166
|
prerelease: false
|
167
|
-
version_requirements: *
|
167
|
+
version_requirements: *2164372620
|
168
168
|
description: An XMPP DSL for Ruby written on top of EventMachine and Nokogiri
|
169
169
|
email: sprsquish@gmail.com
|
170
170
|
executables: []
|