0
0
Fork 0

Improve code style

This commit is contained in:
Eugen Rochko 2016-09-29 21:28:21 +02:00
parent e4aebad35a
commit 927333f4f8
41 changed files with 126 additions and 122 deletions

View file

@ -31,9 +31,9 @@ class XrdController < ApplicationController
def pem_to_magic_key(public_key)
modulus, exponent = [public_key.n, public_key.e].map do |component|
result = ""
result = ''
until component == 0 do
until component.zero?
result << [component % 256].pack('C')
component >>= 8
end
@ -41,7 +41,7 @@ class XrdController < ApplicationController
result.reverse!
end
(["RSA"] + [modulus, exponent].map { |n| Base64.urlsafe_encode64(n) }).join('.')
(['RSA'] + [modulus, exponent].map { |n| Base64.urlsafe_encode64(n) }).join('.')
end
def resource_param