Permalink
Browse files

Improve uri_parser docs a bit.

  • Loading branch information...
1 parent 0aba90d commit e06937b4cfe67d858443b920db2aaa8e64dcdf0e @myronmarston committed Sep 27, 2012
Showing with 13 additions and 7 deletions.
  1. +7 −4 features/configuration/uri_parser.feature
  2. +6 −3 lib/vcr/configuration.rb
View
11 features/configuration/uri_parser.feature
@@ -1,12 +1,14 @@
Feature: uri_parser
By default, VCR will parse URIs using `URI` from the Ruby standard
- library. The `uri_parser` configuration option will override this
- parser.
+ library. There are some URIs seen out in the wild that `URI` cannot
+ parse properly. You can set the `uri_parser` configuration option
+ to use a different parser (such as `Addressable::URI`) to work with
+ these URIs.
The configured URI parser needs to expose a `.parse` class method
- that returns an instance of the uri. This uri needs to implement the
- folllowing API:
+ that returns an instance of the uri. This uri instance needs to
+ implement the folllowing API:
* `#scheme` => a string
* `#host` => a string
@@ -86,3 +88,4 @@ Feature: uri_parser
"""
URI::InvalidURIError
"""
+
View
9 lib/vcr/configuration.rb
@@ -135,10 +135,13 @@ def allow_http_connections_when_no_cassette?
# * `query # => String`
# * `#port=`
# * `#query=`
- # * `#==` # => Boolean
+ # * `#to_s # => String`
+ # * `#== # => Boolean`
#
- # The `#==` must return true if both URI objects represent the
- # same URI
+ # The `#==` method must return true if both URI objects represent the
+ # same URI.
+ #
+ # This defaults to `URI` from the ruby standard library.
#
# @overload uri_parser
# @return [#parse] the current URI parser object

0 comments on commit e06937b

Please sign in to comment.