Class: HeimdallAuth::Generators::SessionsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- HeimdallAuth::Generators::SessionsGenerator
- Defined in:
- lib/generators/heimdall_auth/sessions/sessions_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_session_routes ⇒ Object
5 6 7 |
# File 'lib/generators/heimdall_auth/sessions/sessions_generator.rb', line 5 def add_session_routes route "use_heimdall_auth" end |
#lower_production_log_level ⇒ Object
20 21 22 |
# File 'lib/generators/heimdall_auth/sessions/sessions_generator.rb', line 20 def lower_production_log_level gsub_file 'config/environments/production.rb', 'config.log_level = :debug', 'config.log_level = :warn' end |
#set_https_only ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/generators/heimdall_auth/sessions/sessions_generator.rb', line 9 def set_https_only gsub_file 'config/environments/production.rb', '# config.force_ssl = true', 'config.force_ssl = true' inject_into_file 'config/environments/development.rb', after: " config.assets.debug = true\n" do <<-'RUBY' # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. config.force_ssl = true RUBY end end |