bundler-site
bundler-site copied to clipboard
Installing gems from gists is underdocumented.
https://github.com/rubygems/bundler-site/blob/b86f2ccd3150009bd9bb25d961a462a880631116/source/v2.0/guides/git.html.haml#L111-L121
Is this even possible, considering gists don't support directories? Was it ever?
Hi! I don't know what the current plans are, but it looks like all of the default git sources (:github
, :gist
, and :bitbucket
) were deprecated 3 years ago.
See https://github.com/rubygems/bundler/blame/d852b30b66165dbb88682f72a8929568af7e7c57/lib/bundler/dsl.rb#L288-L312 and https://github.com/rubygems/bundler/commit/598ab4bef8fefd0a11d8b4b735a6c13b2cfb2e78.
The documentation should definitely mention that they're deprecated.
Also, as a note: I don't think Gems technically require any subdirectories. Gemspec files set spec.require_paths = ["lib"]
, usually. If you replace that ["lib"]
with ["."]
, it'll pull files from the same directory the gemspec is in.
So, does this mean this can be closed, or should we still clarify this?
I believe it means that we want the feature to be explained clearer in the Bundler site documentation.
Well, now that I've created my first gist gem :) it's all clear. Back then... I remember I was surprised that one can install gems from gists. And I was wondering how one can create one.
So, how can the docs be improved? You already have examples of installing gems from all 3 sources. And I guess they're pretty self-explanatory.
The only thing I can think of is providing an example of a gist gem. Which is more about rubygems
than bundler
. And if you ever created an ordinary gem, you probably have an idea how to create one in a gist.
So I leave deciding if the docs need to be improved to your discretion.
First of all, the canonical URL is https://bundler.io/guides/git.html, which is to be always up to date.
Per an example for gist:
gem, it looks enough well-documented to me. So I would say 👍 for closing this.
Per an example for gist: gem, it looks enough well-documented to me.
You seem to be missing my point, so I'll add a comment. For a person that never created a gem, when they see the :gist
source, the first question that comes to mind is, "How do I create a gem in a gist?" (At least that is likely.) And that is undocumented and not too straightforward.
But I understand that technically that is out of scope of bundler
(or not exactly in the scope of). And it's not really clear how to document it. Other than by giving a simple example, and/or writing an article. In other words closing the issue also makes sense.
Actually the current gist example is actually confusing, because it reads gist: '4815162342'
. And https://gist.github.com/4815162342 does not redirect to an actual gist, but to the list of gists of user named 4815162342
😆.
I guess an easy improvement is to change the reference to the sample gist @x-yuri created.