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

Relative file path for all(?) versions of Brakeman #36

Conversation

@presidentbeef
Copy link

commented Jun 17, 2019

I broke guard-brakeman in Brakeman 4.5.1 when I switched Brakeman from using strings to represent paths internally to Brakeman::FilePath.

Brakeman::Warning#relative_path has been in Brakeman for a long time, so that should be the preferred API. However...I also removed that in 4.5.1. I should not have done that. I will add it back in 4.5.2 (or whatever the next release is).

Even after that, though, it would still leave guard-brakeman incompatible with Brakeman 4.5.1. So this patch will work with 4.5.1 and any other supported version.

I tested with Brakeman 4.5.1, 4.5.0, and 2.1.1.

@presidentbeef

This comment has been minimized.

@ahharvey

This comment has been minimized.

Copy link

commented Aug 12, 2019

thanks @presidentbeef for this update.

can I confirm that the issue described on Stackoverflow (NoMethodError: undefined method 'gsub' for #<Brakeman::FilePath>) should now be resolved with the latest version of Brakeman?

I am still getting this same error with guard-brakeman 0.8.3 and brakeman 4.6.1. I was not expecting this given presidentbeef/brakeman#1365

@presidentbeef

This comment has been minimized.

Copy link
Author

commented Aug 12, 2019

@ahharvey - It will not work without an update to guard-brakeman.

I realize the way I phrased my comment above was misleading. I had hoped to just update Brakeman to fix the issue, but treating Brakeman::Warning#file as a plain string just won't work any more.

@oreoshake poke, poke

@oreoshake

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

You caught me at a great time, I'm working on this in #37. I've merge this branch into that branch so I'll close this one out and work that one to completion.

@oreoshake oreoshake closed this Aug 12, 2019

oreoshake added a commit that referenced this pull request Aug 12, 2019

@oreoshake

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

@presidentbeef presidentbeef deleted the presidentbeef:work_with_new_brakeman_file_path branch Aug 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.