diff options
| author | mo <mo@mokhan.ca> | 2018-05-07 16:17:53 -0600 |
|---|---|---|
| committer | mo <mo@mokhan.ca> | 2018-05-07 16:17:53 -0600 |
| commit | a7ff82b96fc264b8587cc105b23516f60a0d4cfe (patch) | |
| tree | 7d4589801220ddd3ba7302d051dee8dd7869619d /lib/net/hippie/client.rb | |
| parent | 31500bdab2e72b370d7e622195161df2515fdf4f (diff) | |
rubocop -a
Diffstat (limited to 'lib/net/hippie/client.rb')
| -rw-r--r-- | lib/net/hippie/client.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/net/hippie/client.rb b/lib/net/hippie/client.rb index 9b810b0..bcf3a1c 100644 --- a/lib/net/hippie/client.rb +++ b/lib/net/hippie/client.rb @@ -4,8 +4,8 @@ module Net DEFAULT_HEADERS = { 'Accept' => 'application/json', 'Content-Type' => 'application/json', - 'User-Agent' => "net/hippie #{Net::Hippie::VERSION}", - } + 'User-Agent' => "net/hippie #{Net::Hippie::VERSION}" + }.freeze def initialize( certificate: nil, @@ -68,11 +68,11 @@ module Net http.set_debug_output(Net::Hippie.logger) http.cert = OpenSSL::X509::Certificate.new(certificate) if certificate if key - if passphrase - http.key = OpenSSL::PKey::RSA.new(key, passphrase) - else - http.key = OpenSSL::PKey::RSA.new(key) - end + http.key = if passphrase + OpenSSL::PKey::RSA.new(key, passphrase) + else + OpenSSL::PKey::RSA.new(key) + end end http end |
