File tree Expand file tree Collapse file tree 2 files changed +17
-11
lines changed
Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -149,21 +149,21 @@ def show_for_polling(page)
149149 end
150150
151151 %w( overview workers ) . each do |page |
152- get "/#{ page } .poll" do
152+ get "/#{ page } .poll/? " do
153153 show_for_polling ( page )
154154 end
155155
156- get "/#{ page } /:id.poll" do
156+ get "/#{ page } /:id.poll/? " do
157157 show_for_polling ( page )
158158 end
159159 end
160160
161161 %w( overview queues working workers key ) . each do |page |
162- get "/#{ page } " do
162+ get "/#{ page } /? " do
163163 show page
164164 end
165165
166- get "/#{ page } /:id" do
166+ get "/#{ page } /:id/? " do
167167 show page
168168 end
169169 end
@@ -173,7 +173,7 @@ def show_for_polling(page)
173173 redirect u ( 'queues' )
174174 end
175175
176- get "/failed" do
176+ get "/failed/? " do
177177 if Resque ::Failure . url
178178 redirect Resque ::Failure . url
179179 else
@@ -193,7 +193,7 @@ def show_for_polling(page)
193193 redirect u ( 'failed' )
194194 end
195195
196- get "/failed/requeue/:index" do
196+ get "/failed/requeue/:index/? " do
197197 Resque ::Failure . requeue ( params [ :index ] )
198198 if request . xhr?
199199 return Resque ::Failure . all ( params [ :index ] ) [ 'retried_at' ]
@@ -202,24 +202,24 @@ def show_for_polling(page)
202202 end
203203 end
204204
205- get "/failed/remove/:index" do
205+ get "/failed/remove/:index/? " do
206206 Resque ::Failure . remove ( params [ :index ] )
207207 redirect u ( 'failed' )
208208 end
209209
210- get "/stats" do
210+ get "/stats/? " do
211211 redirect url_path ( "/stats/resque" )
212212 end
213213
214- get "/stats/:id" do
214+ get "/stats/:id/? " do
215215 show :stats
216216 end
217217
218- get "/stats/keys/:key" do
218+ get "/stats/keys/:key/? " do
219219 show :stats
220220 end
221221
222- get "/stats.txt" do
222+ get "/stats.txt/? " do
223223 info = Resque . info
224224
225225 stats = [ ]
Original file line number Diff line number Diff line change 5151
5252 should_respond_with_success
5353end
54+
55+ context "also works with slash at the end" do
56+ setup { get "/working/" }
57+
58+ should_respond_with_success
59+ end
You can’t perform that action at this time.
0 commit comments