-
Notifications
You must be signed in to change notification settings - Fork 103
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
Extract Rex::MIME dependency #201
Conversation
end | ||
|
||
def to_s | ||
self.header.to_s + "\r\n" + content_encoded + "\r\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant self
detected.
What do we actually use this MIME code for anyway? Is it really still the case that there is nothing out there that can provide this functionality beyond Rex or a derivative? |
The methods
Either of these are candidates for refactoring. I'm not sure that a straight forward replacement exists though. Note that I only spent an hour or so looking at it several months ago. |
Gavin and I looked at it for a bit, and extracting that class is the quick fix, which could be completed in one PR. Doing it this way let's us get rid of Rex in the meantime and move forward on our own schedule for the refactoring of the extracted class. The refactor is not hard, but would need a bit of testing to make sure we didn't break anything. |
👍 |
So far the best I've found for The big trade-off right now is whether we have 1-2 external dependencies or 0 external dependencies. |
Removes Rex as a dependency from nexpose-client altogether. The Rex::MIME module has been incorporated into nexpose-client under the Rexlite::MIME module to avoid namespace collisions. At this time Rex::MIME was the only part of Rex that nexpose-client depended on. A few methods of Rex::Text were also pulled into the consuming classes in Rexlite::MIME.
Sicne it has used Rex::MIME in place of rest-client for a while the docs should be updated to reflect that.
13ba82d
to
cb4cd1f
Compare
Extract Rex::MIME dependency
Removes Rex as a dependency from nexpose-client altogether. The Rex::MIME module has been incorporated into nexpose-client under the Rexlite::MIME module to avoid namespace collisions.
At this time Rex::MIME was the only part of Rex that nexpose-client depended on. A few methods of Rex::Text were also pulled into the consuming classes in Rexlite::MIME.
Rex::MIME::Message was used by the
Connection#import_scan
andAdhocReportConfig#generate
methods.cc @sgreen-r7 @hdm @jhart-r7
All of the files pulled over are under the BSD 3-clause license in the Rex project I believe.