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

Only Cleanup! #292

Merged
merged 11 commits into from
Sep 6, 2017
Merged

Only Cleanup! #292

merged 11 commits into from
Sep 6, 2017

Conversation

sgreen-r7
Copy link
Contributor

@sgreen-r7 sgreen-r7 commented Sep 6, 2017

This should just be non-breaking changes, formatting fixes, and general TLC.

rubocop --format simple -F

@loginURL = loginURL
@name = name
@baseURL = baseURL
@loginURL = loginURL

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use snake_case for variable names.

@baseURL = baseURL
@loginURL = loginURL
@name = name
@baseURL = baseURL

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use snake_case for variable names.

@baseURL = baseURL
@headers = {}
@name = name
@baseURL = baseURL

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use snake_case for variable names.

@@ -4,22 +4,21 @@ module Nexpose
module WebCredentials

module WebAppAuthType
HTML_FORM = 'htmlform' # Represent HTML form credentials.
HTML_FORM = 'htmlform' # Represent HTML form credentials.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Freeze mutable objects assigned to constants.

ALL_INSTANCES_IN_A_SPECIFIC_SITE = 'All Instances in a Specific Site'
ALL_INSTANCES = 'All Instances'
ALL_INSTANCES_ON_A_SPECIFIC_ASSET = 'All Instances on a Specific Asset'
ALL_INSTANCES_IN_A_SPECIFIC_SITE = 'All Instances in a Specific Site'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Freeze mutable objects assigned to constants.

end

# The reason for the exception status.
#
module Reason
FALSE_POSITIVE = 'False Positive'
FALSE_POSITIVE = 'False Positive'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Freeze mutable objects assigned to constants.

DELETED = 'Deleted'
APPROVED = 'Approved'
REJECTED = 'Rejected'
DELETED = 'Deleted'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Freeze mutable objects assigned to constants.

REJECTED = 'Rejected'
DELETED = 'Deleted'
APPROVED = 'Approved'
REJECTED = 'Rejected'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Freeze mutable objects assigned to constants.

APPROVED = 'Approved'
REJECTED = 'Rejected'
DELETED = 'Deleted'
APPROVED = 'Approved'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Freeze mutable objects assigned to constants.

Nexpose::VulnException::Status.const_get(name).to_s.downcase==status.downcase || status.to_sym.downcase == name.downcase
end
def status_string_to_constant(status)
Nexpose::VulnException::Status.constants.find do |name|

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer detect over find.

@rapid7 rapid7 deleted a comment from houndci-bot Sep 6, 2017
@sgreen-r7 sgreen-r7 merged commit 92f3238 into master Sep 6, 2017
@sgreen-r7 sgreen-r7 deleted the cleanup_formatting branch September 6, 2017 00:50
@sgreen-r7 sgreen-r7 mentioned this pull request Sep 6, 2017
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