Skip to content

Commit

Permalink
asdfasf
Browse files Browse the repository at this point in the history
  • Loading branch information
stormsilver committed Jan 18, 2019
1 parent e7657da commit 413c036
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/parallel_tests/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ def load_lib
require "parallel_tests"
end

def purge_before_load?
ENV.fetch('PURGE_BEFORE_LOAD', 'TRUE').downcase == 'false' ? false : true
end

def purge_before_load
if Gem::Version.new(Rails.version) > Gem::Version.new('4.2.0')
if purge_before_load? && Gem::Version.new(Rails.version) > Gem::Version.new('4.2.0')
Rake::Task.task_defined?('db:purge') ? 'db:purge' : 'app:db:purge'
end
end
Expand Down

0 comments on commit 413c036

Please sign in to comment.