GitHub PullRequestReviewCommentEvent at 2014-03-07 12:57:09
Repository: sinatra-contrib
Actor: rkh
Payload: {"comment":{"url":"https://api.github.com/repos/sinatra/sinatra-contrib/pulls/comments/10381996","id":10381996,"diff_hunk":"@@ -0,0 +1,134 @@\n+require 'open-uri'\n+require 'net/http'\n+require 'timeout'\n+\n+# Helps you spinning up and shutting down your own sinatra app. This is especially helpful for running\n+# real network tests against a sinatra backend.\n+#\n+# The backend server could look like the following (in test/server.rb).\n+#\n+#   require \"sinatra\"\n+#\n+#   get \"/\" do\n+#     \"Cheers from test server\"\n+#   end\n+#\n+#   get \"/ping\" do\n+#     \"1\"\n+#   end\n+#\n+# Note that you need to implement a ping action for internal use.\n+#\n+# Next, you need to write your runner.\n+#\n+#   require 'sinatra/runner'\n+#\n+#   class Runner < Sinatra::Runner\n+#     def app_file\n+#       File.expand_path(\"../server.rb\", __FILE__)\n+#     end\n+#   end\n+#\n+# Override Runner#app_file, #command, #port, #protocol and #ping_path for customization.\n+#\n+# Whereever you need this test backend, here's how you manage it. The following example assumes you\n+# have a test in your app that needs to be run against your test backend.\n+#\n+#   runner = ServerRunner.new\n+#   runner.run\n+#\n+#   # ..tests against localhost:4567 here..\n+#\n+#   runner.kill\n+#\n+# For an example, check https://github.com/apotonick/roar/blob/master/test/test_helper.rb\n+module Sinatra\n+  class Runner\n+    def app_file\n+      File.expand_path(\"../server.rb\", __FILE__)","path":"lib/sinatra/runner.rb","position":48,"original_position":48,"commit_id":"ca4df9649932cda75484ac91259d331534c168fc","original_commit_id":"ca4df9649932cda75484ac91259d331534c168fc","user":{"login":"rkh","id":30442,"avatar_url":"https://gravatar.com/avatar/5c2b452f6eea4a6d84c105ebd971d2a4?d=https%3A%2F%2Fidenticons.github.com%2F2ae3d2aaceaf26246581744124859b07.png&r=x","gravatar_id":"5c2b452f6eea4a6d84c105ebd971d2a4","url":"https://api.github.com/users/rkh","html_url":"https://github.com/rkh","followers_url":"https://api.github.com/users/rkh/followers","following_url":"https://api.github.com/users/rkh/following{/other_user}","gists_url":"https://api.github.com/users/rkh/gists{/gist_id}","starred_url":"https://api.github.com/users/rkh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkh/subscriptions","organizations_url":"https://api.github.com/users/rkh/orgs","repos_url":"https://api.github.com/users/rkh/repos","events_url":"https://api.github.com/users/rkh/events{/privacy}","received_events_url":"https://api.github.com/users/rkh/received_events","type":"User","site_admin":false},"body":"Shouldn't this be configurable?","created_at":"2014-03-07T12:57:09Z","updated_at":"2014-03-07T12:57:09Z","html_url":"https://github.com/sinatra/sinatra-contrib/pull/122#discussion_r10381996","pull_request_url":"https://api.github.com/repos/sinatra/sinatra-contrib/pulls/122","_links":{"self":{"href":"https://api.github.com/repos/sinatra/sinatra-contrib/pulls/comments/10381996"},"html":{"href":"https://github.com/sinatra/sinatra-contrib/pull/122#discussion_r10381996"},"pull_request":{"href":"https://api.github.com/repos/sinatra/sinatra-contrib/pulls/122"}}}}