onstomp 1.0.0pre1 → 1.0.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/README.md +1 -1
- data/Rakefile +8 -0
- data/examples/openuri.rb +36 -0
- data/lib/onstomp.rb +4 -0
- data/lib/onstomp/client.rb +6 -5
- data/lib/onstomp/components.rb +0 -1
- data/lib/onstomp/components/frame_headers.rb +35 -38
- data/lib/onstomp/components/threaded_processor.rb +13 -0
- data/lib/onstomp/connections/base.rb +15 -8
- data/lib/onstomp/connections/stomp_1.rb +0 -6
- data/lib/onstomp/connections/stomp_1_0.rb +8 -0
- data/lib/onstomp/connections/stomp_1_1.rb +8 -0
- data/lib/onstomp/failover.rb +16 -0
- data/lib/onstomp/failover/buffers.rb +8 -0
- data/lib/onstomp/failover/buffers/written.rb +91 -0
- data/lib/onstomp/failover/client.rb +127 -0
- data/lib/onstomp/failover/failover_configurable.rb +63 -0
- data/lib/onstomp/failover/failover_events.rb +96 -0
- data/lib/onstomp/failover/new_with_failover.rb +20 -0
- data/lib/onstomp/failover/pools.rb +8 -0
- data/lib/onstomp/failover/pools/base.rb +39 -0
- data/lib/onstomp/failover/pools/round_robin.rb +17 -0
- data/lib/onstomp/failover/uri.rb +34 -0
- data/lib/onstomp/interfaces/client_configurable.rb +2 -6
- data/lib/onstomp/interfaces/client_events.rb +4 -0
- data/lib/onstomp/interfaces/connection_events.rb +3 -3
- data/lib/onstomp/interfaces/event_manager.rb +8 -0
- data/lib/onstomp/interfaces/uri_configurable.rb +7 -7
- data/lib/onstomp/open-uri.rb +37 -0
- data/lib/onstomp/open-uri/client_extensions.rb +88 -0
- data/lib/onstomp/open-uri/message_queue.rb +38 -0
- data/lib/onstomp/version.rb +1 -1
- data/spec/onstomp/client_spec.rb +1 -4
- data/spec/onstomp/components/frame_headers_spec.rb +2 -5
- data/spec/onstomp/connections/stomp_1_0_spec.rb +22 -0
- data/spec/onstomp/connections/stomp_1_1_spec.rb +22 -0
- data/spec/onstomp/connections/stomp_1_spec.rb +2 -19
- data/spec/onstomp/connections_spec.rb +4 -0
- data/spec/onstomp/failover/buffers/written_spec.rb +8 -0
- data/spec/onstomp/failover/client_spec.rb +38 -0
- data/spec/onstomp/failover/failover_events_spec.rb +75 -0
- data/spec/onstomp/failover/new_with_failover_spec.rb +16 -0
- data/spec/onstomp/failover/pools/base_spec.rb +54 -0
- data/spec/onstomp/failover/pools/round_robin_spec.rb +27 -0
- data/spec/onstomp/failover/uri_spec.rb +21 -0
- data/spec/onstomp/full_stacks/failover_spec.rb +55 -0
- data/spec/onstomp/full_stacks/onstomp_spec.rb +15 -0
- data/spec/onstomp/full_stacks/open-uri_spec.rb +40 -0
- data/spec/onstomp/full_stacks/ssl/README +6 -0
- data/spec/onstomp/full_stacks/ssl/broker_cert.csr +17 -0
- data/spec/onstomp/full_stacks/ssl/broker_cert.pem +72 -0
- data/spec/onstomp/full_stacks/ssl/broker_key.pem +27 -0
- data/spec/onstomp/full_stacks/ssl/client_cert.csr +17 -0
- data/spec/onstomp/full_stacks/ssl/client_cert.pem +72 -0
- data/spec/onstomp/full_stacks/ssl/client_key.pem +27 -0
- data/spec/onstomp/full_stacks/ssl/demoCA/cacert.pem +17 -0
- data/spec/onstomp/full_stacks/ssl/demoCA/index.txt +2 -0
- data/spec/onstomp/full_stacks/ssl/demoCA/index.txt.attr +1 -0
- data/spec/onstomp/full_stacks/ssl/demoCA/index.txt.attr.old +1 -0
- data/spec/onstomp/full_stacks/ssl/demoCA/index.txt.old +1 -0
- data/spec/onstomp/full_stacks/ssl/demoCA/newcerts/01.pem +72 -0
- data/spec/onstomp/full_stacks/ssl/demoCA/newcerts/02.pem +72 -0
- data/spec/onstomp/full_stacks/ssl/demoCA/private/cakey.pem +17 -0
- data/spec/onstomp/full_stacks/ssl/demoCA/serial +1 -0
- data/spec/onstomp/full_stacks/ssl/demoCA/serial.old +1 -0
- data/spec/onstomp/full_stacks/test_broker.rb +251 -0
- data/spec/onstomp/interfaces/connection_events_spec.rb +3 -1
- data/spec/onstomp/open-uri/client_extensions_spec.rb +113 -0
- data/spec/onstomp/open-uri/message_queue_spec.rb +29 -0
- data/spec/onstomp/open-uri_spec.rb +43 -0
- data/spec/spec_helper.rb +2 -0
- data/yard_extensions.rb +5 -1
- metadata +82 -8
- data/lib/onstomp/components/nil_processor.rb +0 -20
- data/spec/onstomp/components/nil_processor_spec.rb +0 -32
@@ -43,10 +43,12 @@ module OnStomp::Interfaces
|
|
43
43
|
let(:callback3) { mock('callback3') }
|
44
44
|
|
45
45
|
it "should bind events from the hash and trigger connected" do
|
46
|
+
eventable.stub(:version => 'x.y')
|
46
47
|
eventable.should_receive(:bind_event).with(:ev1, callback3)
|
47
48
|
eventable.should_receive(:bind_event).with(:ev1, callback2)
|
48
49
|
eventable.should_receive(:bind_event).with(:ev2, callback1)
|
49
|
-
eventable.should_receive(:trigger_connection_event).
|
50
|
+
eventable.should_receive(:trigger_connection_event).
|
51
|
+
with(:established, "STOMP x.y connection negotiated")
|
50
52
|
eventable.install_bindings_from_client :ev1 => [callback3, callback2],
|
51
53
|
:ev2 => [callback1]
|
52
54
|
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
module OnStomp::OpenURI
|
5
|
+
describe ClientExtensions do
|
6
|
+
let(:client) {
|
7
|
+
mock('client', :subscribe => true).tap do |m|
|
8
|
+
m.extend ClientExtensions
|
9
|
+
end
|
10
|
+
}
|
11
|
+
|
12
|
+
before(:each) do
|
13
|
+
client.auto_destination = '/queue/test'
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "::extended" do
|
17
|
+
let(:to_extend) {
|
18
|
+
mock("to be extended", :send => 'send', :puts => 'puts',
|
19
|
+
:send_with_openuri => 'send_with_openuri')
|
20
|
+
}
|
21
|
+
it "should alias set up aliases" do
|
22
|
+
to_extend.extend ClientExtensions
|
23
|
+
to_extend.send_without_openuri.should == 'send'
|
24
|
+
to_extend.send.should == 'send_with_openuri'
|
25
|
+
to_extend.puts.should == 'send_with_openuri'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe ".send" do
|
30
|
+
it "should use the auto destination if none is given" do
|
31
|
+
client.should_receive(:send_without_openuri).with('/queue/test',
|
32
|
+
'body of message', :header1 => 'value 1')
|
33
|
+
client.send 'body of message', :header1 => 'value 1'
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should use a destination if one is provided" do
|
37
|
+
client.should_receive(:send_without_openuri).with('/topic/other',
|
38
|
+
'i have built these walls', :get_by => "you can't")
|
39
|
+
client.send '/topic/other', 'i have built these walls',
|
40
|
+
:get_by => "you can't"
|
41
|
+
end
|
42
|
+
it "should raise an error if the auto destination is nil" do
|
43
|
+
client.auto_destination = nil
|
44
|
+
lambda {
|
45
|
+
client.send 'body of message', :header1 => 'value 1'
|
46
|
+
}.should raise_error(OnStomp::OpenURI::UnusableDestinationError)
|
47
|
+
end
|
48
|
+
it "should raise an error if the auto destination is empty" do
|
49
|
+
client.auto_destination = ''
|
50
|
+
lambda {
|
51
|
+
client.send 'body of message', :header1 => 'value 1'
|
52
|
+
}.should raise_error(OnStomp::OpenURI::UnusableDestinationError)
|
53
|
+
end
|
54
|
+
it "should raise an error if the auto destination is '/'" do
|
55
|
+
client.auto_destination = '/'
|
56
|
+
lambda {
|
57
|
+
client.send 'body of message', :header1 => 'value 1'
|
58
|
+
}.should raise_error(OnStomp::OpenURI::UnusableDestinationError)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe ".each" do
|
63
|
+
it "should return an enumerator if no block is given" do
|
64
|
+
client.each.should be_a_kind_of(OnStomp::ENUMERATOR_KLASS)
|
65
|
+
end
|
66
|
+
it "should yield up elements of the message queue" do
|
67
|
+
yielded = []
|
68
|
+
client.stub(:openuri_message_queue).and_return(['one', 'two', 'three'])
|
69
|
+
client.each do |m|
|
70
|
+
yielded << m
|
71
|
+
break if yielded.size > 2
|
72
|
+
end
|
73
|
+
yielded.should == ['one', 'two', 'three']
|
74
|
+
end
|
75
|
+
it "should subscribe to the auto destination only once" do
|
76
|
+
client.stub(:openuri_message_queue).and_return(['one', 'two'])
|
77
|
+
client.should_receive(:subscribe).with('/queue/test').and_return(true)
|
78
|
+
client.each { |m| break }
|
79
|
+
client.should_not_receive(:subscribe)
|
80
|
+
client.each { |m| break }
|
81
|
+
end
|
82
|
+
it "should push subscription messages on the message queue" do
|
83
|
+
message_queue = mock('queue')
|
84
|
+
client.stub(:openuri_message_queue => message_queue)
|
85
|
+
client.should_receive(:subscribe).with('/queue/test').and_yield 'me time'
|
86
|
+
message_queue.should_receive(:<<).with 'me time'
|
87
|
+
message_queue.should_receive(:shift).and_return "tonight it's all right"
|
88
|
+
yielded = nil
|
89
|
+
client.each do |m|
|
90
|
+
yielded = m
|
91
|
+
break
|
92
|
+
end
|
93
|
+
yielded.should == "tonight it's all right"
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
describe ".first / .take / .gets" do
|
98
|
+
before(:each) do
|
99
|
+
client.stub(:openuri_message_queue).and_return(['one', 'two',
|
100
|
+
'three', 'four'])
|
101
|
+
end
|
102
|
+
it "should return only one element if no args are given" do
|
103
|
+
client.first.should == 'one'
|
104
|
+
client.take.should == 'two'
|
105
|
+
client.gets.should == 'three'
|
106
|
+
end
|
107
|
+
it "should return an array if an argument is given" do
|
108
|
+
client.gets(1).should == ['one']
|
109
|
+
client.take(2).should == ['two', 'three']
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
module OnStomp::OpenURI
|
5
|
+
describe MessageQueue do
|
6
|
+
let(:queue) {
|
7
|
+
MessageQueue.new
|
8
|
+
}
|
9
|
+
|
10
|
+
describe "adding and removing items" do
|
11
|
+
it "should put something onto the queue" do
|
12
|
+
queue.push 'one'
|
13
|
+
queue << 'two'
|
14
|
+
queue.shift.should == 'one'
|
15
|
+
queue.shift.should == 'two'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe ".shift" do
|
20
|
+
it "should block until something is pushed" do
|
21
|
+
Thread.new do
|
22
|
+
sleep 0.1
|
23
|
+
queue << 'hello world'
|
24
|
+
end
|
25
|
+
queue.shift.should == 'hello world'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe "open-uri support", :openuri => true do
|
5
|
+
let(:stomp_uri) { ::URI.parse("stomp://host.domain.tld/queue/super-test") }
|
6
|
+
let(:stomp_ssl_uri) { ::URI.parse("stomp+ssl://host.domain.tld/queue/super-test") }
|
7
|
+
let(:client) {
|
8
|
+
mock('client',
|
9
|
+
:auto_destination= => nil,
|
10
|
+
:extend => nil)
|
11
|
+
}
|
12
|
+
|
13
|
+
before(:each) do
|
14
|
+
OnStomp::Client.stub(:new => client)
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should create an open-uri client" do
|
18
|
+
OnStomp::Client.should_receive(:new).with(stomp_uri,
|
19
|
+
:versions => ['1.1','1.0']).and_return(client)
|
20
|
+
client.should_receive(:extend).with(OnStomp::OpenURI::ClientExtensions)
|
21
|
+
client.should_receive(:auto_destination=).with(stomp_uri.path)
|
22
|
+
stomp_uri.open({:versions => ['1.1', '1.0']}).should == client
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should yield then disconnect if a block is given" do
|
26
|
+
client.should_receive(:connect)
|
27
|
+
client.should_receive(:puts).with('hello world')
|
28
|
+
client.should_receive(:disconnect)
|
29
|
+
stomp_ssl_uri.open do |c|
|
30
|
+
c.puts "hello world"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should yield then disconnect even if block raises an exception" do
|
35
|
+
client.should_receive(:connect)
|
36
|
+
client.should_receive(:disconnect)
|
37
|
+
lambda {
|
38
|
+
stomp_ssl_uri.open do |c|
|
39
|
+
raise "Test Failure"
|
40
|
+
end
|
41
|
+
}.should raise_error('Test Failure')
|
42
|
+
end
|
43
|
+
end
|
data/spec/spec_helper.rb
CHANGED
data/yard_extensions.rb
CHANGED
@@ -2,10 +2,14 @@ class ConfigurableAttributeHandler < YARD::Handlers::Ruby::AttributeHandler
|
|
2
2
|
handles method_call(:attr_configurable_str)
|
3
3
|
handles method_call(:attr_configurable_client_beats)
|
4
4
|
handles method_call(:attr_configurable_protocols)
|
5
|
+
handles method_call(:attr_configurable_pool)
|
6
|
+
handles method_call(:attr_configurable_buffer)
|
7
|
+
handles method_call(:attr_configurable_int)
|
8
|
+
handles method_call(:attr_configurable_bool)
|
5
9
|
namespace_only
|
6
10
|
|
7
11
|
def process
|
8
|
-
name = statement.parameters.first.jump(:symbol, :ident).source
|
12
|
+
name = statement.parameters.first.jump(:symbol, :ident).source[1..-1]
|
9
13
|
namespace.attributes[scope][name] ||= SymbolHash[:read => nil, :write => nil]
|
10
14
|
namespace.attributes[scope][name][:read] = YARD::CodeObjects::MethodObject.new(namespace, name)
|
11
15
|
namespace.attributes[scope][name][:write] = YARD::CodeObjects::MethodObject.new(namespace, "#{name}=")
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onstomp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
version: 1.0.
|
4
|
+
prerelease:
|
5
|
+
version: 1.0.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Ian D. Eccles
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03
|
13
|
+
date: 2011-04-03 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -91,12 +91,12 @@ files:
|
|
91
91
|
- UserNarrative.md
|
92
92
|
- examples/basic.rb
|
93
93
|
- examples/events.rb
|
94
|
+
- examples/openuri.rb
|
94
95
|
- lib/onstomp.rb
|
95
96
|
- lib/onstomp/client.rb
|
96
97
|
- lib/onstomp/components.rb
|
97
98
|
- lib/onstomp/components/frame.rb
|
98
99
|
- lib/onstomp/components/frame_headers.rb
|
99
|
-
- lib/onstomp/components/nil_processor.rb
|
100
100
|
- lib/onstomp/components/scopes.rb
|
101
101
|
- lib/onstomp/components/scopes/header_scope.rb
|
102
102
|
- lib/onstomp/components/scopes/receipt_scope.rb
|
@@ -114,6 +114,17 @@ files:
|
|
114
114
|
- lib/onstomp/connections/stomp_1.rb
|
115
115
|
- lib/onstomp/connections/stomp_1_0.rb
|
116
116
|
- lib/onstomp/connections/stomp_1_1.rb
|
117
|
+
- lib/onstomp/failover.rb
|
118
|
+
- lib/onstomp/failover/buffers.rb
|
119
|
+
- lib/onstomp/failover/buffers/written.rb
|
120
|
+
- lib/onstomp/failover/client.rb
|
121
|
+
- lib/onstomp/failover/failover_configurable.rb
|
122
|
+
- lib/onstomp/failover/failover_events.rb
|
123
|
+
- lib/onstomp/failover/new_with_failover.rb
|
124
|
+
- lib/onstomp/failover/pools.rb
|
125
|
+
- lib/onstomp/failover/pools/base.rb
|
126
|
+
- lib/onstomp/failover/pools/round_robin.rb
|
127
|
+
- lib/onstomp/failover/uri.rb
|
117
128
|
- lib/onstomp/interfaces.rb
|
118
129
|
- lib/onstomp/interfaces/client_configurable.rb
|
119
130
|
- lib/onstomp/interfaces/client_events.rb
|
@@ -123,12 +134,14 @@ files:
|
|
123
134
|
- lib/onstomp/interfaces/receipt_manager.rb
|
124
135
|
- lib/onstomp/interfaces/subscription_manager.rb
|
125
136
|
- lib/onstomp/interfaces/uri_configurable.rb
|
137
|
+
- lib/onstomp/open-uri.rb
|
138
|
+
- lib/onstomp/open-uri/client_extensions.rb
|
139
|
+
- lib/onstomp/open-uri/message_queue.rb
|
126
140
|
- lib/onstomp/version.rb
|
127
141
|
- onstomp.gemspec
|
128
142
|
- spec/onstomp/client_spec.rb
|
129
143
|
- spec/onstomp/components/frame_headers_spec.rb
|
130
144
|
- spec/onstomp/components/frame_spec.rb
|
131
|
-
- spec/onstomp/components/nil_processor_spec.rb
|
132
145
|
- spec/onstomp/components/scopes/header_scope_spec.rb
|
133
146
|
- spec/onstomp/components/scopes/receipt_scope_spec.rb
|
134
147
|
- spec/onstomp/components/scopes/transaction_scope_spec.rb
|
@@ -145,12 +158,43 @@ files:
|
|
145
158
|
- spec/onstomp/connections/stomp_1_1_spec.rb
|
146
159
|
- spec/onstomp/connections/stomp_1_spec.rb
|
147
160
|
- spec/onstomp/connections_spec.rb
|
161
|
+
- spec/onstomp/failover/buffers/written_spec.rb
|
162
|
+
- spec/onstomp/failover/client_spec.rb
|
163
|
+
- spec/onstomp/failover/failover_events_spec.rb
|
164
|
+
- spec/onstomp/failover/new_with_failover_spec.rb
|
165
|
+
- spec/onstomp/failover/pools/base_spec.rb
|
166
|
+
- spec/onstomp/failover/pools/round_robin_spec.rb
|
167
|
+
- spec/onstomp/failover/uri_spec.rb
|
168
|
+
- spec/onstomp/full_stacks/failover_spec.rb
|
169
|
+
- spec/onstomp/full_stacks/onstomp_spec.rb
|
170
|
+
- spec/onstomp/full_stacks/open-uri_spec.rb
|
171
|
+
- spec/onstomp/full_stacks/ssl/README
|
172
|
+
- spec/onstomp/full_stacks/ssl/broker_cert.csr
|
173
|
+
- spec/onstomp/full_stacks/ssl/broker_cert.pem
|
174
|
+
- spec/onstomp/full_stacks/ssl/broker_key.pem
|
175
|
+
- spec/onstomp/full_stacks/ssl/client_cert.csr
|
176
|
+
- spec/onstomp/full_stacks/ssl/client_cert.pem
|
177
|
+
- spec/onstomp/full_stacks/ssl/client_key.pem
|
178
|
+
- spec/onstomp/full_stacks/ssl/demoCA/cacert.pem
|
179
|
+
- spec/onstomp/full_stacks/ssl/demoCA/index.txt
|
180
|
+
- spec/onstomp/full_stacks/ssl/demoCA/index.txt.attr
|
181
|
+
- spec/onstomp/full_stacks/ssl/demoCA/index.txt.attr.old
|
182
|
+
- spec/onstomp/full_stacks/ssl/demoCA/index.txt.old
|
183
|
+
- spec/onstomp/full_stacks/ssl/demoCA/newcerts/01.pem
|
184
|
+
- spec/onstomp/full_stacks/ssl/demoCA/newcerts/02.pem
|
185
|
+
- spec/onstomp/full_stacks/ssl/demoCA/private/cakey.pem
|
186
|
+
- spec/onstomp/full_stacks/ssl/demoCA/serial
|
187
|
+
- spec/onstomp/full_stacks/ssl/demoCA/serial.old
|
188
|
+
- spec/onstomp/full_stacks/test_broker.rb
|
148
189
|
- spec/onstomp/interfaces/client_events_spec.rb
|
149
190
|
- spec/onstomp/interfaces/connection_events_spec.rb
|
150
191
|
- spec/onstomp/interfaces/event_manager_spec.rb
|
151
192
|
- spec/onstomp/interfaces/frame_methods_spec.rb
|
152
193
|
- spec/onstomp/interfaces/receipt_manager_spec.rb
|
153
194
|
- spec/onstomp/interfaces/subscription_manager_spec.rb
|
195
|
+
- spec/onstomp/open-uri/client_extensions_spec.rb
|
196
|
+
- spec/onstomp/open-uri/message_queue_spec.rb
|
197
|
+
- spec/onstomp/open-uri_spec.rb
|
154
198
|
- spec/onstomp_spec.rb
|
155
199
|
- spec/spec_helper.rb
|
156
200
|
- spec/support/custom_argument_matchers.rb
|
@@ -175,9 +219,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
175
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
220
|
none: false
|
177
221
|
requirements:
|
178
|
-
- - "
|
222
|
+
- - ">="
|
179
223
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
224
|
+
version: "0"
|
181
225
|
requirements: []
|
182
226
|
|
183
227
|
rubyforge_project: onstomp-core
|
@@ -189,7 +233,6 @@ test_files:
|
|
189
233
|
- spec/onstomp/client_spec.rb
|
190
234
|
- spec/onstomp/components/frame_headers_spec.rb
|
191
235
|
- spec/onstomp/components/frame_spec.rb
|
192
|
-
- spec/onstomp/components/nil_processor_spec.rb
|
193
236
|
- spec/onstomp/components/scopes/header_scope_spec.rb
|
194
237
|
- spec/onstomp/components/scopes/receipt_scope_spec.rb
|
195
238
|
- spec/onstomp/components/scopes/transaction_scope_spec.rb
|
@@ -206,12 +249,43 @@ test_files:
|
|
206
249
|
- spec/onstomp/connections/stomp_1_1_spec.rb
|
207
250
|
- spec/onstomp/connections/stomp_1_spec.rb
|
208
251
|
- spec/onstomp/connections_spec.rb
|
252
|
+
- spec/onstomp/failover/buffers/written_spec.rb
|
253
|
+
- spec/onstomp/failover/client_spec.rb
|
254
|
+
- spec/onstomp/failover/failover_events_spec.rb
|
255
|
+
- spec/onstomp/failover/new_with_failover_spec.rb
|
256
|
+
- spec/onstomp/failover/pools/base_spec.rb
|
257
|
+
- spec/onstomp/failover/pools/round_robin_spec.rb
|
258
|
+
- spec/onstomp/failover/uri_spec.rb
|
259
|
+
- spec/onstomp/full_stacks/failover_spec.rb
|
260
|
+
- spec/onstomp/full_stacks/onstomp_spec.rb
|
261
|
+
- spec/onstomp/full_stacks/open-uri_spec.rb
|
262
|
+
- spec/onstomp/full_stacks/ssl/README
|
263
|
+
- spec/onstomp/full_stacks/ssl/broker_cert.csr
|
264
|
+
- spec/onstomp/full_stacks/ssl/broker_cert.pem
|
265
|
+
- spec/onstomp/full_stacks/ssl/broker_key.pem
|
266
|
+
- spec/onstomp/full_stacks/ssl/client_cert.csr
|
267
|
+
- spec/onstomp/full_stacks/ssl/client_cert.pem
|
268
|
+
- spec/onstomp/full_stacks/ssl/client_key.pem
|
269
|
+
- spec/onstomp/full_stacks/ssl/demoCA/cacert.pem
|
270
|
+
- spec/onstomp/full_stacks/ssl/demoCA/index.txt
|
271
|
+
- spec/onstomp/full_stacks/ssl/demoCA/index.txt.attr
|
272
|
+
- spec/onstomp/full_stacks/ssl/demoCA/index.txt.attr.old
|
273
|
+
- spec/onstomp/full_stacks/ssl/demoCA/index.txt.old
|
274
|
+
- spec/onstomp/full_stacks/ssl/demoCA/newcerts/01.pem
|
275
|
+
- spec/onstomp/full_stacks/ssl/demoCA/newcerts/02.pem
|
276
|
+
- spec/onstomp/full_stacks/ssl/demoCA/private/cakey.pem
|
277
|
+
- spec/onstomp/full_stacks/ssl/demoCA/serial
|
278
|
+
- spec/onstomp/full_stacks/ssl/demoCA/serial.old
|
279
|
+
- spec/onstomp/full_stacks/test_broker.rb
|
209
280
|
- spec/onstomp/interfaces/client_events_spec.rb
|
210
281
|
- spec/onstomp/interfaces/connection_events_spec.rb
|
211
282
|
- spec/onstomp/interfaces/event_manager_spec.rb
|
212
283
|
- spec/onstomp/interfaces/frame_methods_spec.rb
|
213
284
|
- spec/onstomp/interfaces/receipt_manager_spec.rb
|
214
285
|
- spec/onstomp/interfaces/subscription_manager_spec.rb
|
286
|
+
- spec/onstomp/open-uri/client_extensions_spec.rb
|
287
|
+
- spec/onstomp/open-uri/message_queue_spec.rb
|
288
|
+
- spec/onstomp/open-uri_spec.rb
|
215
289
|
- spec/onstomp_spec.rb
|
216
290
|
- spec/spec_helper.rb
|
217
291
|
- spec/support/custom_argument_matchers.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
# A processor that does nothing, used in the event that
|
4
|
-
# {OnStomp::Client client} +processor+ attribute is set to +nil+
|
5
|
-
class OnStomp::Components::NilProcessor
|
6
|
-
# Creates a new processor
|
7
|
-
def initialize(client); end
|
8
|
-
# Always returns +false+
|
9
|
-
# @return [false]
|
10
|
-
def running?; false; end
|
11
|
-
# Does nothing
|
12
|
-
# @return [self]
|
13
|
-
def start; self; end
|
14
|
-
# Does nothing
|
15
|
-
# @return [self]
|
16
|
-
def join; self; end
|
17
|
-
# Does nothing
|
18
|
-
# @return [self]
|
19
|
-
def stop; self; end
|
20
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
module OnStomp::Components
|
5
|
-
describe NilProcessor do
|
6
|
-
let(:client) { mock('client') }
|
7
|
-
let(:processor) { NilProcessor.new client }
|
8
|
-
|
9
|
-
describe ".start" do
|
10
|
-
it "should return itself" do
|
11
|
-
processor.start.should == processor
|
12
|
-
end
|
13
|
-
end
|
14
|
-
describe ".stop" do
|
15
|
-
it "should return itself" do
|
16
|
-
processor.stop.should == processor
|
17
|
-
end
|
18
|
-
end
|
19
|
-
describe ".join" do
|
20
|
-
it "should return itself" do
|
21
|
-
processor.join.should == processor
|
22
|
-
end
|
23
|
-
end
|
24
|
-
describe ".running?" do
|
25
|
-
it "should never be running" do
|
26
|
-
processor.running?.should be_false
|
27
|
-
processor.start
|
28
|
-
processor.running?.should be_false
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|