onstomp 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5f0fcfaa300e31031e10003e4c2b4ba86bffe72d
4
+ data.tar.gz: 2358bc943063271535dee0bfbfa4a5c88fd0603b
5
+ SHA512:
6
+ metadata.gz: bb71c53a00f2cf4e8ed8916035d2f51f81baf1d50da0e13fc94c4f2c9e6cf6db085a9b6198b2cb35121258a39c7ef99d71f2a9d4dd26b9c005e62c34ee1fd749
7
+ data.tar.gz: 154804957105f06e82adc9db3f4c95897b9b2a233d9937e8c46711f0d9326b7cb3920a397564b858fe809837757b5aa5125c18c2e123c99cf730a954d90f7ddb
data/.gitignore CHANGED
@@ -11,4 +11,5 @@ Gemfile.lock
11
11
  *.swp
12
12
  tags
13
13
  other
14
-
14
+ .ruby-version
15
+ .ruby-gemset
@@ -2,4 +2,9 @@ rvm:
2
2
  - 1.8.7
3
3
  - 1.9.2
4
4
  - 1.9.3
5
- - jruby
5
+ - 2.0.0
6
+ - 2.1.0
7
+ - jruby-18mode
8
+ - jruby-19mode
9
+
10
+ bundler_args: --without docs
@@ -33,10 +33,6 @@ require 'monitor'
33
33
 
34
34
  # Primary namespace for the `onstomp` gem
35
35
  module OnStomp
36
- # Class to use for creating enumerator objects, which depends upon the
37
- # version of Ruby being used.
38
- ENUMERATOR_KLASS = (RUBY_VERSION >= '1.9') ? Enumerator : Enumerable::Enumerator
39
-
40
36
  # A common base class for errors raised by the OnStomp gem
41
37
  # @abstract
42
38
  class OnStompError < StandardError; end
@@ -172,7 +172,7 @@ class OnStomp::Components::FrameHeaders
172
172
  iterate_each &block
173
173
  self
174
174
  else
175
- OnStomp::ENUMERATOR_KLASS.new(self)
175
+ self.to_enum
176
176
  end
177
177
  end
178
178
 
@@ -94,8 +94,9 @@ module OnStomp::Connections
94
94
  context = OpenSSL::SSL::SSLContext.new
95
95
  post_check = ssl_opts.delete(:post_connection_check)
96
96
  post_check_host = (post_check == true) ? host : post_check
97
- DEFAULT_SSL_OPTIONS.keys.each do |k|
98
- context.__send__(:"#{k}=", ssl_opts[k]) if ssl_opts.key?(k)
97
+ ssl_opts.each do |opt,val|
98
+ o_meth = :"#{opt}="
99
+ context.__send__(o_meth, val) if context.respond_to?(o_meth)
99
100
  end
100
101
  tcp_sock = create_socket_tcp(client)
101
102
  socket = OpenSSL::SSL::SSLSocket.new(tcp_sock, context)
@@ -39,7 +39,7 @@ module OnStomp::OpenURI::ClientExtensions
39
39
  yield openuri_message_queue.shift
40
40
  end
41
41
  else
42
- OnStomp::ENUMERATOR_KLASS.new(self)
42
+ self.to_enum
43
43
  end
44
44
  end
45
45
 
@@ -7,7 +7,7 @@ module OnStomp
7
7
  # Minor / feature version
8
8
  MINOR = 0
9
9
  # Patch version
10
- PATCH = 7
10
+ PATCH = 8
11
11
  # Complete version
12
12
  VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}"
13
13
  end
@@ -130,7 +130,7 @@ module OnStomp::Components
130
130
  end
131
131
 
132
132
  it "should yield an enumerator if called without a block" do
133
- headers.each.should be_a_kind_of(OnStomp::ENUMERATOR_KLASS)
133
+ headers.each.should be_a_kind_of(Enumerable)
134
134
  end
135
135
 
136
136
  it "should yield header names and values as pairs of strings" do
@@ -43,7 +43,8 @@ module OnStomp
43
43
  :ca_path => '/path/to/ca_files/',
44
44
  :cert => '/path/to/client/cert.pem',
45
45
  :key => '/path/to/client/key.pem',
46
- :verify_mode => 'super_duper_mode'
46
+ :verify_mode => 'super_duper_mode',
47
+ :ssl_version => 'SSLv3'
47
48
  }
48
49
  }
49
50
  let(:connected_frame) { mock('CONNECTED frame') }
@@ -61,7 +61,7 @@ module OnStomp::OpenURI
61
61
 
62
62
  describe ".each" do
63
63
  it "should return an enumerator if no block is given" do
64
- client.each.should be_a_kind_of(OnStomp::ENUMERATOR_KLASS)
64
+ client.each.should be_a_kind_of(Enumerable)
65
65
  end
66
66
  it "should yield up elements of the message queue" do
67
67
  yielded = []
@@ -1,12 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Dir[File.expand_path('support', File.dirname(__FILE__)) + "/**/*.rb"].each { |f| require f }
3
3
 
4
- begin
5
- require 'simplecov'
6
- SimpleCov.start do
7
- add_filter "/spec/"
4
+ if ENV['SCOV']
5
+ begin
6
+ require 'simplecov'
7
+ SimpleCov.start do
8
+ add_filter "/spec/"
9
+ end
10
+ rescue LoadError
8
11
  end
9
- rescue LoadError
10
12
  end
11
13
 
12
14
  require 'onstomp'
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onstomp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
5
- prerelease:
4
+ version: 1.0.8
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ian D. Eccles
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-06-11 00:00:00.000000000 Z
11
+ date: 2014-04-01 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,49 +27,43 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: simplecov
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: 0.3.0
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: 0.3.0
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: yard
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: 0.6.0
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: 0.6.0
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rake
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  description: Client library for message passing with brokers that support the Stomp
@@ -214,27 +205,26 @@ files:
214
205
  - yard_extensions.rb
215
206
  homepage: http://github.com/meadvillerb/onstomp
216
207
  licenses: []
208
+ metadata: {}
217
209
  post_install_message:
218
210
  rdoc_options: []
219
211
  require_paths:
220
212
  - lib
221
213
  required_ruby_version: !ruby/object:Gem::Requirement
222
- none: false
223
214
  requirements:
224
- - - ! '>='
215
+ - - '>='
225
216
  - !ruby/object:Gem::Version
226
217
  version: 1.8.7
227
218
  required_rubygems_version: !ruby/object:Gem::Requirement
228
- none: false
229
219
  requirements:
230
- - - ! '>='
220
+ - - '>='
231
221
  - !ruby/object:Gem::Version
232
222
  version: '0'
233
223
  requirements: []
234
224
  rubyforge_project: onstomp-core
235
- rubygems_version: 1.8.21
225
+ rubygems_version: 2.0.6
236
226
  signing_key:
237
- specification_version: 3
227
+ specification_version: 4
238
228
  summary: Client for message queues implementing the Stomp protocol interface.
239
229
  test_files:
240
230
  - spec/onstomp/client_spec.rb