Remove hard-coded references to 'app/public'#126
Remove hard-coded references to 'app/public'#126ashleywillard merged 1 commit intorubyatscale:mainfrom
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.
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).
| 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.
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.
Nevermind, I see that it's a ParsePackwerk::Pack and not a Packs::Pack.
Prefer reading the
public_pathvalue from the packwerk configuration