-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
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
@alexevanczuk heads up that I replaced a couple more occurences of |
@alexevanczuk @shageman any sense of timeline for when this and #130 might be merged and released? |
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.
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) |
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.
I think I'm missing something here. Why create a hash and get the pack from the hash rather than calling pack.public_path
?
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.
Nevermind, I see that it's a ParsePackwerk::Pack
and not a Packs::Pack
.
Prefer reading the
public_path
value from the packwerk configuration