Skip to content

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

Merged
ashleywillard merged 1 commit intorubyatscale:mainfrom
naveg:main
Nov 28, 2023
Merged

Remove hard-coded references to 'app/public'#126
ashleywillard merged 1 commit intorubyatscale:mainfrom
naveg:main

Conversation

@naveg
Copy link
Copy Markdown
Contributor

@naveg naveg commented Nov 14, 2023

Prefer reading the public_path value from the packwerk configuration

@alexevanczuk
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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).

Comment thread lib/packs/private.rb
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
Copy Markdown
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
Copy Markdown
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
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