summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2018-09-07 10:59:13 +1000
committerAsh McKenzie <amckenzie@gitlab.com>2018-09-07 10:59:24 +1000
commit631430b2fd5f581637a66580ee9a56a508cc7ca4 (patch)
tree4d328509bafb493731a1a725d8ee3b0b03d240a9
parent493646938cad8f99f5420ec578689e112515c5d7 (diff)
downloadgitlab-shell-631430b2fd5f581637a66580ee9a56a508cc7ca4.tar.gz
New HTTPCodes module
-rw-r--r--lib/http_codes.rb5
-rw-r--r--lib/http_helper.rb4
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/http_codes.rb b/lib/http_codes.rb
new file mode 100644
index 0000000..24b3b5a
--- /dev/null
+++ b/lib/http_codes.rb
@@ -0,0 +1,5 @@
+module HTTPCodes
+ HTTP_SUCCESS = '200'.freeze
+ HTTP_UNAUTHORIZED = '401'.freeze
+ HTTP_NOT_FOUND = '404'.freeze
+end
diff --git a/lib/http_helper.rb b/lib/http_helper.rb
index 62d0c51..1e75833 100644
--- a/lib/http_helper.rb
+++ b/lib/http_helper.rb
@@ -1,4 +1,8 @@
+require_relative 'http_codes'
+
module HTTPHelper
+ include HTTPCodes
+
READ_TIMEOUT = 300
protected