Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
fc50dbb7
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,发现更多精彩内容 >>
提交
fc50dbb7
编写于
2月 02, 2018
作者:
E
Eileen M. Uchitelle
提交者:
eileencodes
2月 02, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Merge pull request #31276 from freeletics/fix-generators-list
Removed "private" generators from command list.
上级
95b2cb86
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
5 addition
and
18 deletion
+5
-18
railties/lib/rails/generators.rb
railties/lib/rails/generators.rb
+3
-0
railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb
...nerators/rails/encrypted_file/encrypted_file_generator.rb
+1
-17
railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb
...ails/encryption_key_file/encryption_key_file_generator.rb
+1
-1
未找到文件。
railties/lib/rails/generators.rb
浏览文件 @
fc50dbb7
...
@@ -218,6 +218,9 @@ def sorted_groups
...
@@ -218,6 +218,9 @@ def sorted_groups
rails
.
delete
(
"app"
)
rails
.
delete
(
"app"
)
rails
.
delete
(
"plugin"
)
rails
.
delete
(
"plugin"
)
rails
.
delete
(
"encrypted_secrets"
)
rails
.
delete
(
"encrypted_secrets"
)
rails
.
delete
(
"encrypted_file"
)
rails
.
delete
(
"encryption_key_file"
)
rails
.
delete
(
"master_key"
)
rails
.
delete
(
"credentials"
)
rails
.
delete
(
"credentials"
)
hidden_namespaces
.
each
{
|
n
|
groups
.
delete
(
n
.
to_s
)
}
hidden_namespaces
.
each
{
|
n
|
groups
.
delete
(
n
.
to_s
)
}
...
...
railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb
浏览文件 @
fc50dbb7
...
@@ -5,23 +5,7 @@
...
@@ -5,23 +5,7 @@
module
Rails
module
Rails
module
Generators
module
Generators
class
EncryptedFileGenerator
<
Base
class
EncryptedFileGenerator
<
Base
# :nodoc:
def
add_encrypted_file
(
file_path
,
key_path
)
unless
File
.
exist?
(
file_path
)
say
"Adding
#{
file_path
}
to store encrypted content."
say
""
say
"The following content has been encrypted with the encryption key:"
say
""
say
template
,
:on_green
say
""
add_encrypted_file_silently
(
file_path
,
key_path
)
say
"You can edit encrypted file with `bin/rails encrypted:edit
#{
file_path
}
`."
say
""
end
end
def
add_encrypted_file_silently
(
file_path
,
key_path
,
template
=
encrypted_file_template
)
def
add_encrypted_file_silently
(
file_path
,
key_path
,
template
=
encrypted_file_template
)
unless
File
.
exist?
(
file_path
)
unless
File
.
exist?
(
file_path
)
setup
=
{
content_path:
file_path
,
key_path:
key_path
,
env_key:
"RAILS_MASTER_KEY"
,
raise_if_missing_key:
true
}
setup
=
{
content_path:
file_path
,
key_path:
key_path
,
env_key:
"RAILS_MASTER_KEY"
,
raise_if_missing_key:
true
}
...
...
railties/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb
浏览文件 @
fc50dbb7
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
module
Rails
module
Rails
module
Generators
module
Generators
class
EncryptionKeyFileGenerator
<
Base
class
EncryptionKeyFileGenerator
<
Base
# :nodoc:
def
add_key_file
(
key_path
)
def
add_key_file
(
key_path
)
key_path
=
Pathname
.
new
(
key_path
)
key_path
=
Pathname
.
new
(
key_path
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录