Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various speling errars in Core and Extras #171

Merged
merged 2 commits into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MobiusCore/Source/ConcurrentAccessDetector.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Foundation
/// Utility to catch invalid concurrent access to non-thread-safe code.
///
/// Like a mutex, `ConcurrentAccessDetector` guards a critical region. However, instead of blocking if two threads
/// attemt to enter the critical region at once, it crashes in debug builds. In release builds, it has no effect (and
/// attempt to enter the critical region at once, it crashes in debug builds. In release builds, it has no effect (and
/// also no overhead, as long as it’s only used within one module).
///
/// Copies of a `ConcurrentAccessDetector` share the same underlying mutex, and hence their critical region is the union
Expand Down
2 changes: 1 addition & 1 deletion MobiusCore/Source/Disposables/CompositeDisposable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public final class CompositeDisposable {
private var disposables: [Disposable]
private let lock = DispatchQueue(label: "Mobius.CompositeDisposable")

/// Initialises a `CompositeDisposable`.
/// Initializes a `CompositeDisposable`.
///
/// - Parameter disposables: an array of disposables.
init(disposables: [Disposable]) {
Expand Down
2 changes: 1 addition & 1 deletion MobiusCore/Source/Disposables/Disposable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

/// Types adopting the `Disposable` protocol can be disposed, cleaning up the resources referenced.
///
/// The resouces can be anything; ranging from a network request, task on the CPU or an observation of another resource.
/// The resources can be anything; ranging from a network request, task on the CPU or an observation of another resource.
///
/// See also `AnonymousDisposable` for a concrete anonymous implementation.
public protocol Disposable: AnyObject {
Expand Down
2 changes: 1 addition & 1 deletion MobiusCore/Source/MobiusController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public final class MobiusController<Model, Event, Effect> {
┃ loopQueue ┃
┗━━━━━━━━━━━┛

In order to construct this bottom-up and fulfil definitive initialization requirements, state and loopQueue are
In order to construct this bottom-up and fulfill definitive initialization requirements, state and loopQueue are
duplicated in local variables.
*/

Expand Down
2 changes: 1 addition & 1 deletion MobiusCore/Source/MobiusLoop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public final class MobiusLoop<Model, Event, Effect>: Disposable {
consumeEvent(event)
}

// MARK: - Implemenation details
// MARK: - Implementation details

/// Apply a `Next`:
///
Expand Down
2 changes: 1 addition & 1 deletion MobiusCore/Source/WorkBag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import Foundation

/// Like a work queue, but agressively avoids doing things sequentially.
/// Like a work queue, but aggressively avoids doing things sequentially.
///
/// We don’t want to commit to any sequencing guarantees in Mobius loops. Since we’re cognizant of Hyrum’s Law, we don’t
/// want to provide _unguaranteed_ sequencing either, so this implementation currently randomizes execution order. We
Expand Down
2 changes: 1 addition & 1 deletion MobiusCore/Test/AnyConnectionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Quick
class ConnectionTests: QuickSpec {
override func spec() {
describe("Connection") {
context("when initialising with closures") {
context("when initializing with closures") {
var connection: Connection<Int>!
var acceptValue: Int?
var disposeCalled = false
Expand Down
2 changes: 1 addition & 1 deletion MobiusCore/Test/CompositeDisposableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class CompositeDisposableTests: QuickSpec {
disposables[1] = five
disposables[2] = six
}
it("doesnt dispose last") {
it("doesn’t dispose last") {
composite.dispose()
expect(one.disposed).to(beTrue())
expect(two.disposed).to(beTrue())
Expand Down
12 changes: 6 additions & 6 deletions MobiusCore/Test/MobiusControllerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class MobiusControllerTests: QuickSpec {
var activateInitiator: Bool!

func clearViewRecorder() {
makeSureAllEffectsAndEventsHaveBeenProccessed()
makeSureAllEffectsAndEventsHaveBeenProcessed()
view.recorder.clear()
}

Expand Down Expand Up @@ -107,13 +107,13 @@ class MobiusControllerTests: QuickSpec {
controller.start()

view.dispatch("restarted")
self.makeSureAllEffectsAndEventsHaveBeenProccessed()
self.makeSureAllEffectsAndEventsHaveBeenProcessed()

expect(view.recorder.items).toEventually(equal(["S", "S-restarted"]))
}
it("should retain updated state") {
view.dispatch("hi")
self.makeSureAllEffectsAndEventsHaveBeenProccessed()
self.makeSureAllEffectsAndEventsHaveBeenProcessed()

controller.stop()

Expand Down Expand Up @@ -318,7 +318,7 @@ class MobiusControllerTests: QuickSpec {
controller.start()

view.dispatch("the last event")
self.makeSureAllEffectsAndEventsHaveBeenProccessed()
self.makeSureAllEffectsAndEventsHaveBeenProcessed()

controller.stop()

Expand Down Expand Up @@ -380,7 +380,7 @@ class MobiusControllerTests: QuickSpec {
}

it("should release any references to the loop") {
self.makeSureAllEffectsAndEventsHaveBeenProccessed()
self.makeSureAllEffectsAndEventsHaveBeenProcessed()
controller.stop()
controller.disconnectView()
controller = nil
Expand All @@ -390,7 +390,7 @@ class MobiusControllerTests: QuickSpec {
}
}

func makeSureAllEffectsAndEventsHaveBeenProccessed() {
func makeSureAllEffectsAndEventsHaveBeenProcessed() {
loopQueue.sync {
// Waiting synchronously for effects to be completed
}
Expand Down
4 changes: 2 additions & 2 deletions MobiusCore/Test/MobiusLoopTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class MobiusLoopTests: QuickSpec {
expect(receivedModels).to(equal(["the beginning", "one", "two", "three"]))
}

it("should queue up events dispatched before start to support racy initialisations") {
it("should queue up events dispatched before start to support racy initializations") {
loop = Mobius.loop(update: Update { model, event in .next(model + "-" + event) }, effectHandler: EagerEffectHandler())
.start(from: "the beginning")

Expand Down Expand Up @@ -175,7 +175,7 @@ class MobiusLoopTests: QuickSpec {
}

describe("when creating a builder") {
context("when a class corresponding to the ConnectableProtocol is used as effecthandler") {
context("when a class corresponding to the ConnectableProtocol is used as effect handler") {
beforeEach {
let update = Update { (_: String, _: String) -> Next<String, String> in
Next<String, String>.noChange
Expand Down
2 changes: 1 addition & 1 deletion MobiusExtras/Source/ConnectableClass.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ open class ConnectableClass<Input, Output>: Connectable {

private func accept(_ input: Input) {
// The construct of consumerSet is there to release the lock asap.
// We dont know what goes on in the overriden `handle` function...
// We don’t know what goes on in the overridden `handle` function...
var consumerSet: Bool = false
lock.lock()
consumerSet = consumer != nil
Expand Down
1 change: 0 additions & 1 deletion MobiusTest/Test/FirstMatchersTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
// under the License.

import MobiusCore
import MobiusTest
@testable import MobiusTest
import Nimble
import Quick
Expand Down