diff --git a/Gemfile b/Gemfile index 5db4f0f..ec8933a 100644 --- a/Gemfile +++ b/Gemfile @@ -20,12 +20,13 @@ gem 'rack-tracker' gem 'redcarpet' group :development, :test do - gem 'rspec-rails', '~> 3.6' + gem 'bundler-audit' + gem 'byebug' gem 'factory_bot_rails' gem 'guard-rails', require: false gem "guard-rspec" gem "guard" - gem 'byebug' + gem 'rspec-rails', '~> 3.6' end group :production do diff --git a/Gemfile.lock b/Gemfile.lock index 5cf429d..655fdd0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -52,6 +52,9 @@ GEM execjs (~> 2.0) bindex (0.5.0) builder (3.2.3) + bundler-audit (0.7.0.1) + bundler (>= 1.2.0, < 3) + thor (>= 0.18, < 2) byebug (9.1.0) carrierwave (1.2.1) activemodel (>= 4.0.0) @@ -526,6 +529,7 @@ PLATFORMS ruby DEPENDENCIES + bundler-audit byebug carrierwave draper diff --git a/Rakefile b/Rakefile index ba6b733..fb72568 100644 --- a/Rakefile +++ b/Rakefile @@ -4,3 +4,19 @@ require File.expand_path('../config/application', __FILE__) Rails.application.load_tasks + +if %w[development test].include? Rails.env + require 'bundler/audit/task' + require 'rspec/core/rake_task' + + # setup task bundle:audit + Bundler::Audit::Task.new + + # setup task rspec + RSpec::Core::RakeTask.new(:rspec) do |t| + # t.exclude_pattern = "**/{system}/**/*_spec.rb" # example, here how to skip integration specs + end + + desc 'Run the specs and bundle:audit' + task ci: %w[rspec bundle:audit] +end