parallelized_specs 0.4.60 → 0.4.61

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -12,7 +12,7 @@ begin
12
12
  gem.email = "jake@instructure.com"
13
13
  gem.homepage = "http://github.com/jakesorce/#{gem.name}"
14
14
  gem.authors = "Jake Sorce, Bryan Madsen, Shawn Meredith"
15
- gem.version = "0.4.60"
15
+ gem.version = "0.4.61"
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
@@ -157,12 +157,25 @@ class ParallelizedSpecs
157
157
  end
158
158
 
159
159
  def self.formatter_directory_management(formatters)
160
+ FileUtils.mkdir_p('parallel_log') if !File.directory?('tmp/parallel_log')
160
161
  begin
161
- File.directory?('tmp/parallel_log') ? `rm -rf tmp/parallel_log && mkdir tmp/parallel_log` : FileUtils.mkdir_p('tmp/parallel_log')
162
+ ['tmp/parallel_log/spec_count', 'tmp/parallel_log/failed_specs', 'tmp/parallel_log/thread_started'].each do |dir|
163
+ directory_cleanup_and_create(dir)
164
+ `rm tmp/parallel_log/rspec.failures && touch tmp/parallel_log/rspec.failures`
165
+ `rm tmp/parallel_log/total_count.txt && tmp/parallel_log/total_count.txt`
166
+ end
167
+ rescue SystemCallError
168
+ $stderr.print "directory management error " + $!
169
+ raise
170
+ end
171
+ end
172
+
173
+ def self.directory_cleanup_and_create(dir)
174
+ if File.directory?(dir)
175
+ `rm -rf #{dir} && mkdir #{dir}`
176
+ else
177
+ `mkdir #{dir}`
162
178
  end
163
- rescue SystemCallError
164
- $stderr.print "directory management error " + $!
165
- raise
166
179
  end
167
180
 
168
181
  def self.rerun_initializer()
@@ -551,5 +564,4 @@ class ParallelizedSpecs
551
564
  File.open(file, 'a+') { |f| f.puts slow_spec }
552
565
  end
553
566
  end
554
-
555
567
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "parallelized_specs"
8
- s.version = "0.4.60"
8
+ s.version = "0.4.61"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jake Sorce, Bryan Madsen, Shawn Meredith"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallelized_specs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.60
4
+ version: 0.4.61
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: