zeus-parallel_tests 0.2.4 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +12 -0
  5. data/Appraisals +19 -0
  6. data/README.md +3 -2
  7. data/Rakefile +2 -13
  8. data/bin/zeus-parallel_tests +8 -10
  9. data/circle.yml +39 -0
  10. data/gemfiles/rails_3_zeus_0.13.gemfile +8 -0
  11. data/gemfiles/rails_3_zeus_0.15.gemfile +8 -0
  12. data/gemfiles/rails_4_zeus_0.13.gemfile +8 -0
  13. data/gemfiles/rails_4_zeus_0.15.gemfile +8 -0
  14. data/lib/zeus/parallel_tests.rb +1 -1
  15. data/lib/zeus/parallel_tests/rails.rb +21 -13
  16. data/lib/zeus/parallel_tests/version.rb +1 -1
  17. data/lib/zeus/parallel_tests/worker.rb +44 -45
  18. data/spec/dummy/Guardfile +4 -4
  19. data/spec/dummy/config/application.rb +2 -9
  20. data/spec/dummy/config/boot.rb +1 -1
  21. data/spec/dummy/config/environments/development.rb +0 -8
  22. data/spec/dummy/config/environments/production.rb +0 -6
  23. data/spec/dummy/config/environments/test.rb +1 -4
  24. data/spec/dummy/custom_plan.rb +1 -0
  25. data/spec/dummy/features/support/env.rb +1 -2
  26. data/spec/dummy/lib/tasks/cucumber.rake +43 -44
  27. data/spec/dummy/spec/spec_helper.rb +4 -4
  28. data/spec/dummy/spec/unit_test_a_spec.rb +3 -3
  29. data/spec/dummy/spec/unit_test_b_spec.rb +3 -3
  30. data/spec/lib/zeus/parallel_tests/worker_spec.rb +28 -30
  31. data/spec/parallel_spec.rb +56 -0
  32. data/spec/spec_helper.rb +2 -10
  33. data/spec/zeus_parallel_tests_spec.rb +16 -0
  34. data/zeus-parallel_tests.gemspec +23 -14
  35. metadata +120 -19
  36. data/.travis.yml +0 -5
  37. data/spec/dummy/Gemfile +0 -31
  38. data/spec/slow/parallel_rspec_spec.rb +0 -56
  39. data/spec/slow/zeus-parallel_tests_spec.rb +0 -29
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zeus-parallel_tests
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artur Roszczyk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-09 00:00:00.000000000 Z
11
+ date: 2015-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeus
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.13.3
19
+ version: 0.13.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.13.3
26
+ version: 0.13.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: parallel_tests
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,20 +38,34 @@ dependencies:
38
38
  - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.11.3
41
+ - !ruby/object:Gem::Dependency
42
+ name: appraisal
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ~>
59
+ - - '>='
46
60
  - !ruby/object:Gem::Version
47
- version: '1.3'
61
+ version: '0'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - ~>
66
+ - - '>='
53
67
  - !ruby/object:Gem::Version
54
- version: '1.3'
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rake
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -66,8 +80,92 @@ dependencies:
66
80
  - - '>='
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '3.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '3.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: cucumber-rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: database_cleaner
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: guard-rspec
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rspec-rails
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '>='
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '>='
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: sqlite3
71
169
  requirement: !ruby/object:Gem::Requirement
72
170
  requirements:
73
171
  - - '>='
@@ -90,14 +188,20 @@ extra_rdoc_files: []
90
188
  files:
91
189
  - .gitignore
92
190
  - .rspec
191
+ - .rubocop.yml
93
192
  - .ruby-gemset
94
193
  - .ruby-version
95
- - .travis.yml
194
+ - Appraisals
96
195
  - Gemfile
97
196
  - LICENSE.txt
98
197
  - README.md
99
198
  - Rakefile
100
199
  - bin/zeus-parallel_tests
200
+ - circle.yml
201
+ - gemfiles/rails_3_zeus_0.13.gemfile
202
+ - gemfiles/rails_3_zeus_0.15.gemfile
203
+ - gemfiles/rails_4_zeus_0.13.gemfile
204
+ - gemfiles/rails_4_zeus_0.15.gemfile
101
205
  - lib/zeus/parallel_tests.rb
102
206
  - lib/zeus/parallel_tests/rails.rb
103
207
  - lib/zeus/parallel_tests/templates/custom_plan.rb
@@ -108,7 +212,6 @@ files:
108
212
  - spec/dummy/.rspec
109
213
  - spec/dummy/.ruby-gemset
110
214
  - spec/dummy/.ruby-version
111
- - spec/dummy/Gemfile
112
215
  - spec/dummy/Guardfile
113
216
  - spec/dummy/README.rdoc
114
217
  - spec/dummy/Rakefile
@@ -155,9 +258,9 @@ files:
155
258
  - spec/dummy/spec/unit_test_b_spec.rb
156
259
  - spec/dummy/zeus.json
157
260
  - spec/lib/zeus/parallel_tests/worker_spec.rb
158
- - spec/slow/parallel_rspec_spec.rb
159
- - spec/slow/zeus-parallel_tests_spec.rb
261
+ - spec/parallel_spec.rb
160
262
  - spec/spec_helper.rb
263
+ - spec/zeus_parallel_tests_spec.rb
161
264
  - zeus-parallel_tests.gemspec
162
265
  homepage: ''
163
266
  licenses:
