sinatra-advanced-routes 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/NEWS.md +4 -0
- data/lib/sinatra/advanced_routes.rb +6 -5
- data/spec/sinatra/advanced_routes_spec.rb +1 -1
- metadata +22 -66
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZTFlMmQyM2IwYzQzMGZhOTgxMzNhN2VkMTc4MmI4ZWQxN2JkMjZiMA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ODhhY2RhYmViNjkzMmJhNGZlYjk3NWEyZWZkMDljMTNhNzRmMDg5Nw==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NTE0MWIxZGQyZjc0NTQ3MmUzOWYzYzlhODYzN2I3ZmRlYzc0MTQxNThkNGUz
|
10
|
+
MjYwNjFlN2IzOGNhNzZkYTZhY2FhMDg2ODlmNGNjY2E3NDMyOWQ1N2U0YWZh
|
11
|
+
MzFhOTc2ZWJiZWRkMmQ4ZDAwNWEwM2QyZmMyZTRhMTkyMTU0OTg=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZGZhOTI3NTk1YmViZGZmMmJmMGMyYmU5YjdiNmMwYTU4NjExNDQ1OTJhZDNi
|
14
|
+
Y2RkNGJmMWNlNmFlZTIzODVjODkyMTcxMGMzZjI3OWIxMjgwZWY5Mjg3MjVk
|
15
|
+
YzAyNDYzY2Y1ZGNhYTE3MDg2YTFhYjU3OGQ4YjE3OGVmMjRjZDQ=
|
data/NEWS.md
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
require "sinatra/base"
|
2
|
-
require "sinatra/sugar"
|
3
|
-
require "monkey-lib"
|
4
2
|
|
5
3
|
module Sinatra
|
6
|
-
Base.ignore_caller
|
7
4
|
|
8
5
|
module AdvancedRoutes
|
9
6
|
|
@@ -124,8 +121,12 @@ module Sinatra
|
|
124
121
|
|
125
122
|
def route(verb, path, options={}, &block)
|
126
123
|
file, line = block.source_location if block.respond_to? :source_location
|
127
|
-
file
|
128
|
-
|
124
|
+
if file.nil?
|
125
|
+
files = caller_files
|
126
|
+
files.delete(__FILE__)
|
127
|
+
file = files.first
|
128
|
+
end
|
129
|
+
file &&= File.expand_path(file)
|
129
130
|
route = super(verb, path, options, &block)
|
130
131
|
route.to_route! verb, :app => self, :file => file, :line => line, :path => path
|
131
132
|
invoke_hook :advanced_route_added, route
|
@@ -46,7 +46,7 @@ describe Sinatra::AdvancedRoutes do
|
|
46
46
|
before { @route = define_route(verb, "/foo") { } }
|
47
47
|
it("exposes app") { @route.app.should == app }
|
48
48
|
it("exposes path") { @route.path.should == "/foo" }
|
49
|
-
it("exposes file") { @route.file.should ==
|
49
|
+
it("exposes file") { @route.file.should == File.expand_path(__FILE__) }
|
50
50
|
it("exposes verb") { @route.verb.should == verb.to_s.upcase }
|
51
51
|
it("exposes pattern") { @route.pattern.should == @route[0] }
|
52
52
|
it("exposes keys") { @route.keys.should == @route[1] }
|
metadata
CHANGED
@@ -1,129 +1,87 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-advanced-routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
5
|
-
prerelease:
|
4
|
+
version: 0.5.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Konstantin Haase
|
8
|
+
- Jean-Philippe Doyle
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
16
|
-
prerelease: false
|
15
|
+
name: sinatra
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
17
|
requirements:
|
19
18
|
- - ~>
|
20
19
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
22
|
-
none: false
|
20
|
+
version: '1.0'
|
23
21
|
type: :runtime
|
22
|
+
prerelease: false
|
24
23
|
version_requirements: !ruby/object:Gem::Requirement
|
25
24
|
requirements:
|
26
25
|
- - ~>
|
27
26
|
- !ruby/object:Gem::Version
|
28
|
-
version:
|
29
|
-
none: false
|
27
|
+
version: '1.0'
|
30
28
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
32
|
-
prerelease: false
|
29
|
+
name: rspec
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
31
|
requirements:
|
35
|
-
- -
|
32
|
+
- - ! '>='
|
36
33
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
38
|
-
|
39
|
-
|
34
|
+
version: 1.3.0
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
40
37
|
version_requirements: !ruby/object:Gem::Requirement
|
41
38
|
requirements:
|
42
|
-
- -
|
39
|
+
- - ! '>='
|
43
40
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
45
|
-
none: false
|
41
|
+
version: 1.3.0
|
46
42
|
- !ruby/object:Gem::Dependency
|
47
43
|
name: rack-test
|
48
|
-
prerelease: false
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
45
|
requirements:
|
51
46
|
- - ! '>='
|
52
47
|
- !ruby/object:Gem::Version
|
53
48
|
version: '0'
|
54
|
-
none: false
|
55
49
|
type: :development
|
50
|
+
prerelease: false
|
56
51
|
version_requirements: !ruby/object:Gem::Requirement
|
57
52
|
requirements:
|
58
53
|
- - ! '>='
|
59
54
|
- !ruby/object:Gem::Version
|
60
55
|
version: '0'
|
61
|
-
none: false
|
62
56
|
- !ruby/object:Gem::Dependency
|
63
57
|
name: rake
|
64
|
-
prerelease: false
|
65
58
|
requirement: !ruby/object:Gem::Requirement
|
66
59
|
requirements:
|
67
60
|
- - ! '>='
|
68
61
|
- !ruby/object:Gem::Version
|
69
62
|
version: '0'
|
70
|
-
none: false
|
71
63
|
type: :development
|
64
|
+
prerelease: false
|
72
65
|
version_requirements: !ruby/object:Gem::Requirement
|
73
66
|
requirements:
|
74
67
|
- - ! '>='
|
75
68
|
- !ruby/object:Gem::Version
|
76
69
|
version: '0'
|
77
|
-
none: false
|
78
70
|
- !ruby/object:Gem::Dependency
|
79
71
|
name: sinatra-contrib
|
80
|
-
prerelease: false
|
81
72
|
requirement: !ruby/object:Gem::Requirement
|
82
73
|
requirements:
|
83
74
|
- - ! '>='
|
84
75
|
- !ruby/object:Gem::Version
|
85
76
|
version: '0'
|
86
|
-
none: false
|
87
77
|
type: :development
|
88
|
-
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
requirements:
|
90
|
-
- - ! '>='
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: '0'
|
93
|
-
none: false
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: sinatra
|
96
78
|
prerelease: false
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - ~>
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '1.0'
|
102
|
-
none: false
|
103
|
-
type: :runtime
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
requirements:
|
106
|
-
- - ~>
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '1.0'
|
109
|
-
none: false
|
110
|
-
- !ruby/object:Gem::Dependency
|
111
|
-
name: rspec
|
112
|
-
prerelease: false
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ! '>='
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 1.3.0
|
118
|
-
none: false
|
119
|
-
type: :development
|
120
79
|
version_requirements: !ruby/object:Gem::Requirement
|
121
80
|
requirements:
|
122
81
|
- - ! '>='
|
123
82
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
125
|
-
|
126
|
-
description: Make Sinatra routes first class objects (part of BigBand).
|
83
|
+
version: '0'
|
84
|
+
description: Make Sinatra routes first class objects.
|
127
85
|
email: konstantin.mailinglists@googlemail.com
|
128
86
|
executables: []
|
129
87
|
extensions: []
|
@@ -138,6 +96,7 @@ files:
|
|
138
96
|
- LICENSE
|
139
97
|
homepage: http://github.com/rkh/sinatra-advanced-routes
|
140
98
|
licenses: []
|
99
|
+
metadata: {}
|
141
100
|
post_install_message:
|
142
101
|
rdoc_options: []
|
143
102
|
require_paths:
|
@@ -147,18 +106,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
147
106
|
- - ! '>='
|
148
107
|
- !ruby/object:Gem::Version
|
149
108
|
version: '0'
|
150
|
-
none: false
|
151
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
110
|
requirements:
|
153
111
|
- - ! '>='
|
154
112
|
- !ruby/object:Gem::Version
|
155
113
|
version: '0'
|
156
|
-
none: false
|
157
114
|
requirements: []
|
158
115
|
rubyforge_project:
|
159
|
-
rubygems_version:
|
116
|
+
rubygems_version: 2.0.3
|
160
117
|
signing_key:
|
161
|
-
specification_version:
|
162
|
-
summary: Make Sinatra routes first class objects
|
118
|
+
specification_version: 4
|
119
|
+
summary: Make Sinatra routes first class objects.
|
163
120
|
test_files: []
|
164
|
-
has_rdoc: yard
|