class Rockstart::Security::RackAttackGenerator
Public Instance Methods
add_initializer()
click to toggle source
# File lib/generators/rockstart/security/rack_attack/rack_attack_generator.rb, line 15 def add_initializer initializer_template "rack_attack" end
add_request_spec()
click to toggle source
# File lib/generators/rockstart/security/rack_attack/rack_attack_generator.rb, line 19 def add_request_spec template "rack_attack_spec.rb", "spec/requests/rack_attack_spec.rb" end
add_rspec_support()
click to toggle source
# File lib/generators/rockstart/security/rack_attack/rack_attack_generator.rb, line 23 def add_rspec_support copy_file "cache_support.rb", "spec/support/cache.rb" end
enable_cache_store_for_all_environments()
click to toggle source
# File lib/generators/rockstart/security/rack_attack/rack_attack_generator.rb, line 27 def enable_cache_store_for_all_environments application do <<~CACHE # Use memory_store cache for testing and default configurations config.cache_store = :memory_store CACHE end comment_lines "config/environments/test.rb", "config.cache_store = " end