Skip to content

Commit

Permalink
Merge 67082d2 into 4a5cc8c
Browse files Browse the repository at this point in the history
  • Loading branch information
//de committed Apr 18, 2015
2 parents 4a5cc8c + 67082d2 commit ffe02f6
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -11,7 +11,6 @@ rvm:

matrix:
allow_failures:
- rvm: jruby
- rvm: rbx-2
- rvm: ruby-head
- rvm: jruby-head
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -2,6 +2,7 @@ source 'http://rubygems.org'

gem 'coveralls', require: false
gem 'celluloid', github: 'celluloid/celluloid', branch: 'master'
gem 'transpec', github: 'yujinakayama/transpec', tag: 'v3.1.0'

# Specify your gem's dependencies in celluloid-zmq.gemspec
gemspec
2 changes: 1 addition & 1 deletion celluloid-zmq.gemspec
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
gem.add_dependency "ffi-rzmq"

gem.add_development_dependency "rake"
gem.add_development_dependency "rspec", "~> 2.14.0"
gem.add_development_dependency "rspec", "~> 3.0"

# Files
ignores = File.read(".gitignore").split(/\r?\n/).reject{ |f| f =~ /^(#.+|\s*)$/ }.map {|f| Dir[f] }.flatten
Expand Down
3 changes: 1 addition & 2 deletions lib/celluloid/zmq.rb
Expand Up @@ -23,8 +23,7 @@ def included(klass)

# Obtain a 0MQ context
def init(worker_threads = 1)
return @context if @context
@context = ::ZMQ::Context.new(worker_threads)
@context ||= ::ZMQ::Context.new(worker_threads)
end

def context
Expand Down
1 change: 1 addition & 0 deletions spec/celluloid/zmq/socket_spec.rb
Expand Up @@ -10,6 +10,7 @@
identity = socket.get(::ZMQ::IDENTITY)

expect(identity).to eq("Identity")
socket.close
end

end
2 changes: 1 addition & 1 deletion spec/celluloid/zmq_spec.rb
Expand Up @@ -146,7 +146,7 @@ def close_socket
client.recv_string(message)
expect(message).to eq("hello world")

expect(result.value).to be_true
expect(result.value).to be_truthy
end
end
end
4 changes: 1 addition & 3 deletions spec/spec_helper.rb
Expand Up @@ -10,10 +10,8 @@
Celluloid.shutdown_timeout = 1

RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true

config.around do |ex|
Celluloid::ZMQ.init(1) unless example.metadata[:no_init]
Celluloid::ZMQ.init(1) unless ex.metadata[:no_init]
Celluloid.boot
ex.run
Celluloid.shutdown
Expand Down

0 comments on commit ffe02f6

Please sign in to comment.