-
Notifications
You must be signed in to change notification settings - Fork 41
Adds BundleReport CLI class to an entry point from executable file #154
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
Conversation
JuanVqz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a test? Is it complicated?
lib/next_rails/bundle_report/cli.rb
Outdated
|
|
||
| require 'optparse' | ||
| require 'next_rails' | ||
| require 'next_rails/bundle_report' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| require 'next_rails/bundle_report' | |
| require 'next_rails/bundle_report' | |
| # 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for the contribution @hmdros ![]()
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