omf_common 6.1.2.pre.3 → 6.1.2.pre.4
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -8,8 +8,7 @@ Rake::Task[:release].clear
|
|
8
8
|
|
9
9
|
Rake::TestTask.new do |t|
|
10
10
|
t.libs << 'test'
|
11
|
-
t.pattern = "test
|
12
|
-
|
13
|
-
#t.pattern = "test/**/xmpp/topic_spec.rb"
|
11
|
+
t.pattern = "test/**/[^xmpp][^xml]*/topic_spec.rb"
|
12
|
+
t.pattern = "test/**/*/*_spec.rb"
|
14
13
|
t.verbose = true
|
15
14
|
end
|
data/bin/omf_monitor_topic
CHANGED
@@ -48,7 +48,7 @@ describe OmfCommon::Comm::Topic do
|
|
48
48
|
@comm = mock
|
49
49
|
|
50
50
|
# TODO Again, can not create an abstract topic without init a message
|
51
|
-
OmfCommon::Message.init(type: :
|
51
|
+
OmfCommon::Message.init(type: :json)
|
52
52
|
|
53
53
|
OmfCommon.stubs(:comm).returns(@comm)
|
54
54
|
@topic = OmfCommon::Comm::Topic.create(:bob)
|
@@ -58,8 +58,10 @@ describe OmfCommon::Comm::Topic do
|
|
58
58
|
|
59
59
|
after do
|
60
60
|
OmfCommon::Comm.reset
|
61
|
+
OmfCommon::Message.reset
|
61
62
|
OmfCommon.unstub(:comm)
|
62
|
-
OmfCommon::Message::XML::Message.any_instance.unstub(:mid)
|
63
|
+
#OmfCommon::Message::XML::Message.any_instance.unstub(:mid)
|
64
|
+
OmfCommon::Message::Json::Message.any_instance.unstub(:mid)
|
63
65
|
end
|
64
66
|
|
65
67
|
it "must create and send frcp create message" do
|
@@ -140,7 +142,7 @@ describe OmfCommon::Comm::Topic do
|
|
140
142
|
msg.stubs(:itype).with(:ruby).returns('creation_ok')
|
141
143
|
msg.stubs(:cid).returns(:bob_id)
|
142
144
|
|
143
|
-
OmfCommon::Message::
|
145
|
+
OmfCommon::Message::Json::Message.any_instance.stubs(:mid).returns(:bob_id)
|
144
146
|
|
145
147
|
cbk_called = [false, false, false, false]
|
146
148
|
|
@@ -13,11 +13,12 @@ describe OmfCommon::Comm::XMPP::Topic do
|
|
13
13
|
include EventedSpec::SpecHelper
|
14
14
|
|
15
15
|
# XMPP requires more time
|
16
|
-
default_timeout
|
16
|
+
default_timeout 10.1
|
17
17
|
|
18
18
|
before do
|
19
19
|
@xmpp_comm = OmfCommon::Comm::XMPP::Communicator.new
|
20
20
|
OmfCommon::Eventloop.init(type: :em)
|
21
|
+
OmfCommon::Message.init(type: :xml)
|
21
22
|
OmfCommon.stubs(:comm).returns(@xmpp_comm)
|
22
23
|
end
|
23
24
|
|
@@ -25,6 +26,7 @@ describe OmfCommon::Comm::XMPP::Topic do
|
|
25
26
|
em do
|
26
27
|
@xmpp_comm.init(url: 'xmpp://srv.mytestbed.net')
|
27
28
|
end
|
29
|
+
OmfCommon::Message.reset
|
28
30
|
end
|
29
31
|
|
30
32
|
it "must allow you to subscribe/unsubscribe to a new pubsub topic" do
|
@@ -14,6 +14,10 @@ describe OmfCommon::Message do
|
|
14
14
|
@message = OmfCommon::Message.create(:create, { p1: 'p1_value', p2: 'p2_value' }, { rtype: :bob })
|
15
15
|
end
|
16
16
|
|
17
|
+
after do
|
18
|
+
OmfCommon::Message.reset
|
19
|
+
end
|
20
|
+
|
17
21
|
it "must be able to query internal properties" do
|
18
22
|
@message.type.must_equal :create
|
19
23
|
@message.operation.must_equal :create
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omf_common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.2.pre.
|
4
|
+
version: 6.1.2.pre.4
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|