aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb')
-rw-r--r--railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb18
1 files changed, 1 insertions, 17 deletions
diff --git a/railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb b/railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb
index 4ce2fc1d86..85b3663fba 100644
--- a/railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb
+++ b/railties/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb
@@ -5,23 +5,7 @@ require "active_support/encrypted_file"
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 }