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

fix: fix combination of rubygems and --all-projects #2333

Merged
merged 1 commit into from
Nov 3, 2021

Conversation

admons
Copy link
Contributor

@admons admons commented Nov 2, 2021

What does this PR do?

today all rebygems projects have the same project name with --all-projects flag.
this adds the nested dir name into the project name.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2021

Warnings
⚠️

Since the CLI is unifying on a standard and improved tooling, we're starting to migrate old-style imports and exports to ES6 ones.
A file you've modified is using either module.exports or require(). If you can, please update them to ES6 import syntax and export syntax.
Files found:

  • src/lib/plugins/rubygems/index.ts
  • test/acceptance/cli-test/cli-test.ruby.spec.ts

Generated by 🚫 dangerJS against 5fef84f

@admons admons force-pushed the fix/rubygems-with-all-projects branch 5 times, most recently from ed4dffd to 5706ef8 Compare November 3, 2021 10:36
today all rebygems projects have the same project name with --all-projects flag.
this adds the nested dir name into the project name.
@admons admons force-pushed the fix/rubygems-with-all-projects branch from 5706ef8 to 5fef84f Compare November 3, 2021 10:58
@admons admons marked this pull request as ready for review November 3, 2021 12:21
@admons admons requested review from a team as code owners November 3, 2021 12:21

export async function inspect(
root: string,
targetFile: string,
options: types.Options = {},
Copy link
Contributor Author

@admons admons Nov 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already send the options when we run inspect, but never used it here.
All changes in this file is just to propagate options to the plugin

return {
packageName: path.basename(root),
packageName: options.allSubProjects
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the name of the package here is the actual name of the project, and the project name is a part of the identifier, we only want to change this in the problematic area we're facing of 2 or more projects with the '--all-projects` flag.

Copy link
Contributor

@jan-stehlik jan-stehlik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one @admons 🕺

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 this pull request may close these issues.

3 participants