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

Replace .aprc with .amazing_print.yml #63

Open
HarlemSquirrel opened this issue Oct 31, 2020 · 4 comments
Open

Replace .aprc with .amazing_print.yml #63

HarlemSquirrel opened this issue Oct 31, 2020 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@HarlemSquirrel
Copy link
Member

To avoid conflicts like #54 I think we should stop using .aprc and use a new file in YAML format like Rubocop does.

We could support loading files from multiple places. See https://github.com/rubocop-hq/rubocop/blob/master/lib/rubocop/config_loader.rb

This is also more safe since today any Ruby code in .aprc is executed.

@HarlemSquirrel HarlemSquirrel added the enhancement New feature or request label Oct 31, 2020
@kikonen
Copy link

kikonen commented Nov 7, 2020

yes, executable code in .aprc can possibly allow code injection attacks (one reason why I never kept awesome_print enabled in production. Another reason being that it was was triggering severe performance issues in some situations, by simply having gem loaded into process; don't know if amazing_print has inherited those performance issues).

@klausbadelt
Copy link

The current fixed .aprc location in the home folder - as opposed to project folder etc. - also complicates deployment and configuration sharing between devs. For example, building a Docker image with files outside the project folder is not possible/inconvenient.

@stefanwascoding
Copy link
Contributor

+1 for using Rubocop-style config loading.

I was about to open an issue for supporting an XDG base directory aware config path ($XDG_CONFIG_HOME/aprc -- I like a clean $HOME 😄), when I came across this issue here, which potentially already includes that feature.

@paddor OTOH if work on this issue is not likely any time soon, let me know if a PR for just adding XDG base dir support would have a chance of getting accepted.

@paddor
Copy link
Contributor

paddor commented Mar 15, 2021

I don't have a strong opinion about this. XDG seems like a good idea. PR welcome.

@HarlemSquirrel HarlemSquirrel added the help wanted Extra attention is needed label Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants