Skip to content

Commit

Permalink
Remove utopia and puma.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jan 31, 2018
1 parent b2cb77c commit a79ef50
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 34 deletions.
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ source 'https://rubygems.org'
gemspec

group :test do
gem 'puma'
gem 'utopia'

gem 'rack-test'
gem 'simplecov'
gem 'coveralls', require: false
Expand Down
26 changes: 18 additions & 8 deletions spec/async/websocket/connection_spec.ru
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@

require 'utopia'
require 'async/websocket'

class LogRequest
class Upgrade
def initialize(app)
@app = app
end

def call(env)
Async.logger.debug("Server: #{env.inspect}")

@app.call(env)
if Async::WebSocket?(env)
Async::WebSocket.open(env) do |connection|
read, write = IO.pipe

Process.spawn("ls -lah", :out => write)
write.close

read.each_line do |line|
connection.text(line)
end

connection.close
end
else
@app.call(env)
end
end
end

use LogRequest

use Utopia::Controller, root: File.expand_path('../pages', __FILE__)
use Upgrade

run lambda {|env| [404, {}, []]}
23 changes: 0 additions & 23 deletions spec/async/websocket/pages/controller.rb

This file was deleted.

0 comments on commit a79ef50

Please sign in to comment.