Skip to content

Commit

Permalink
examples: move test registry reference to a dedicated ruby file
Browse files Browse the repository at this point in the history
  • Loading branch information
niamster committed Feb 10, 2015
1 parent 44d337e commit 5fad418
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 1 addition & 3 deletions examples/itchy.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env ruby
require 'dcell'

require 'dcell/registries/redis_adapter'
registry = DCell::Registry::RedisAdapter.new :server => 'localhost'
require_relative 'registry'

class Itchy
include Celluloid
Expand Down
4 changes: 4 additions & 0 deletions examples/registry.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require 'dcell/registries/redis_adapter'
def registry
DCell::Registry::RedisAdapter.new :server => 'localhost'
end
4 changes: 2 additions & 2 deletions examples/scratchy.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env ruby
require 'dcell'
require 'dcell/registries/redis_adapter'
require_relative 'registry'

registry = DCell::Registry::RedisAdapter.new :server => 'localhost'
DCell.start :registry => registry

itchy_node = DCell::Node["itchy"]
itchy = itchy_node[:itchy]

Expand Down

0 comments on commit 5fad418

Please sign in to comment.