-
Notifications
You must be signed in to change notification settings - Fork 81
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
Changes to be compatible with ROTP 4.0.2
#45
Changes to be compatible with ROTP 4.0.2
#45
Conversation
@@ -9,6 +9,7 @@ | |||
require "minitest/autorun" | |||
require "minitest/unit" | |||
require "active_record" | |||
require "activemodel-serializers-xml" |
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.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
assert_match %r{^otpauth://totp/Example\:roberto@heapsource\.com\?secret=\w{32}&issuer=Example$}, @user.provisioning_uri(nil, issuer: "Example") | ||
assert_match %r{^otpauth://totp/Example\:roberto@heapsource\.com\?secret=\w{32}&issuer=Example$}, @visitor.provisioning_uri(nil, issuer: "Example") | ||
assert_match %r{^otpauth://totp/Example\:roberto\?secret=\w{32}&issuer=Example$}, @user.provisioning_uri("roberto", issuer: "Example") | ||
assert_match %r{^otpauth://totp/Example\:roberto\?secret=\w{32}&issuer=Example$}, @visitor.provisioning_uri("roberto", issuer: "Example") |
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.
Metrics/LineLength: Line is too long. [141/80]
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
assert_match %r{otpauth://totp/roberto\?secret=\w{16}&issuer=Example}, @visitor.provisioning_uri("roberto", issuer: "Example") | ||
assert_match %r{^otpauth://totp/Example\:roberto@heapsource\.com\?secret=\w{32}&issuer=Example$}, @user.provisioning_uri(nil, issuer: "Example") | ||
assert_match %r{^otpauth://totp/Example\:roberto@heapsource\.com\?secret=\w{32}&issuer=Example$}, @visitor.provisioning_uri(nil, issuer: "Example") | ||
assert_match %r{^otpauth://totp/Example\:roberto\?secret=\w{32}&issuer=Example$}, @user.provisioning_uri("roberto", issuer: "Example") |
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.
Metrics/LineLength: Line is too long. [138/80]
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
assert_match %r{otpauth://totp/roberto\?secret=\w{16}&issuer=Example}, @user.provisioning_uri("roberto", issuer: "Example") | ||
assert_match %r{otpauth://totp/roberto\?secret=\w{16}&issuer=Example}, @visitor.provisioning_uri("roberto", issuer: "Example") | ||
assert_match %r{^otpauth://totp/Example\:roberto@heapsource\.com\?secret=\w{32}&issuer=Example$}, @user.provisioning_uri(nil, issuer: "Example") | ||
assert_match %r{^otpauth://totp/Example\:roberto@heapsource\.com\?secret=\w{32}&issuer=Example$}, @visitor.provisioning_uri(nil, issuer: "Example") |
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.
Metrics/LineLength: Line is too long. [151/80]
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
assert_match %r{otpauth://totp/roberto@heapsource\.com\?secret=\w{16}&issuer=Example}, @visitor.provisioning_uri(nil, issuer: "Example") | ||
assert_match %r{otpauth://totp/roberto\?secret=\w{16}&issuer=Example}, @user.provisioning_uri("roberto", issuer: "Example") | ||
assert_match %r{otpauth://totp/roberto\?secret=\w{16}&issuer=Example}, @visitor.provisioning_uri("roberto", issuer: "Example") | ||
assert_match %r{^otpauth://totp/Example\:roberto@heapsource\.com\?secret=\w{32}&issuer=Example$}, @user.provisioning_uri(nil, issuer: "Example") |
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.
Metrics/LineLength: Line is too long. [148/80]
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
assert_match %r{otpauth://totp/roberto\?secret=\w{16}}, @visitor.provisioning_uri("roberto") | ||
assert_match %r{otpauth://hotp/roberto\?secret=\w{16}}, @member.provisioning_uri("roberto") | ||
assert_match %r{^otpauth://totp/roberto\?secret=\w{32}$}, @user.provisioning_uri("roberto") | ||
assert_match %r{^otpauth://totp/roberto\?secret=\w{32}$}, @visitor.provisioning_uri("roberto") |
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.
Metrics/LineLength: Line is too long. [98/80]
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
assert_match %r{otpauth://totp/roberto\?secret=\w{16}}, @user.provisioning_uri("roberto") | ||
assert_match %r{otpauth://totp/roberto\?secret=\w{16}}, @visitor.provisioning_uri("roberto") | ||
assert_match %r{otpauth://hotp/roberto\?secret=\w{16}}, @member.provisioning_uri("roberto") | ||
assert_match %r{^otpauth://totp/roberto\?secret=\w{32}$}, @user.provisioning_uri("roberto") |
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.
Metrics/LineLength: Line is too long. [95/80]
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
3cfc1e3
to
63c5146
Compare
This was done to make |
@subinwalter I haven't chance to use this gem during the last years so I can't maintain it properly so I've added you as collaborator. Please just add an note in the README if any future/current version is incompatible with previous versions so users can lock the gem to a proper version 🙏 |
@guilleiguaran opened PR |
Fixes #44