Skip to content

Move bin/ to exe/ and use bin/ to ship binstubs to ease development #2755

@deivid-rodriguez

Description

@deivid-rodriguez

This is a Feature Proposal

🎩 Description

I'd like to repropose #1475, maybe @josepjaume has changed his mind since... 😃 Bundler moved the default folder to ship binaries to exe/ precisely to let gems use the bin/ folder for binstubs to aid development (http://bundler.io/blog/2015/03/20/moving-bins-to-exe.html).

The most common usage of binstubs is to shorten bundle exec my_tool to bin/my_tool but there's other handy usages of it. For example, I've been using binstubs like these to work with docker for a while:

Binstub d/rake

#!/bin/bash

fail_fast=${FAIL_FAST:-false}

docker-compose run --rm -e "FAIL_FAST=$fail_fast" decidim bash -c "bundle exec rake $*"

Binstub d/rspec

#!/bin/bash

gem=${1%%/*}
spec=${1#*/}
fail_fast=${FAIL_FAST:-false}
folder=${gem:-.}

docker-compose run --rm -e "FAIL_FAST=$fail_fast" decidim bash -c "cd $folder && bundle exec rspec $spec"

Happy to add this if you are ok with it!

📌 Related issues

📋 Additional Data

None.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions