Class: Suspenders::SecurityGenerator

Inherits:
Generators::Base show all
Defined in:
lib/suspenders/generators/security_generator.rb

Instance Method Summary collapse

Methods inherited from Generators::Base

default_source_root

Methods included from Actions

#action_mailer_asset_host, #action_mailer_host, #configure_environment, #expand_json, #replace_in_file

Instance Method Details

#add_checkers_gemsObject



5
6
7
8
9
# File 'lib/suspenders/generators/security_generator.rb', line 5

def add_checkers_gems
  gem 'brakeman', require: false, group: :development
  gem 'bundler-audit', '>= 0.5.0', require: false, group: :development
  Bundler.with_clean_env { run "bundle install" }
end

#create_binstubsObject



11
12
13
14
15
16
# File 'lib/suspenders/generators/security_generator.rb', line 11

def create_binstubs
  Bundler.with_clean_env do
    run "bundle binstubs brakeman"
    run "bundle binstubs bundler-audit"
  end
end