提交 fc50dbb7 编写于 作者: E Eileen M. Uchitelle 提交者: eileencodes

Merge pull request #31276 from freeletics/fix-generators-list

Removed "private" generators from command list.
上级 95b2cb86
......@@ -218,6 +218,9 @@ def sorted_groups
rails.delete("app")
rails.delete("plugin")
rails.delete("encrypted_secrets")
rails.delete("encrypted_file")
rails.delete("encryption_key_file")
rails.delete("master_key")
rails.delete("credentials")
hidden_namespaces.each { |n| groups.delete(n.to_s) }
......
......@@ -5,23 +5,7 @@
module Rails
module Generators
class EncryptedFileGenerator < Base
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
class EncryptedFileGenerator < Base # :nodoc:
def add_encrypted_file_silently(file_path, key_path, template = encrypted_file_template)
unless File.exist?(file_path)
setup = { content_path: file_path, key_path: key_path, env_key: "RAILS_MASTER_KEY", raise_if_missing_key: true }
......
......@@ -6,7 +6,7 @@
module Rails
module Generators
class EncryptionKeyFileGenerator < Base
class EncryptionKeyFileGenerator < Base # :nodoc:
def add_key_file(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.
先完成此消息的编辑!
想要评论请 注册