Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Fix deprecated celluloid #25

Merged
merged 2 commits into from
Nov 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/rack/handler/reel.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'celluloid/current'
require 'reel/rack/server'

module Rack
Expand All @@ -15,7 +16,7 @@ def self.run(app, options = {})
app = Rack::CommonLogger.new(app, STDOUT) unless options[:quiet]
ENV['RACK_ENV'] = options[:environment].to_s if options[:environment]

supervisor = ::Reel::Rack::Server.supervise_as(:reel_rack_server, app, options)
supervisor = ::Reel::Rack::Server.supervise(as: :reel_rack_server, args: [app, options])

begin
sleep
Expand Down
6 changes: 3 additions & 3 deletions lib/reel/rack/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
module Reel
module Rack
class Server < Reel::Server::HTTP
include Celluloid::Logger
include Celluloid::Internals::Logger

attr_reader :app

Expand All @@ -20,7 +20,7 @@ def initialize(app, options)
super(options[:Host], options[:Port], &method(:on_connection))
@app = app
end

def on_connection(connection)
connection.each_request do |request|
if request.websocket?
Expand All @@ -30,7 +30,7 @@ def on_connection(connection)
end
end
end

# Compile the regex once
CONTENT_LENGTH_HEADER = %r{^content-length$}i

Expand Down