Run rubocop on all files

This commit is contained in:
2023-06-08 21:57:54 +10:00
parent 6a2bc82e3b
commit 9d9d8ccf6d
65 changed files with 114 additions and 158 deletions

View File

@@ -52,8 +52,10 @@ module Adamantium
mastodon_token = settings.mastodon_token
file = Tempfile.new(SecureRandom.uuid)
# rubocop:disable Security/Open
file.write(URI.open(photo["value"]).read)
file.rewind
# rubocop:enable Security/Open
file_size = file.size.to_f / 2**20
formatted_file_size = "%.2f" % file_size

View File

@@ -12,4 +12,4 @@ module Adamantium
end
end
end
end
end

View File

@@ -18,4 +18,4 @@ module Adamantium
end
end
end
end
end

View File

@@ -3,7 +3,7 @@ module Adamantium
class BasicAuth < Rack::Auth::Basic
def call(env)
request = Rack::Request.new(env)
if request.path.match(/^\/admin*/)
if /^\/admin*/.match?(request.path)
# Execute basic authentication
super(env)
else