From 06cba5c6e5e180a1f8f5f2083aaa22fbdfba95b5 Mon Sep 17 00:00:00 2001 From: ydah Date: Tue, 16 Apr 2024 11:19:12 +0900 Subject: [PATCH 1/8] balaced ==> balanced --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b1017e..187ab5e 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ $ flatware rspec The rspec runner can balance worker loads, making your suite even faster. -It forms balaced groups of spec files according to their last run times, if you've set `example_status_persistence_file_path` [in your RSpec config](https://relishapp.com/rspec/rspec-core/v/3-8/docs/command-line/only-failures). +It forms balanced groups of spec files according to their last run times, if you've set `example_status_persistence_file_path` [in your RSpec config](https://relishapp.com/rspec/rspec-core/v/3-8/docs/command-line/only-failures). For this to work the configuration option must be loaded before any specs are run. The `.rspec` file is one way to achive this: From 8b05e22b8ccb8befe14644445a518c1963fa5ba1 Mon Sep 17 00:00:00 2001 From: ydah Date: Tue, 16 Apr 2024 11:20:16 +0900 Subject: [PATCH 2/8] achive ==> achieve --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 187ab5e..ffbdc81 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ The rspec runner can balance worker loads, making your suite even faster. It forms balanced groups of spec files according to their last run times, if you've set `example_status_persistence_file_path` [in your RSpec config](https://relishapp.com/rspec/rspec-core/v/3-8/docs/command-line/only-failures). -For this to work the configuration option must be loaded before any specs are run. The `.rspec` file is one way to achive this: +For this to work the configuration option must be loaded before any specs are run. The `.rspec` file is one way to achieve this: --require spec_helper From 94b25bd6fdcddd8e332e828f9e34530984788d25 Mon Sep 17 00:00:00 2001 From: ydah Date: Tue, 16 Apr 2024 11:20:34 +0900 Subject: [PATCH 3/8] recomended ==> recommended --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ffbdc81..30eaef6 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ For this to work the configuration option must be loaded before any specs are ru --require spec_helper -But beware, if you're using ActiveRecord in your suite you'll need to avoid doing things that cause it to establish a database connection in `spec_helper.rb`. If ActiveRecord connects before flatware forks off workers, each will die messily. All of this will just work if you're following [the recomended pattern of splitting your helpers into `spec_helper` and `rails_helper`](https://github.com/rspec/rspec-rails/blob/v3.8.2/lib/generators/rspec/install/templates/spec/rails_helper.rb). Another option is to use [the configurable hooks]( +But beware, if you're using ActiveRecord in your suite you'll need to avoid doing things that cause it to establish a database connection in `spec_helper.rb`. If ActiveRecord connects before flatware forks off workers, each will die messily. All of this will just work if you're following [the recommended pattern of splitting your helpers into `spec_helper` and `rails_helper`](https://github.com/rspec/rspec-rails/blob/v3.8.2/lib/generators/rspec/install/templates/spec/rails_helper.rb). Another option is to use [the configurable hooks]( #faster-startup-with-activerecord ). From fa74ff1ef1cd952d10a916308aeb10551b261d9b Mon Sep 17 00:00:00 2001 From: ydah Date: Tue, 16 Apr 2024 11:21:16 +0900 Subject: [PATCH 4/8] Sanwiches ==> Sandwiches --- features/regressions.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/regressions.feature b/features/regressions.feature index ea65c37..5742126 100644 --- a/features/regressions.feature +++ b/features/regressions.feature @@ -6,7 +6,7 @@ Feature: Survives weird uses of gherkin Background: Given the pubas is grand - Scenario Outline: Sanwiches + Scenario Outline: Sandwiches Given I know you want to do it Then we make the following : | Peanut Butter | Jelly | | time | From d22ef2876bea4f7626f01cd3e9d827065e0af847 Mon Sep 17 00:00:00 2001 From: ydah Date: Tue, 16 Apr 2024 11:21:26 +0900 Subject: [PATCH 5/8] attepted ==> attempted --- spec/flatware/worker_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/flatware/worker_spec.rb b/spec/flatware/worker_spec.rb index 1933ce9..8300fb2 100644 --- a/spec/flatware/worker_spec.rb +++ b/spec/flatware/worker_spec.rb @@ -35,7 +35,7 @@ end end - context 'when attepted job raises' do + context 'when attempted job raises' do it 'marks the job as failed' do job = Flatware::Job.new allow(sink).to receive_messages(started: nil, finished: nil) From 3b8e77ea85a2883755f40c1da9c9855c178dd2ec Mon Sep 17 00:00:00 2001 From: ydah Date: Tue, 16 Apr 2024 11:21:49 +0900 Subject: [PATCH 6/8] concurent ==> concurrent --- lib/flatware/cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flatware/cli.rb b/lib/flatware/cli.rb index 6ea47d1..faaf568 100644 --- a/lib/flatware/cli.rb +++ b/lib/flatware/cli.rb @@ -17,7 +17,7 @@ def self.worker_option aliases: '-w', type: :numeric, default: processors, - desc: 'Number of concurent processes to run' + desc: 'Number of concurrent processes to run' ) end From 2e08c687dc62f34cf120f2267241f59981bec6f7 Mon Sep 17 00:00:00 2001 From: ydah Date: Tue, 16 Apr 2024 11:22:05 +0900 Subject: [PATCH 7/8] usefull ==> useful --- lib/flatware/cli.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flatware/cli.rb b/lib/flatware/cli.rb index faaf568..6283b1e 100644 --- a/lib/flatware/cli.rb +++ b/lib/flatware/cli.rb @@ -90,6 +90,6 @@ def workers warn( format(<<~MESSAGE, gem_list: flatware_gems.join(' or '))) The flatware gem is a dependency of flatware runners for rspec and cucumber. - Install %s for more usefull commands. + Install %s for more useful commands. MESSAGE end From c4060b9640787f128427c189e2b5b3e66056ff38 Mon Sep 17 00:00:00 2001 From: ydah Date: Tue, 16 Apr 2024 11:22:20 +0900 Subject: [PATCH 8/8] interruped ==> interrupted --- lib/flatware/sink.rb | 6 +++--- lib/flatware/sink/signal.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/flatware/sink.rb b/lib/flatware/sink.rb index 73073b0..7390505 100644 --- a/lib/flatware/sink.rb +++ b/lib/flatware/sink.rb @@ -41,7 +41,7 @@ def start def ready(worker) job = queue.shift - if job && !(remaining_work.empty? || interruped?) + if job && !(remaining_work.empty? || interrupted?) workers << worker job else @@ -73,8 +73,8 @@ def respond_to_missing?(name, include_all) private - def interruped? - @signal&.interruped? + def interrupted? + @signal&.interrupted? end def check_finished! diff --git a/lib/flatware/sink/signal.rb b/lib/flatware/sink/signal.rb index c6621eb..2a6d247 100644 --- a/lib/flatware/sink/signal.rb +++ b/lib/flatware/sink/signal.rb @@ -7,7 +7,7 @@ def initialize(&on_interrupt) @on_interrupt = on_interrupt end - def interruped? + def interrupted? !signals.empty? end