-
Notifications
You must be signed in to change notification settings - Fork 54
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
Expose Webmachine::Application to adapters #154
Conversation
let(:adapter) do | ||
described_class.new(configuration, dispatcher) | ||
server = TCPServer.new('0.0.0.0', 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's some duplication here. it looks like the shared examples for adapter_lint
also look for an available port and assign that in before(:all)
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reel runs it's tests twice. One for the normal lint and another time for websockets. That's also the reason for the bind errors because the websocket test tries to run on the same port before the normal test server has shut down.
Von einem mobilen Gerät gesendet
Am 25.02.2014 um 06:58 schrieb Robert [email protected]:
In spec/webmachine/adapters/reel_spec.rb:
let(:adapter) do
- described_class.new(configuration, dispatcher)
- server = TCPServer.new('0.0.0.0', 0)
there's some duplication here. it looks like the shared examples for adapter_lint also look for an available port and assign that in before(:all) as well.—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think this commit could help? ebe22fc
it_should_behave_like :adapter_lint
is scoped to its own context block, so the before(:all) /after(:all) filter setup in the shared examples for adapter lint wouldn't be run for the web socket examples and the web socket examples seem to take care of their own setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it passed twice on travis.
sometimes a local copy of rbx-head fails randomly with:
|
this looks good to me. ready for merge? anyone else have thoughts? |
Have a PR for jruby-http-kit ready. Von einem mobilen Gerät gesendet
|
@robgleeson I'm generally unopposed to this in concept, but I want a chance to read the code carefully before we merge. EOD tomorrow should be long enough, thanks! |
@seancribbs got around to take a look yet? |
@@ -1,5 +1,5 @@ | |||
require 'i18n' | |||
|
|||
I18n.enforce_available_locales = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please wrap this in a if ... respond_to?
. Older versions of i18n
break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other option is to bump the minimum required version in the Gemfile or gemspec.
Aside from the version compatibility thing, I'm 👍 on this. It will also enable other things we might desire in the future. |
Also randomly assignes a port when running RSpec
what comes to mind is temporary urls, because you can now change the dispatcher routes from within a resource, only thing that is missing is the deletion of routes. /cc @seancribbs |
Will merge this tomorrow morning, @nLight might want to take a look first, will create a PR for https://github.com/nLight/jruby-http-kit afterwards. |
Looks good to me! |
Expose Webmachine::Application to adapters
In order to implement secure Proxy support i need to get a hold of the application instance in every adapter, this adds that.
It also changes specs so each adapter gets its own random Port which fixes some #126 issues.