usher 0.5.11 → 0.5.12
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +48 -53
- data/VERSION.yml +2 -2
- data/lib/usher.rb +12 -12
- data/lib/usher/delimiters.rb +7 -7
- data/lib/usher/interface.rb +19 -30
- data/lib/usher/interface/{email_interface.rb → email.rb} +1 -1
- data/lib/usher/interface/{merb_interface.rb → merb.rb} +1 -1
- data/lib/usher/interface/{rack_interface.rb → rack.rb} +14 -10
- data/lib/usher/interface/{rack_interface → rack}/mapper.rb +0 -0
- data/lib/usher/interface/rack/route.rb +16 -0
- data/lib/usher/interface/rails20.rb +7 -0
- data/lib/usher/interface/{rails2_2_interface.rb → rails22.rb} +18 -18
- data/lib/usher/interface/{rails2_2_interface → rails22}/mapper.rb +2 -2
- data/lib/usher/interface/{rails2_3_interface.rb → rails23.rb} +1 -1
- data/lib/usher/interface/rails23/mapper.rb +44 -0
- data/lib/usher/interface/{rails3_interface.rb → rails3.rb} +1 -1
- data/lib/usher/interface/{text_interface.rb → text.rb} +1 -1
- data/lib/usher/node.rb +71 -57
- data/lib/usher/route.rb +10 -5
- data/lib/usher/route/static.rb +9 -0
- data/lib/usher/route/variable.rb +28 -9
- data/lib/usher/util.rb +3 -3
- data/lib/usher/util/generate.rb +55 -18
- data/lib/usher/util/parser.rb +25 -18
- data/rails/init.rb +24 -8
- data/spec/private/generate_spec.rb +116 -1
- data/spec/private/generate_with_spec.rb +28 -0
- data/spec/private/rack/dispatch_spec.rb +23 -2
- data/spec/private/rack/route_spec.rb +50 -0
- data/spec/private/rails2_2/generate_spec.rb +1 -1
- data/spec/private/rails2_2/path_spec.rb +1 -1
- data/spec/private/rails2_2/recognize_spec.rb +1 -1
- data/spec/private/rails2_3/generate_spec.rb +1 -1
- data/spec/private/rails2_3/path_spec.rb +1 -1
- data/spec/private/rails2_3/recognize_spec.rb +1 -1
- data/spec/private/recognize_spec.rb +4 -5
- data/spec/private/url_parts_spec.rb +116 -0
- metadata +26 -12
- data/lib/usher/interface/rack_interface/route.rb +0 -16
metadata
CHANGED
@@ -1,15 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
+
- Daniel Neighman
|
8
|
+
- Daniel Vartanov
|
9
|
+
- !binary |
|
10
|
+
SmFrdWIgxaDFpWFzdG7DvQ==
|
11
|
+
|
7
12
|
- Joshua Hull
|
8
13
|
autorequire:
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2009-
|
17
|
+
date: 2009-12-04 00:00:00 -05:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
@@ -41,20 +46,23 @@ files:
|
|
41
46
|
- lib/usher/exceptions.rb
|
42
47
|
- lib/usher/grapher.rb
|
43
48
|
- lib/usher/interface.rb
|
44
|
-
- lib/usher/interface/
|
45
|
-
- lib/usher/interface/
|
46
|
-
- lib/usher/interface/
|
47
|
-
- lib/usher/interface/
|
48
|
-
- lib/usher/interface/
|
49
|
-
- lib/usher/interface/
|
50
|
-
- lib/usher/interface/
|
51
|
-
- lib/usher/interface/
|
52
|
-
- lib/usher/interface/
|
53
|
-
- lib/usher/interface/
|
49
|
+
- lib/usher/interface/email.rb
|
50
|
+
- lib/usher/interface/merb.rb
|
51
|
+
- lib/usher/interface/rack.rb
|
52
|
+
- lib/usher/interface/rack/mapper.rb
|
53
|
+
- lib/usher/interface/rack/route.rb
|
54
|
+
- lib/usher/interface/rails20.rb
|
55
|
+
- lib/usher/interface/rails22.rb
|
56
|
+
- lib/usher/interface/rails22/mapper.rb
|
57
|
+
- lib/usher/interface/rails23.rb
|
58
|
+
- lib/usher/interface/rails23/mapper.rb
|
59
|
+
- lib/usher/interface/rails3.rb
|
60
|
+
- lib/usher/interface/text.rb
|
54
61
|
- lib/usher/node.rb
|
55
62
|
- lib/usher/route.rb
|
56
63
|
- lib/usher/route/path.rb
|
57
64
|
- lib/usher/route/request_method.rb
|
65
|
+
- lib/usher/route/static.rb
|
58
66
|
- lib/usher/route/util.rb
|
59
67
|
- lib/usher/route/variable.rb
|
60
68
|
- lib/usher/spinoffs/strscan_additions.rb
|
@@ -68,11 +76,13 @@ files:
|
|
68
76
|
- spec/private/delimiters_spec.rb
|
69
77
|
- spec/private/email/recognize_spec.rb
|
70
78
|
- spec/private/generate_spec.rb
|
79
|
+
- spec/private/generate_with_spec.rb
|
71
80
|
- spec/private/grapher_spec.rb
|
72
81
|
- spec/private/parser_spec.rb
|
73
82
|
- spec/private/path_spec.rb
|
74
83
|
- spec/private/rack/dispatch_spec.rb
|
75
84
|
- spec/private/rack/generate_spec.rb
|
85
|
+
- spec/private/rack/route_spec.rb
|
76
86
|
- spec/private/rails2_2/compat.rb
|
77
87
|
- spec/private/rails2_2/generate_spec.rb
|
78
88
|
- spec/private/rails2_2/path_spec.rb
|
@@ -85,6 +95,7 @@ files:
|
|
85
95
|
- spec/private/request_method_spec.rb
|
86
96
|
- spec/private/splitter_spec.rb
|
87
97
|
- spec/private/string_scanner_spec.rb
|
98
|
+
- spec/private/url_parts_spec.rb
|
88
99
|
- spec/spec.opts
|
89
100
|
- spec/spec_helper.rb
|
90
101
|
has_rdoc: true
|
@@ -119,11 +130,13 @@ test_files:
|
|
119
130
|
- spec/private/delimiters_spec.rb
|
120
131
|
- spec/private/email/recognize_spec.rb
|
121
132
|
- spec/private/generate_spec.rb
|
133
|
+
- spec/private/generate_with_spec.rb
|
122
134
|
- spec/private/grapher_spec.rb
|
123
135
|
- spec/private/parser_spec.rb
|
124
136
|
- spec/private/path_spec.rb
|
125
137
|
- spec/private/rack/dispatch_spec.rb
|
126
138
|
- spec/private/rack/generate_spec.rb
|
139
|
+
- spec/private/rack/route_spec.rb
|
127
140
|
- spec/private/rails2_2/compat.rb
|
128
141
|
- spec/private/rails2_2/generate_spec.rb
|
129
142
|
- spec/private/rails2_2/path_spec.rb
|
@@ -136,4 +149,5 @@ test_files:
|
|
136
149
|
- spec/private/request_method_spec.rb
|
137
150
|
- spec/private/splitter_spec.rb
|
138
151
|
- spec/private/string_scanner_spec.rb
|
152
|
+
- spec/private/url_parts_spec.rb
|
139
153
|
- spec/spec_helper.rb
|
@@ -1,16 +0,0 @@
|
|
1
|
-
class Usher
|
2
|
-
module Interface
|
3
|
-
class RackInterface
|
4
|
-
module Route
|
5
|
-
# add("/index.html").redirect("/")
|
6
|
-
def redirect(path, status = 302)
|
7
|
-
lambda do
|
8
|
-
response = Rack::Response.new
|
9
|
-
response.redirect(path, status)
|
10
|
-
response.finish
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|