Skip to content

Commit

Permalink
Merge pull request #85 from ydah/fix-typos
Browse files Browse the repository at this point in the history
Fix some typos
  • Loading branch information
briandunn authored May 13, 2024
2 parents 2c2dc3f + c4060b9 commit 689dea6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ $ 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:
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

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
).

Expand Down
2 changes: 1 addition & 1 deletion features/regressions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 <food_item>:
| Peanut Butter | Jelly | | time |
Expand Down
4 changes: 2 additions & 2 deletions lib/flatware/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 %<gem_list>s for more usefull commands.
Install %<gem_list>s for more useful commands.
MESSAGE
end
6 changes: 3 additions & 3 deletions lib/flatware/sink.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -73,8 +73,8 @@ def respond_to_missing?(name, include_all)

private

def interruped?
@signal&.interruped?
def interrupted?
@signal&.interrupted?
end

def check_finished!
Expand Down
2 changes: 1 addition & 1 deletion lib/flatware/sink/signal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(&on_interrupt)
@on_interrupt = on_interrupt
end

def interruped?
def interrupted?
!signals.empty?
end

Expand Down
2 changes: 1 addition & 1 deletion spec/flatware/worker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 689dea6

Please sign in to comment.