boxen / our-boxen

Copy me for your team.
https://github.com/boxen/our-boxen/
MIT License
2.58k stars 884 forks source link

bundler management missing middleware or configuration capabilities #842

Closed akalman closed 6 years ago

akalman commented 7 years ago

I recently modified a puppet module to use several backing ruby functions that are dependent on the nokogiri ruby library. Because the puppet module itself isn't inside the gem tree (and its own gemfile is only used for testing), the nokogiri dependency needs to be explicitly fulfilled in the ruby environment that boxen is executing in.

This can easily be done by modifying the Gemfile in our our-boxen fork, but the gemfile is parsed and resolved by bundler when it is executed by the boxen bootstrapping script. And nokogiri is reliant on native libraries to install that the boxen ruby environment isn't configured to use.

Now, when a user updates to the latest version of our our-boxen repository, they have to manually run a command to change the boxen ruby config to tell it to use native libraries when installing nokogiri.

If there was a way to plug in some logic that ran during the bootstrapping process, we could automate this issue without having to modify our bootstrapping script from the mainline bootstrapping script.

jacobbednarz commented 7 years ago

Implementing a hooks system for Boxen has been something I've been contemplating for a while now however every time I've got into it I've hit issues with dependency or encapsulation for our use cases.

The implementation was simply a collection of bash finds + greps for a specific filename pattern and then execute each of them concurrently. Nothing fancy but I lost interest after it didn't solve our use cases.

I'd like to take a look at this but unfortunately it's not going to feature high on my priority list right now. If you'd like to open a PR for it, I'm happy to review.

akalman commented 7 years ago

here ya go

https://github.com/boxen/our-boxen/pull/845