stompserver 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,16 @@
1
+ == 0.9.2 / 16 Oct 2006
2
+
3
+ * More Queue issues resolved
4
+ * Added more unit tests
5
+ * All tests pass
6
+ * Queue processing done in one large batch, this may change
7
+
8
+ == 0.9.1 / 16 Oct 2006
9
+
10
+ * Stepping along
11
+ * Fixed release issues
12
+ * Fixed queue logic error (failed to detect offlines)
13
+
1
14
  == 0.9.0 / 16 Oct 2006
2
15
 
3
16
  * Initialial Beta Release
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ Hoe.new('stompserver', StompServer::VERSION) do |p|
14
14
  p.email = "phurley@gmail.com"
15
15
  p.author = ["Patrick Hurley"]
16
16
  p.extra_deps = [
17
- ["eventmachine", ">= 5.0.0"],
17
+ ["eventmachine", ">= 0.5.0"],
18
18
  ["madeleine", ">= 0.7.3"],
19
19
  ["hoe", ">= 1.1.1"]
20
20
  ]
data/bin/stompserver CHANGED
@@ -0,0 +1,7 @@
1
+ require 'rubygems'
2
+ require 'stompserver'
3
+
4
+ StompServer.setup
5
+ EventMachine::run do
6
+ EventMachine.start_server "0.0.0.0", 61613, StompServer
7
+ end
data/lib/stomp_server.rb CHANGED
@@ -5,7 +5,7 @@ require 'queue_manager'
5
5
  require 'frame_journal'
6
6
 
7
7
  module StompServer
8
- VERSION = '0.9.2'
8
+ VERSION = '0.9.3'
9
9
  VALID_COMMANDS = [:connect, :send, :subscribe, :unsubscribe, :begin, :commit, :abort, :ack, :disconnect]
10
10
 
11
11
  def self.setup(j = FrameJournal.new, tm = TopicManager.new, qm = QueueManager.new(j))
@@ -1,4 +1,5 @@
1
1
  require 'queue_manager'
2
+ require 'frame_journal'
2
3
  require 'test/unit' unless defined? $ZENTEST and $ZENTEST
3
4
  require 'tesly'
4
5
 
@@ -69,7 +70,7 @@ class TestQueues < Test::Unit::TestCase
69
70
  assert_equal('', u.data)
70
71
  end
71
72
 
72
- def test_sendmsg(msg)
73
+ def test_sendmsg
73
74
  u = UserMock.new
74
75
  t = 'foo'
75
76
  @t.subscribe(t, u)
@@ -80,4 +81,20 @@ class TestQueues < Test::Unit::TestCase
80
81
  assert_equal('MESSAGE', m1.command)
81
82
  end
82
83
 
84
+ def test_queued_sendmsg
85
+ t = 'foo'
86
+ m1 = MessageMock.new('foo', 'foomsg')
87
+ @t.sendmsg(m1)
88
+
89
+ u = UserMock.new
90
+ @t.subscribe(t, u)
91
+
92
+ assert_equal(m1.data, u.data)
93
+ assert_equal('MESSAGE', m1.command)
94
+
95
+ u2 = UserMock.new
96
+ @t.subscribe(t, u2)
97
+ assert_equal('', u2.data)
98
+ end
99
+
83
100
  end
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: stompserver
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.2
6
+ version: 0.9.3
7
7
  date: 2006-10-16 00:00:00 -04:00
8
8
  summary: A very light messaging server
9
9
  require_paths:
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirements:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: 5.0.0
69
+ version: 0.5.0
70
70
  version:
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: madeleine