forked from ezmobius/nanite
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git://github.com/halorgium/nanite
* 'master' of git://github.com/halorgium/nanite: Register actors in the init.rb for agents to allow actors to not be auto-loaded if needed
- Loading branch information
Showing
8 changed files
with
20 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,20 +1,11 @@ | |||
class RackWorker < Nanite::Actor | class RackWorker < Nanite::Actor | ||
|
|||
expose :call | expose :call | ||
|
|||
def initialize(app) | def initialize(app) | ||
@app = app | @app = app | ||
end | end | ||
|
|||
def call(env) | def call(env) | ||
@app.call(env) | @app.call(env) | ||
end | end | ||
|
|||
end | end | ||
|
|||
app = Proc.new do |env| | |||
[200, {'Content-Type'=>'text/html'}, "hello world!"] | |||
end | |||
|
|||
Nanite.register(RackWorker.new(app), 'rack') | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,5 +1,5 @@ | |||
--- | --- | ||
:pass: testing | :pass: testing | ||
:vhost: /nanite | :vhost: /nanite | ||
:user: nanite | :user: nanite | ||
:identity: fred | :identity: fred |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
app = Proc.new do |env| | |||
[200, {'Content-Type'=>'text/html'}, "hello world!"] | |||
end | |||
|
|||
register(RackWorker.new(app), 'rack') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters