Adds BundleReport CLI class to an entry point from executable file#154
Merged
Adds BundleReport CLI class to an entry point from executable file#154
Conversation
JuanVqz
reviewed
May 5, 2025
Member
JuanVqz
left a comment
There was a problem hiding this comment.
Could you please add a test? Is it complicated?
JuanVqz
reviewed
May 5, 2025
JuanVqz
reviewed
May 5, 2025
JuanVqz
reviewed
May 5, 2025
JuanVqz
reviewed
May 5, 2025
fbuys
reviewed
May 5, 2025
JuanVqz
reviewed
May 6, 2025
lib/next_rails/bundle_report/cli.rb
Outdated
|
|
||
| require 'optparse' | ||
| require 'next_rails' | ||
| require 'next_rails/bundle_report' |
Member
There was a problem hiding this comment.
Suggested change
| require 'next_rails/bundle_report' | |
| require 'next_rails/bundle_report' | |
fbuys
approved these changes
May 6, 2025
hmdros
commented
May 6, 2025
| # Print a report on our Gemfile | ||
| # Why not just use `bundle outdated`? It doesn't give us the information we care about (and it fails). | ||
| # | ||
| at_exit do |
Author
There was a problem hiding this comment.
Was there an specific reason for using this at_exit block?
I removed it from def run in the CLI because it was making tests execution fail for it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Following issue: #153
Motivation and Context
Exposing a single entry point for the
bundle_reportcommand to make it easier to invoke programmatically.Remove the logic from
exe/bundle_report, and move it out tolib/next_rails/bundle_report/cli.rbso we can call:NextRails::BundleReport::CLI.new(ARGV).generatefrom another service, and we would still have the same output as calling thebundle_reportfrom exe.How Has This Been Tested?
Moving the code from
exe/bundle_reporttolib/next_rails/bundle_report/cli.rbshould keep the same behavior.I will abide by the code of conduct