celluloid 0.15.1 → 0.15.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d074071245d3218d8e119b0bf9f12f05aab6c8f
4
- data.tar.gz: 5b7fb44228ae18ed9d1d64f9a26ae82bc61acf6f
3
+ metadata.gz: f22a9c7d89b293484d7dcbe03cda32d7055ee42a
4
+ data.tar.gz: a13abc0b96f0e4931f6ff20457f9665282a4d08b
5
5
  SHA512:
6
- metadata.gz: 2a006db60f84694c38e5ff90585c5890b1eed7b5b517f302d3d6e9a50552e6c5c44df07d50dce9bc6a2d87d7f91470c7d9a617d427e3f4e28426ecbb4affe3c6
7
- data.tar.gz: 1969c4c6ba4fc4bdedc606b5009d5ab0aacf73d76a48c905a523f2774ca75696eb5e81b338702f07aa8da7c16bff6e5d6f1cb72ce77957258411d4cf0c94c3af
6
+ metadata.gz: fba64fd21b7f58cf3fab69cdcfe889b4b95478a5bcad61557b1376e3965bc73583eeaf215be7003e886cc0fdd6a239aa79dd3738cd6ad831ce1c114435da4ff0
7
+ data.tar.gz: fea6248e5f4e1931485673a458182ca86f380820b2e18acd7d90618203f8c6a193bdf33213161d397153dd43485bb4e1907ff65fb9efd14cc7c6a70cfcb4c309
@@ -8,7 +8,7 @@ if defined?(JRUBY_VERSION) && JRUBY_VERSION == "1.7.3"
8
8
  end
9
9
 
10
10
  module Celluloid
11
- VERSION = '0.15.1'
11
+ VERSION = '0.15.2'
12
12
  Error = Class.new StandardError
13
13
 
14
14
  extend self # expose all instance methods as singleton methods
@@ -116,6 +116,10 @@ module Celluloid
116
116
  Celluloid::IncidentReporter.supervise_as :default_incident_reporter, STDERR
117
117
  end
118
118
 
119
+ def running?
120
+ internal_pool
121
+ end
122
+
119
123
  def register_shutdown
120
124
  return if @shutdown_registered
121
125
  # Terminate all actors at exit
@@ -510,5 +514,8 @@ require 'celluloid/legacy' unless defined?(CELLULOID_FUTURE)
510
514
  Celluloid.task_class = Celluloid::TaskFiber
511
515
  Celluloid.logger = Logger.new(STDERR)
512
516
  Celluloid.shutdown_timeout = 10
513
- Celluloid.register_shutdown
514
- Celluloid.init
517
+
518
+ unless $CELLULOID_TEST
519
+ Celluloid.register_shutdown
520
+ Celluloid.init
521
+ end
@@ -8,3 +8,5 @@ module Celluloid
8
8
  end
9
9
 
10
10
  $CELLULOID_DEBUG = true
11
+
12
+ require 'celluloid/test'
@@ -0,0 +1,3 @@
1
+ $CELLULOID_TEST = true
2
+
3
+ require 'celluloid'
@@ -3,7 +3,6 @@ Coveralls.wear!
3
3
 
4
4
  require 'rubygems'
5
5
  require 'bundler/setup'
6
- require 'celluloid'
7
6
  require 'celluloid/rspec'
8
7
 
9
8
  logfile = File.open(File.expand_path("../../log/test.log", __FILE__), 'a')
@@ -21,10 +20,11 @@ RSpec.configure do |config|
21
20
 
22
21
  config.before do
23
22
  Celluloid.logger = logger
24
- Celluloid.shutdown
25
- sleep 0.01
26
-
27
- Celluloid.internal_pool.assert_inactive
23
+ if Celluloid.running?
24
+ Celluloid.shutdown
25
+ sleep 0.01
26
+ Celluloid.internal_pool.assert_inactive
27
+ end
28
28
 
29
29
  Celluloid.boot
30
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: celluloid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-06 00:00:00.000000000 Z
11
+ date: 2013-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: timers
@@ -134,6 +134,7 @@ files:
134
134
  - lib/celluloid/tasks/task_fiber.rb
135
135
  - lib/celluloid/tasks/task_thread.rb
136
136
  - lib/celluloid/tasks.rb
137
+ - lib/celluloid/test.rb
137
138
  - lib/celluloid/thread.rb
138
139
  - lib/celluloid/thread_handle.rb
139
140
  - lib/celluloid/uuid.rb