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

AO3-6815 Update Contributing Information #4935

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/models/prompt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
before_validation :cleanup_url
def cleanup_url
self.url = Addressable::URI.heuristic_parse(self.url) if self.url
rescue Addressable::URI::InvalidURIError

Check warning on line 68 in app/models/prompt.rb

View workflow job for this annotation

GitHub Actions / Rubocop

[rubocop] reported by reviewdog 🐶 `rescue` at 68, 4 is not aligned with `def cleanup_url` at 66, 2. Raw Output: app/models/prompt.rb:68:5: C: Layout/RescueEnsureAlignment: `rescue` at 68, 4 is not aligned with `def cleanup_url` at 66, 2.

Check warning on line 68 in app/models/prompt.rb

View workflow job for this annotation

GitHub Actions / Rubocop

[rubocop] reported by reviewdog 🐶 Do not suppress exceptions. Raw Output: app/models/prompt.rb:68:5: W: Lint/SuppressedException: Do not suppress exceptions.
end

validate :correct_number_of_tags
Expand Down
2 changes: 1 addition & 1 deletion app/validators/url_format_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def validate_each(record,attribute,value)
# http (optional s) :// domain . tld (optional port) / anything
regexp = /^https?:\/\/[_a-z\d\-]+\.[._a-z\d\-]+(:\d+)?\/?.+/i
unless value.match regexp
record.errors.add(attribute, options[:message] || "does not appear to be a valid URL.")
record.errors.add(attribute.upcase, options[:message] || " does not appear to be a valid URL.")
end
end
end
Loading