rails / cssbundling-rails

Bundle and process CSS in Rails with Tailwind, PostCSS, and Sass via Node.js.
MIT License
565 stars 83 forks source link

Use ruby command "gem list" for foreman existence test #93

Closed elalemanyo closed 2 years ago

elalemanyo commented 2 years ago

Hi, I know this does not solve any current problem, but maybe would be better to use the command gem list to check for foreman. This command gives a better output (boolean) and appropriate exit code.

Thanks

Related with rails/cssbundling-rails/pull/91

elalemanyo commented 2 years ago

@MrJoy I know this is something you fixed a few days ago, but maybe this is a good way to improve it, what do you think? Or is your way better? Thanks

MrJoy commented 2 years ago

Seems perfectly reasonable to me.

kevynlebouille commented 2 years ago

Hi @elalemanyo ,

Your version output true or false in the console.

Here is my proposal

if ! gem list foreman -i --silent; then
elalemanyo commented 2 years ago

Hi @elalemanyo ,

Your version output true or false in the console.

Here is my proposal

if ! gem list foreman -i --silent; then

@kevynlebouille I love your proposal, Thanks!

elalemanyo commented 2 years ago

@MrJoy do you think we can merge this? 😁

MrJoy commented 2 years ago

I'm not a maintainer, so it's not really for me to say. I can say that the fix works perfectly fine for my use-case and I fully support merging it.