rubocop: fix various Rubocop warnings.

This commit is contained in:
evazion
2021-06-16 18:24:42 -05:00
parent cfe471e0b5
commit 07e23204b6
99 changed files with 412 additions and 374 deletions

View File

@@ -156,12 +156,12 @@ module Sources::Strategies
"https://twitter.com/i/web/status/#{status_id}"
elsif url =~ %r{\Ahttps?://(?:o|image-proxy-origin)\.twimg\.com/\d/proxy\.jpg\?t=(\w+)&}i
str = Base64.decode64($1)
source = URI.extract(str, ['http', 'https'])
source = URI.extract(str, %w[http https])
if source.any?
source = source[0]
if source =~ %r{^https?://twitpic.com/show/large/[a-z0-9]+}i
source.gsub!(%r{show/large/}, "")
index = source.rindex('.')
index = source.rindex(".")
source = source[0..index - 1]
end
source