capistrano3-unicorn icon indicating copy to clipboard operation
capistrano3-unicorn copied to clipboard

Customize unicorn command

Open spectator opened this issue 11 years ago • 5 comments

Lets you customize unicorn command to something other than bundle exec unicorn, for example bin/unicorn.

Also includes minor updates such as using current_path.join instead of File.join.

spectator avatar Jul 14 '14 20:07 spectator

Humm, I just rejected PR #28 because changing the command changes the meaning of the arguments particularly for -E when using unicorn vs unicorn_rails. I do see the value of being able to specify ./bin/unicorn though and I'm guessing you use binstubs.

My major concern with this change is that it will likely break the SSHKit::CommandMap. See the tl;dr here: https://github.com/capistrano/capistrano.

Are the updates for current_path.join just a syntax preference or was there any other motivation?

mlineen avatar Jul 14 '14 20:07 mlineen

Thanks for pointing this out, I wan't aware of this behaviour. Could you please take a look at the second commit I have just pushed? It should preserve original behavior and let users customize how they want to run unicorn at their own peril.

In re current_path.join vs File.join. I believe current_path is just an instance of Pathname which already has everything needed to create proper paths, so it is weird to see Pathname and File mixed up together where just Pathname is more than enough. Also, looking at Capistrano source it seems more conventional to use current_path.join.

spectator avatar Jul 14 '14 22:07 spectator

I am favorable towards this.

soulcutter avatar Jul 16 '14 18:07 soulcutter

Would like to use Rainbows! with this, +1

masterkain avatar Jul 23 '14 18:07 masterkain

I would like this as well. Hacking around it in the mean time.

christhekeele avatar Jan 27 '15 11:01 christhekeele