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

Remove ruby 2.4+ warnings #458

Merged
merged 3 commits into from
May 30, 2018

Conversation

davidlibrera
Copy link
Contributor

I do some code refactor in order to remove warnings about unused variables, inner scoped variables with same name of outer scope and a missing initialization of @logger instance attribute inside Logger. I don't change any code behaviour.

@@ -288,7 +289,7 @@ def issuers
raise ValidationError.new(error_msg)
end

doc = decrypted_document.nil? ? document : decrypted_document
_doc = decrypted_document.nil? ? document : decrypted_document
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove this line? It seems not required.

@@ -32,7 +32,9 @@ def self.format_cert(cert)
formatted_cert.join("\n")
else
cert = cert.gsub(/\-{5}\s?(BEGIN|END) CERTIFICATE\s?\-{5}/, "")
cert = cert.gsub(/[\n\r\s]/, "")
cert = cert.gsub(/[\r]/, "")
cert = cert.gsub(/\n/, "")
Copy link
Collaborator

Choose a reason for hiding this comment

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

/\n/ or /[\n]/ ?
/\s/ or /[\s]/ ?

@@ -318,10 +318,10 @@ def validate_signature(base64_cert, soft = true)

# check digests
ref = REXML::XPath.first(sig_element, "//ds:Reference", {"ds"=>DSIG})
uri = ref.attributes.get_attribute("URI").value
_uri = ref.attributes.get_attribute("URI").value
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you remove this line as well?

@davidlibrera
Copy link
Contributor Author

I commit the fix. Should I squash it into one commit?

@pitbulk
Copy link
Collaborator

pitbulk commented May 30, 2018

I think we are ok

@pitbulk pitbulk merged commit a15c183 into SAML-Toolkits:master May 30, 2018
@davidlibrera davidlibrera deleted the refactor/warnings branch May 30, 2018 13:34
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.

None yet

2 participants