parallelized_specs 0.3.90 → 0.3.91

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.3.90"
15
+ gem.version = "0.3.91"
16
16
  end
17
17
  Jeweler::GemcutterTasks.new
18
18
  rescue LoadError
@@ -9,8 +9,8 @@ module RSpec
9
9
  env_test_number = ENV['TEST_ENV_NUMBER']
10
10
  env_test_number = 1 if ENV['TEST_ENV_NUMBER'].blank?
11
11
  puts "Thread #{env_test_number.to_s} has #{@example_count} specs"
12
- File.open("tmp/parallel_log/spec_count/total_specs#{env_test_number}.txt", 'a+') { |f| f.write(@example_count) }
13
- File.open("tmp/parallel_log/thread_started/thread_#{env_test_number}.txt", 'a+') { |f| f.write("") }
12
+ File.open("#{RAILS_ROOT}/tmp/parallel_log/spec_count/total_specs#{env_test_number}.txt", 'a+') { |f| f.write(@example_count) }
13
+ File.open("#{RAILS_ROOT}/tmp/parallel_log/thread_started/thread_#{env_test_number}.txt", 'a+') { |f| f.write("") }
14
14
  super
15
15
  end
16
16
 
@@ -18,8 +18,8 @@ module RSpec
18
18
  def dump_summary(duration, example_count, failure_count, pending_count)
19
19
  env_test_number = ENV['TEST_ENV_NUMBER']
20
20
  env_test_number = 1 if ENV['TEST_ENV_NUMBER'].blank?
21
- spec_file = "tmp/parallel_log/spec_count/total_specs#{env_test_number}.txt"
22
- failure_file = "tmp/parallel_log/failed_specs/failed_specs#{env_test_number}.txt"
21
+ spec_file = "#{RAILS_ROOT}/tmp/parallel_log/spec_count/total_specs#{env_test_number}.txt"
22
+ failure_file = "#{RAILS_ROOT}/tmp/parallel_log/failed_specs/failed_specs#{env_test_number}.txt"
23
23
  expected_example_count = File.open(spec_file, &:readline).to_s
24
24
  puts "Expected example count = #{expected_example_count} from rspec example count = #{example_count}"
25
25
  File.delete(spec_file) if expected_example_count.to_i - example_count.to_i < 2
@@ -117,20 +117,20 @@ class ParallelizedSpecs
117
117
  puts ""
118
118
  puts "Took #{Time.now - start} seconds"
119
119
 
120
- if Dir.glob('tmp/parallel_log/spec_count/{*,.*}').count == 2 && Dir.glob('tmp/parallel_log/thread_started/{*,.*}').count == num_processes + 2
120
+ if Dir.glob("#{RAILS_ROOT}/tmp/parallel_log/spec_count/{*,.*}").count == 2 && Dir.glob("#{RAILS_ROOT}/tmp/parallel_log/thread_started/{*,.*}").count == num_processes + 2
121
121
  (puts "All threads completed")
122
- elsif Dir.glob('tmp/parallel_log/thread_started/{*,.*}').count != num_processes + 2
122
+ elsif Dir.glob("#{RAILS_ROOT}/tmp/parallel_log/thread_started/{*,.*}").count != num_processes + 2
123
123
  abort "one or more threads didn't get started by rspec"
124
124
  else
125
- threads = Dir["tmp/parallel_log/spec_count/*"]
125
+ threads = Dir["#{RAILS_ROOT}/tmp/parallel_log/spec_count/*"]
126
126
  threads.each do |t|
127
127
  failed_thread = t.match(/\d/).to_s
128
128
  if failed_thread == "1"
129
129
  puts "Thread 1 last spec to start running"
130
- puts IO.readlines("tmp/parallel_log/thread_.log")[-1]
130
+ puts IO.readlines("#{RAILS_ROOT}/tmp/parallel_log/thread_.log")[-1]
131
131
  else
132
132
  puts "Thread #{failed_thread} last spec to start running"
