sinatra-advanced-routes 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sinatra/advanced_routes.rb +2 -1
- metadata +4 -4
@@ -125,8 +125,9 @@ module Sinatra
|
|
125
125
|
def route(verb, path, options={}, &block)
|
126
126
|
file, line = block.source_location if block.respond_to? :source_location
|
127
127
|
file ||= caller_files.first
|
128
|
+
file &&= file.expand_path
|
128
129
|
route = super(verb, path, options, &block)
|
129
|
-
route.to_route! verb, :app => self, :file => file
|
130
|
+
route.to_route! verb, :app => self, :file => file, :line => line, :path => path
|
130
131
|
invoke_hook :advanced_route_added, route
|
131
132
|
@capture_routes << route if @capture_routes
|
132
133
|
route
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-advanced-routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 1
|
10
|
+
version: 0.5.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Konstantin Haase
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-16 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|