f81fe777cb
handlers in a Sinatra application. Assuming that your application is running on example.com, and that it has been mapped to /myapp, you should be able call url_for from within a handler as follows: url_for "/" # Returns "/myapp/" url_for "/foo" # Returns "/myapp/foo" url_for "/foo", :full # Returns "http://example.com/myapp/foo" WWW: http://github.com/emk/sinatra-url-for PR: ports/149359 Submitted by: Eric Freeman <freebsdports at chillibear.com>
22 lines
520 B
Makefile
22 lines
520 B
Makefile
# Ports collection makefile for: rubygem-emk-sinatra-url-for
|
|
# Date created: 5 Aug 2010
|
|
# Whom: Eric Freeman <freebsdports@chillibear.com>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= emk-sinatra-url-for
|
|
PORTVERSION= 0.2.1
|
|
CATEGORIES= www rubygems
|
|
MASTER_SITES= RG
|
|
|
|
MAINTAINER= freebsdports@chillibear.com
|
|
COMMENT= Construct absolute paths and full URLs for a Sinatra application
|
|
|
|
RUN_DEPENDS= rubygem-sinatra>=0.9.1:${PORTSDIR}/www/rubygem-sinatra
|
|
|
|
USE_RUBY= yes
|
|
USE_RUBYGEMS= yes
|
|
RUBYGEM_AUTOPLIST= yes
|
|
|
|
.include <bsd.port.mk>
|