133
- puts IO.readlines("tmp/parallel_log/thread_#{failed_thread}.log")[-1]
133
+ puts IO.readlines("#{RAILS_ROOT}/tmp/parallel_log/thread_#{failed_thread}.log")[-1]
134
134
  end
135
135
  end
136
136
  abort "One or more threads have failed, see above logging information for details" #works on both 1.8.7\1.9.3
@@ -140,12 +140,12 @@ class ParallelizedSpecs
140
140
  failed = test_results.any? { |result| result[:exit_status] != 0 } #ruby 1.8.7 works breaks on 1.9.3
141
141
  puts "this is the exit status of the rspec suites #{failed}"
142
142
 
143
- if Dir.glob('tmp/parallel_log/failed_specs/{*,.*}').count > 2 && !File.zero?("tmp/parallel_log/rspec.failures") # works on both 1.8.7\1.9.3
143
+ if Dir.glob("#{RAILS_ROOT}/tmp/parallel_log/failed_specs/{*,.*}").count > 2 && !File.zero?("#{RAILS_ROOT}/tmp/parallel_log/rspec.failures") # works on both 1.8.7\1.9.3
144
144
  puts "some specs failed, about to start the rerun process\n no more than 9 specs may be rerun and shared specs are not allowed\n...\n..\n."
145
145
  ParallelizedSpecs.rerun()
146
146
  else
147
147
  #works on both 1.8.7\1.9.3
148
- abort "#{name.capitalize}s Failed" if Dir.glob('tmp/parallel_log/failed_specs/{*,.*}').count > 2 || failed
148
+ abort "#{name.capitalize}s Failed" if Dir.glob("#{RAILS_ROOT}/tmp/parallel_log/failed_specs/{*,.*}").count > 2 || failed
149
149
  end
150
150
  puts "marking build as PASSED"
151
151
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "parallelized_specs"
8
- s.version = "0.3.90"
8
+ s.version = "0.3.91"
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"]
12
- s.date = "2013-01-12"
12
+ s.date = "2013-01-15"
13
13
  s.email = "jake@instructure.com"
14
14
  s.files = [
15
15
  "Gemfile",
metadata CHANGED
@@ -1,38 +1,45 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: parallelized_specs
3
- version: !ruby/object:Gem::Version
4
- version: 0.3.90
3
+ version: !ruby/object:Gem::Version
4
+ hash: 165
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 91
10
+ version: 0.3.91
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Jake Sorce, Bryan Madsen, Shawn Meredith
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2013-01-12 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2013-01-15 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: parallel
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
23
22
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :runtime
33
+ version_requirements: *id001
30
34
  description:
31
35
  email: jake@instructure.com
32
36
  executables: []
37
+
33
38
  extensions: []
39
+
34
40
  extra_rdoc_files: []
35
- files:
41
+
42
+ files:
36
43
  - Gemfile
37
44
  - Gemfile.lock
38
45
  - Rakefile
@@ -64,27 +71,37 @@ files:
64
71
  - spec/spec_helper.rb
65
72
  homepage: http://github.com/jakesorce/parallelized_specs
66
73
  licenses: []
74
+
67
75
  post_install_message:
68
76
  rdoc_options: []
69
- require_paths:
77
+
78
+ require_paths:
70
79
  - lib
71
- required_ruby_version: !ruby/object:Gem::Requirement
80
+ required_ruby_version: !ruby/object:Gem::Requirement
72
81
  none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ hash: 3
86
+ segments:
87
+ - 0
88
+ version: "0"
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
90
  none: false
79
- requirements:
80
- - - ! '>='
81
- - !ruby/object:Gem::Version
82
- version: '0'
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ hash: 3
95
+ segments:
96
+ - 0
97
+ version: "0"
83
98
  requirements: []
99
+
84
100
  rubyforge_project:
85
101
  rubygems_version: 1.8.24
86
102
  signing_key:
87
103
  specification_version: 3
88
104
  summary: Run rspec tests in parallel
89
105
  test_files: []
106
+
90
107
  has_rdoc: