ruote-stomp-maestrodev 2.2.3 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,7 +60,7 @@ module RuoteStomp
60
60
  cv.signal
61
61
  end
62
62
  rescue Exception => e
63
- raise RuntimeError, "Failed to connect to Stomp server. (#{e.message})", e.backtrace
63
+ raise e, "Failed to connect to Stomp server: #{e.message}"
64
64
  end
65
65
  end
66
66
 
@@ -89,12 +89,11 @@ module RuoteStomp
89
89
  protected
90
90
 
91
91
  def create_connection_uri(config={})
92
- config.each {|n,v| config[n]=v.to_s}
93
92
  user = config[:user]
94
93
  passcode = config[:passcode]
95
94
  host = config[:host]
96
- port = config[:port]
97
- ssl = config[:ssl] ? "+ssl" : ""
95
+ port = config[:port].to_s
96
+ ssl = (config[:ssl] and !config[:ssl].to_s.empty?) ? "+ssl" : ""
98
97
  cert = config[:cert] || ""
99
98
 
100
99
  # construct the connection URI
@@ -1,4 +1,4 @@
1
1
  module RuoteStomp
2
- VERSION = '2.2.3'
2
+ VERSION = '2.2.4'
3
3
  end
4
4
 
@@ -2,6 +2,25 @@ require File.join(File.dirname(__FILE__), 'spec_helper')
2
2
 
3
3
  describe RuoteStomp do
4
4
 
5
+ module RuoteStomp
6
+ # access protected methods
7
+ def self.create_connection_uri_spec(config)
8
+ create_connection_uri(config)
9
+ end
10
+ end
11
+
12
+ before(:each) do
13
+ @config = {
14
+ :host => "127.0.0.1",
15
+ :port => 61613,
16
+ :user => "u",
17
+ :passcode => "p",
18
+ :reliable => true,
19
+ :ssl => nil,
20
+ :cert => nil
21
+ }
22
+ end
23
+
5
24
  it "uses persistent messages by default" do
6
25
  RuoteStomp.use_persistent_messages?.should be_true
7
26
  end
@@ -10,5 +29,27 @@ describe RuoteStomp do
10
29
  RuoteStomp.use_persistent_messages = false
11
30
  RuoteStomp.use_persistent_messages?.should be_false
12
31
  end
13
- end
14
32
 
33
+ it "should create the correct connection url" do
34
+ uri = RuoteStomp.create_connection_uri_spec(@config.merge({:user => nil, :passcode => nil}))
35
+ uri.should eq("stomp://127.0.0.1:61613")
36
+ end
37
+
38
+ it "should create the correct connection url with user/passwd" do
39
+ RuoteStomp.create_connection_uri_spec(@config).should eq("stomp://u:p@127.0.0.1:61613")
40
+ end
41
+
42
+ it "should create the correct connection url with ssl" do
43
+ uri = RuoteStomp.create_connection_uri_spec(@config.merge({:ssl => true}))
44
+ uri.should eq("stomp+ssl://u:p@127.0.0.1:61613")
45
+
46
+ uri = RuoteStomp.create_connection_uri_spec(@config.merge({:ssl => false}))
47
+ uri.should eq("stomp://u:p@127.0.0.1:61613")
48
+
49
+ uri = RuoteStomp.create_connection_uri_spec(@config.merge({:ssl => "+ssl"}))
50
+ uri.should eq("stomp+ssl://u:p@127.0.0.1:61613")
51
+
52
+ uri = RuoteStomp.create_connection_uri_spec(@config.merge({:ssl => ""}))
53
+ uri.should eq("stomp://u:p@127.0.0.1:61613")
54
+ end
55
+ end
metadata CHANGED
@@ -1,159 +1,146 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ruote-stomp-maestrodev
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.4
4
5
  prerelease:
5
- version: 2.2.3
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Kit Plummer
9
9
  - Brian Sam-Bodden
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
-
14
- date: 2013-04-03 00:00:00 Z
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
13
+ date: 2013-04-12 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
17
16
  name: onstomp
18
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: &15857260 !ruby/object:Gem::Requirement
19
18
  none: false
20
- requirements:
19
+ requirements:
21
20
  - - ~>
22
- - !ruby/object:Gem::Version
21
+ - !ruby/object:Gem::Version
23
22
  version: 1.0.4
24
23
  type: :runtime
25
24
  prerelease: false
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
25
+ version_requirements: *15857260
26
+ - !ruby/object:Gem::Dependency
28
27
  name: ruote
29
- requirement: &id002 !ruby/object:Gem::Requirement
28
+ requirement: &15856760 !ruby/object:Gem::Requirement
30
29
  none: false
31
- requirements:
30
+ requirements:
32
31
  - - ~>
33
- - !ruby/object:Gem::Version
32
+ - !ruby/object:Gem::Version
34
33
  version: 2.2.0
35
34
  type: :runtime
36
35
  prerelease: false
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
36
+ version_requirements: *15856760
37
+ - !ruby/object:Gem::Dependency
39
38
  name: json
40
- requirement: &id003 !ruby/object:Gem::Requirement
39
+ requirement: &15856380 !ruby/object:Gem::Requirement
41
40
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: "0"
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: '0'
46
45
  type: :runtime
47
46
  prerelease: false
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
47
+ version_requirements: *15856380
48
+ - !ruby/object:Gem::Dependency
50
49
  name: parslet
51
- requirement: &id004 !ruby/object:Gem::Requirement
50
+ requirement: &15855920 !ruby/object:Gem::Requirement
52
51
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: "0"
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
57
56
  type: :runtime
58
57
  prerelease: false
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
58
+ version_requirements: *15855920
59
+ - !ruby/object:Gem::Dependency
61
60
  name: rake
62
- requirement: &id005 !ruby/object:Gem::Requirement
61
+ requirement: &15855500 !ruby/object:Gem::Requirement
63
62
  none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: "0"
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
68
67
  type: :development
69
68
  prerelease: false
70
- version_requirements: *id005
71
- - !ruby/object:Gem::Dependency
69
+ version_requirements: *15855500
70
+ - !ruby/object:Gem::Dependency
72
71
  name: rspec
73
- requirement: &id006 !ruby/object:Gem::Requirement
72
+ requirement: &15855000 !ruby/object:Gem::Requirement
74
73
  none: false
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
78
77
  version: 2.6.0
79
78
  type: :development
80
79
  prerelease: false
81
- version_requirements: *id006
82
- - !ruby/object:Gem::Dependency
80
+ version_requirements: *15855000
81
+ - !ruby/object:Gem::Dependency
83
82
  name: stompserver
84
- requirement: &id007 !ruby/object:Gem::Requirement
83
+ requirement: &15854500 !ruby/object:Gem::Requirement
85
84
  none: false
86
- requirements:
85
+ requirements:
87
86
  - - ~>
88
- - !ruby/object:Gem::Version
87
+ - !ruby/object:Gem::Version
89
88
  version: 0.9.9
90
89
  type: :development
91
90
  prerelease: false
92
- version_requirements: *id007
91
+ version_requirements: *15854500
93
92
  description: Stomp participant/listener pair for ruote 2.2
94
- email:
93
+ email:
95
94
  - kplummer@maestrodev.com
96
95
  - bsbodden@integrallis.com
97
96
  executables: []
98
-
99
97
  extensions: []
100
-
101
98
  extra_rdoc_files: []
102
-
103
- files:
99
+ files:
104
100
  - Rakefile
105
- - lib/ruote-stomp/launchitem_listener.rb
101
+ - lib/ruote-stomp.rb
106
102
  - lib/ruote-stomp/participant.rb
107
- - lib/ruote-stomp/receiver.rb
108
- - lib/ruote-stomp/version.rb
103
+ - lib/ruote-stomp/launchitem_listener.rb
109
104
  - lib/ruote-stomp/workitem_listener.rb
110
- - lib/ruote-stomp.rb
111
- - spec/launchitem_listener_spec.rb
112
- - spec/participant_spec.rb
105
+ - lib/ruote-stomp/version.rb
106
+ - lib/ruote-stomp/receiver.rb
113
107
  - spec/receiver_spec.rb
114
108
  - spec/ruote_stomp_spec.rb
115
109
  - spec/spec_helper.rb
116
- - spec/support/ruote_helpers.rb
117
110
  - spec/support/ruote_matchers.rb
111
+ - spec/support/ruote_helpers.rb
118
112
  - spec/workitem_listener_spec.rb
113
+ - spec/launchitem_listener_spec.rb
114
+ - spec/participant_spec.rb
119
115
  - ruote-stomp.gemspec
120
- - CHANGELOG.txt
121
116
  - CREDITS.txt
122
- - PostInstall.txt
117
+ - CHANGELOG.txt
123
118
  - TODO.txt
119
+ - PostInstall.txt
124
120
  - README.rdoc
125
121
  homepage: http://ruote.rubyforge.org
126
122
  licenses: []
127
-
128
123
  post_install_message:
129
124
  rdoc_options: []
130
-
131
- require_paths:
125
+ require_paths:
132
126
  - lib
133
- required_ruby_version: !ruby/object:Gem::Requirement
127
+ required_ruby_version: !ruby/object:Gem::Requirement
134
128
  none: false
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- hash: -4158031662629052166
139
- segments:
140
- - 0
141
- version: "0"
142
- required_rubygems_version: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ! '>='
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ required_rubygems_version: !ruby/object:Gem::Requirement
143
134
  none: false
144
- requirements:
145
- - - ">="
146
- - !ruby/object:Gem::Version
147
- hash: -4158031662629052166
148
- segments:
149
- - 0
150
- version: "0"
135
+ requirements:
136
+ - - ! '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
151
139
  requirements: []
152
-
153
140
  rubyforge_project: ruote
154
- rubygems_version: 1.8.25
141
+ rubygems_version: 1.8.9
155
142
  signing_key:
156
143
  specification_version: 3
157
144
  summary: Stomp participant/listener pair for ruote 2.2
158
145
  test_files: []
159
-
146
+ has_rdoc: