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

Fix rule texts parsing #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fernandomm
Copy link
Contributor

It was using squeeze method without any parameter which will squeeze all characters.

Texts like

Message-Id is not valid, according to RFC 2822

were parsed as

Mesage-Id is not valid, acording to RFC 282

Note that Message-Id was changed to Mesage-Id and RFC 2822 was changed to RFC 282.

As a bonus I corrected the tests in https://github.com/codefriar/RubySpamAssassin/blob/af6d81bdfe0a1438a1911f46d68b1ec3a5e262b6/spec/RubySpamAssassin/report_parser_spec.rb which weren't testing anything since they didn't used expect() method.

They weren't using expect() so rspec wasn't testing anything.
It was using squeeze method without any parameter which will squeeze all characters.

Texts like "Message-Id is not valid, according to RFC 2822" were parsed as "Mesage-Id is not valid, acording to RFC 282". Note that Message-Id was changed to Mesage-Id and RFC 2822 was changed to RFC 282.
@mensfeld
Copy link

Ping. I could use this as well.

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.

2 participants