Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal for stable 0.16.1 #47

Merged
merged 8 commits into from
Apr 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--color
--tty
--format documentation
--backtrace
--order random
--require spec_helper
--warnings
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.16.1 (2015-04-26)
-------------------
* Support for XPUB sockets
* Support for reading multipart messages
* Spec cleanup

0.16.0 (2014-09-04)
-------------------
* Support for setting socket options
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
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
5 changes: 3 additions & 2 deletions celluloid-zmq.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ Gem::Specification.new do |gem|
gem.description = "Celluloid bindings to the ffi-rzmq library"
gem.summary = "Celluloid::ZMQ provides concurrent Celluloid actors that can listen for 0MQ events"
gem.homepage = "http://github.com/celluloid/celluloid-zmq"
gem.license = "MIT"

gem.name = "celluloid-zmq"
gem.version = Celluloid::ZMQ::VERSION

gem.add_dependency "celluloid", ">= 0.16.0"
gem.add_dependency "celluloid", "~> 0.16"
gem.add_dependency "ffi"
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
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion lib/celluloid/zmq/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Celluloid
module ZMQ
VERSION = "0.17.0.pre1"
VERSION = "0.16.1"
end
end
3 changes: 1 addition & 2 deletions spec/celluloid/zmq/actor_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'spec_helper'
require 'celluloid/rspec'

describe Celluloid::ZMQ do
RSpec.describe Celluloid::ZMQ do
it_behaves_like "a Celluloid Actor", Celluloid::ZMQ
end
3 changes: 1 addition & 2 deletions spec/celluloid/zmq/mailbox_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'spec_helper'
require 'celluloid/rspec'

describe Celluloid::ZMQ::Mailbox do
RSpec.describe Celluloid::ZMQ::Mailbox do
it_behaves_like "a Celluloid Mailbox"
end
4 changes: 2 additions & 2 deletions spec/celluloid/zmq/socket_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require 'spec_helper'
require 'celluloid/rspec'

describe Celluloid::ZMQ::Socket, actor_system: :global do
RSpec.describe Celluloid::ZMQ::Socket, actor_system: :global do

it "allows setting and getting ZMQ options on the socket" do
socket = Celluloid::ZMQ::RepSocket.new
Expand All @@ -10,6 +9,7 @@
identity = socket.get(::ZMQ::IDENTITY)

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

end
6 changes: 2 additions & 4 deletions spec/celluloid/zmq_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
require 'spec_helper'

describe Celluloid::ZMQ do
RSpec.describe Celluloid::ZMQ do
before { @sockets = [] }
after { @sockets.each(&:close) }

Expand Down Expand Up @@ -146,7 +144,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
6 changes: 3 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

Celluloid.shutdown_timeout = 1

RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true
RSpec.configure(&:disable_monkey_patching!)

RSpec.configure do |config|
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