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

Make it possible to disable server startup in the at_exit block #217

Merged

Conversation

moretea
Copy link
Contributor

@moretea moretea commented Nov 15, 2012

This hook is executed after any program that load Goliath::Application.

It made my sprockets-for-goliath gem specs to fail (see failed travis build).

@@ -24,6 +24,15 @@ module Application

module_function

# Control wheter or not the application will be run using an at_exit block.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling mistake in "whether", but otherwise, lgtm. 👍

@dj2
Copy link
Contributor

dj2 commented Nov 16, 2012

Not sure if we want this. If you're including the Application then you want it to auto-run. I think the correct solution would be to not require goliath/goliath in your spec. If it's specific things you need, require those bits directly.

Not pulling goliath::Application into your spec would solve the issue I think.

@moretea
Copy link
Contributor Author

moretea commented Nov 16, 2012

@dj2 I'm afraid that your suggestion doesn't work.

My gem depends on Goliath::API, which does a require "goliath/goliath" here, so goliath/application.rb get's loaded whether I want it or not.

@moretea
Copy link
Contributor Author

moretea commented Nov 17, 2012

If you guys have any suggestions about how to fix this in another way: I'm open for alternatives.

@igrigorik
Copy link
Member

Seems to make sense to me. @dj2? :)

@rubencaro
Copy link
Contributor

I would find this useful too for testing.

igrigorik added a commit that referenced this pull request Nov 18, 2012
Make it possible to disable server startup in the at_exit block
@igrigorik igrigorik merged commit fc2e630 into postrank-labs:master Nov 18, 2012
@igrigorik
Copy link
Member

Merged - thanks! @dj2 if you have a better way.. we can revert. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants