diff --git a/Gemfile b/Gemfile index 57db654ae..1a6921ff4 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" group :development, :test do gem "heroku_hatchet" - gem "rspec-parts" # another alternative is http://docs.knapsackpro.com/ruby/knapsack + gem "knapsack" gem "rspec-core" gem "rspec-expectations" gem "excon" diff --git a/Gemfile.lock b/Gemfile.lock index 6d97d6170..f2c2a4e62 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -33,6 +33,8 @@ GEM i18n (1.0.1) concurrent-ruby (~> 1.0) json (2.0.4) + knapsack (1.16.0) + rake minitest (5.11.3) minitest-retry (0.1.9) minitest (>= 5.0) @@ -54,8 +56,6 @@ GEM rspec-expectations (3.6.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.6.0) - rspec-parts (0.2.1) - rake rspec-retry (0.5.4) rspec-core (> 3.3, < 3.7) rspec-support (3.6.0) @@ -73,12 +73,12 @@ DEPENDENCIES git! heroku_hatchet json (~> 2.0.2) + knapsack netrc parallel_tests rake rspec-core rspec-expectations - rspec-parts rspec-retry BUNDLED WITH diff --git a/Rakefile b/Rakefile index 804a741c7..41c9a0011 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ require "fileutils" require "tmpdir" require 'hatchet/tasks' - +require 'knapsack' ENV["BUILDPACK_LOG_FILE"] ||= "tmp/buildpack.log" S3_BUCKET_NAME = "heroku-buildpack-ruby" @@ -310,4 +310,4 @@ begin rescue LoadError => e end - +Knapsack.load_tasks if defined?(Knapsack) diff --git a/app.json b/app.json index 8e3035745..210762cfe 100644 --- a/app.json +++ b/app.json @@ -17,7 +17,7 @@ }, "scripts": { "test-setup": "bundle exec rake hatchet:setup_ci", - "test": "bundle exec rake spec:part[($CI_NODE_INDEX + 1),$CI_NODE_TOTAL]" + "test": "bundle exec rake knapsack:rspec" }, "buildpacks": [ { "url": "heroku/ruby" } diff --git a/knapsack_rspec_report.json b/knapsack_rspec_report.json new file mode 100644 index 000000000..f6bceb284 --- /dev/null +++ b/knapsack_rspec_report.json @@ -0,0 +1,4 @@ +{ + "spec/hatchet/bugs_spec.rb": 83.60694026947021, + "spec/hatchet/ci_spec.rb": 184.3626697063446 +} \ No newline at end of file diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e650dc779..b73e8ddaf 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,6 +5,10 @@ require 'rspec/retry' require 'language_pack' +require 'knapsack' + +Knapsack::Adapters::RSpecAdapter.bind + ENV['RACK_ENV'] = 'test' RSpec.configure do |config|