Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
e0513e33
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e0513e33
编写于
7月 28, 2008
作者:
J
Joshua Peek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Routing whitespace cleanup
上级
6e754551
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
84 addition
and
89 deletion
+84
-89
actionpack/lib/action_controller/assertions/routing_assertions.rb
...ck/lib/action_controller/assertions/routing_assertions.rb
+22
-22
actionpack/lib/action_controller/routing.rb
actionpack/lib/action_controller/routing.rb
+28
-30
actionpack/lib/action_controller/routing/optimisations.rb
actionpack/lib/action_controller/routing/optimisations.rb
+11
-11
actionpack/lib/action_controller/routing/recognition_optimisation.rb
...lib/action_controller/routing/recognition_optimisation.rb
+0
-2
actionpack/lib/action_controller/routing/route.rb
actionpack/lib/action_controller/routing/route.rb
+7
-8
actionpack/lib/action_controller/routing/route_set.rb
actionpack/lib/action_controller/routing/route_set.rb
+2
-2
actionpack/lib/action_controller/routing/routing_ext.rb
actionpack/lib/action_controller/routing/routing_ext.rb
+0
-1
actionpack/lib/action_controller/routing/segments.rb
actionpack/lib/action_controller/routing/segments.rb
+3
-2
actionpack/test/controller/routing_test.rb
actionpack/test/controller/routing_test.rb
+1
-0
actionpack/test/controller/test_test.rb
actionpack/test/controller/test_test.rb
+10
-11
未找到文件。
actionpack/lib/action_controller/assertions/routing_assertions.rb
浏览文件 @
e0513e33
actionpack/lib/action_controller/routing.rb
浏览文件 @
e0513e33
...
...
@@ -360,7 +360,6 @@ def use_controllers!(controller_names)
# * previous namespace is root:
# controller_relative_to( "posts", "anything_with_no_slashes" ) # =>"posts"
#
def
controller_relative_to
(
controller
,
previous
)
if
controller
.
nil?
then
previous
elsif
controller
[
0
]
==
?/
then
controller
[
1
..-
1
]
...
...
@@ -370,7 +369,6 @@ def controller_relative_to(controller, previous)
end
end
Routes
=
RouteSet
.
new
ActiveSupport
::
Inflector
.
module_eval
do
...
...
actionpack/lib/action_controller/routing/optimisations.rb
浏览文件 @
e0513e33
actionpack/lib/action_controller/routing/recognition_optimisation.rb
浏览文件 @
e0513e33
...
...
@@ -51,7 +51,6 @@ module Routing
# 3) segm test for /users/:id
# (jump to list index = 5)
# 4) full test for /users/:id => here we are!
class
RouteSet
def
recognize_path
(
path
,
environment
=
{})
result
=
recognize_optimized
(
path
,
environment
)
and
return
result
...
...
@@ -152,7 +151,6 @@ def to_plain_segments(str)
segments
<<
nil
segments
end
end
end
end
actionpack/lib/action_controller/routing/route.rb
浏览文件 @
e0513e33
...
...
@@ -234,7 +234,6 @@ def requirement_for(key)
end
nil
end
end
end
end
actionpack/lib/action_controller/routing/route_set.rb
浏览文件 @
e0513e33
actionpack/lib/action_controller/routing/routing_ext.rb
浏览文件 @
e0513e33
class
Object
def
to_param
to_s
...
...
actionpack/lib/action_controller/routing/segments.rb
浏览文件 @
e0513e33
...
...
@@ -130,6 +130,7 @@ def local_name
def
extract_value
"
#{
local_name
}
= hash[:
#{
key
}
] && hash[:
#{
key
}
].to_param
#{
"||
#{
default
.
inspect
}
"
if
default
}
"
end
def
value_check
if
default
# Then we know it won't be nil
"
#{
value_regexp
.
inspect
}
=~
#{
local_name
}
"
if
regexp
...
...
@@ -141,6 +142,7 @@ def value_check
"
#{
local_name
}
#{
"&&
#{
value_regexp
.
inspect
}
=~
#{
local_name
}
"
if
regexp
}
"
end
end
def
expiry_statement
"expired, hash = true, options if !expired && expire_on[:
#{
key
}
]"
end
...
...
@@ -214,7 +216,6 @@ def optionality_implied?
def
regexp_has_modifiers?
regexp
.
options
&
(
Regexp
::
IGNORECASE
|
Regexp
::
EXTENDED
)
!=
0
end
end
class
ControllerSegment
<
DynamicSegment
#:nodoc:
...
...
actionpack/test/controller/routing_test.rb
浏览文件 @
e0513e33
...
...
@@ -834,6 +834,7 @@ def test_time_recognition
puts
"
#{
1
/
per_url
}
url/s
\n\n
"
end
end
def
test_time_generation
n
=
5000
if
RunTimeTests
...
...
actionpack/test/controller/test_test.rb
浏览文件 @
e0513e33
...
...
@@ -597,7 +597,6 @@ def with_foo_routing
end
end
class
CleanBacktraceTest
<
Test
::
Unit
::
TestCase
def
test_should_reraise_the_same_object
exception
=
Test
::
Unit
::
AssertionFailedError
.
new
(
'message'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录