| CARVIEW |
Every repository with this icon (
Every repository with this icon (
Run the following if you haven't already:
gem sources -a https://gems.github.com
Install the gem(s):
sudo gem install mojombo-ernie
| Description: | Ernie is an Erlang/Ruby BERT-RPC Server. |
| Clone URL: |
git://github.com/mojombo/ernie.git
Give this clone URL to anyone.
git clone git://github.com/mojombo/ernie.git
|
| name | age | message | |
|---|---|---|---|
| |
.document | Mon May 18 16:40:10 -0700 2009 | add tests and unify cli [mojombo] |
| |
.gitignore | Mon May 18 18:38:26 -0700 2009 | add erlang build stuff [mojombo] |
| |
LICENSE | Mon May 18 16:40:10 -0700 2009 | add tests and unify cli [mojombo] |
| |
README.md | Mon May 18 19:54:34 -0700 2009 | add example using bertrpc gem [mojombo] |
| |
Rakefile | Mon May 18 18:38:26 -0700 2009 | add erlang build stuff [mojombo] |
| |
VERSION.yml | Mon May 18 18:53:50 -0700 2009 | Version bump to 0.1.0 [mojombo] |
| |
bin/ | Mon May 18 18:51:07 -0700 2009 | clean up binary [mojombo] |
| |
ebin/ | Mon May 18 16:15:19 -0700 2009 | add handler cli param and fix up to actually work [mojombo] |
| |
elib/ | Mon May 18 18:03:16 -0700 2009 | add ernie class and tests [mojombo] |
| |
ernie.gemspec | Mon May 18 18:56:18 -0700 2009 | add gemspec [mojombo] |
| |
ext/ | Mon May 18 18:38:26 -0700 2009 | add erlang build stuff [mojombo] |
| |
lib/ | Mon May 18 18:03:16 -0700 2009 | add ernie class and tests [mojombo] |
| |
test/ | Mon May 18 18:03:16 -0700 2009 | add ernie class and tests [mojombo] |
Ernie
By Tom Preston-Werner (tom@mojombo.com)
WARNING: This software is alpha and should not be used in production without extensive testing. You should not consider this project production ready until it is released as 1.0.
Description
Ernie is a BERT-RPC server implementation that uses an Erlang server to accept incoming connections, and then delegates the request to a Ruby handler via Erlectricity.
Installation
You must have Erlang installed before installing Ernie.
gem install mojombo-ernie -s https://gems.github.com
Running
Usage: ernie [options] <handler>
-n, --name NAME Node name
-p, --port PORT Port
-d, --detached Run as a daemon
-P, --pidfile PIDFILE Location to write pid file.
Example Handler
require 'ernie'
mod(:calc) do
fun(:add) do |a, b|
a + b
end
end
Example BERT-RPC call for above example
-> {call, calc, add, [1, 2]}
<- {reply, 3}
Using the BERTRPC gem to make calls to Ernie
You can make BERT-RPC calls from Ruby with the BERTRPC gem:
require 'bertrpc'
svc = BERTRPC::Service.new('localhost', 8000)
svc.calc.add.call(1, 2)
# => 3
Contribute
If you'd like to hack on Ernie, start by forking my repo on GitHub:
https://github.com/mojombo/ernie
To get all of the dependencies, install the gem first. The best way to get your changes merged back into core is as follows:
- Clone down your fork
- Create a topic branch to contain your change
- Hack away
- Add tests and make sure everything still passes by running
rake - If you are adding new functionality, document it in the README.md
- Do not change the version number, I will do that on my end
- If necessary, rebase your commits into logical chunks, without errors
- Push the branch up to GitHub
- Send me (mojombo) a pull request for your branch
Copyright
Copyright (c) 2009 Tom Preston-Werner. See LICENSE for details.







