Skip to content

Commit

Permalink
Document switching the HTTP driver
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrous26 committed Sep 14, 2011
1 parent ebcd442 commit df0f5f3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions .yardopts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ lib/**/*.rb
-
docs/GettingStarted.markdown
docs/Examples.markdown
docs/SwitchingHTTPDriver.markdown
ChangeLog
LICENSE.txt
25 changes: 25 additions & 0 deletions docs/SwitchingHTTPDriver.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Switch HTTP Drivers

By default, `jiraSOAP` tells `handsoap` to use the `net/http` driver
for all HTTP work. This is done so that `jiraSOAP` will work
out-of-the-box with other Ruby implementations, namely
MacRuby. However, `net/http` is slow compared to the other
available HTTP drivers.

Switching to another, more performant, HTTP driver is advisable to get
the maximum roflscale performance from `jiraSOAP`. The HTTP driver is
handled entirely by `handsoap`, and is very easy change, you just need
to make sure that you have loaded `jiraSOAP` first and then tell
`handsoap` to use a different driver. An example would look like this:

require 'rubygems'
require 'jiraSOAP'
Handsoap.http_driver = :curb

Which would change the driver to the `curb` gem. There are other
drivers available, and an up to date list is maintained in the
`handsoap` [README](https://github.com/unwire/handsoap).

__Note__: I only run the full test suite using `net/http`, but other
drivers should be drop-in replacements that require no changes to
`jiraSOAP` itself (with the exception of `eventmachine`).

0 comments on commit df0f5f3

Please sign in to comment.