Permalink
Commits on Mar 9, 2009
  1. Merge branch 'master' of git://github.com/sinatra/sinatra

    * 'master' of git://github.com/sinatra/sinatra: (53 commits)
      0.9.1 release
      Fix broken link to testing doc in README
      Undeprecate headers helper method [#125]
      set :environment to :test in TestHarness
      Fix test_with_rack_env example in README
      Set :environment to :test when Sinatra::Test is included
      Tidy up README a bit; link to @sinatra on Twitter
      Misc additions to the CHANGES file
      Trim down Testing section in the README; link to doc site instead
      Bump version to 0.9.1 and update CHANGES file
      Never use Session middleware in test environment [#119]
      Don't allow :session option in body/params arg; misc refactoring
      Trying to remove the pain out of session testing
      Fix middleware not running when app run as middleware [#161]
      Better Content-Length handling for HEAD requests
      Fix issues with Content-Length after explicit forward [#159]
      yield the MockRequest to the block before invoking the app [#111]
      Add registered callback for extension modules [#148]
      Remove disabled compat specs
      Set sensible defaults on Default for test env
      ...
    
    Conflicts:
    	lib/sinatra/base.rb
    committed Mar 9, 2009
Commits on Mar 3, 2009
  1. 0.9.1 release

    rtomayko committed Mar 3, 2009
Commits on Mar 2, 2009
  1. Fix test_with_rack_env example in README

    First, there was a missing quote, and second :agent is more
    clear than HTTP_USER_AGENT.
    cypher committed with rtomayko Mar 2, 2009
Commits on Feb 27, 2009
  1. Don't allow :session option in body/params arg; misc refactoring

    This changes the parent commit's :session option semantics just
    slightly. The :session option must be passed as part of the options
    Hash -- the body arg is assumed to be params or a POST/PUT body.
    Also, the mapping from :session to HTTP_COOKIE has been switched to
    'rack.session' - mapping it to HTTP_COOKIE doesn't make any sense.
    
    While here, refactor the make_request method to make it more
    obvious that we're really just building up the options Hash for
    MockRequest.
    rtomayko committed Feb 27, 2009
  2. Fix middleware not running when app run as middleware [#161]

    The app's middleware pipeline was ignored when the app itself was
    run as middleware. This was due to the separate call paths for
    middleware vs. endpoint apps. This change makes it so that both
    endpoint and middleware apps are invoked via the same instance
    level #call method.
    
    One potentially confusing aspect of this change is that Base.new now
    returns the head of the app's middleware pipeline. If no middleware
    is used by the app, this will be an instance of the Base class;
    however, if middleware is used, Base.new will return the head of
    the middleware chain leading to the Base instance.
    rtomayko committed Feb 27, 2009
Commits on Feb 25, 2009
  1. Better Content-Length handling for HEAD requests

    Responses to HEAD requests _should_ have a Content-Length header
    that's identical to GET requests. When a body is provided by the
    application, set the Content-Length header to the size of the body
    and replace the body with an empty Array; when no body is provided
    by the application in response to a HEAD request, and the
    Content-Length is calculated to be "0", remove the Content-Length
    header entirely to avoid mis-matched values.
    
    The idea here is that it's better to omit the header when we believe
    the Content-Length is not indicative of the same in response to GET
    than to send the Content-Length with a mismatched value. Logic
    taken from Apache and is generally in line with RFC 2616.
    rtomayko committed Feb 25, 2009
Commits on Feb 24, 2009
  1. yield the MockRequest to the block before invoking the app [#111]

    sr commented this out during some refactoring but I'd like
    to leave it in for now.
    rtomayko committed Feb 24, 2009
  2. Add registered callback for extension modules [#148]

    The "registered" message is sent to extension modules immediately
    after the module is mixed into a Sinatra::Base class. This can be
    used to initialize the class with options, add templates, define
    error handlers, etc.
    rtomayko committed Feb 22, 2009
Commits on Feb 23, 2009
  1. Remove disabled compat specs

    rtomayko committed Feb 23, 2009
Commits on Feb 22, 2009
  1. Test for #head

    sr committed with rtomayko Feb 22, 2009
  2. Cosmetic change to test for #follow

    sr committed with rtomayko Feb 22, 2009
  3. Little refactoring of Sinatra::Test

    sr committed with rtomayko Feb 20, 2009
  4. Started test for Sinatra::Test

    sr committed with rtomayko Jan 28, 2009
Commits on Feb 20, 2009
  1. added test for redirect back

    capotej committed with rtomayko Feb 20, 2009
  2. Allow helper methods to use blocks in erb views

    Matias Käkelä committed with rtomayko Feb 18, 2009
  3. Fixed broken link in README.

    Aupajo committed with rtomayko Feb 18, 2009