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

Changes the way adapters are managed #750

Merged
merged 2 commits into from
Nov 21, 2017
Merged

Conversation

iMacTia
Copy link
Member

@iMacTia iMacTia commented Nov 19, 2017

Description

Changes the way adapters are managed to gain the following:

  • Adapter can be set anywhere in the stack and will always be the last
  • We can easily check if the adapter is set or not
  • Use default adapter if no adapter set

Fixes #47 and #121

* Adapter can be set anywhere in the stack and will always be the last
* We can easily check if the adapter is set or not
* Use default adapter if no adapter set

fixes #47
fixes #121
@iMacTia
Copy link
Member Author

iMacTia commented Nov 19, 2017

@olleolleolle want to have a look 😄 ?


if handler
handler.klass.setup_parallel_manager
if adapter and adapter.respond_to?(:supports_parallel?) and adapter.supports_parallel?
Copy link
Member

Choose a reason for hiding this comment

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

You may wish to use && over and?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah that's the Rubocop convention and I've already planned to scan the entire gem through it before releasing 1.0. However in that file and is preferred to && so I went for that.
It's just temporary, we'll eventually converge into the standard and fix all these occurrences later on

Copy link
Member

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

This makes very happy.

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