diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-07 17:00:21 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-09 23:38:42 +0100 |
commit | 1da7d54ee549ffd54ce8f8df37caeee30badcce4 (patch) | |
tree | cc58a19ce8482e054479a50309ea8aaebcc0db20 /lib/gitlab_net.rb | |
parent | 6d23be22d907ad8328169d36712ea36d36107b93 (diff) | |
download | gitlab-shell-1da7d54ee549ffd54ce8f8df37caeee30badcce4.tar.gz |
Print broadcast message if one is available.
Diffstat (limited to 'lib/gitlab_net.rb')
-rw-r--r-- | lib/gitlab_net.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb index c178927..9bfc0d5 100644 --- a/lib/gitlab_net.rb +++ b/lib/gitlab_net.rb @@ -41,6 +41,15 @@ class GitlabNet JSON.parse(resp.body) rescue nil end + def broadcast_message + resp = get("#{host}/broadcast_message") + if resp.code == '200' + JSON.parse(resp.body) rescue nil + else + nil + end + end + def check get("#{host}/check") end |