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

use bundler to parse the Gemfile? #4

Open
copiousfreetime opened this issue Jul 27, 2023 · 3 comments
Open

use bundler to parse the Gemfile? #4

copiousfreetime opened this issue Jul 27, 2023 · 3 comments

Comments

@copiousfreetime
Copy link
Contributor

copiousfreetime commented Jul 27, 2023

Is there any particular reason to avoid having Bundler itself parse the gemfile? Bundler is already a runtime dependency of gem_dating

I think you could do something like the following at minimum

bundler_defintion = ::Bundler::Definition.build(path_to_gemfile, nil, nil)
result = GemDating::Result.new(bundler_definition.specs.map(&:name))
@copiousfreetime
Copy link
Contributor Author

Correction - bundler_definition.specs will return ALL the resolved spec tree, I think what you would want is bundler_definition.dependencies

@Daniel-N-Huss
Copy link
Collaborator

I agree that Bundler should be our first stop for validating a Gemfile!

When we discussed, other options came up first. Namely, using bundler outdated, or other gems like libyear-bundler.

We specifically wanted to avoid needing a valid Bundler definition, or even a parsable Gemfile. We wanted to avoid getting blocked by setting up really old rubies, gems that were privately hosted, or missing for other reasons (ex: Mimemagic pulling gems).

I'll update the readme with a section that highlights that better!

@copiousfreetime
Copy link
Contributor Author

Totally understandable, bundler does do a bunch of other things under the covers.

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

No branches or pull requests

2 participants