Skip to content

Add common binstubs to decidim-dev#1475

Closed
deivid-rodriguez wants to merge 1 commit intomasterfrom
chore/binstubs
Closed

Add common binstubs to decidim-dev#1475
deivid-rodriguez wants to merge 1 commit intomasterfrom
chore/binstubs

Conversation

@deivid-rodriguez
Copy link
Copy Markdown
Contributor

🎩 What? Why?

This PR adds common binstubs to decidim-dev. I have my PATH extended in the decidim folder to include decidim-dev/bin. With that and this patch, I don't need to type bundle exec in front of every command.

Is this something you would consider for decidim-dev?

📌 Related Issues

None.

📋 Subtasks

None.

📷 Screenshots (optional)

None.

👻 GIF

hungry

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 10, 2017

Codecov Report

Merging #1475 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1475   +/-   ##
=======================================
  Coverage   96.97%   96.97%           
=======================================
  Files         492      492           
  Lines        8311     8311           
=======================================
  Hits         8060     8060           
  Misses        251      251

Copy link
Copy Markdown
Contributor

@oriolgual oriolgual left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's OK to me, let's hear the others :)

Copy link
Copy Markdown
Contributor

@josepjaume josepjaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know about this. Don't we risk these files becoming obsolete over time? IMHO this is a shortcoming of how ruby works, and there's already tools that try to work around this (rbenv, chruby, rvm...).

The fact that we dislike them is just another reason why using bundle exec isn't such a bad idea, even if it's a bit of a PITA.

So, unless I'm missing something, 👎 for me :S

@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

I don't know about this. Don't we risk these files becoming obsolete over time?

Well, yes, just like any other file you keep in version control, right? However, due to their simplicity (they just make sure the correct Gemfile environment is loaded so they can select the right executable) and the super extra care of bundler & rubygems towards backwards compatibility, these files usually have ~0 churn.

IMHO this is a shortcoming of how ruby works, and there's already tools that try to work around this (rbenv, chruby, rvm...).

The fact that we dislike them is just another reason why using bundle exec isn't such a bad idea, even if it's a bit of a PITA.

Note that those are ruby managers, and bundler is a library manager. I don't dislike ruby version managers (I actually use them every day...), but how do you ensure the correct version of a library is loaded using those tools? In my opinion, keeping these files in source control is just a nice convenience at little cost.

Having said all that, I just thought of another way to not need this. I think I can get the same candy by adding an unlikely folder to end up in source control to my global .gitignore file, like deivid-bin/, and put the binstubs in there! So closing!


Some references from rbenv's wiki:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants