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

Use puts instead of p for multi-line message #172

Merged
merged 1 commit into from
May 26, 2015
Merged

Use puts instead of p for multi-line message #172

merged 1 commit into from
May 26, 2015

Conversation

vandrijevik
Copy link
Contributor

Kernel#p calls #inspect on its argument before writing it to the output, so the warning message for an unsupported adapter is displayed like this:

"Database adapter seamless_database_pool not supported. Use:\nForeigner::Adapter.register 'seamless_database_pool', 'path/to/adapter'"

This PR changes the p to a puts, so the message displayed is:

Database adapter seamless_database_pool not supported. Use:
Foreigner::Adapter.register 'seamless_database_pool', 'path/to/adapter'

as intended.

Note: capture(stream) is deprecated, which is why the test uses a StringIO to capture the output instead of calling that method.

matthuhiggins added a commit that referenced this pull request May 26, 2015
…sage

Use puts instead of p for multi-line message
@matthuhiggins matthuhiggins merged commit 2aeeb00 into matthuhiggins:master May 26, 2015
@vandrijevik vandrijevik deleted the fix-adapter-load-warning-message branch May 27, 2015 08:29
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.

2 participants