Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update examples to use celluloid/autostart

  • Loading branch information...
commit 6a5e0ae7d5cf94388804e513fbe74fba1adcd55b 1 parent ef547ad
@tarcieri tarcieri authored
View
2  examples/basic_usage.rb
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
$:.push File.expand_path('../../lib', __FILE__)
-require 'celluloid'
+require 'celluloid/autostart'
class Counter
# This is all you have to do to turn any Ruby class into one which creates
View
2  examples/cigarette_smokers.rb
@@ -2,7 +2,7 @@
require 'rubygems'
require 'bundler/setup'
-require 'celluloid'
+require 'celluloid/autostart'
#
# THE CIGARETTE SMOKERS PROBLEM
View
2  examples/futures.rb
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
$:.push File.expand_path('../../lib', __FILE__)
-require 'celluloid'
+require 'celluloid/autostart'
require 'digest/sha2'
class Hasher
View
2  examples/pool.rb
@@ -9,7 +9,7 @@
PARALLEL_RUBIES = %w(jruby rbx)
$:.push File.expand_path('../../lib', __FILE__)
-require 'celluloid'
+require 'celluloid/autostart'
require 'digest/sha2'
class Rehasher
View
2  examples/ring.rb
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
$:.push File.expand_path('../../lib', __FILE__)
-require 'celluloid'
+require 'celluloid/autostart'
class Ring
include Celluloid
View
4 examples/simple_pmap.rb
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
$:.push File.expand_path('../../lib', __FILE__)
-require 'celluloid'
+require 'celluloid/autostart'
module Enumerable
# Simple parallel map using Celluloid::Futures
@@ -9,4 +9,4 @@ def pmap(&block)
futures = map { |elem| Celluloid::Future.new(elem, &block) }
futures.map { |future| future.value }
end
-end
+end
View
2  examples/supervisors_and_registry.rb
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
$:.push File.expand_path('../../lib', __FILE__)
-require 'celluloid'
+require 'celluloid/autostart'
class MyActor
include Celluloid
View
2  examples/timers.rb
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
$:.push File.expand_path('../../lib', __FILE__)
-require 'celluloid'
+require 'celluloid/autostart'
class TimerExample
include Celluloid
Please sign in to comment.
Something went wrong with that request. Please try again.