File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ module Rails
4
+ module Command
5
+ class SecretCommand < Base # :nodoc:
6
+ desc "secret" , "Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)."
7
+ def perform
8
+ require "securerandom"
9
+ puts SecureRandom . hex ( 64 )
10
+ end
11
+ end
12
+ end
13
+ end
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
- desc "Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions)."
4
- task :secret do
5
- require "securerandom"
6
- puts SecureRandom . hex ( 64 )
7
- end
8
-
9
3
desc "List versions of all Rails frameworks and the environment"
10
4
task about : :environment do
11
5
puts Rails ::Info
You can’t perform that action at this time.
0 commit comments