Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for rackup gem. #193

Merged
merged 2 commits into from
Oct 31, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/external.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
async-websocket:
url: https://github.com/socketry/async-websocket.git
command: bundle exec rspec
command: bundle exec sus
3 changes: 2 additions & 1 deletion examples/streaming/gems.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source "https://rubygems.org"

gem 'trenni', '~> 3.14'
gem 'rack', '3.0.0.beta1'
gem 'rack', '3.0.0'
gem 'falcon', path: '../../'
# gem 'protocol-http', path: '../../../protocol-http'
2 changes: 2 additions & 0 deletions gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@
gem 'puma'
gem 'bake-test'
gem 'bake-test-external'

gem "rackup"
end
6 changes: 3 additions & 3 deletions spec/rack/handler/falcon_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
require_relative 'shared_examples'
require 'rack/handler/falcon'

RSpec.describe Rack::Handler::Falcon do
it_behaves_like Rack::Handler, 'falcon'
RSpec.describe Rackup::Handler::Falcon do
it_behaves_like Rackup::Handler, 'falcon'

let(:app) {lambda {|env| [200, {}, ["Hello World"]]}}

it "can start and stop server" do
Rack::Handler::Falcon.run(app) do |server|
Rackup::Handler::Falcon.run(app) do |server|
server.stop
end
end
Expand Down
3 changes: 2 additions & 1 deletion spec/rack/handler/shared_examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
require 'async/http/endpoint'
require 'async/http/client'
require 'async/process'
require 'rackup/handler'

RSpec.shared_examples_for Rack::Handler do |server_name|
RSpec.shared_examples_for Rackup::Handler do |server_name|
include_context Async::RSpec::Reactor

let(:config_path) {File.join(__dir__, "config.ru")}
Expand Down