Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
f04a49b0
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
f04a49b0
编写于
2月 09, 2017
作者:
R
Rafael Mendonça França
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix rubocop violations
上级
e04de27b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
13 deletion
+15
-13
Gemfile.lock
Gemfile.lock
+3
-1
guides/rails_guides/markdown/renderer.rb
guides/rails_guides/markdown/renderer.rb
+11
-11
railties/lib/rails/tasks/yarn.rake
railties/lib/rails/tasks/yarn.rake
+1
-1
未找到文件。
Gemfile.lock
浏览文件 @
f04a49b0
...
...
@@ -189,6 +189,8 @@ GEM
eventmachine (>= 0.12.0)
websocket-driver (>= 0.5.1)
ffi (1.9.17)
ffi (1.9.17-x64-mingw32)
ffi (1.9.17-x86-mingw32)
globalid (0.3.7)
activesupport (>= 4.1.0)
hiredis (0.6.1)
...
...
@@ -234,7 +236,7 @@ GEM
mini_portile2 (~> 2.1.0)
nokogiri (1.7.0.1-x86-mingw32)
mini_portile2 (~> 2.1.0)
parser (2.
3.3.1
)
parser (2.
4.0.0
)
ast (~> 2.2)
pg (0.19.0)
pg (0.19.0-x64-mingw32)
...
...
guides/rails_guides/markdown/renderer.rb
浏览文件 @
f04a49b0
...
...
@@ -16,7 +16,7 @@ def block_code(code, language)
end
def
link
(
url
,
title
,
content
)
if
url
.
start_with?
(
'http://api.rubyonrails.org'
)
if
url
.
start_with?
(
"http://api.rubyonrails.org"
)
%(<a href="#{api_link(url)}">#{content}</a>)
elsif
title
%(<a href="#{url}" title="#{title}">#{content}</a>)
...
...
@@ -93,29 +93,29 @@ def convert_notes(body)
end
def
github_file_url
(
file_path
)
root
,
rest
=
file_path
.
split
(
'/'
,
2
)
root
,
rest
=
file_path
.
split
(
"/"
,
2
)
case
root
when
'abstract_controller'
,
'action_controller'
,
'action_dispatch'
path
=
[
'actionpack'
,
'lib'
,
root
,
rest
].
join
(
'/'
)
when
'active_support'
,
'active_record'
,
'active_model'
,
'action_view'
,
'action_cable'
,
'action_mailer'
,
'action_pack'
,
'active_job'
path
=
[
root
.
sub
(
'_'
,
''
),
'lib'
,
root
,
rest
].
join
(
'/'
)
when
"abstract_controller"
,
"action_controller"
,
"action_dispatch"
path
=
[
"actionpack"
,
"lib"
,
root
,
rest
].
join
(
"/"
)
when
"active_support"
,
"active_record"
,
"active_model"
,
"action_view"
,
"action_cable"
,
"action_mailer"
,
"action_pack"
,
"active_job"
path
=
[
root
.
sub
(
"_"
,
""
),
"lib"
,
root
,
rest
].
join
(
"/"
)
else
path
=
file_path
end
[
"https://github.com/rails/rails/tree"
,
version
||
'master'
,
path
].
join
(
'/'
)
[
"https://github.com/rails/rails/tree"
,
version
||
"master"
,
path
].
join
(
"/"
)
end
def
version
ENV
[
'RAILS_VERSION'
]
ENV
[
"RAILS_VERSION"
]
end
def
api_link
(
url
)
if
version
&&
!
url
.
match
(
/v\d\.\d\.\d/
)
url
.
insert
(
url
.
index
(
'.org'
)
+
4
,
"/
#{
version
}
"
)
url
.
sub
(
'http://edgeapi'
,
'http://api'
)
if
url
.
include?
(
'edgeapi'
)
url
.
insert
(
url
.
index
(
".org"
)
+
4
,
"/
#{
version
}
"
)
url
.
sub
(
"http://edgeapi"
,
"http://api"
)
if
url
.
include?
(
"edgeapi"
)
end
url
...
...
railties/lib/rails/tasks/yarn.rake
浏览文件 @
f04a49b0
namespace
:yarn
do
desc
"Install all JavaScript dependencies as specified via Yarn"
task
:install
do
system
(
'./bin/yarn install --no-progress'
)
system
(
"./bin/yarn install --no-progress"
)
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录