Skip to content

Commit 4df5fa2

Browse files
authored
Merge pull request rails#31276 from freeletics/fix-generators-list
Removed "private" generators from command list.
2 parents 74aa62c + c8dc4f2 commit 4df5fa2

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

railties/lib/rails/generators.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ def sorted_groups
218218
rails.delete("app")
219219
rails.delete("plugin")
220220
rails.delete("encrypted_secrets")
221+
rails.delete("encrypted_file")
222+
rails.delete("encryption_key_file")
223+
rails.delete("master_key")
221224
rails.delete("credentials")
222225

223226
hidden_namespaces.each { |n| groups.delete(n.to_s) }

railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,7 @@
55

66
module Rails
77
module Generators
8-
class EncryptedFileGenerator < Base
9-
def add_encrypted_file(file_path, key_path)
10-
unless File.exist?(file_path)
11-
say "Adding #{file_path} to store encrypted content."
12-
say ""
13-
say "The following content has been encrypted with the encryption key:"
14-
say ""
15-
say template, :on_green
16-
say ""
17-
18-
add_encrypted_file_silently(file_path, key_path)
19-
20-
say "You can edit encrypted file with `bin/rails encrypted:edit #{file_path}`."
21-
say ""
22-
end
23-
end
24-
8+
class EncryptedFileGenerator < Base # :nodoc:
259
def add_encrypted_file_silently(file_path, key_path, template = encrypted_file_template)
2610
unless File.exist?(file_path)
2711
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
module Rails
88
module Generators
9-
class EncryptionKeyFileGenerator < Base
9+
class EncryptionKeyFileGenerator < Base # :nodoc:
1010
def add_key_file(key_path)
1111
key_path = Pathname.new(key_path)
1212

0 commit comments

Comments
 (0)