Skip to content

Commit

Permalink
Merge commit 'mojombo/master' into multi_node
Browse files Browse the repository at this point in the history
Conflicts:
	README.md
	bin/ernie
  • Loading branch information
dgrijalva committed May 24, 2010
2 parents ea785ec + a8c4127 commit 4c4fee9
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 6 deletions.
4 changes: 4 additions & 0 deletions History.txt
@@ -1,3 +1,7 @@
= 2.4.0 / 2010-05-21
* Minor Additions
* Add -E cli option for setting extra Erlang VM options

= 2.3.0 / 2010-05-17
* Minor Additions
* Add 'halt' command for gracefully shutting down
Expand Down
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -56,11 +56,12 @@ Running
-c, --config CONFIG Config file.
-p, --port PORT Port.
-l, --log-level Log level (0-4).
-a, --access-log LOGFILE Access log file
-a, --access-log LOGFILE Access log file.
-d, --detached Run as a daemon.
-P, --pidfile PIDFILE Location to write pid file.
--name NAME Erlang process name.
--sname SNAME Erlang short process name.
-E, --erlang ERLANG_OPTIONS Options passed to Erlang VM.

Commands:
<none> Start an Ernie server.
Expand All @@ -77,6 +78,10 @@ Running
Reload the handlers for the ernie server currently running on
port 9999.

ernie -c example.cfg -E '-run mymodule'
Start the ernie server with an additional erlang module called
'mymodule'


Configuration File
------------------
Expand Down
2 changes: 1 addition & 1 deletion VERSION.yml
@@ -1,5 +1,5 @@
---
:minor: 3
:minor: 4
:build:
:patch: 0
:major: 2
10 changes: 8 additions & 2 deletions bin/ernie
Expand Up @@ -75,6 +75,10 @@ OptionParser.new do |opts|
opts.on("-P", "--pidfile PIDFILE", "Location to write pid file.") do |x|
options[:pidfile] = x
end

opts.on("-E", "--erlang ERLANG_OPTIONS", "Additional parameters to Erlang VM") do |x|
options[:erl_options] = x
end
end.parse!

if command = ARGV[0]
Expand Down Expand Up @@ -105,6 +109,7 @@ else
access_log = options[:access_log] ? "-ernie_server_app access_log '\"#{options[:access_log]}\"'" : ''
name = options[:name] ? "-name #{options[:name]}" : ''
sname = options[:sname] ? "-sname #{options[:sname]}" : ''
erl_options = options[:erl_options]

cmd = %Q{erl -boot start_sasl \
#{name} \
Expand All @@ -119,8 +124,9 @@ else
-ernie_server_app port #{port} \
-ernie_server_app config '"#{config}"' \
-ernie_server_app log_level #{log_level} \
-run ernie_server_app boot}.squeeze(' ')
-run ernie_server_app boot \
#{erl_options}}.squeeze(' ')
puts cmd
STDOUT.flush
exec(cmd)
end
end
5 changes: 3 additions & 2 deletions ernie.gemspec
Expand Up @@ -5,11 +5,11 @@

Gem::Specification.new do |s|
s.name = %q{ernie}
s.version = "2.3.0"
s.version = "2.4.0"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Tom Preston-Werner"]
s.date = %q{2010-05-17}
s.date = %q{2010-05-21}
s.default_executable = %q{ernie}
s.description = %q{Ernie is an Erlang/Ruby hybrid BERT-RPC server implementation packaged as a gem.}
s.email = %q{tom@mojombo.com}
Expand Down Expand Up @@ -47,6 +47,7 @@ Gem::Specification.new do |s|
"elib/port_wrapper.erl",
"ernie.gemspec",
"examples/example.cfg",
"examples/example.config",
"examples/ext.erl",
"examples/ext.rb",
"examples/nat.erl",
Expand Down
5 changes: 5 additions & 0 deletions examples/example.config
@@ -0,0 +1,5 @@
[{sasl,
[{sasl_error_logger, {file, "/tmp/sasl/sasl.log"}},
{error_logger_mf_dir, "/tmp/sasl"},
{error_logger_mf_maxbytes, 10000000},
{error_logger_mf_maxfiles, 5}]}].

0 comments on commit 4c4fee9

Please sign in to comment.