jubjub 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.mdown +42 -6
- data/lib/jubjub/connection/xmpp_gateway/muc.rb +4 -20
- data/lib/jubjub/connection/xmpp_gateway/pubsub.rb +194 -13
- data/lib/jubjub/data_form.rb +30 -0
- data/lib/jubjub/muc.rb +4 -93
- data/lib/jubjub/muc/collection.rb +55 -0
- data/lib/jubjub/muc/configuration.rb +5 -0
- data/lib/jubjub/muc/muc.rb +37 -0
- data/lib/jubjub/pubsub.rb +8 -201
- data/lib/jubjub/pubsub/affiliation.rb +83 -0
- data/lib/jubjub/pubsub/affiliation_collection.rb +38 -0
- data/lib/jubjub/pubsub/collection.rb +68 -0
- data/lib/jubjub/pubsub/configuration.rb +5 -0
- data/lib/jubjub/pubsub/item.rb +35 -0
- data/lib/jubjub/pubsub/item_collection.rb +35 -0
- data/lib/jubjub/pubsub/pubsub.rb +66 -0
- data/lib/jubjub/pubsub/subscription.rb +24 -0
- data/lib/jubjub/user.rb +2 -2
- data/spec/connection/xmpp_gateway_muc_spec.rb +3 -3
- data/spec/connection/xmpp_gateway_pubsub_spec.rb +167 -11
- data/spec/fixtures/dataform_1.xml +65 -0
- data/spec/fixtures/vcr_cassettes/pubsub_default_configuration.yml +118 -0
- data/spec/fixtures/vcr_cassettes/pubsub_modify_affiliations.yml +275 -0
- data/spec/fixtures/vcr_cassettes/pubsub_purge.yml +68 -0
- data/spec/fixtures/vcr_cassettes/pubsub_retrieve_affiliations.yml +99 -0
- data/spec/mixins/user_spec.rb +8 -8
- data/spec/models/muc_collection_spec.rb +17 -12
- data/spec/models/muc_configuration_spec.rb +1 -1
- data/spec/models/pubsub_affiliation_collection_spec.rb +86 -0
- data/spec/models/pubsub_affiliation_spec.rb +244 -0
- data/spec/models/pubsub_collection_spec.rb +50 -18
- data/spec/models/pubsub_item_collection_spec.rb +12 -12
- data/spec/models/pubsub_item_spec.rb +9 -2
- data/spec/models/pubsub_spec.rb +27 -2
- data/spec/models/pubsub_subscription_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- data/spec/support/helpers.rb +7 -0
- data/spec/support/shared_examples.rb +30 -0
- metadata +46 -19
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Jubjub::
|
3
|
+
describe Jubjub::Pubsub::Collection do
|
4
4
|
|
5
5
|
describe "that are proxied like" do
|
6
6
|
|
@@ -15,8 +15,8 @@ describe Jubjub::PubsubCollection do
|
|
15
15
|
|
16
16
|
describe "inspect" do
|
17
17
|
|
18
|
-
it "should show the list of rooms, not
|
19
|
-
Jubjub::
|
18
|
+
it "should show the list of rooms, not Muc::Collection" do
|
19
|
+
Jubjub::Pubsub::Collection.new('pubsub.foo.com', @mock_connection).inspect.should eql(@nodes.inspect)
|
20
20
|
end
|
21
21
|
|
22
22
|
end
|
@@ -24,7 +24,7 @@ describe Jubjub::PubsubCollection do
|
|
24
24
|
describe "map" do
|
25
25
|
|
26
26
|
it "should pass the block to the rooms" do
|
27
|
-
c = Jubjub::
|
27
|
+
c = Jubjub::Pubsub::Collection.new('pubsub.foo.com', @mock_connection)
|
28
28
|
c.map{|r| r.node.to_s }.should eql(['node_1', 'node_2'])
|
29
29
|
end
|
30
30
|
|
@@ -36,7 +36,7 @@ describe Jubjub::PubsubCollection do
|
|
36
36
|
|
37
37
|
describe "jid" do
|
38
38
|
it "should return the jid" do
|
39
|
-
p = Jubjub::
|
39
|
+
p = Jubjub::Pubsub::Collection.new "pubsub.foo.com", mock
|
40
40
|
p.jid.should == Jubjub::Jid.new('pubsub.foo.com')
|
41
41
|
end
|
42
42
|
end
|
@@ -47,7 +47,7 @@ describe Jubjub::PubsubCollection do
|
|
47
47
|
@mock_connection.stub_chain :pubsub, :subscribe
|
48
48
|
@mock_connection.pubsub.should_receive(:subscribe).with( Jubjub::Jid.new( 'pubsub.foo.com' ), 'node' )
|
49
49
|
|
50
|
-
p = Jubjub::
|
50
|
+
p = Jubjub::Pubsub::Collection.new "pubsub.foo.com", @mock_connection
|
51
51
|
p.subscribe "node"
|
52
52
|
end
|
53
53
|
end
|
@@ -61,28 +61,41 @@ describe Jubjub::PubsubCollection do
|
|
61
61
|
it "without subid should call pubsub.unsubscribe on connection" do
|
62
62
|
@mock_connection.pubsub.should_receive(:unsubscribe).with( Jubjub::Jid.new( 'pubsub.foo.com' ), 'node', nil )
|
63
63
|
|
64
|
-
p = Jubjub::
|
64
|
+
p = Jubjub::Pubsub::Collection.new "pubsub.foo.com", @mock_connection
|
65
65
|
p.unsubscribe "node"
|
66
66
|
end
|
67
67
|
|
68
68
|
it "with subid should call pubsub.unsubscribe on connection" do
|
69
69
|
@mock_connection.pubsub.should_receive(:unsubscribe).with( Jubjub::Jid.new( 'pubsub.foo.com' ), 'node', '123' )
|
70
70
|
|
71
|
-
p = Jubjub::
|
71
|
+
p = Jubjub::Pubsub::Collection.new "pubsub.foo.com", @mock_connection
|
72
72
|
p.unsubscribe "node", "123"
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
76
|
describe "create" do
|
77
|
-
|
77
|
+
before do
|
78
78
|
@mock_connection = mock
|
79
|
-
@mock_connection.stub_chain :pubsub, :create
|
80
|
-
|
81
|
-
|
79
|
+
@mock_connection.stub_chain :pubsub, :create
|
80
|
+
end
|
81
|
+
|
82
|
+
it "should call pubsub.create on connection" do
|
83
|
+
@mock_connection.pubsub.should_receive(:create).with( Jubjub::Jid.new( 'pubsub.foo.com' ), 'node', nil )
|
82
84
|
|
83
|
-
p = Jubjub::
|
85
|
+
p = Jubjub::Pubsub::Collection.new "pubsub.foo.com", @mock_connection
|
84
86
|
p.create "node"
|
85
87
|
end
|
88
|
+
|
89
|
+
it "should yield a Pubsub::Configuration if a block is given" do
|
90
|
+
@config = Jubjub::Pubsub::Configuration.new( "foo" => { :type => "boolean", :value => "1", :label => "Foo" } )
|
91
|
+
|
92
|
+
@mock_connection.pubsub.should_receive( :default_configuration ).with( Jubjub::Jid.new( 'pubsub.foo.com' ) ).and_return( @config )
|
93
|
+
@mock_connection.pubsub.should_receive( :create ).with( Jubjub::Jid.new( 'pubsub.foo.com' ), 'node', @config )
|
94
|
+
|
95
|
+
Jubjub::Pubsub::Collection.new( "pubsub.foo.com", @mock_connection ).create( 'node' ){|config|
|
96
|
+
config.should == @config
|
97
|
+
}
|
98
|
+
end
|
86
99
|
end
|
87
100
|
|
88
101
|
describe "[]" do
|
@@ -95,7 +108,7 @@ describe Jubjub::PubsubCollection do
|
|
95
108
|
@mock_connection.stub_chain( :pubsub, :list ).and_return(@nodes)
|
96
109
|
end
|
97
110
|
|
98
|
-
subject { Jubjub::
|
111
|
+
subject { Jubjub::Pubsub::Collection.new "pubsub.foo.com", @mock_connection }
|
99
112
|
|
100
113
|
it "should work like a normal array when passed a Fixnum" do
|
101
114
|
subject[1].should == @nodes[1]
|
@@ -105,8 +118,8 @@ describe Jubjub::PubsubCollection do
|
|
105
118
|
subject["node_1"].should == @nodes[0]
|
106
119
|
end
|
107
120
|
|
108
|
-
it "should return
|
109
|
-
subject['made-up'].should
|
121
|
+
it "should return Jubjub::Pubsub item if nothing found as it may still exist" do
|
122
|
+
subject['made-up'].should == Jubjub::Pubsub.new( 'pubsub.foo.com', 'made-up', @mock_connection )
|
110
123
|
end
|
111
124
|
end
|
112
125
|
|
@@ -123,7 +136,7 @@ describe Jubjub::PubsubCollection do
|
|
123
136
|
'node_2'
|
124
137
|
)
|
125
138
|
|
126
|
-
p = Jubjub::
|
139
|
+
p = Jubjub::Pubsub::Collection.new "pubsub.foo.com", @mock_connection
|
127
140
|
p.destroy "node", "pubsub.new.com", "node_2"
|
128
141
|
end
|
129
142
|
|
@@ -138,11 +151,30 @@ describe Jubjub::PubsubCollection do
|
|
138
151
|
nil
|
139
152
|
)
|
140
153
|
|
141
|
-
p = Jubjub::
|
154
|
+
p = Jubjub::Pubsub::Collection.new "pubsub.foo.com", @mock_connection
|
142
155
|
p.destroy "node"
|
143
156
|
end
|
144
157
|
end
|
145
158
|
|
159
|
+
describe "purge" do
|
160
|
+
|
161
|
+
before do
|
162
|
+
@mock_connection = mock
|
163
|
+
@mock_connection.stub_chain :pubsub, :purge
|
164
|
+
end
|
165
|
+
|
166
|
+
it "should call pubsub.purge on connection" do
|
167
|
+
@mock_connection.pubsub.should_receive(:purge).with(
|
168
|
+
Jubjub::Jid.new('pubsub.foo.com'),
|
169
|
+
'node'
|
170
|
+
)
|
171
|
+
|
172
|
+
m = Jubjub::Pubsub::Collection.new 'pubsub.foo.com', @mock_connection
|
173
|
+
m.purge('node')
|
174
|
+
end
|
175
|
+
|
176
|
+
end
|
177
|
+
|
146
178
|
end
|
147
179
|
|
148
180
|
end
|
@@ -1,30 +1,30 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Jubjub::
|
3
|
+
describe Jubjub::Pubsub::ItemCollection do
|
4
4
|
|
5
5
|
describe "that are proxied like" do
|
6
6
|
|
7
7
|
before do
|
8
8
|
@mock_connection = mock
|
9
9
|
@items = [
|
10
|
-
Jubjub::
|
11
|
-
Jubjub::
|
10
|
+
Jubjub::Pubsub::Item.new('pubsub.foo.com', 'node_1', 'abc', '<foo></foo>', @mock_connection),
|
11
|
+
Jubjub::Pubsub::Item.new('pubsub.foo.com', 'node_1', 'efg', '<bar></bar>', @mock_connection)
|
12
12
|
]
|
13
13
|
@mock_connection.stub_chain( :pubsub, :retrieve_items ).and_return(@items)
|
14
14
|
end
|
15
15
|
|
16
16
|
describe "inspect" do
|
17
17
|
|
18
|
-
it "should show the list of
|
19
|
-
Jubjub::
|
18
|
+
it "should show the list of items, not Pubsub::ItemCollection" do
|
19
|
+
Jubjub::Pubsub::ItemCollection.new('pubsub.foo.com', 'node_1', @mock_connection).inspect.should eql(@items.inspect)
|
20
20
|
end
|
21
21
|
|
22
22
|
end
|
23
23
|
|
24
24
|
describe "map" do
|
25
25
|
|
26
|
-
it "should pass the block to the
|
27
|
-
c = Jubjub::
|
26
|
+
it "should pass the block to the items" do
|
27
|
+
c = Jubjub::Pubsub::ItemCollection.new('pubsub.foo.com', 'node_1', @mock_connection)
|
28
28
|
c.map{|r| r.data.to_s }.should eql(['<foo></foo>', '<bar></bar>'])
|
29
29
|
end
|
30
30
|
|
@@ -36,13 +36,13 @@ describe Jubjub::PubsubItemCollection do
|
|
36
36
|
|
37
37
|
describe "jid" do
|
38
38
|
it "should return the jid" do
|
39
|
-
Jubjub::
|
39
|
+
Jubjub::Pubsub::ItemCollection.new("pubsub.foo.com", "node", mock).jid.should == Jubjub::Jid.new("pubsub.foo.com")
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
43
|
describe "node" do
|
44
44
|
it "should return the node" do
|
45
|
-
Jubjub::
|
45
|
+
Jubjub::Pubsub::ItemCollection.new("pubsub.foo.com", "node", mock).node.should == 'node'
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
@@ -50,13 +50,13 @@ describe Jubjub::PubsubItemCollection do
|
|
50
50
|
before do
|
51
51
|
@mock_connection = mock
|
52
52
|
@nodes = [
|
53
|
-
Jubjub::
|
54
|
-
Jubjub::
|
53
|
+
Jubjub::Pubsub::Item.new('pubsub.foo.com', 'node_1', 'abc', '<foo></foo>', @mock_connection),
|
54
|
+
Jubjub::Pubsub::Item.new('pubsub.foo.com', 'node_1', 'efg', '<bar></bar>', @mock_connection)
|
55
55
|
]
|
56
56
|
@mock_connection.stub_chain( :pubsub, :retrieve_items ).and_return(@nodes)
|
57
57
|
end
|
58
58
|
|
59
|
-
subject { Jubjub::
|
59
|
+
subject { Jubjub::Pubsub::ItemCollection.new "pubsub.foo.com", "node_1", @mock_connection }
|
60
60
|
|
61
61
|
it "should work like a normal array when passed a Fixnum" do
|
62
62
|
subject[1].should == @nodes[1]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Jubjub::
|
3
|
+
describe Jubjub::Pubsub::Item do
|
4
4
|
|
5
5
|
def pubsub_item_factory(override = {})
|
6
6
|
options = {
|
@@ -11,7 +11,7 @@ describe Jubjub::PubsubItem do
|
|
11
11
|
:connection => "SHHHH CONNECTION OBJECT"
|
12
12
|
}.merge( override )
|
13
13
|
|
14
|
-
Jubjub::
|
14
|
+
Jubjub::Pubsub::Item.new(
|
15
15
|
options[:jid],
|
16
16
|
options[:node],
|
17
17
|
options[:item_id],
|
@@ -50,6 +50,13 @@ describe Jubjub::PubsubItem do
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
+
describe "uri" do
|
54
|
+
it "should return the uri of the item" do
|
55
|
+
item = pubsub_item_factory :jid => "theozaurus@foo.com", :node => "blah", :item_id => "123"
|
56
|
+
item.uri.should == "xmpp:theozaurus@foo.com?;node=blah;item=123"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
53
60
|
describe "retract" do
|
54
61
|
it "should call pubsub.retract on connection" do
|
55
62
|
@mock_connection = mock
|
data/spec/models/pubsub_spec.rb
CHANGED
@@ -38,6 +38,12 @@ describe Jubjub::Pubsub do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
describe "uri" do
|
42
|
+
it "should return the uri of the node" do
|
43
|
+
Jubjub::Pubsub.new(Jubjub::Jid.new('theozaurus@foo.com'), 'blah', mock ).uri.should == "xmpp:theozaurus@foo.com?;node=blah"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
41
47
|
describe "subscribe" do
|
42
48
|
it "should call pubsub.subscribe on connection" do
|
43
49
|
@mock_connection = mock
|
@@ -141,15 +147,34 @@ describe Jubjub::Pubsub do
|
|
141
147
|
|
142
148
|
end
|
143
149
|
|
150
|
+
describe "purge" do
|
151
|
+
|
152
|
+
before do
|
153
|
+
@mock_connection = mock
|
154
|
+
@mock_connection.stub_chain :pubsub, :purge
|
155
|
+
end
|
156
|
+
|
157
|
+
it "should call pubsub.purge on connection" do
|
158
|
+
@mock_connection.pubsub.should_receive(:purge).with(
|
159
|
+
Jubjub::Jid.new('pubsub.foo.com'),
|
160
|
+
'node'
|
161
|
+
)
|
162
|
+
|
163
|
+
m = Jubjub::Pubsub.new 'pubsub.foo.com', 'node', @mock_connection
|
164
|
+
m.purge
|
165
|
+
end
|
166
|
+
|
167
|
+
end
|
168
|
+
|
144
169
|
describe "items" do
|
145
170
|
|
146
171
|
before do
|
147
172
|
@mock_connection = mock
|
148
173
|
end
|
149
174
|
|
150
|
-
it 'should return Jubjub::
|
175
|
+
it 'should return Jubjub::Pubsub::ItemCollection' do
|
151
176
|
@pubsub_node = Jubjub::Pubsub.new 'pubsub.foo.com', 'node', @mock_connection
|
152
|
-
@pubsub_node.items.should be_a Jubjub::
|
177
|
+
@pubsub_node.items.should be_a Jubjub::Pubsub::ItemCollection
|
153
178
|
@pubsub_node.items.jid.should == Jubjub::Jid.new('pubsub.foo.com')
|
154
179
|
@pubsub_node.items.node.should == 'node'
|
155
180
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Jubjub::
|
3
|
+
describe Jubjub::Pubsub::Subscription do
|
4
4
|
|
5
5
|
def pubsub_subscription_factory(override = {})
|
6
6
|
options = {
|
@@ -12,7 +12,7 @@ describe Jubjub::PubsubSubscription do
|
|
12
12
|
:connection => "SHHHH CONNECTION OBJECT"
|
13
13
|
}.merge( override )
|
14
14
|
|
15
|
-
Jubjub::
|
15
|
+
Jubjub::Pubsub::Subscription.new(
|
16
16
|
options[:jid],
|
17
17
|
options[:node],
|
18
18
|
options[:subscriber],
|
data/spec/spec_helper.rb
CHANGED
@@ -12,7 +12,7 @@ RSpec.configure do |config|
|
|
12
12
|
end
|
13
13
|
|
14
14
|
VCR.config do |config|
|
15
|
-
config.cassette_library_dir =
|
15
|
+
config.cassette_library_dir = fixture_path 'vcr_cassettes'
|
16
16
|
config.stub_with :webmock
|
17
17
|
config.default_cassette_options = { :record => :none, :match_requests_on => [:uri, :method, :body] }
|
18
18
|
end
|
@@ -2,6 +2,36 @@ shared_examples_for "any data form" do
|
|
2
2
|
|
3
3
|
describe "creating" do
|
4
4
|
|
5
|
+
it "should understand XML to build object" do
|
6
|
+
dataform_1 = xml_fixture 'dataform_1'
|
7
|
+
dataform = subject.class.new(dataform_1)
|
8
|
+
|
9
|
+
expected = {
|
10
|
+
"public" => { :type => "boolean", :value => "", :label => "Public bot?" },
|
11
|
+
"FORM_TYPE" => { :type => "hidden", :value => "jabber:bot", :label => nil},
|
12
|
+
"invitelist" => { :type => "jid-multi", :value => [], :label=>"People to invite"},
|
13
|
+
"description" => { :type => "text-multi", :value => [], :label=>"Helpful description of your bot"},
|
14
|
+
"password" => { :type => "text-private", :value => "", :label=>"Password for special access"},
|
15
|
+
"botname" => { :type => "text-single", :value => "", :label=>"The name of your bot"},
|
16
|
+
"features" => { :type => "list-multi", :value => ["news", "search"], :label => "What features will the bot support?", :options => [
|
17
|
+
{:value => "contests", :label=>"Contests"},
|
18
|
+
{:value => "news", :label=>"News"},
|
19
|
+
{:value => "polls", :label=>"Polls"},
|
20
|
+
{:value => "reminders", :label=>"Reminders"},
|
21
|
+
{:value => "search", :label=>"Search"}
|
22
|
+
]},
|
23
|
+
"maxsubs" => { :type => "list-single", :value => "20", :label => "Maximum number of subscribers", :options => [
|
24
|
+
{ :value => "10", :label=>"10"},
|
25
|
+
{ :value => "20", :label=>"20"},
|
26
|
+
{ :value => "30", :label=>"30"},
|
27
|
+
{ :value => "50", :label=>"50"},
|
28
|
+
{ :value => "100", :label=>"100"},
|
29
|
+
{ :value => "none", :label=>"None"}]}
|
30
|
+
}
|
31
|
+
|
32
|
+
dataform.fields.should == expected
|
33
|
+
end
|
34
|
+
|
5
35
|
it "should understand hash to build object" do
|
6
36
|
params = {
|
7
37
|
"muc#roomconfig_allowvisitornickchange" => { :type => "boolean", :value => "1", :label => "Allow visitors to change nickname" },
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jubjub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Theo Cushion
|
@@ -15,12 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-06-16 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
23
|
none: false
|
25
24
|
requirements:
|
26
25
|
- - ">="
|
@@ -30,11 +29,11 @@ dependencies:
|
|
30
29
|
- 0
|
31
30
|
version: "0"
|
32
31
|
name: nokogiri
|
32
|
+
type: :runtime
|
33
33
|
prerelease: false
|
34
|
-
|
34
|
+
requirement: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
|
37
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
36
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
38
37
|
none: false
|
39
38
|
requirements:
|
40
39
|
- - ">="
|
@@ -44,11 +43,11 @@ dependencies:
|
|
44
43
|
- 0
|
45
44
|
version: "0"
|
46
45
|
name: rake
|
46
|
+
type: :development
|
47
47
|
prerelease: false
|
48
|
-
|
48
|
+
requirement: *id002
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
|
51
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
50
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
52
51
|
none: false
|
53
52
|
requirements:
|
54
53
|
- - ">="
|
@@ -58,11 +57,11 @@ dependencies:
|
|
58
57
|
- 0
|
59
58
|
version: "0"
|
60
59
|
name: vcr
|
60
|
+
type: :development
|
61
61
|
prerelease: false
|
62
|
-
|
62
|
+
requirement: *id003
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
|
-
|
65
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
64
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
66
65
|
none: false
|
67
66
|
requirements:
|
68
67
|
- - ~>
|
@@ -73,11 +72,11 @@ dependencies:
|
|
73
72
|
- 6
|
74
73
|
version: "1.6"
|
75
74
|
name: webmock
|
75
|
+
type: :development
|
76
76
|
prerelease: false
|
77
|
-
|
77
|
+
requirement: *id004
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
|
-
|
80
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
79
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
81
80
|
none: false
|
82
81
|
requirements:
|
83
82
|
- - ~>
|
@@ -88,8 +87,9 @@ dependencies:
|
|
88
87
|
- 4
|
89
88
|
version: "2.4"
|
90
89
|
name: rspec
|
90
|
+
type: :development
|
91
91
|
prerelease: false
|
92
|
-
|
92
|
+
requirement: *id005
|
93
93
|
description: jubjub is designed to provie a simple API for controller XMPP servers and their resources. Currently it should be used in conjunction with xmpp_gateway, but the architecture has been left so that other backends could be implemented.
|
94
94
|
email: theo.c@zepler.net
|
95
95
|
executables: []
|
@@ -106,7 +106,18 @@ files:
|
|
106
106
|
- lib/jubjub/data_form.rb
|
107
107
|
- lib/jubjub/errors.rb
|
108
108
|
- lib/jubjub/jid.rb
|
109
|
+
- lib/jubjub/muc/collection.rb
|
110
|
+
- lib/jubjub/muc/configuration.rb
|
111
|
+
- lib/jubjub/muc/muc.rb
|
109
112
|
- lib/jubjub/muc.rb
|
113
|
+
- lib/jubjub/pubsub/affiliation.rb
|
114
|
+
- lib/jubjub/pubsub/affiliation_collection.rb
|
115
|
+
- lib/jubjub/pubsub/collection.rb
|
116
|
+
- lib/jubjub/pubsub/configuration.rb
|
117
|
+
- lib/jubjub/pubsub/item.rb
|
118
|
+
- lib/jubjub/pubsub/item_collection.rb
|
119
|
+
- lib/jubjub/pubsub/pubsub.rb
|
120
|
+
- lib/jubjub/pubsub/subscription.rb
|
110
121
|
- lib/jubjub/pubsub.rb
|
111
122
|
- lib/jubjub/user.rb
|
112
123
|
- lib/jubjub.rb
|
@@ -114,6 +125,7 @@ files:
|
|
114
125
|
- README.mdown
|
115
126
|
- spec/connection/xmpp_gateway_muc_spec.rb
|
116
127
|
- spec/connection/xmpp_gateway_pubsub_spec.rb
|
128
|
+
- spec/fixtures/dataform_1.xml
|
117
129
|
- spec/fixtures/vcr_cassettes/muc_configuration.yml
|
118
130
|
- spec/fixtures/vcr_cassettes/muc_create.yml
|
119
131
|
- spec/fixtures/vcr_cassettes/muc_create_with_configuration.yml
|
@@ -121,13 +133,17 @@ files:
|
|
121
133
|
- spec/fixtures/vcr_cassettes/muc_exit.yml
|
122
134
|
- spec/fixtures/vcr_cassettes/muc_list.yml
|
123
135
|
- spec/fixtures/vcr_cassettes/pubsub_create.yml
|
136
|
+
- spec/fixtures/vcr_cassettes/pubsub_default_configuration.yml
|
124
137
|
- spec/fixtures/vcr_cassettes/pubsub_destroy.yml
|
125
138
|
- spec/fixtures/vcr_cassettes/pubsub_destroy_with_redirect.yml
|
126
139
|
- spec/fixtures/vcr_cassettes/pubsub_list.yml
|
140
|
+
- spec/fixtures/vcr_cassettes/pubsub_modify_affiliations.yml
|
127
141
|
- spec/fixtures/vcr_cassettes/pubsub_publish_with_dataform_payload.yml
|
128
142
|
- spec/fixtures/vcr_cassettes/pubsub_publish_with_id.yml
|
129
143
|
- spec/fixtures/vcr_cassettes/pubsub_publish_with_string_payload.yml
|
144
|
+
- spec/fixtures/vcr_cassettes/pubsub_purge.yml
|
130
145
|
- spec/fixtures/vcr_cassettes/pubsub_retract.yml
|
146
|
+
- spec/fixtures/vcr_cassettes/pubsub_retrieve_affiliations.yml
|
131
147
|
- spec/fixtures/vcr_cassettes/pubsub_retrieve_items.yml
|
132
148
|
- spec/fixtures/vcr_cassettes/pubsub_setup_node.yml
|
133
149
|
- spec/fixtures/vcr_cassettes/pubsub_subscribe.yml
|
@@ -139,12 +155,15 @@ files:
|
|
139
155
|
- spec/models/muc_collection_spec.rb
|
140
156
|
- spec/models/muc_configuration_spec.rb
|
141
157
|
- spec/models/muc_spec.rb
|
158
|
+
- spec/models/pubsub_affiliation_collection_spec.rb
|
159
|
+
- spec/models/pubsub_affiliation_spec.rb
|
142
160
|
- spec/models/pubsub_collection_spec.rb
|
143
161
|
- spec/models/pubsub_item_collection_spec.rb
|
144
162
|
- spec/models/pubsub_item_spec.rb
|
145
163
|
- spec/models/pubsub_spec.rb
|
146
164
|
- spec/models/pubsub_subscription_spec.rb
|
147
165
|
- spec/spec_helper.rb
|
166
|
+
- spec/support/helpers.rb
|
148
167
|
- spec/support/shared_examples.rb
|
149
168
|
- .rspec
|
150
169
|
- .infinity_test
|
@@ -187,6 +206,7 @@ summary: An Object to XMPP mapper to make managing XMPP resources easy
|
|
187
206
|
test_files:
|
188
207
|
- spec/connection/xmpp_gateway_muc_spec.rb
|
189
208
|
- spec/connection/xmpp_gateway_pubsub_spec.rb
|
209
|
+
- spec/fixtures/dataform_1.xml
|
190
210
|
- spec/fixtures/vcr_cassettes/muc_configuration.yml
|
191
211
|
- spec/fixtures/vcr_cassettes/muc_create.yml
|
192
212
|
- spec/fixtures/vcr_cassettes/muc_create_with_configuration.yml
|
@@ -194,13 +214,17 @@ test_files:
|
|
194
214
|
- spec/fixtures/vcr_cassettes/muc_exit.yml
|
195
215
|
- spec/fixtures/vcr_cassettes/muc_list.yml
|
196
216
|
- spec/fixtures/vcr_cassettes/pubsub_create.yml
|
217
|
+
- spec/fixtures/vcr_cassettes/pubsub_default_configuration.yml
|
197
218
|
- spec/fixtures/vcr_cassettes/pubsub_destroy.yml
|
198
219
|
- spec/fixtures/vcr_cassettes/pubsub_destroy_with_redirect.yml
|
199
220
|
- spec/fixtures/vcr_cassettes/pubsub_list.yml
|
221
|
+
- spec/fixtures/vcr_cassettes/pubsub_modify_affiliations.yml
|
200
222
|
- spec/fixtures/vcr_cassettes/pubsub_publish_with_dataform_payload.yml
|
201
223
|
- spec/fixtures/vcr_cassettes/pubsub_publish_with_id.yml
|
202
224
|
- spec/fixtures/vcr_cassettes/pubsub_publish_with_string_payload.yml
|
225
|
+
- spec/fixtures/vcr_cassettes/pubsub_purge.yml
|
203
226
|
- spec/fixtures/vcr_cassettes/pubsub_retract.yml
|
227
|
+
- spec/fixtures/vcr_cassettes/pubsub_retrieve_affiliations.yml
|
204
228
|
- spec/fixtures/vcr_cassettes/pubsub_retrieve_items.yml
|
205
229
|
- spec/fixtures/vcr_cassettes/pubsub_setup_node.yml
|
206
230
|
- spec/fixtures/vcr_cassettes/pubsub_subscribe.yml
|
@@ -212,12 +236,15 @@ test_files:
|
|
212
236
|
- spec/models/muc_collection_spec.rb
|
213
237
|
- spec/models/muc_configuration_spec.rb
|
214
238
|
- spec/models/muc_spec.rb
|
239
|
+
- spec/models/pubsub_affiliation_collection_spec.rb
|
240
|
+
- spec/models/pubsub_affiliation_spec.rb
|
215
241
|
- spec/models/pubsub_collection_spec.rb
|
216
242
|
- spec/models/pubsub_item_collection_spec.rb
|
217
243
|
- spec/models/pubsub_item_spec.rb
|
218
244
|
- spec/models/pubsub_spec.rb
|
219
245
|
- spec/models/pubsub_subscription_spec.rb
|
220
246
|
- spec/spec_helper.rb
|
247
|
+
- spec/support/helpers.rb
|
221
248
|
- spec/support/shared_examples.rb
|
222
249
|
- .rspec
|
223
250
|
- .infinity_test
|