Routes Changelog
========================

-- 1.5 (Sept. 19th, 2006)
* Significant updates to map.resource and unit tests that comb it thoroughly
  to ensure its creating all the proper routes (it now is). Increased unit
  testing coverage to 95%.
* Added unit tests to ensure controller_scan works properly with nested
  controller files and appropriately scans the directory structure. This
  brings the Routes util module up to full code coverage.
* Fixed url_for so that when the protocol is changed, port information is
  removed from the host.
* Added more thorough testing to _RequestConfig object and the ability to
  set your own object. This increases testing coverage of the __init__ module
  to 100%.
* Fixed bug with sub_domain not maintaining port information in url_for and
  added unit tests. Reported by Jonathan Rosebaugh.
* Added unit tests to ensure sub_domain option works with named routes, cleaned
  up url_for memory argument filtering. Fixed bug with named routes and sub_domain
  option not working together, reported by Jonathan Rosebaugh.
* Changed order in which sub-domain is added to match-dict so it can be used
  in a conditions function.

-- 1.4.1 (Sept. 6th, 2006)
* Added sub_domains option to mapper, along with sub_domains_ignore list for 
  subdomains that are considered equivilant to the main domain. When sub_domains
  is active, url_for will now take a sub_domain option that can alter the host
  the route will go to.
* Added ability for filter functions to provide a _host, _protocol, _anchor arg
  which is then used to create the URL with the appropriate host/protocol/anchor
  destination.
* Patch applied from Ticket #28. Resolves issue with Mapper's controller_scan
  function requiring a valid directory argument. Submitted by Zoran Isailovski.

-- 1.4 (July 21, 2006)
* Fixed bug with map.resource related to member methods, found in Rails version.
* Fixed bug with map.resource member methods not requiring a member id.
* Fixed bug related to handling keyword argument controller.
* Added map.resource command which can automatically generate a batch of routes intended
  to be used in a REST-ful manner by a web framework.
* Added URL generation handling for a 'method' argument. If 'method' is specified, it
  is not dropped and will be changed to '_method' for use by the framework.
* Added conditions option to map.connect. Accepts a dict with optional keyword args
  'method' or 'function'. Method is a list of HTTP methods that are valid for the route.
  Function is a function that will be called with environ, matchdict where matchdict is
  the dict created by the URL match.
* Fixed redirect_to function for using absolute URL's. redirect_to now passes all args to
  url_for, then passes the resulting URL to the redirect function. Reported by climbus.

-- 1.3.2 (April 30th, 2006)
* Fixed _filter bug with inclusion in match dict during matching, reported by David Creemer.
* Fixed improper url quoting by using urllib.encode, patch by Jason Culverhouse.

-- 1.3.1 (April 4th, 2006)
* Mapper has an optional attribute ``append_slash``. When set to ``True``, any URL's
  generated will have a slash appended to the end. 
* Fixed prefix option so that if the PATH_INFO is empty after prefix regexp, its set to
  '/' so the match proceeds ok.
* Fixed prefix bug that caused routes after the initial one to not see the proper url
  for matching. Caught by Jochen Kupperschmidt.

-- 1.3 (Feb. 25th, 2006)
* url_for keyword filters:
  - Named routes can now have a _filter argument that should specify a function that takes
    a dict as its sole argument. The dict will contain the full set of keywords passed to
    url_for, which the function can then modify as it pleases. The new dict will then be
    used as if it was the original set of keyword args given to url_for.
* Fixed Python 2.3 incompatibility due to using keyword arg for a sort statement
  when using the built-in controller scanner.

-- 1.2 (Feb. 17th, 2006)
* If a named route doesn't exist, and a url_for call is used, instead of using the
  keyword arguments to generate a URL, they will be used as query args for the raw
  URL supplied. (Backwards Incompatible)
* If Mapper has debug=True, using match will return two additional values, the route
  that matched, if one did match. And a list of routes that were tried, and information
  about why they didn't pass.
* url_for enhancements:
  - Can now be used with 'raw' URL's to generate proper url's for static content that
    will then automatically include SCRIPT_NAME if necessary
  - Static named routes can now be used to shortcut common path information as desired.
* Controller Scanner will now sort controller names so that the longest one is first. This
  ensures that the deepest nested controller is executed first before more shallow ones to
  increase predictability.
* Controller Scanner now scans directories properly, the version in 1.1 left off the
  directory prefix when created the list of controllers.
    (Thanks to Justin for drawing my attention to it)

-- 1.1 (Jan. 13th, 2006)
* Routes Mapper additions:
  - Now takes several optional arguments that determine how it will 
    generate the regexp's.
  - Can now hold a function for use when determining what the available
    controllers are. Comes with a default directory scanner
  - Given a directory for the default scanner or a function, the Mapper
    will now automatically run it to get the controller list when needed
* Syntax available for splitting routes to allow more complex route paths, such
  as ':controller/:(action)-:(id).html'
* Easier setup/integration with Routes per request. Setting the environ in a
  WSGI environ will run match, and setup everything needed for url_for/etc.

-- 1.0.2 (Dec. 30th, 2005)
* Routes where a default was present but None were filling in improper values.
* Passing a 0 would evaluate to None during generation, resulting in missing
  URL parts

-- 1.0.1 (Dec. 18th, 2005)
* Request Local Callable - You can now designate your own callable function that
  should then be used to store the request_config data. This is most useful for
  environments where its possible multiple requests might be running in a single
  thread. The callable should return a request specific object for attributes to
  be attached. See routes.__init__.py for more information.

-- 1.0 (Nov. 21st, 2005)
* routes.__init__ will now load the common symbols most people will
  want to actually use.
  Thus, you can either:
       from routes import *
  Or:
       from routes import request_confg, Mapper
  The following names are available for importing from routes:
      request_config, Mapper, url_for, redirect_to
* Route Names - You can now name a route, which will save a copy of the defaults
  defined for later use by url_for or redirect_to. 
  Thus, a route and url_for looking like this:
       m.connect('home', controller='blog', action='splash')
       url_for(controller='blog', action='splash')   # => /home
  Can now be used with a name:
       m.connect('home_url','home', controller='blog', action='splash')
       url_for('home_url')  # => /home
  Additional keywords can still be added to url_for and will override defaults in
  the named route.
* Trailing / - Route recognition earlier failed on trailing slashes, not really a bug,
  not really a feature I guess. Anyways, trailing slashes are o.k. now as in the Rails
  version.
* redirect_to now has two sets of tests to ensure it works properly