mirror of
https://github.com/moparisthebest/mailcatcher
synced 2024-11-16 14:15:08 -05:00
Options, be good to me
This commit is contained in:
parent
00d3e6720e
commit
699edba963
@ -199,11 +199,16 @@ module MailCatcher
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.run
|
def self.run(options = {})
|
||||||
|
options[:smtp_ip] ||= '127.0.0.1'
|
||||||
|
options[:smtp_port] ||= 1025
|
||||||
|
options[:http_ip] ||= '127.0.0.1'
|
||||||
|
options[:http_port] ||= 1080
|
||||||
|
|
||||||
Thin::Logging.silent = true
|
Thin::Logging.silent = true
|
||||||
EM::run do
|
EM::run do
|
||||||
EM::start_server '127.0.0.1', 1025, SmtpServer
|
EM::start_server options[:smtp_ip], options[:smtp_port], SmtpServer
|
||||||
Thin::Server.start WebApp, '127.0.0.1', 1080
|
Thin::Server.start WebApp, options[:http_ip], options[:http_port]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user