Skip to content

Commit d106115

Browse files
committed
Made --encryption option required
1 parent e2ae482 commit d106115

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

lib/generators/authtrail/install_generator.rb

+1-11
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ class InstallGenerator < Rails::Generators::Base
66
include ActiveRecord::Generators::Migration
77
source_root File.join(__dir__, "templates")
88

9-
class_option :encryption, type: :string
10-
# deprecated
11-
class_option :lockbox, type: :boolean
9+
class_option :encryption, type: :string, required: true
1210

1311
def copy_migration
1412
encryption # ensure valid
@@ -56,18 +54,10 @@ def ip_column
5654
end
5755
end
5856

59-
# TODO remove default
6057
def encryption
6158
case options[:encryption]
6259
when "lockbox", "activerecord", "none"
6360
options[:encryption]
64-
when nil
65-
if options[:lockbox]
66-
# TODO deprecation warning
67-
"lockbox"
68-
else
69-
"none"
70-
end
7161
else
7262
abort "Error: encryption must be lockbox, activerecord, or none"
7363
end

0 commit comments

Comments
 (0)