File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -11,24 +11,22 @@ class InstallGenerator < ::Rails::Generators::Base
11
11
desc 'Automates Lit installation'
12
12
13
13
def set_authentication_function
14
- @authentication_function = options [ 'authentication-function' ] . presence ||
15
- ask ( "What's the authentication function, ie. :authenticate_user! :" ) . presence ||
16
- nil
14
+ @authentication_function =
15
+ options [ ' authentication- function' ] . presence ||
16
+ ask ( "What's the authentication function, ie. :authenticate_user! :" ) . presence || nil
17
17
end
18
18
19
19
def set_key_value_engine
20
- @key_value_engine = options [ 'key-value-engine' ] . presence ||
21
- ask ( "What's the key value engine? ([hash] OR redis):" ) . presence ||
22
- :hash
20
+ @key_value_engine =
21
+ options [ 'key-value-engine' ] . presence || ask ( "What's the key value engine? ([hash] OR redis):" ) . presence ||
22
+ :hash
23
23
end
24
24
25
25
def add_redis_dependency
26
26
if @key_value_engine == 'redis'
27
27
puts 'Adding redis dependency'
28
28
gem 'redis'
29
- Bundler . with_clean_env do
30
- run 'bundle install'
31
- end
29
+ Bundler . with_clean_env { run 'bundle install' }
32
30
end
33
31
end
34
32
@@ -42,7 +40,7 @@ def add_lit_initializer
42
40
puts 'Skipping config/initializers/lit.rb creation, file already exists!'
43
41
else
44
42
puts 'Adding lit initializer (config/initializers/lit.rb)...'
45
- template 'initializer.rb ' , path
43
+ template 'initializer.erb ' , path
46
44
end
47
45
end
48
46
You can’t perform that action at this time.
0 commit comments