Skip to content

Fix: issues affecting the code quality#567

Merged
pitbulk merged 8 commits intoSAML-Toolkits:masterfrom
withshubh:master
Jan 2, 2023
Merged

Fix: issues affecting the code quality#567
pitbulk merged 8 commits intoSAML-Toolkits:masterfrom
withshubh:master

Conversation

@withshubh
Copy link
Copy Markdown
Contributor

Description

This PR fixes a few issues that were affecting the code quality.

Summary of changes

  • Prefer rescuing StandardError over Exception
  • Prefix any unused method arguments with an underscore
  • Remove redundant and unnecessary require statement
  • Replaces the old OpenSSL algorithmic constants with the newer strings initializers
  • Remove redundant string coercion
  • Remove useless access modifiers

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.002%) to 97.999% when pulling 925a10a on withshubh:master into b3f2191 on onelogin:master.

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 18, 2021

Coverage Status

Coverage decreased (-1.2%) to 96.791% when pulling b71ca2f on withshubh:master into b3f2191 on onelogin:master.

# @return [Boolean] True if the SessionNotOnOrAfter of the AuthnStatement is valid, otherwise (when expired) False if soft=True
# @raise [ValidationError] if soft == false and validation fails
#
def validate_session_expiration(soft = true)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I believe we can simply remove the param

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@pitbulk removed!:sparkles:

@withshubh
Copy link
Copy Markdown
Contributor Author

Hi @pitbulk 👋

Please review the PR ✨

@johnnyshields
Copy link
Copy Markdown
Collaborator

johnnyshields commented Aug 8, 2021

👍 looks good to merge

Comment thread lib/onelogin/ruby-saml/response.rb Outdated
@johnnyshields
Copy link
Copy Markdown
Collaborator

@pitbulk let's merge this one?

@pitbulk pitbulk merged commit 82f08a3 into SAML-Toolkits:master Jan 2, 2023
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.

4 participants