diff --git a/Appraisals b/Appraisals index bbad0b1..7fd30f3 100644 --- a/Appraisals +++ b/Appraisals @@ -1,19 +1,23 @@ -appraise 'rails-3-zeus-0.15' do - gem 'rails', '3.2.21' - gem 'zeus', '0.15.4' +appraise 'rails-4-zeus-0.15' do + gem 'rails', '~> 4.2.3' + gem 'zeus', '~> 0.15.4' + gem 'ruby_dep', '< 1.4.0' # 1.4 and up require Ruby 2.2.5 + gem 'listen', '< 3.1.0' # 3.1 and up require Ruby 2.2.3 end -appraise 'rails-4-zeus-0.15' do - gem 'rails', '4.2.3' - gem 'zeus', '0.15.4' +appraise 'rails-4-zeus-0.13' do + gem 'rails', '~> 4.2.3' + gem 'zeus', '~> 0.13.3' + gem 'ruby_dep', '< 1.4.0' # 1.4 and up require Ruby 2.2.5 + gem 'listen', '< 3.1.0' # 3.1 and up require Ruby 2.2.3 end -appraise 'rails-3-zeus-0.13' do - gem 'rails', '3.2.21' - gem 'zeus', '0.13.3' +appraise 'rails-5-zeus-0.15' do + gem 'rails', '~> 5.0.0.1' + gem 'zeus', '~> 0.15.4' end -appraise 'rails-4-zeus-0.13' do - gem 'rails', '4.2.3' - gem 'zeus', '0.13.3' +appraise 'rails-5-zeus-0.13' do + gem 'rails', '~> 5.0.0.1' + gem 'zeus', '~> 0.13.3' end diff --git a/circle.yml b/circle.yml index ad2bb7f..95f0bb9 100644 --- a/circle.yml +++ b/circle.yml @@ -1,39 +1,32 @@ dependencies: pre: - echo rvm_autoupdate_flag=0 >> ~/.rvmrc + - rvm install 2.3 - rvm install 2.2 - rvm install 2.1 - - rvm install 2.0 - - rvm install 1.9 cache_directories: + - /home/ubuntu/.rvm/gems/ruby-2.3.0 - /home/ubuntu/.rvm/gems/ruby-2.2.0 - /home/ubuntu/.rvm/gems/ruby-2.1.5 - - /home/ubuntu/.rvm/gems/ruby-2.0.0-p598 - - /home/ubuntu/.rvm/gems/ruby-1.9.3-p551 override: - - rvm-exec 2.2 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.15.gemfile' + - rvm-exec 2.3 bash -c 'bundle check --gemfile=gemfiles/rails_5_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_5_zeus_0.15.gemfile' + - rvm-exec 2.3 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.15.gemfile' + - rvm-exec 2.3 bash -c 'bundle check --gemfile=gemfiles/rails_5_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_5_zeus_0.13.gemfile' + - rvm-exec 2.3 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.13.gemfile' + - rvm-exec 2.2 bash -c 'bundle check --gemfile=gemfiles/rails_5_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_5_zeus_0.15.gemfile' - rvm-exec 2.2 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.15.gemfile' - - rvm-exec 2.2 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.13.gemfile' + - rvm-exec 2.2 bash -c 'bundle check --gemfile=gemfiles/rails_5_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_5_zeus_0.13.gemfile' - rvm-exec 2.2 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.13.gemfile' - - rvm-exec 2.1 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.15.gemfile' - rvm-exec 2.1 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.15.gemfile' - - rvm-exec 2.1 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.13.gemfile' - rvm-exec 2.1 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.13.gemfile' - - rvm-exec 2.0 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.15.gemfile' - - rvm-exec 2.0 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.15.gemfile' - - rvm-exec 2.0 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.13.gemfile' - - rvm-exec 2.0 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.13.gemfile' - - rvm-exec 1.9 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.15.gemfile' - - rvm-exec 1.9 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.15.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.15.gemfile' - - rvm-exec 1.9 bash -c 'bundle check --gemfile=gemfiles/rails_3_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_3_zeus_0.13.gemfile' - - rvm-exec 1.9 bash -c 'bundle check --gemfile=gemfiles/rails_4_zeus_0.13.gemfile || bundle install --gemfile=gemfiles/rails_4_zeus_0.13.gemfile' test: override: + - rvm-exec 2.3 bash -c 'bundle exec appraisal rspec' - rvm-exec 2.2 bash -c 'bundle exec appraisal rspec' - - rvm-exec 2.1 bash -c 'bundle exec appraisal rspec' - - rvm-exec 2.0 bash -c 'bundle exec appraisal rspec' - - rvm-exec 1.9 bash -c 'bundle exec appraisal rspec' - - rvm-exec 2.2 bash -c 'bundle exec rubocop' + # Rails 5 requires Ruby 2.2.2 + - rvm-exec 2.1 bash -c 'bundle exec appraisal rails-4-zeus-0.15 rspec' + - rvm-exec 2.1 bash -c 'bundle exec appraisal rails-4-zeus-0.13 rspec' + - rvm-exec 2.3 bash -c 'bundle exec rubocop' diff --git a/gemfiles/rails_4_zeus_0.13.gemfile b/gemfiles/rails_4_zeus_0.13.gemfile index 42da9b5..848ac56 100644 --- a/gemfiles/rails_4_zeus_0.13.gemfile +++ b/gemfiles/rails_4_zeus_0.13.gemfile @@ -2,7 +2,9 @@ source "https://rubygems.org" -gem "rails", "4.2.3" -gem "zeus", "0.13.3" +gem "rails", "~> 4.2.3" +gem "zeus", "~> 0.13.3" +gem "ruby_dep", "< 1.4.0" +gem "listen", "< 3.1.0" gemspec :path => "../" diff --git a/gemfiles/rails_4_zeus_0.15.gemfile b/gemfiles/rails_4_zeus_0.15.gemfile index 7729cc2..bd24ca3 100644 --- a/gemfiles/rails_4_zeus_0.15.gemfile +++ b/gemfiles/rails_4_zeus_0.15.gemfile @@ -2,7 +2,9 @@ source "https://rubygems.org" -gem "rails", "4.2.3" -gem "zeus", "0.15.4" +gem "rails", "~> 4.2.3" +gem "zeus", "~> 0.15.4" +gem "ruby_dep", "< 1.4.0" +gem "listen", "< 3.1.0" gemspec :path => "../" diff --git a/gemfiles/rails_3_zeus_0.13.gemfile b/gemfiles/rails_5_zeus_0.13.gemfile similarity index 65% rename from gemfiles/rails_3_zeus_0.13.gemfile rename to gemfiles/rails_5_zeus_0.13.gemfile index 87a137c..55929eb 100644 --- a/gemfiles/rails_3_zeus_0.13.gemfile +++ b/gemfiles/rails_5_zeus_0.13.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rails", "3.2.21" -gem "zeus", "0.13.3" +gem "rails", "~> 5.0.0.1" +gem "zeus", "~> 0.13.3" gemspec :path => "../" diff --git a/gemfiles/rails_3_zeus_0.15.gemfile b/gemfiles/rails_5_zeus_0.15.gemfile similarity index 65% rename from gemfiles/rails_3_zeus_0.15.gemfile rename to gemfiles/rails_5_zeus_0.15.gemfile index 5cf710a..7fe8348 100644 --- a/gemfiles/rails_3_zeus_0.15.gemfile +++ b/gemfiles/rails_5_zeus_0.15.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "rails", "3.2.21" -gem "zeus", "0.15.4" +gem "rails", "~> 5.0.0.1" +gem "zeus", "~> 0.15.4" gemspec :path => "../" diff --git a/lib/zeus/parallel_tests/version.rb b/lib/zeus/parallel_tests/version.rb index 51b01f1..f7d7d2a 100644 --- a/lib/zeus/parallel_tests/version.rb +++ b/lib/zeus/parallel_tests/version.rb @@ -1,5 +1,5 @@ module Zeus module ParallelTests - VERSION = '0.3.1' + VERSION = '0.3.1'.freeze end end diff --git a/lib/zeus/parallel_tests/worker.rb b/lib/zeus/parallel_tests/worker.rb index e340534..9f77a15 100644 --- a/lib/zeus/parallel_tests/worker.rb +++ b/lib/zeus/parallel_tests/worker.rb @@ -1,5 +1,6 @@ require_relative '../parallel_tests' require 'tempfile' +require 'English' module Zeus module ParallelTests @@ -22,7 +23,7 @@ def initialize(suite, env, argv) def spawn system %(zeus parallel_#{@suite}_worker #{parallel_tests_attributes}) args_file.unlink - $CHILD_STATUS.to_i + $CHILD_STATUS.exitstatus end private diff --git a/spec/dummy/Guardfile b/spec/dummy/Guardfile index 629e478..22a2876 100644 --- a/spec/dummy/Guardfile +++ b/spec/dummy/Guardfile @@ -19,5 +19,5 @@ guard 'rspec', zeus: true, parallel: true do # Turnip features and steps watch(%r{^spec/acceptance/(.+)\.feature$}) - watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' } + watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' } end diff --git a/spec/dummy/config.ru b/spec/dummy/config.ru index 1989ed8..cbd7415 100644 --- a/spec/dummy/config.ru +++ b/spec/dummy/config.ru @@ -1,4 +1,4 @@ # This file is used by Rack-based servers to start the application. -require ::File.expand_path('../config/environment', __FILE__) +require ::File.expand_path('../config/environment', __FILE__) run Dummy::Application diff --git a/spec/dummy/config/environments/test.rb b/spec/dummy/config/environments/test.rb index f7d264b..904d888 100644 --- a/spec/dummy/config/environments/test.rb +++ b/spec/dummy/config/environments/test.rb @@ -22,7 +22,7 @@ config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false + config.action_controller.allow_forgery_protection = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the diff --git a/spec/dummy/script/rails b/spec/dummy/script/rails index f8da2cf..bd79dce 100755 --- a/spec/dummy/script/rails +++ b/spec/dummy/script/rails @@ -1,6 +1,6 @@ #!/usr/bin/env ruby # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) require 'rails/commands' diff --git a/spec/lib/zeus/parallel_tests/worker_spec.rb b/spec/lib/zeus/parallel_tests/worker_spec.rb index f3f2036..4c6d2f6 100644 --- a/spec/lib/zeus/parallel_tests/worker_spec.rb +++ b/spec/lib/zeus/parallel_tests/worker_spec.rb @@ -6,7 +6,7 @@ let(:cli_env) { { 'TEST_ENV_NUMBER' => '3' } } let(:worker) { double('worker', spawn: 0) } before { allow(Zeus::ParallelTests::Worker).to receive_messages(new: worker) } - subject { Zeus::ParallelTests::Worker.run(cli_argv, cli_env) } + subject { Zeus::ParallelTests::Worker.run(cli_argv, cli_env) } it 'creates instance of worker' do expect(Zeus::ParallelTests::Worker).to receive(:new) @@ -53,7 +53,7 @@ it 'returns exit code' do system 'true' - expect(worker).to receive(:system) { allow($CHILD_STATUS).to receive_messages(to_i: 1) } + expect(worker).to receive(:system) { allow($CHILD_STATUS).to receive_messages(exitstatus: 1) } expect(subject).to eq(1) end end