capistrano / bundler

Bundler support for Capistrano 3.x
MIT License
219 stars 83 forks source link

Add hanami to bundle_bins #88

Closed mgrachev closed 7 years ago

mgrachev commented 7 years ago

This is necessary so that you can run the command hanami through methodexecute.

Hanami is a full-stack Ruby web framework.

Example:

namespace :deploy do
  task :hanami_help do
    on roles(:app) do
      within release_path do
        with hanami_env: fetch(:hanami_env) do
          execute :hanami, 'help'
        end
      end
    end
  end
end
mattbrictson commented 7 years ago

Hi, thanks for the PR! I know that rails is listed directly in the capistrano-bundler gem, but I think that is the exception to the rule. Generally it is a better idea to create a new gem that does this. So I think this should be done in your capistrano-hanami gem.

For example, you can see here how the capistrano3-puma gem automatically adds puma to the list of Bundler binaries using append:

namespace :load do
  task :defaults do
    # ...
    append :bundle_bins, 'puma', 'pumactl'
  end
end

https://github.com/seuros/capistrano-puma/blob/e18b30c18aceceed003e8007c268125317a17a9d/lib/capistrano/tasks/puma.rake#L27

I think this technique is preferable than changing the capistrano-bundler gem itself.

mgrachev commented 7 years ago

@mattbrictson Thank you, I agree with you. Happy New Year! 🎉