Run rubocop on all files
This commit is contained in:
@@ -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
|
||||
|
@@ -12,4 +12,4 @@ module Adamantium
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -18,4 +18,4 @@ module Adamantium
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user