Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Pass options hash into server init

  • Loading branch information...
commit a2c02cc5d949d87c411fe67b728c8478ecabed25 1 parent 032ee60
@blakesmith authored
Showing with 6 additions and 6 deletions.
  1. +1 −1  bin/flamethrower
  2. +5 −5 lib/flamethrower/server/event_server.rb
View
2  bin/flamethrower
@@ -60,7 +60,7 @@ end
FLAMETHROWER_LOGGER = Logger.new(options['logger'] || STDOUT)
-server = Flamethrower::EventServer.new(options['host'], options['port'], options['domain'], options['token'])
+server = Flamethrower::EventServer.new(options)
trap("INT") do
FLAMETHROWER_LOGGER.info("Received shutdown signal, killing connections")
View
10 lib/flamethrower/server/event_server.rb
@@ -24,11 +24,11 @@ def streams_alive?
class EventServer
attr_reader :host, :port, :campfire_connection, :connections
- def initialize(host, port, domain, token)
- @host = host || "0.0.0.0"
- @port = port || 6667
- @domain = domain
- @token = token
+ def initialize(options = {})
+ @host = options['host'] || "0.0.0.0"
+ @port = options['port'] || 6667
+ @domain = options['domain']
+ @token = options['token']
@connections = []
end
Please sign in to comment.
Something went wrong with that request. Please try again.