Commit Graph

4 Commits

Author SHA1 Message Date
Konstantin Haase e001d62669 adjust require lines for test helper, so it also works properly on 1.9.2 2011-05-11 09:44:02 +02:00
TJ Holowaychuk d6ceeb0b56 Added proc as argument for #route_added hook 2009-04-19 20:04:50 -07:00
Simon Rozet ff0d068687 Use contest instead of test/spec/mini
See <http://github.com/citrusbyte/contest> for more info. The
contest.rb file is included under the test/ directory.
2009-03-31 02:23:48 -07:00
Blake Mizerany 8b8ddfef56 Hook mechanizm for route_added [help from rtomayko]
Example:

module Sinatra
  module RouteAddedExtSample
    def self.route_added(verb, path)
      p [verb, path]
    end
  end

  register RouteAddedExtSample
end

post '/' do
  do_something
  'ok'
end

Output:

["POST", "/"]

move superclass logic into extensions attr reader
2009-03-09 22:58:37 -07:00