@@ -179,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
282
  version: '0'
180
283
  requirements: []
181
284
  rubyforge_project:
182
- rubygems_version: 2.0.3
285
+ rubygems_version: 2.4.6
183
286
  signing_key:
184
287
  specification_version: 4
185
288
  summary: ''
@@ -188,7 +291,6 @@ test_files:
188
291
  - spec/dummy/.rspec
189
292
  - spec/dummy/.ruby-gemset
190
293
  - spec/dummy/.ruby-version
191
- - spec/dummy/Gemfile
192
294
  - spec/dummy/Guardfile
193
295
  - spec/dummy/README.rdoc
194
296
  - spec/dummy/Rakefile
@@ -235,7 +337,6 @@ test_files:
235
337
  - spec/dummy/spec/unit_test_b_spec.rb
236
338
  - spec/dummy/zeus.json
237
339
  - spec/lib/zeus/parallel_tests/worker_spec.rb
238
- - spec/slow/parallel_rspec_spec.rb
239
- - spec/slow/zeus-parallel_tests_spec.rb
340
+ - spec/parallel_spec.rb
240
341
  - spec/spec_helper.rb
241
- has_rdoc:
342
+ - spec/zeus_parallel_tests_spec.rb
@@ -1,5 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.0.0
4
- - 1.9.3
5
- script: bundle exec rake travis:spec
@@ -1,31 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'rails', '3.2.13'
4
-
5
- # Bundle edge Rails instead:
6
- # gem 'rails', :git => 'git://github.com/rails/rails.git'
7
-
8
- gem 'sqlite3'
9
-
10
- gem "rspec-rails"
11
- gem 'cucumber-rails', require: false
12
- gem "zeus-parallel_tests"
13
- gem 'database_cleaner'
14
- gem 'turn', require: false
15
- gem 'guard-rspec'
16
-
17
-
18
- # To use ActiveModel has_secure_password
19
- # gem 'bcrypt-ruby', '~> 3.0.0'
20
-
21
- # To use Jbuilder templates for JSON
22
- # gem 'jbuilder'
23
-
24
- # Use unicorn as the app server
25
- # gem 'unicorn'
26
-
27
- # Deploy with Capistrano
28
- # gem 'capistrano'
29
-
30
- # To use debugger
31
- # gem 'debugger'
@@ -1,56 +0,0 @@
1
- require 'spec_helper'
2
-
3
- $:.unshift File.expand_path("../../../lib", __FILE__)
4
-
5
- require "zeus/parallel_tests/version"
6
- require 'open3'
7
-
8
- describe "zeus parallel_rspec spec" do
9
- def build_gem(version=Zeus::ParallelTests::VERSION)
10
- system "gem build zeus-parallel_tests.gemspec &>/dev/null"
11
- end
12
-
13
- def install_gem(version=Zeus::ParallelTests::VERSION)
14
- system "gem install ./zeus-parallel_tests-#{version}.gem --ignore-dependencies &>/dev/null"
15
- end
16
-
17
- def uninstall_gem(version=Zeus::ParallelTests::VERSION)
18
- system "echo y | gem uninstall zeus-parallel_tests -v #{version} --quiet &>/dev/null"
19
- end
20
-
21
- def launch_server
22
- pid = fork do
23
- Dir.chdir "spec/dummy/"
24
- system "bundle install"
25
- exec "bundle exec zeus start &>/dev/null"
26
- end
27
- sleep 3
28
- pid
29
- end
30
-
31
- before(:all) do
32
- build_gem
33
- install_gem
34
- print "Launch zeus server for dummy app in separate console and press ENTER "
35
- $stdin.getc
36
- # @server_pid = launch_server.to_i
37
- Dir.chdir "spec/dummy/"
38
- end
39
-
40
- it "connects to server" do
41
- expect(system("zeus r true &>/dev/null")).to be_true
42
- end
43
-
44
- it 'runs specs in two processes' do
45
- Open3.popen2e("zeus", "parallel_rspec", "-n", "2" "spec") do |input, output, t|
46
- expect(output.to_a.map(&:chomp)).to include("2 processes for 2 specs, ~ 1 specs per process")
47
- end
48
- end
49
-
50
- after(:all) do
51
- # system "kill -9 #{@server_pid.to_s}"
52
- # system "rm -fr .zeus.sock"
53
- uninstall_gem
54
- end
55
- end
56
-
@@ -1,29 +0,0 @@
1
- require 'spec_helper'
2
- require 'tmpdir'
3
- require 'fileutils'
4
-
5
- describe 'zeus-parallel_tests' do
6
- before do
7
- @project_dir = File.expand_path(Dir.mktmpdir)
8
- Dir.mkdir(File.join(@project_dir, "script"))
9
-
10
- bin = File.expand_path('../../../bin/zeus-parallel_tests', __FILE__)
11
- @run = -> { system("#{bin} init &>/dev/null", chdir: @project_dir) }
12
- end
13
-
14
- after do
15
- FileUtils.rm_rf @project_dir
16
- @io && @io.close
17
- end
18
-
19
- it "creates zeus configuration and script/spec in projects directory" do
20
- @run.call
21
-
22
- expected_files = ['zeus.json', 'custom_plan.rb'].
23
- map { |f| File.join(@project_dir, f) }
24
-
25
- expected_files.each do |f|
26
- File.exists?(f).should be_true
27
- end
28
- end
29
- end