Class: CspEasyGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- CspEasyGenerator
- Defined in:
- lib/generators/csp_easy/csp_easy_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_policy_file ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/generators/csp_easy/csp_easy_generator.rb', line 5 def generate_policy_file copy_file "csp_policy.yml", "config/csp_policy.yml" say "---------------------------------------" say " To enable CSP easy in your Rails application add the following to your application.rb:" say ' config.middleware.use "CSPEasy", CSPEasyRails.policy("#{config.root}/config/csp_policy.yml")' say "---------------------------------------" end |