summaryrefslogtreecommitdiff
path: root/lib/nickserver/adapters/http.rb
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2017-09-23 15:11:20 +0000
committerazul <azul@riseup.net>2017-09-23 15:11:20 +0000
commitfac140a8ff76e98c275194845125d4c97f4ba07b (patch)
tree08ffafb2c70935892e975704911080b9da84e391 /lib/nickserver/adapters/http.rb
parent787287318c54b019a12ef79525c9f5b10d93724d (diff)
parent8ac6bb8492c9a3b9ec5d7b5bf2b35907a1f8c332 (diff)
Merge branch 'rubocop' into 'master'
Style fixes based on Rubocop See merge request leap/nickserver!19
Diffstat (limited to 'lib/nickserver/adapters/http.rb')
-rw-r--r--lib/nickserver/adapters/http.rb26
1 files changed, 12 insertions, 14 deletions
diff --git a/lib/nickserver/adapters/http.rb b/lib/nickserver/adapters/http.rb
index eb77cc6..a759e53 100644
--- a/lib/nickserver/adapters/http.rb
+++ b/lib/nickserver/adapters/http.rb
@@ -2,22 +2,20 @@ require 'nickserver/adapters'
require 'nickserver/config'
require 'http'
-# Nickserver::Adapters::Http
-#
-# Basic http adapter with ssl and minimal error handling.
-# Only implemented get requests so far.
-#
-# Error Handling:
-#
-# Pass a string as the 'rescue' option. If a ConnectionError occures
-# which includes the string passed it will be rescued and the request
-# will return nil. This allows handling the error inside the adapter so
-# that for the derived CelluloidHttp Adapter the actor does not get
-# killed.
-
module Nickserver::Adapters
+ # Nickserver::Adapters::Http
+ #
+ # Basic http adapter with ssl and minimal error handling.
+ # Only implemented get requests so far.
+ #
+ # Error Handling:
+ #
+ # Pass a string as the 'rescue' option. If a ConnectionError occures
+ # which includes the string passed it will be rescued and the request
+ # will return nil. This allows handling the error inside the adapter so
+ # that for the derived CelluloidHttp Adapter the actor does not get
+ # killed.
class Http
-
def get(url, options = {})
url = HTTP::URI.parse url.to_s
response = get_with_auth url, params: options[:query]