Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing gems from gists is underdocumented. #503

Open
x-yuri opened this issue Feb 22, 2020 · 8 comments
Open

Installing gems from gists is underdocumented. #503

x-yuri opened this issue Feb 22, 2020 · 8 comments

Comments

@x-yuri
Copy link

x-yuri commented Feb 22, 2020

There are analogous shortcuts for Bitbucket (<code>:bitbucket</code>) and GitHub Gists (<code>:gist</code>).
:code
# lang: ruby
gem 'capistrano-sidekiq', github: 'seuros/capistrano-sidekiq'
gem 'keystone', bitbucket: 'musicone/keystone'
%h2 Custom git sources
.contents
.bullet
.description
The <code>:github</code> shortcut used above is one of Bundler's built in git sources. Bundler comes
with shortcuts for <code>:github</code>, <code>:gist</code>, and <code>:bitbucket</code>, but you can

Is this even possible, considering gists don't support directories? Was it ever?

@duckinator
Copy link
Member

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 rubygems/bundler@598ab4b.

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.

@x-yuri
Copy link
Author

x-yuri commented Jul 13, 2023

It is indeed possible and the deprecation is canceled.

@deivid-rodriguez
Copy link
Member

So, does this mean this can be closed, or should we still clarify this?

@olleolleolle
Copy link
Member

I believe it means that we want the feature to be explained clearer in the Bundler site documentation.

@x-yuri
Copy link
Author

x-yuri commented Jul 13, 2023

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.

@tnir
Copy link
Collaborator

tnir commented Jul 13, 2023

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.

@x-yuri
Copy link
Author

x-yuri commented Jul 14, 2023

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.

@deivid-rodriguez
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants