Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSytse Sijbrandij <sytses@gmail.com>2014-09-20 13:57:12 +0400
committerSytse Sijbrandij <sytses@gmail.com>2014-09-20 13:57:12 +0400
commit82956a03c7394c31001190d85a8e8a641c52dcba (patch)
tree751cf7c652226c15174bf6fdc3d87c190deb3ddb
parent24c79205c4d780c709563b799174135ae38c7789 (diff)
parentb9f0508732a70a50e48c460365d7eeee059cc7c0 (diff)
Merge pull request #7798 from spuder/issue#7763
Adds support for ruby 1.8 in webhook example
-rw-r--r--doc/web_hooks/web_hooks.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/web_hooks/web_hooks.md b/doc/web_hooks/web_hooks.md
index 13c4de4301e..16817d1933d 100644
--- a/doc/web_hooks/web_hooks.md
+++ b/doc/web_hooks/web_hooks.md
@@ -124,12 +124,14 @@ Save the following file as `print_http_body.rb`.
```ruby
require 'webrick'
-server = WEBrick::HTTPServer.new(Port: ARGV.first)
+server = WEBrick::HTTPServer.new(:Port => ARGV.first)
server.mount_proc '/' do |req, res|
puts req.body
end
-trap 'INT' do server.shutdown end
+trap 'INT' do
+ server.shutdown
+end
server.start
```