Skip to content
This repository
Browse code

Update examples to use celluloid/autostart

  • Loading branch information...
commit 6a5e0ae7d5cf94388804e513fbe74fba1adcd55b 1 parent ef547ad
Tony Arcieri authored March 17, 2013
2  examples/basic_usage.rb
... ...
@@ -1,7 +1,7 @@
1 1
 #!/usr/bin/env ruby
2 2
 
3 3
 $:.push File.expand_path('../../lib', __FILE__)
4  
-require 'celluloid'
  4
+require 'celluloid/autostart'
5 5
 
6 6
 class Counter
7 7
   # This is all you have to do to turn any Ruby class into one which creates
2  examples/cigarette_smokers.rb
@@ -2,7 +2,7 @@
2 2
 
3 3
 require 'rubygems'
4 4
 require 'bundler/setup'
5  
-require 'celluloid'
  5
+require 'celluloid/autostart'
6 6
 
7 7
 #
8 8
 # THE CIGARETTE SMOKERS PROBLEM
2  examples/futures.rb
... ...
@@ -1,7 +1,7 @@
1 1
 #!/usr/bin/env ruby
2 2
 
3 3
 $:.push File.expand_path('../../lib', __FILE__)
4  
-require 'celluloid'
  4
+require 'celluloid/autostart'
5 5
 require 'digest/sha2'
6 6
 
7 7
 class Hasher
2  examples/pool.rb
@@ -9,7 +9,7 @@
9 9
 PARALLEL_RUBIES = %w(jruby rbx)
10 10
 
11 11
 $:.push File.expand_path('../../lib', __FILE__)
12  
-require 'celluloid'
  12
+require 'celluloid/autostart'
13 13
 require 'digest/sha2'
14 14
 
15 15
 class Rehasher
2  examples/ring.rb
... ...
@@ -1,7 +1,7 @@
1 1
 #!/usr/bin/env ruby
2 2
 
3 3
 $:.push File.expand_path('../../lib', __FILE__)
4  
-require 'celluloid'
  4
+require 'celluloid/autostart'
5 5
 
6 6
 class Ring
7 7
   include Celluloid
4  examples/simple_pmap.rb
... ...
@@ -1,7 +1,7 @@
1 1
 #!/usr/bin/env ruby
2 2
 
3 3
 $:.push File.expand_path('../../lib', __FILE__)
4  
-require 'celluloid'
  4
+require 'celluloid/autostart'
5 5
 
6 6
 module Enumerable
7 7
   # Simple parallel map using Celluloid::Futures
@@ -9,4 +9,4 @@ def pmap(&block)
9 9
     futures = map { |elem| Celluloid::Future.new(elem, &block) }
10 10
     futures.map { |future| future.value }
11 11
   end
12  
-end
  12
+end
2  examples/supervisors_and_registry.rb
... ...
@@ -1,7 +1,7 @@
1 1
 #!/usr/bin/env ruby
2 2
 
3 3
 $:.push File.expand_path('../../lib', __FILE__)
4  
-require 'celluloid'
  4
+require 'celluloid/autostart'
5 5
 
6 6
 class MyActor
7 7
   include Celluloid
2  examples/timers.rb
... ...
@@ -1,7 +1,7 @@
1 1
 #!/usr/bin/env ruby
2 2
 
3 3
 $:.push File.expand_path('../../lib', __FILE__)
4  
-require 'celluloid'
  4
+require 'celluloid/autostart'
5 5
 
6 6
 class TimerExample
7 7
   include Celluloid

0 notes on commit 6a5e0ae

Please sign in to comment.
Something went wrong with that request. Please try again.