-
Notifications
You must be signed in to change notification settings - Fork 2
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
Delete most of the logic, and clean-up what's left #83
Conversation
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.
Some files could not be reviewed due to errors:
Error: The `Lint/InvalidCharacterLiteral` cop has been removed since it was n...
Error: The `Lint/InvalidCharacterLiteral` cop has been removed since it was never being actually triggered. (obsolete configuration found in .rubocop.yml, please update it) obsolete parameter EnforcedStyle (for Style/Encoding) found in .rubocop.yml Style/Encoding no longer supports styles. The "never" behavior is always assumed. obsolete parameter SupportedStyles (for Style/Encoding) found in .rubocop.yml
Codecov Report
@@ Coverage Diff @@
## master #83 +/- ##
=========================================
- Coverage 99.44% 99.4% -0.04%
=========================================
Files 10 10
Lines 358 168 -190
=========================================
- Hits 356 167 -189
+ Misses 2 1 -1
Continue to review full report at Codecov.
|
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.
Some files could not be reviewed due to errors:
Error: The `Lint/InvalidCharacterLiteral` cop has been removed since it was n...
Error: The `Lint/InvalidCharacterLiteral` cop has been removed since it was never being actually triggered. (obsolete configuration found in .rubocop.yml, please update it) obsolete parameter EnforcedStyle (for Style/Encoding) found in .rubocop.yml Style/Encoding no longer supports styles. The "never" behavior is always assumed. obsolete parameter SupportedStyles (for Style/Encoding) found in .rubocop.yml
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.
Some files could not be reviewed due to errors:
Error: The `Lint/InvalidCharacterLiteral` cop has been removed since it was n...
Error: The `Lint/InvalidCharacterLiteral` cop has been removed since it was never being actually triggered. (obsolete configuration found in .rubocop.yml, please update it) obsolete parameter EnforcedStyle (for Style/Encoding) found in .rubocop.yml Style/Encoding no longer supports styles. The "never" behavior is always assumed. obsolete parameter SupportedStyles (for Style/Encoding) found in .rubocop.yml
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.
Some files could not be reviewed due to errors:
Error: The `Lint/InvalidCharacterLiteral` cop has been removed since it was n...
Error: The `Lint/InvalidCharacterLiteral` cop has been removed since it was never being actually triggered. (obsolete configuration found in .rubocop.yml, please update it) obsolete parameter EnforcedStyle (for Style/Encoding) found in .rubocop.yml Style/Encoding no longer supports styles. The "never" behavior is always assumed. obsolete parameter SupportedStyles (for Style/Encoding) found in .rubocop.yml
def validate_retrievable(option, uri) | ||
fail_unless Reacher.new(uri).retrievable? if option | ||
invalid unless Reacher.new(uri).retrievable? if option |
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.
Avoid using nested modifiers.
Avoid modifier if after another conditional.
Single `invalid` method is enough.
The allow_nil/blank options are standard Active Model features. There aren't implemented in this gem, thus they don't need testing.
Validating URLs requires additional constraints. Not all valid URIs with http(s) scheme set are valid URLs. We used to have a RegExp for that, but it has been proven to be way too limited. Disabling these specs for now.
The previous regular-expression-based implementation was insufficient, and very difficult to improve. Therefore, most of it must be removed prior being rewritten from scratch.