Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
58796dcf
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,发现更多精彩内容 >>
提交
58796dcf
编写于
3月 10, 2010
作者:
R
Rizwan Reza
提交者:
José Valim
3月 11, 2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rake task for generating Rails documentation updated to support Bundler.
Signed-off-by:
N
José Valim
<
jose.valim@gmail.com
>
上级
6c027443
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
33 addition
and
41 deletion
+33
-41
railties/lib/rails/tasks/documentation.rake
railties/lib/rails/tasks/documentation.rake
+33
-41
未找到文件。
railties/lib/rails/tasks/documentation.rake
浏览文件 @
58796dcf
namespace
:doc
do
def
gem_path
(
gem_name
)
Bundler
.
load
.
specs
.
find
{
|
s
|
s
.
name
==
gem_name
}.
full_gem_path
end
desc
"Generate documentation for the application. Set custom template with TEMPLATE=/path/to/rdoc/template.rb or title with TITLE=
\"
Custom Title
\"
"
Rake
::
RDocTask
.
new
(
"app"
)
{
|
rdoc
|
rdoc
.
rdoc_dir
=
'doc/app'
...
...
@@ -11,54 +15,42 @@ namespace :doc do
rdoc
.
rdoc_files
.
include
(
'lib/**/*.rb'
)
}
desc
'Generate documentation for the Rails framework. Specify path with RAILS_PATH="/path/to/rails"'
path
=
ENV
[
'RAILS_PATH'
]
unless
path
&&
File
.
directory?
(
path
)
task
:rails
do
if
path
$stderr
.
puts
"Skipping doc:rails, missing Rails directory at
#{
path
}
"
else
$stderr
.
puts
"Skipping doc:rails, RAILS_PATH environment variable is not set"
end
desc
'Generate documentation for the Rails framework.'
Rake
::
RDocTask
.
new
(
"rails"
)
{
|
rdoc
|
rdoc
.
rdoc_dir
=
'doc/api'
rdoc
.
template
=
"
#{
ENV
[
'template'
]
}
.rb"
if
ENV
[
'template'
]
rdoc
.
title
=
"Rails Framework Documentation"
rdoc
.
options
<<
'--line-numbers'
<<
'--inline-source'
rdoc
.
rdoc_files
.
include
(
'README'
)
%w(README CHANGELOG MIT-LICENSE lib/action_mailer/base.rb)
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
gem_path
(
'actionmailer'
)
}
/
#{
file
}
"
)
end
else
Rake
::
RDocTask
.
new
(
"rails"
)
{
|
rdoc
|
version
=
"-
#{
Rails
::
VERSION
::
STRING
}
"
unless
ENV
[
'RAILS_PATH'
]
rdoc
.
rdoc_dir
=
'doc/api'
rdoc
.
template
=
"
#{
ENV
[
'template'
]
}
.rb"
if
ENV
[
'template'
]
rdoc
.
title
=
"Rails Framework Documentation"
rdoc
.
options
<<
'--line-numbers'
<<
'--inline-source'
rdoc
.
rdoc_files
.
include
(
'README'
)
%w(README CHANGELOG lib/action_mailer/base.rb)
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
path
}
/actionmailer
#{
version
}
/
#{
file
}
"
)
end
%w(README CHANGELOG
lib/action_controller/**/*.rb lib/action_view/**/*.rb)
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
path
}
/actionpack
#{
version
}
/
#{
file
}
"
)
end
%w(README CHANGELOG MIT-LICENSE
lib/action_controller/**/*.rb lib/action_view/**/*.rb)
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
gem_path
(
'actionpack'
)
}
/
#{
file
}
"
)
end
%w(README CHANGELOG
lib/active_model/**/*.rb)
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
path
}
/activemodel
#{
version
}
/
#{
file
}
"
)
end
%w(README CHANGELOG MIT-LICENSE
lib/active_model/**/*.rb)
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
gem_path
(
'activemodel'
)
}
/
#{
file
}
"
)
end
%w(README CHANGELOG lib/active_record/**/*.rb)
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
path
}
/activerecord
#{
version
}
/
#{
file
}
"
)
end
%w(README CHANGELOG lib/active_record/**/*.rb)
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
gem_path
(
'activerecord'
)
}
/
#{
file
}
"
)
end
%w(README CHANGELOG lib/active_resource.rb lib/active_resource/*)
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
path
}
/activeresource
#{
version
}
/
#{
file
}
"
)
end
%w(README CHANGELOG lib/active_resource.rb lib/active_resource/*)
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
gem_path
(
'activeresource'
)
}
/
#{
file
}
"
)
end
%w(README CHANGELOG lib/active_support/**/*.rb)
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
path
}
/activesupport
#{
version
}
/
#{
file
}
"
)
end
%w(README CHANGELOG lib/active_support/**/*.rb)
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
gem_path
(
'activesupport'
)
}
/
#{
file
}
"
)
end
%w(README CHANGELOG MIT-LICENSE lib/{*.rb,commands/*.rb,generators/*.rb})
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
path
}
/railties
#{
version
}
/
#{
file
}
"
)
end
}
end
%w(README CHANGELOG lib/{*.rb,commands/*.rb,generators/*.rb})
.
each
do
|
file
|
rdoc
.
rdoc_files
.
include
(
"
#{
gem_path
(
'railties'
)
}
/
#{
file
}
"
)
end
}
plugins
=
FileList
[
'vendor/plugins/**'
].
collect
{
|
plugin
|
File
.
basename
(
plugin
)
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录