-
Notifications
You must be signed in to change notification settings - Fork 253
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
Improved command map #45
Conversation
@leehambley after your review, I'm going to make new versions of rvm/rbenv/bundler integrations using this code. |
@kirs looks good, the only thing I would have done differently is to specify whether Given that this is mostly an internal API it doesn't matter if we just call it I'd be happy to merge this as it is, and mark the API as private, and re-visit if you think we could benefit from |
Do you mean the API like this? SSHKit.config.command_map.prefix[:rake].push("bundle exec")
SSHKit.config.command_map.prefix[:rake].unshift("rbenv exec") ? |
Yes, exactly, so that I'm kind of afraid of load ordering issues, and of unclean terms like "add". But that change looks like exactly what I had in mind. I assume it's possible to do something like prefixing everything in the command map, as we do in some places now, like pushing a general suffix, not just for (then maybe the map could be empty, and we could push |
There is a priority option that works like unshift now: But I'll rework it anyway with the syntax I wrote in the previous comment. I don't have a clear idea how to prefix everything yet. |
With push/unshift prefixes
@leehambley updated |
@leehambley what do you think about a new release of SSHKit with this API? This will give us an opportunity to release new rubygems.org versions of capistrano-* plugins. |
I'd like to do it all for 3.1
|
I've prepared few changes to try prefixes: |
Awesome, thanks - let's try and get all of this out on Friday, will you Lee Hambleyhttp://lee.hambley.name/ On 19 November 2013 08:50, Kir Shatrov [email protected] wrote:
|
Hopefully 😄 |
Improved command map (possible breaking change, see the changelog.)
As I wrote in capistrano/capistrano#639, we need more ways to configure command map behaviour.
This PR adds prefixes feature.