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

Remove hard-coded references to 'app/public' #126

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

naveg
Copy link
Contributor

@naveg naveg commented Nov 14, 2023

Prefer reading the public_path value from the packwerk configuration

@alexevanczuk
Copy link
Contributor

Thank you! @shageman would you help get this merged when ya get a chance 🙏🏼

Prefer reading the `public_path` value from the packwerk configuration,
or DEFAULT_PUBLIC_PATH when no specific pack is available
@naveg
Copy link
Contributor Author

naveg commented Nov 17, 2023

@alexevanczuk heads up that I replaced a couple more occurences of app/public with ParsePackwerk::DEFAULT_PUBLIC_PATH.

@naveg
Copy link
Contributor Author

naveg commented Nov 21, 2023

@alexevanczuk @shageman any sense of timeline for when this and #130 might be merged and released?

Copy link
Contributor

@ashleywillard ashleywillard left a comment

Choose a reason for hiding this comment

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

This looks good! It might also be good to make a small update in the README. Something like (that is -- the app/public folder) -> (that is -- to app/public folder or the pack's specified public path).

@@ -550,7 +553,7 @@ def self.get_info(packs: Packs.all, format: :detail, types: %i[privacy dependenc
pack_name: pack.name,
owner: owner.nil? ? 'No one' : owner.name,
size: pack.relative_path.glob('**/*.rb').count,
public_api: pack.relative_path.join('app/public')
public_api: pack.relative_path.join(package_by_name[pack.name].public_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I'm missing something here. Why create a hash and get the pack from the hash rather than calling pack.public_path?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevermind, I see that it's a ParsePackwerk::Pack and not a Packs::Pack.

@ashleywillard ashleywillard merged commit 3ed4eee into rubyatscale:main Nov 28, 2023
7 checks passed
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