adding mysql environment for mysql sql injection tests

This commit is contained in:
Mike McCabe
2014-04-17 23:03:46 -04:00
parent d2bd77a461
commit c0ea2c87a5
4 changed files with 71 additions and 2 deletions
+6 -2
View File
@@ -14,7 +14,7 @@ ruby '2.0.0'
gem 'sqlite3'
gem 'foreman'
group :development do
group :development, :mysql do
gem 'brakeman'
gem 'bundler-audit'
gem 'guard-brakeman'
@@ -33,7 +33,7 @@ gem 'gauntlt'
gem 'simplecov', :require => false, :group => :test
group :development, :test do
group :development, :test, :mysql do
gem 'launchy'
gem 'capybara'
gem 'database_cleaner'
@@ -41,6 +41,10 @@ group :development, :test do
gem 'rspec-rails'
end
group :mysql do
gem 'mysql2'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
+2
View File
@@ -170,6 +170,7 @@ GEM
mini_portile (0.5.3)
multi_json (1.9.2)
multi_test (0.1.1)
mysql2 (0.3.15)
nio4r (1.0.0)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
@@ -324,6 +325,7 @@ DEPENDENCIES
jquery-rails
launchy
mailcatcher
mysql2
poltergeist
powder
pry
+9
View File
@@ -9,6 +9,15 @@ development:
pool: 5
timeout: 5000
mysql:
adapter: mysql2
database: development_railsgoat
pool: 5
timeout: 5000
host: localhost
username: root
password:
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
+54
View File
@@ -0,0 +1,54 @@
Railsgoat::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
config.active_record.auto_explain_threshold_in_seconds = 0.5
# Tired of caching causing issues
config.middleware.delete Rack::ETag
# Do not compress assets
config.assets.compress = false
# Expands the lines which load the assets
config.assets.debug = true
# ActionMailer settings for email support
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { :address => "localhost", :port => 1025 }
config.action_mailer.default_url_options = { :host => "localhost:3000" }
config.middleware.insert_before(
Rack::Lock, Rack::LiveReload,
:min_delay => 500,
:max_delay => 1000,
:port => 35727,
:host => 'railsgoat.dev',
:ignore => [ %r{dont/modify\.html$} ]
)
end