untitledkingdom / mina-puma

Puma tasks for Mina
MIT License
84 stars 40 forks source link

Annoying dependency on Rails #19

Open Bounga opened 7 years ago

Bounga commented 7 years ago

Hello.

"mina-puma" requires mina/rails and it's pretty annoying and can cause bugs when using other plugins.

I use "mina-hanami" and there are some conflicting tasks such as mina console since these are not namespaced. So if one requires "mina-puma" after "mina-hanami" these tasks are overwritten.

I think it's a bit useless to require mina/rails to set puma_env (that you can default to production without trying to get RAILS_ENV value) and gain access to bundle_prefix you could easily rewrite with something like:

set :bundle_prefix, -> { %{#{fetch(:bundle_bin)} exec} }

and let the user knows he can tune it or even require mina/rails, mina/hanamior mina/whatever_framework after mina/pumato get this set for him.

My point here is it would be great if "mina-puma" was framework agnostic. What do you think of this idea?