Skip to content

Commit

Permalink
Merge pull request #2236 from FlyingCaiChong/dev-fix
Browse files Browse the repository at this point in the history
fix some typo
  • Loading branch information
onevcat committed Apr 25, 2024
2 parents 298cb26 + 96fe0bb commit 20aa5f2
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Sources/Cache/DiskStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ extension DiskStorage {

/// Default is `false`
/// If set to `true`, image extension will be extracted from original file name and append to
/// the hased file name and used as the cache key on disk.
/// the hashed file name and used as the cache key on disk.
public var autoExtAfterHashedFileName = false

/// Closure that takes in initial directory path and generates
Expand Down
4 changes: 2 additions & 2 deletions Sources/Cache/ImageCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ open class ImageCache {
/// will be sent to this closure as result. Otherwise, a `KingfisherError` result
/// with detail failing reason will be sent.
///
/// Note: This method is marked as `open` for only compatible purpose. Do not overide this method. Instead, override
/// Note: This method is marked as `open` for only compatible purpose. Do not override this method. Instead, override
/// the version receives `KingfisherParsedOptionsInfo` instead.
open func retrieveImage(forKey key: String,
options: KingfisherOptionsInfo? = nil,
Expand Down Expand Up @@ -585,7 +585,7 @@ open class ImageCache {
/// - Returns: The image stored in memory cache, if exists and valid. Otherwise, if the image does not exist or
/// has already expired, `nil` is returned.
///
/// Note: This method is marked as `open` for only compatible purpose. Do not overide this method. Instead, override
/// Note: This method is marked as `open` for only compatible purpose. Do not override this method. Instead, override
/// the version receives `KingfisherParsedOptionsInfo` instead.
open func retrieveImageInMemoryCache(
forKey key: String,
Expand Down
2 changes: 1 addition & 1 deletion Sources/General/ImageSource/ImageDataProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public struct RawImageDataProvider: ImageDataProvider {
/// Creates an image data provider by the given raw `data` value and a `cacheKey` be used in Kingfisher cache.
///
/// - Parameters:
/// - data: The raw data reprensents an image.
/// - data: The raw data represents an image.
/// - cacheKey: The key is used for caching the image data. You need a different key for any different image.
public init(data: Data, cacheKey: String) {
self.data = data
Expand Down
2 changes: 1 addition & 1 deletion Sources/General/KFOptionsSetter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ extension KFOptionSetter {
/// - Returns: A `Self` value with changes applied.
/// If set, options will be passed the store operation for a new files.
///
/// This is useful if you want to implement file enctyption on first write - eg [.completeFileProtection]
/// This is useful if you want to implement file encryption on first write - eg [.completeFileProtection]
///
public func diskStoreWriteOptions(_ writingOptions: Data.WritingOptions) -> Self {
options.diskStoreWriteOptions = writingOptions
Expand Down
2 changes: 1 addition & 1 deletion Sources/General/KingfisherError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ extension KingfisherError.ImageSettingErrorReason {
case .dataProviderError(let provider, let error):
return "Image data provider fails to provide data. Provider: \(provider), error: \(error)"
case .alternativeSourcesExhausted(let errors):
return "Image setting from alternaive sources failed: \(errors)"
return "Image setting from alternative sources failed: \(errors)"
}
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/General/KingfisherManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public struct RetrieveImageResult {
/// Gets the data behind the result.
///
/// If this result is from a network downloading (when `cacheType == .none`), calling this returns the downloaded
/// data. If the reuslt is from cache, it serializes the image with the given cache serializer in the loading option
/// data. If the result is from cache, it serializes the image with the given cache serializer in the loading option
/// and returns the result.
///
/// - Note:
Expand Down
4 changes: 2 additions & 2 deletions Sources/Networking/ImagePrefetcher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public class ImagePrefetcher: CustomStringConvertible {
}
}

/// Stops current downloading progress, and cancel any future prefetching activity that might be occuring.
/// Stops current downloading progress, and cancel any future prefetching activity that might be occurring.
public func stop() {
prefetchQueue.async {
if self.finished { return }
Expand Down Expand Up @@ -409,7 +409,7 @@ public class ImagePrefetcher: CustomStringConvertible {

private func reportCompletionOrStartNext() {
if let resource = self.pendingSources.popFirst() {
// Loose call stack for huge ammount of sources.
// Loose call stack for huge amount of sources.
prefetchQueue.async { self.startPrefetching(resource) }
} else {
guard allFinished else { return }
Expand Down
2 changes: 1 addition & 1 deletion Sources/Networking/RedirectHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import Foundation
public protocol ImageDownloadRedirectHandler {

/// The `ImageDownloadRedirectHandler` contained will be used to change the request before redirection.
/// This is the posibility you can modify the image download request during redirection. You can modify the
/// This is the possibility you can modify the image download request during redirection. You can modify the
/// request for some customizing purpose, such as adding auth token to the header, do basic HTTP auth or
/// something like url mapping.
///
Expand Down
4 changes: 2 additions & 2 deletions Sources/Views/AnimatedImageView.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
//
// AnimatableImageView.swift
// AnimatedImageView.swift
// Kingfisher
//
// Created by bl4ckra1sond3tre on 4/22/16.
//
// The AnimatableImageView, AnimatedFrame and Animator is a modified version of
// The AnimatedImageView, AnimatedFrame and Animator is a modified version of
// some classes from kaishin's Gifu project (https://github.com/kaishin/Gifu)
//
// The MIT License (MIT)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Dependency/Nocilla/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ stubRequest(@"GET", @"http://www.google.com").andReturn(404);
```
#### Returning a specific status code and header
The same approch here, you can use `withHeader` or `withHeaders`
The same approach here, you can use `withHeader` or `withHeaders`
```objc
stubRequest(@"POST", @"https://api.example.com/dogs.json").
Expand Down Expand Up @@ -184,7 +184,7 @@ If some request is made but it wasn't stubbed, Nocilla won't let that request hi
At this moment Nocilla will raise an exception with a meaningful message about the error and how to solve it, including a snippet of code on how to stub the unexpected request.

### Testing asynchronous requests
When testing asynchrounous requests your request will be sent on a different thread from the one on which your test is executed. It is important to keep this in mind, and design your test in such a way that is has enough time to finish. For instance ```tearDown()``` when using ```XCTest``` and ```afterEach()``` when using [Quick](https://github.com/Quick/Quick) and [Nimble](https://github.com/Quick/Nimble) will cause the request never to complete.
When testing asynchronous requests your request will be sent on a different thread from the one on which your test is executed. It is important to keep this in mind, and design your test in such a way that is has enough time to finish. For instance ```tearDown()``` when using ```XCTest``` and ```afterEach()``` when using [Quick](https://github.com/Quick/Quick) and [Nimble](https://github.com/Quick/Nimble) will cause the request never to complete.


## Who uses Nocilla.
Expand Down

0 comments on commit 20aa5f2

Please sign in to comment.