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

Added WKWebView extensions #851

Merged
merged 6 commits into from
May 27, 2020
Merged

Conversation

hamtiko
Copy link
Member

@hamtiko hamtiko commented May 25, 2020

I have copied old UIWebView extensions and added them as a WKWebview extensions with small compatibility changes.

Checklist

  • I checked the Contributing Guidelines before creating this request.
  • New extensions are written in Swift 5.0.
  • New extensions support iOS 10.0+ / tvOS 9.0+ / macOS 10.10+ / watchOS 2.0+, or use @available if not.
  • I have added tests for new extensions, and they passed.
  • All extensions have a clear comments explaining their functionality, all parameters and return type in English.
  • All extensions are declared as public.
  • I have added a changelog entry describing my changes.

@codecov
Copy link

codecov bot commented May 25, 2020

Codecov Report

Merging #851 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #851      +/-   ##
==========================================
+ Coverage   92.80%   92.81%   +0.01%     
==========================================
  Files          99      100       +1     
  Lines        3403     3408       +5     
==========================================
+ Hits         3158     3163       +5     
  Misses        245      245              
Flag Coverage Δ
#ios 95.70% <100.00%> (+<0.01%) ⬆️
#macos 83.06% <100.00%> (+0.03%) ⬆️
#tvos 95.75% <ø> (ø)
Impacted Files Coverage Δ
...rces/SwifterSwift/WebKit/WKWebViewExtensions.swift 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b027022...0eb5a89. Read the comment docs.

@SwifterSwiftBot
Copy link

SwifterSwiftBot commented May 25, 2020

4 Messages
📖 Thank you for submitting a pull request to SwifterSwift. The team will review your submission as soon as possible.
📖 iOS: Executed 680 tests, with 0 failures (0 unexpected) in 15.730 (16.707) seconds
📖 tvOS: Executed 645 tests, with 0 failures (0 unexpected) in 2.264 (2.713) seconds
📖 macOS: Executed 512 tests, with 0 failures (0 unexpected) in 1.720 (1.908) seconds

Generated by 🚫 Danger

@hamtiko hamtiko mentioned this pull request May 25, 2020
@hamtiko
Copy link
Member Author

hamtiko commented May 25, 2020

It seems there is some problem with SwiftLint check. I have tried to rerun but it fails again.

It is failing with following message:

No runner matching the specified labels was found: macos.

I am assuming GitHub removes macos yaml label for runners.

@LucianoPAlmeida
Copy link
Member

I tried to adjust, can you rebase with master and try again :)

Copy link
Contributor

@guykogus guykogus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these. There's a problem with your tests, however. Adding those 2 second delays is actually quite long and also unnecessary. You need to check 1) the return value from calling those functions, and 2) use the web view's navigationDelegate to get the expected responses that can later call successExpectation.fulfill()

Comment on lines 28 to 31
guard self.webView.url != nil else {
XCTFail("No URL in webView")
return
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still need to fulfil the expectation so that the test knows to continue. Just assert that the url is not nil.

Suggested change
guard self.webView.url != nil else {
XCTFail("No URL in webView")
return
}
XCTAssertNotNil(self.webView.url)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same comment applies to the other tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@hamtiko
Copy link
Member Author

hamtiko commented May 26, 2020

@guykogus thanks for you comments.

I have refactored tests based on your suggestions.

Copy link
Member

@LucianoPAlmeida LucianoPAlmeida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@guykogus guykogus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please rename the tests folder (see comment)?
You also need to add an entry into the README.md file for WebKit extensions, as well as update the podspec to provide a WebKit subspec.

@@ -1131,6 +1138,7 @@
748B191B23B4F4DA0030FABB /* StoreKitTests */,
077BA0931F6BE93000D9C4AC /* SwiftStdlibTests */,
07C50D0D1F5EB03200F46E5A /* UIKitTests */,
985C1B9124797911008AAB0E /* WebKitTest */,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename the folder to WebKitTests

…adme

Increasing WKWebView test expectation timeout
@hamtiko
Copy link
Member Author

hamtiko commented May 26, 2020

@guykogus done. I have increased test expectation timeout as well.

@hamtiko
Copy link
Member Author

hamtiko commented May 26, 2020

It seems 3 seconds of timeout is not enough. What you will suggest? Is it worth to increase timeout more?

@guykogus
Copy link
Contributor

Maybe use a simpler website to load, like http://example.com. Although I wonder if it will fail because it's not https 🤔
I think it might be enough to consider the expectation fulfilled as soon as webView(_:didStartProvisionalNavigation:) is called. You don't need to wait for the entire website to finish loading. Check that this fails when you have a dead URL, like https://invalidurl.com.
At the same time, you should respond to the WKNavigationDelegate error callbacks to fail on errors and fulfil the expectation.

Copy link
Contributor

@guykogus guykogus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for a valid URL string that fails to load. I suggested previously https://invalidurl.com

@hamtiko
Copy link
Member Author

hamtiko commented May 27, 2020

@guykogus When I am trying to add test for dead url the webView(_:didStartProvisionalNavigation:) delegate function is calling and expectation fulfills before getting fail function called.

Is it ok? or you suggest to go back to use webView(_:didFinish:) function?

@guykogus
Copy link
Contributor

@guykogus When I am trying to add test for dead url the webView(_:didStartProvisionalNavigation:) delegate function is calling and expectation fulfills before getting fail function called.

Is it ok? or you suggest to go back to use webView(_:didFinish:) function?

@hamtiko you should actually be waiting for a failure expectation in this case. I think what might be better is to use custom XCTestExpectation classes. Try using these:

class WebViewSuccessExpectation: XCTestExpectation, WKNavigationDelegate {
    init(description: String, webView: WKWebView) {
        super.init(description: description)
        webView.navigationDelegate = self
    }

    func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) {
        fulfill()
    }
}

class WebViewFailureExpectation: XCTestExpectation, WKNavigationDelegate {
    init(description: String, webView: WKWebView) {
        super.init(description: description)
        webView.navigationDelegate = self
    }

    func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) {
        fulfill()
    }

    func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {
        fulfill()
    }
}

This way each test can use the appropriate expectation. Notice that for the success I changed to using webView(_:didCommit:), because as you pointed out even on failure didStartProvisionalNavigation is called. This way we don't wait for the entire website to load, we just wait till loading starts to succeed.

@hamtiko
Copy link
Member Author

hamtiko commented May 27, 2020

@guykogus Great idea! Thanks for your advice.

@LucianoPAlmeida LucianoPAlmeida merged commit f444866 into SwifterSwift:master May 27, 2020
daliadanila added a commit to daliadanila/SwifterSwift that referenced this pull request May 28, 2020
…alculateTextSize

* origin/master:
  Refactored init(light:dark:) to remove deployment target version restrictions. (SwifterSwift#844)
  Added WKWebView extensions (SwifterSwift#851)
  Update UIEdgeInsets extensions link (SwifterSwift#852)
alokc83 added a commit to MtAden/SwifterSwift that referenced this pull request Jul 1, 2020
* Fix Swift Package Manager

* Consistency improvement (SwifterSwift#553)

* Tests consistency improvements (SwifterSwift#554)

* Add initializers with Literals for UILayoutPriority (SwifterSwift#549)

* Add initializers with Literals for UILayoutPriority

* Added CHANGELOG entry

* Undo project.pbxproj changes

* Update unit tests

* Remove whitespace from CHANGELOG

* Remove redundant tests

* Add addition operator to `UIEdgeInsets` (SwifterSwift#557)

* Add addition operator to `UIEdgeInsets`

* Add in-place mutating addition for UIEdgeInsets

* Add `rotated(by:)` functions to `UIImage` for generating rotated images. (SwifterSwift#555)

* Add `rotated(by:)` functions to `UIImage` for generating rotated images.

* spaces -> tabs

* Fix availability

* Fix CHANGELOG message

* Add SwifterSwift to comments

* Added 'key(forValue: Value)' method to DictionaryExtensions (SwifterSwift#561)

* Added 'key(forValue: Value)' method to DictionaryExtensions

* Added 'key(forValue: Value)' method to DictionaryExtensions

* Added 'key(forValue: Value)' method to DictionaryExtensions

* Added 'key(forValue: Value)' method to DictionaryExtensions

* Update for Swift 4.2 and Xcode 10 support (SwifterSwift#562)

* Updating Code base and iOS Unit Tests.

* Updating MacOS tests

* Update travis image.

* Updating some extensions.

* Updating pod spec swift version

* Updating swift version

* Fixing indentation on some files.

* Indenting.

* Indenting some files.

* Running swiftlint autocorrect --format

* Workaround cocoapods issue

* Updating spec, readme and changelog for new version.

* Removing toggles since they are stdlib now.

* Deprecating random extensions in favor of the natives.

* Updating arc4_random usages.

* Removing prior SwifterSwift 4.2.0 version deprecated version.

* Added ancestorView(withClass:) (SwifterSwift#560)

* added ancestorView(withClass:)

* review changes

* added PR to changelog

* added ancestorView(where:)

* Use 'swift_version' instead of 'pod_target_xcconfig{SWIFT_VERSION}' to specify Swift version of pod target itself. (SwifterSwift#566)

* Update the CHANGELOG to correctly display what has been changed for the latest version (SwifterSwift#569)

* Update the CHANGELOG to correctly display what has been changed for the latest version
Close the version to create a public release

* Update README and podspec for v4.6.0

* Fix README to say Xcode 10.0 and Swift 4.2 (SwifterSwift#572)

* Fixed image cropped method (SwifterSwift#575)

* Fixed image cropped method

* Added SwifterSwift#575 pull request description

* Dictionary Key-Path Subscript (SwifterSwift#574)

* Created Dictionary[path:] key-path subscript for deep fetching/setting

* Created DictionaryExtensionTests.testSubscriptKeypath test case

* Added Dictionary[path:] subscript entry to CHANGELOG

* Updated PR number in CHANGELOG for Dictionary[path:] entry

* Removed extrenuous 'return' from Dictionary[path:] setter

* Use for-in loop instead of .reduce in Dictionary[path:] to allow early returns

* Added path count guard to Dictionary[path:] getter

* Added empty path test to DictionaryExtensionTests.testSubscriptKeypath test case

* Added [key, key1] path test to DictionaryExtensionTests.testSubscriptKeypath test case

* Use .isEmptry instead of .count check for path length guard in Dictionary[path:]

* (Maintenance) Random values (SwifterSwift#577)

* Clean up usage of new random functions

* Update project version to match current

* Added a computed property 'yesterday' for Date and a test function for it. (SwifterSwift#578)

* Added Date property "yesterday" and a test function for it.

* Updated Changelog with propery  for Date

* Updated Changelog with propery  for Date

* Updated Changelog with propery  for Date

* Adding 'yesterday' property for Date (PR SwifterSwift#578) error fix.

* Adding  property 'yesterday' for Date (PR #SwifterSwift#578), comment, syntax and unit test fix

* Changes made for Changelog and a test case

* Added missing WhatsApp color (SwifterSwift#581)

* added WhatsApp color

* added changelog

* Removed self. when not needed (SwifterSwift#579)

* removed self when not needed

* improved formatting

* Add `rounded(numberOfDecimalPlaces:, rule:)` to `BinaryFloatingPoint` (SwifterSwift#583)

* Add `rounded(numberOfDecimalPlaces:rule:)` to `Float` and `Double`

* Add `rounded(numberOfDecimalPlaces:, rule:)` to CHANGELOG

* Append pr detail to CHANGELOG

* Prefer `max`  over comparison, thank guykogus

* Move method from `Double` and `Float` to `BinaryFloatingPoint`, thank LucianoPAlmeida (SwifterSwift#583)

* Make method public SwifterSwift#583

* Minor changes

* Add `BidirectionalCollection[offset:]` subscript for getting element with negative index. (SwifterSwift#582)

* Add subscript nth to `Collection` where `Index` is `Int`

* Add `Collection[nth:]` to CHANGELOG

* Append detail to CHANGELOG SwifterSwift#582

* Move method to `BidirectionalCollection`

* Move BidirectionalCollectionExtension to its own file (SwifterSwift#582)

* Replace the old Date.random function with ones using the new built-in random API (SwifterSwift#576)

* Replace the old Date.random function with ones using the new built-in random API

* Update changelog

* Add SwifterSwift to documentation

* Add new extensions of `DispatchQueue` (SwifterSwift#585)

* Fix unit test fail of testing date beginning (SwifterSwift#592)

* Fix unit test fail of testing date beginning

* Use NSTimeZone.default instead Timezone.current or Date().timezone code review by @guykogus and @jianstm

* Revert testTimezone() using Date().timeZone

* Remove `timeZone` from `Date` extensions (SwifterSwift#594)

* Update `podspec` to make the group paths of SwifterSwift correct in Pods project (SwifterSwift#590)

* Add an project of installation example with Cocoapods

* Fix up `source_files` to correct the group paths of SwifterSwift in Pods project.

* Use `dependency`='SwifterSwift/Shared/Color' instead of `source_files`='Sources/Extensions/Shared/ColorExtensions.swift' for subspec 'UIKit', 'AppKit'

* Update `Podfile` of the example project to describe that fixed issue.

* Update CHANGELOG of PR SwifterSwift#590

* Delete the test targets of example project.

* Delete the example project with Cocoapods installation.

* Revoke the subspec 'Shared/Color' and put back the source files to its original group 'Shared'.

* Added 'tomorrow' property for Date class. (Addition to PR SwifterSwift#578) (SwifterSwift#587)

* Added 'tomorrow' property for Date class

* Fixed PR number

* Updated test case for Date.tomorrow (pr SwifterSwift#587)

* Fixed trailing space

* Update CONTRIBUTING.md to mention adding a subspec for new modules (SwifterSwift#595)

* Add examples playground (SwifterSwift#596)

* Create playground with working examples of extensions from Examples.md

* Remove Examples.md

* Add Examples playground into the project

* Remove number of Swift version from playground text

* Update README.md to replace Examples.md with Examples.playground

* Update CHANGELOG.md to include PR changes into upcoming release

* Update Examples.playground
- to remove sections and categories without examples
- to add message to build the project before using the playground
- to add "Try yourself" section
- rename playground pages files

* Fix SwiftLint warnings

* Remove some examples which actually do not show an output in playground
Update some examples to show an output in playground

* Remove unuseful example from playground

* Do small fixes for UIImage/UIImageView extensions examples

* Fix swiftlint warnings

* added UIActivityExtensions (SwifterSwift#580)

* added UIActivityExtensions

* added changelog

* removed google plus

* removed UIActivityExtensions from tvOS

* updated changelog

* added newline

* added empty line

* Added extension 'duplicates' to Sequence (SwifterSwift#605)

* Added functions

Added functions to count the number of times that the element occours in the array, and function to return duplicated element in the array.

* Update Sources/Extensions/SwiftStdlib/ArrayExtensions.swift

Co-Authored-By: dylancfe15 <[email protected]>

* Removed the countElement() functions.

Deleted the countElement() functions and kept only the getDuplicates().

* Deleted testCountElement()

* Added extension 'duplicatedElement'

Added `duplicatedElements() -> [Element]` get duplicated elements from an array.

* Update ArrayExtensions.swift

* Added 'duplicatedElements' extension

Function to return duplicated element from the original array.

* Added extension 'duplicatedElements' to Array

'duplicatedElements' will return duplicated elements from the original array

* Edited CHANGELOG.md

* Update CHANGELOG.md

* Update ArrayExtensions.swift

* Update ArrayExtensions.swift

* Update ArrayExtensionsTests.swift

* Update ArrayExtensions.swift

* Update ArrayExtensions.swift

* Update ArrayExtensions.swift

* Update ArrayExtensionsTests.swift

* Update ArrayExtensions.swift

* Update ArrayExtensions.swift

* Update CHANGELOG.md

Co-Authored-By: dylancfe15 <[email protected]>

* Added extension 'duplicates' to Sequence

A function for getting the duplicated elements in a sequence.

* Added extension 'duplicates' to Sequence

A function for getting the duplicated elements in a sequence.

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update ArrayExtensions.swift

* Update ArrayExtensionsTests.swift

* Update SequenceExtensionsTests.swift

* Added extension `isLeapYear` to Date

Added `isLeapYear` to check whether or not the year is a leap year.

* Update CHANGELOG.md

* Update DateExtensions.swift

* Update DateExtensionsTests.swift

* Update SequenceExtensions.swift

Removed countedSet, instead, using a set and an array.

* Update SequenceExtensions.swift

* Fix typo (SwifterSwift#609)

* Adding convenience method to present a popover. (SwifterSwift#593)

* Adding convenience method to present a popover.

* Update CHANGELOG.md

* Fixing SwiftLint warnings

* Update CHANGELOG.md

Co-Authored-By: marcocapano <[email protected]>

* Update Sources/Extensions/UIKit/UIViewControllerExtensions.swift

Co-Authored-By: marcocapano <[email protected]>

* Applying PR suggestions

* Update CHANGELOG.md

* removing unnecessary empty line

* Removing expectation

* fixed test

* Adding tests for size and delegate parameters

* Update UIViewControllerExtensionsTests.swift

* Update UIViewControllerExtensionsTests.swift

* Update Tests/UIKitTests/UIViewControllerExtensionsTests.swift

Co-Authored-By: marcocapano <[email protected]>

* Updating comments based on suggestions

* Adding convenience initializer and test for UILabel (SwifterSwift#607)

* Adding convenience initializer and test for UILabel

* Update CHANGELOG.md

* fixed test

* Update CHANGELOG.md

Co-Authored-By: marcocapano <[email protected]>

* Improvement common suffix extension (SwifterSwift#606)

* Improving performance and tests implementation of commonSuffix.

* Changelog entry.

* Debug what is happening on PR builds with pod lib lint

* Skipping tests on the build.

* Adding another test case.

* Fixing tests.

* Implementation logic change.

* Handle missing case and adding diacriticInsensitive test.

* Improving implementation.

* guard

* Added FileManager.createTemporaryDirectory() to create a directory for saving temporary files (SwifterSwift#615)

* Added FileManager.temporaryFileDirectory() to create a directory for saving temporary files

* Set PR number

* Add test for creating a file at the temporary directory

* Remove temp files at end of test

* Rename function to make its purpose clearer.

* Only triggering push builds for master. (SwifterSwift#618)

* Fixing SwifterSwift#616 bug on NSAttributedStringExtensions. (SwifterSwift#617)

* Fixing SwifterSwift#616 bug on NSAttributedStringExtensions.

* Changelog.

* Fix typo (SwifterSwift#620)

* Fixed: Minor typo in UIWindowsExtensions.swift (SwifterSwift#623)

* Fix typo (SwifterSwift#628)

* Upadting xcode version (SwifterSwift#635)

* removing extensions not needed anymore (SwifterSwift#637)

* removing extensions not needed anymore

* Update CHANGELOG.md

* Update CHANGELOG.md

* Fix yesterday (SwifterSwift#641)

Changed extension method 'yesterday' for class 'Date' to be calculated using Calendar.date(byAdding:to:) instead of addingTimeInterval().

* Fixed all SwiftLint(0.31.0)-related warnings (SwifterSwift#643)

* Fixed all SwiftLint(0.31.0)-related warnings

* Reverted header docs indentations.

* Fixing tint UIImage extension upside down. (SwifterSwift#639)

* Fixing tint UIImage extension upside down.
* Changelog
* Update Sources/Extensions/UIKit/UIImageExtensions.swift

Co-Authored-By: LucianoPAlmeida <[email protected]>

* Making some array extensions, generic collection extensions (SwifterSwift#634)

* Making keep(while: ), take(while: ) and skip(while:) array extensions, collection extensions.

* Adding changelog entry

* Adressing PR comments.

* Added MKMapViewExtensions (SwifterSwift#629)

* added MKMapViewExtensions

* code review changes

* updated project file

* readded CLLocationCoordinate2D

* updated test

* fixed @available checks

* Fix tomorrow to use Calendar.date(byAdding:to:) (Related to Issue SwifterSwift#640) (SwifterSwift#642)

* Changed tomorrow method to use Calendar.date(byAdding:to:)

* Changed tomorrow method to use Calendar.date(byAdding:to:)

* Changed tomorrow method to use Calendar.date(byAdding:to:)

* Added CHANGELOG entry

* Moved the entry about the change in 'yesterday' to Fixed

* Fixed a testTomorrow

* v5.0 (SwifterSwift#649)

* release: v5.0.0

* Update version number in Test info.plist

* Update badges

* - Resolved an issue where extension methods were internal instead of public. (SwifterSwift#652)

* Adding Linux build to Travis CI (SwifterSwift#650)

* Testing linux build on travis

* Changes on travis CI

* Naming Darwin

* Trying linux build

* Change name

* Change test to build

* Remove parallel

* Creating test target

* Executing swift test --generate-linuxmain

* Separating test targets

* Removing linux main

* Adding check os user default tests.

* Removing foundation tests for now

* Removing test from linux for now.

* Swiftlint

* Excluding files

* Remove auto generated files.

* Adding auto generated files to gitignore.

* Update .travis.yml

* Checks on NSNSAttributedStringExtensions.swift

* Checks on NSNSAttributedStringExtensions.swift

* swift test

* Checks on NSNSAttributedStringExtensions.swift

* lint

* More checks

* Platform checks on linux

* Testing Import Glibc

* More checks

* More checks

* More checks

* isNumeric StringExtension platform check

* More checks

* Againnnn more platform checks

* Adding back generated files.

* Removing generation that doesnt work on linux

* Checks inside tests

* Moving checks inside functions

* Moving checks inside functions

* Moving checks inside functions

* More checks

* Updating nspredicate tests to not use unsuported linux corelibsfoundation methods

* Conditional check for not linux

* Temp file extension implementation for linux

* Temp file extension implementation for linux

* Conditional check for not linux

* Adding conditional tests

* Adding conditional tests

* Adding GLibc

* Verbose output

* Updating tomorow and yesterday

* Removing verbose

* Testing something

* Testing something

* Testing something

* Putting back commented code.

* Attemping work around

* Link to issue

* Removing some extensions from linux to make tests pass

* Check conditional

* Adding file config to danger swiftlint

* Updating gem files

* Work around swiftlint

* [README] Document support for installation via Accio (SwifterSwift#658)

* [README] Document support for installation via Accio

* [README] Update Accio & SwiftPM installation sections in Moya style

* Application Bundle Property Fixes (SwifterSwift#664)

- Resolved an issue where version would return the wrong value.
- Resolved an issue where displayName would return the wrong value or nil if localized.

* Update Swift version to 5.0 (SwifterSwift#667)

* Refactored the query value extension in URL (SwifterSwift#668)

* SwifterSwift#661

`queryValue` extension refactored.

* Changelog updated.

* Add aspectRatio and max properties to CGSize (SwifterSwift#662)

Add aspectRatio, maxDimension, and minDimension properties to CGSize

* ✨ Added String.isPalindrome (SwifterSwift#671)

* ✨ Palindrome

* Updated CHANGELOG.MD. Added reference

* Removed extra indent

* 👌 Updating code due to code review changes. @guykogus

* Update CHANGELOG.md

Co-Authored-By: cHaLkdusT <[email protected]>

* Add function withoutDuplicates at extension Sequence (SwifterSwift#666)

* Optimization code and Complexity

* Add function withoutDuplicates at extension Sequence

* Add change log and change function name

* update changelog

* remove IndexPath in testtestWithoutDuplicates

* Update Tests/SwiftStdlibTests/SequenceExtensionsTests.swift

Co-Authored-By: saucym <[email protected]>

* Update Sources/SwifterSwift/SwiftStdlib/SequenceExtensions.swift

Co-Authored-By: saucym <[email protected]>

* Add several extensions related to SceneKit (SwifterSwift#660)

* Fixing missing public modifiers (SwifterSwift#677)

* Fixing missing public modifiers

* Reverting modifier

* Updating pod version

* verbose on podlib lint

* Removing pod lib lint for now.

* The size of rect can equal to the size of image when cropping image. (SwifterSwift#679)

* The size of rect can equal to the size of image when cropping image.

* Update test of cropping UIImage.

* Update CHANGELOG.md

* Update CHANGELOG.md

* Fixed SwiftLint Warnings (SwifterSwift#682)

* Removed isNumber, isLetter, isLowercased, isUppercased and isWhiteSpace (SwifterSwift#689)

* removed isNumber, isLetter, isLowercased, isUppercased and isWhiteSpace

* Update CHANGELOG.md

* Update CHANGELOG.md

* swift test --generate-linuxmain

* swift test --generate-linuxmain again

* Update CHANGELOG.md

* Update README.md (SwifterSwift#692)

Add missing 'SwifterSwift/UIKit' on CocoaPods installation guide

* fix SwifterSwift#693 [UITableViewExtensions] : Crash in iOS 13.0 (XCode 11.0) due to returning wrong last section (0) even for the empty tableView (SwifterSwift#694)

* 🚀`isValidIndexPath(_:)` will now return `false` for IndexPaths with a negative row or section (SwifterSwift#696)

* `isValidIndexPath(_:)` will now return `false` for IndexPaths with a negative row or section

* Added PR number to changelog

* Moved && to the end of the line

* 🚀 Added `isValidIndexPath(_:)` UICollectionView method and test (SwifterSwift#695)

* Added `isValidIndexPath` extension and test

* Changelog pre-entry

* Added PR Number to changelog

* Checking for negative IndexPaths as well

* Fixing whitespaces

* Moved && to the end of the line

* Removed an empty line

* Updating gem files (SwifterSwift#697)

* Added CollectionView.safeScrollToItem(at:, at scrollPosition: , animated:) (SwifterSwift#698)

* Updating bundle (SwifterSwift#699)

* remove duplicate optional link (SwifterSwift#700)

* Update StringExtensions.swift (SwifterSwift#701)

More elegant

* Add convenience initializer extensions for UIBezierPath (SwifterSwift#659)

* Add convenience initializer extensions for UIBezierPath

* Add additional documentation to UIBezierPath extensions

* Refactor helper property in UIBezierPathExtensionsTests

* Added backgroundColor to NSView  SwifterSwift#534 (SwifterSwift#702)

* Added backgroundColor to NSView 

this will allow to set and get background color of NSView

* Made backgroundColor as public properly

Made backgroundColor as public property as per guideline

* Moved backgroundColor with other property

Moved backgroundColor with other property

* added test testBackgroundColor

added test testBackgroundColor

* Update NSViewExtensionsTests.swift

* Added change log for NSView - backgroundColor 

Added change log for NSView - backgroundColor property

* Fixed issues with test case - backgroundColor

Fixed issue related with test case backgroundColor

* Removed self

Removed self as per contributor's suggestion

* Updated text

Updated text

* Swiftlint changes

Swiftlint changes

* swiftlint autocorrect

* Added missing backgroundColor

* Deleted duplicated NSViewExtensions.swift

* Removed () + self where possible

* backgroundColor's comment proposed by guykogus

* Update CHANGELOG.md

* Update CHANGELOG.md

* Removed public for extensions, IBInspectable formatting

* Removed spaces

* Reverted spaces, added testBackgroundColor again

* Use the original scale of the source image (SwifterSwift#703)

* Modifed the scale methods in UIImageExtensions.swift, to use the original scale of the source image

* Update CHANGELOG.md

* Add a probot stale configuration (SwifterSwift#705)

* Add a probot stale configuration

See Issue SwifterSwift#644 
Also see https://github.com/probot/stale

* Add suggestions of @LucianoPAlmeida

* ♻️ Refactor sum() to make it more Swift-er (SwifterSwift#707)

* Refactor sum() to make it more Swift-er

* Updated CHANGELOG.md

* Update Sources/SwifterSwift/SwiftStdlib/SequenceExtensions.swift

Co-Authored-By: Luciano Almeida <[email protected]>

* ♻️ Moved divided(by:) function from ArrayExtensions to SequenceExtensions (SwifterSwift#706)

* ✨ Added Collection.split(where:) helper function

* Updated CHANGELOG.md

* Fixed typo

* 👌 Updating code due to code review changes

* Removed unnecessary whitespaces

* 🚨 Fixed linter warnings

* 💚 Fixing CI Build

* Array.withoutDuplicates(keyPath:) (SwifterSwift#704)

* removeDuplicates and withoutDuplicates with params

removeDuplicates(by comparator: (Element, Element) -> Bool) -> [Element], removeDuplicates<E: Equatable>(keyPath path: KeyPath<Element, E>) -> [Element], withoutDuplicates(by comparator: (Element, Element) -> Bool) -> [Element], withoutDuplicates<E: Equatable>(keyPath path: KeyPath<Element, E>) -> [Element]

* Fixed examples

[1, -1, 2, -4, 3, 3, 3, 4, -5] -> [1, 2, -4, 3, -5]

* Tests for new removeDuplicates and withoutDuplicates

testRemoveDuplicatesUsingComparator, testRemoveDuplicatesUsingKeyPath, testWithoutDuplicatesUsingComparator, testWithoutDuplicatesUsingKeyPath

* Added Added removeDuplicates(by:), removeDuplicates(keyPath:), withoutDuplicates(by:), withoutDuplicates(keyPath:)

* Changed removeDuplicates and withoutDuplicates

* Added removeDuplicates and withoutDuplicates where Element: Hashable

* New Array extension for Element: Hashable

* Fixed tests

* Remove Set from tests

* Optimised methods by Luciano Almeida

* Update CHANGELOG.md

* Fixing Codecov report

* Reverted CHANGELOG.md

* Reverted ArrayExtensions.swift

* Reverted ArrayExtensionsTests.swift

* Tests for withoutDuplicates(keyPath:)

* Added Array.withoutDuplicates(keyPath:)

* Added withoutDuplicates(keyPath:)

* Autogenerated Equatable

* Array -> Set

* Tests for func withoutDuplicates<E: Equatable>(keyPath path: KeyPath<Element, E>) -> [Element]

* Added func withoutDuplicates<E: Equatable>(keyPath path: KeyPath<Element, E>) -> [Element]

* withoutDuplicates -> withoutDuplicatesUnordered

* Tests for withoutDuplicatesUnordered

* Less tests for withoutDuplicates(keyPath:)

* Only 1 withoutDuplicates

* Tests for withoutDuplicates(keyPath:)

* A better way to create set

Co-Authored-By: Guy Kogus <[email protected]>

* remove -> filtering

Co-Authored-By: Guy Kogus <[email protected]>

* Removed comment (clean code)

* a set -> an array

Co-Authored-By: Guy Kogus <[email protected]>

* a set -> an array in method description

Co-Authored-By: Guy Kogus <[email protected]>

* withoutDuplicates for Equatable and Hashable

* swiftlint autocorrect

* Tests for 2 withoutDuplicates(keyPath:)

* short names

* var city -> let city

Co-Authored-By: Guy Kogus <[email protected]>

* Optional location

* Person is not Hashable

* Documenting String appendingPathComponent (SwifterSwift#709)

* Sorted key path improvements (SwifterSwift#712)

* Deprecating sort(by keyPath: ascending:) in favor of sort(by keyPath: with:)

* Updating linux tests

* Changelog

* Spacing.

* Default version.

* Changing default.

* release: v5.1.0 (SwifterSwift#713)

* String with prefix (SwifterSwift#720)

* Added replacingOccurrences extension to String

* Added withPrefix method to String extension

* Update CHANGELOG.md

* Remove duplicate entry

* Remove unneccessary self and favor string addition to string interpolation

* Remove replacingOccurrences function as it's in a separate PR SwifterSwift#719

* Favor using guard over if for early exit condition

* Move comment inside method body per omaralbeik's suggestion

* Updated per suggestion

* Add withBackgroundColor(_:) extensions to UIImage (SwifterSwift#721)

* Add withBackgroundColor(_:) extensions to UIImage

* Add changelog entry for UIImage.withBackgroundColor(_:)

* Change username vyax to MaxHaertwig

* Use UIGraphicsImageRenderer on iOS 10+

* Add missing tvOS version check

* Exclude extension from watchOS

* NSRegularExpression extensions (SwifterSwift#727)

Add `NSRegularExpression` extensions to remove usage of `NSString`, `NSRange` and `UnsafeMutablePointer<ObjCBool>`

* Add init(light:dark:) to NSColor and UIColor (SwifterSwift#722)

* Add init(light:dark:) to NSColor and UIColor

* Conditionally import Cocoa

* Add missing canImport(UIKit) checks

* Add test for NSColor.init(light:dark:)

* Fix cocoa import check

* Expose NSColor extension to objc

* Make OS check at runtime

* Add custom SwiftLint rules (SwifterSwift#725)

Closes SwifterSwift#545

* Added 'applyGradient' method to UIViewExtensions (SwifterSwift#726)

* Added applyGradient method to UIViewExtensions

* Added applyGradient method to UIViewExtensions.swift
* Added testApplyGradient to UIViewExtensionsTests.swift

* Updated CHANGELOG.md

* Removed applyGradient(:) from UIViewExtensions and made it in CAGradientLayerExtension.

* Update CHANGELOG.md

Co-Authored-By: Guy Kogus <[email protected]>

* Update CHANGELOG.md

Co-Authored-By: Guy Kogus <[email protected]>

* Update Sources/SwifterSwift/CoreAnimation/CAGradientLayerExtensions.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Update Sources/SwifterSwift/CoreAnimation/CAGradientLayerExtensions.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Added tests to check all of the values

* Added !os(Linux) check as the build was failing for Linux.

* Added non-nil values to locations for test.

* Add sum(for keyPath:) to Sequence (SwifterSwift#736)

* 🚀 UIGraphicsImageRenderer in filled(withColor:) (SwifterSwift#733)

* Converted filled(withColor:) to use UIGraphicsImageRenderer when available

* Dropped watchOS support for UIImage.filled(withColor:) and added CHANGELOG entry

* Patched filled(withColor:) to work on all platforms with the latest APIs when available

* Remove unnecessary parameter parentheses

Co-Authored-By: Guy Kogus <[email protected]>

* Reverted Xcode project to initial state, better organized changelog

* Improve UIImage.tint(color:blendMode:) using UIGraphicsImageRenderer (SwifterSwift#734)

* Update tint(_: blendMode:) func to use UIGraphicsImageRenderer when available

* Remove watchOS support - UIGraphicsImageRenderer not available - for tint(_: blendMode:) function

* Update CHANGELOG.md

* Dev review required changes

* Code refactor

* Update CHANGELOG.md

* Moved watchOS check inside tint(_: blendMode: alpha:) -> UIImage and withBackgroundColor(_:) -> UIImage functions

* Add missing import and fix podspec (SwifterSwift#739)

* Add missing import

* Re-enable pod lib lint as part of the travis build

* Remove verbose pod lib lint so that travis isn't terminated

* Create a separate task for running the pod lint

* Split the pod lint tasks

* Fix watchOS destination (SwifterSwift#745)

* Add flexibleSpace and fixedSpace(width:) extensions to UIBarButtonItem (SwifterSwift#728)

* Add flexibleSpace and fixedSpace(width:) extensions to UIBarButtonItem

* Ad test for UIBarButtonItem.flexibleSpace

* Modify test for UIBarButtonItem.flexibleSpace

* Update CHANGELOG.md

Co-Authored-By: Guy Kogus <[email protected]>

* Fix indentation

* Fix merge conflicts

* add base64 UIImage initialiser SwifterSwift#741  (SwifterSwift#744)

Closes SwifterSwift#741

* Array mutable remove duplicates (SwifterSwift#737)

* Add mutating Mutating versions of removeDuplicates(keyPath:) with tests

* Edit changelog

* Edit changelog

* Update Sources/SwifterSwift/SwiftStdlib/ArrayExtensions.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Update Sources/SwifterSwift/SwiftStdlib/ArrayExtensions.swift

Co-Authored-By: Luciano Almeida <[email protected]>

* Fix removeDuplicates(keyPath:) code style

* Update CHANGELOG.md

Co-Authored-By: Guy Kogus <[email protected]>

* Fix Changelog

* Fix removeDuplicates code style

* Remove discardableResult, change comments to methods

* Move removeDuplicates methods to RangeReplaceableCollection

* Move testing structs to separate file

* Update CHANGELOG.md

Co-Authored-By: Guy Kogus <[email protected]>

* Update CHANGELOG.md

Co-Authored-By: Guy Kogus <[email protected]>

* Add comment for structs in TestHelpers

* Xcode 11.2 (SwifterSwift#752)

* Fix compilation and (most) tests for Xcode 11 and macCatalyst

* Replace imports of Cocoa with AppKit

* Update Xcode version in README

* Unify Color usages

* Fix subspecs

* Upgrade to Xcode 11.2

* Add `init(grouping:by:)` for Dictionary that uses a keypath. 🚀 (SwifterSwift#751)

* Add `grouped(by:)` function for sequences.

* Fix SwiftLint whitespace warnings

* Update Test cases

* Add dictionary keypath grouping init and tests

* Apply suggestions from code review

Co-Authored-By: Guy Kogus <[email protected]>

* Update change log for new Dictionary init

* Remove sequence extension

* Apply suggestions from code review

Co-Authored-By: Luciano Almeida <[email protected]>

* Update to UIImage extensions and new init 🚀  (SwifterSwift#753)

* Update `UIImage` with refactor and new `init?(url:scale:)`

* Modified UIImage extension compressed so it doens't use other extension SwifterSwift#755  🚀 (SwifterSwift#757)

* Make group(by:) generic for all Collections (SwifterSwift#758)

* Add base64String methods to UIImage (SwifterSwift#747)

Add base64String functions for png and jpeg representations

* added assignToAll to MutableCollection (#issue/759) 🚀 (SwifterSwift#760)

* Exclude AppKit extensions to be compiled for macCatalyst (SwifterSwift#762)

* Exclude AppKit extensions to be compiled for macCatalyst

* Add KeyedDecodingContainer extensions (SwifterSwift#750)

* Add KeyedDecodingContainer extensions.

* Minor changes, refactor

* Update CHANGELOG.md

* Swift lint refactor

* Remove trailing whitespace

* Add Foundation import

* Remove unnecessary do catch block

* Code refactor

* Dev review required changes

* Remove empty lines

* Update Foundation import

* Update KeyedDecodingContainerTests.swift

Make CodingKeys enum private.

* Update Sources/SwifterSwift/SwiftStdlib/KeyedDecodingContainer.swift

Remove not needed CodingKey conformation.

Co-Authored-By: Guy Kogus <[email protected]>

* Update Sources/SwifterSwift/SwiftStdlib/KeyedDecodingContainer.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Update Sources/SwifterSwift/SwiftStdlib/KeyedDecodingContainer.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Code review required changes.

* Sequence.mapByKeyPath (SwifterSwift#763)

* map<T>

* testMapByKeyPath

* map(by:)

* Update CHANGELOG.md

Co-Authored-By: Luciano Almeida <[email protected]>

* Fixed build errors in KeyedDecodingContainerTests (SwifterSwift#764)

* Update KeyedDecodingContainerExtensionsTests.swift

* Correct file name

* Update Tests/SwiftStdlibTests/KeyedDecodingContainerExtensionsTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* swiftlint:disable:this force_try

* Removed empty lines

* Sequence.compactMapByKeyPath (SwifterSwift#766)

* Fixing swiftlint on travis failing on travis (SwifterSwift#765)

* Creating a step for swiftlint

* Excluding folder installed by travis

* Fixing swiftlint docs custom warnings

* Filter by key path (SwifterSwift#771)

* Bump excon from 0.67.0 to 0.71.0 (SwifterSwift#779)

Bumps [excon](https://github.com/excon/excon) from 0.67.0 to 0.71.0.
- [Release notes](https://github.com/excon/excon/releases)
- [Changelog](https://github.com/excon/excon/blob/master/changelog.txt)
- [Commits](excon/excon@v0.67.0...v0.71.0)

Signed-off-by: dependabot[bot] <[email protected]>

* Add sorted(like:keyPath:) to Array (SwifterSwift#772)

* Add sorted(like:keyPath:) to Array to sort an array like another array based on a keyPath

* Update Sources/SwifterSwift/SwiftStdlib/ArrayExtensions.swift

Co-Authored-By: Luciano Almeida <[email protected]>

* Update CHANGELOG.md

Co-Authored-By: Luciano Almeida <[email protected]>

* Rename variables in `testSortedLike` test

Co-authored-by: Luciano Almeida <[email protected]>
Co-authored-by: Guy Kogus <[email protected]>

* Add localizedPrice SKProduct extension (SwifterSwift#781)

* GitHub Actions  (SwifterSwift#783)

* Unify UIEdgeInsets and NSEdgeInsets (SwifterSwift#785)

* Danger API key expose to forks  (SwifterSwift#784)

* Update CI.yml

* Update CI.yml

* Update CI.yml

* Update CI.yml

* Update CI.yml

* Update CI.yml

* Update CI.yml

* Update CI.yml

* Update CI.yml

* Update CI.yml

* Update CI.yml

* Update CI.yml

* Add tests for UIImage.compressedData(quality:) (SwifterSwift#786)

* added UIImage base64 initialiser

* added Base64 Test
+ fixed base64 init documentation (XC markup)

* added to changelog

* added SwiftLint formatting for merge (SwifterSwift#744 (comment))

* improved after review notes from @guykogus
+ added size test
+ added byteSize test

* Update Tests/UIKitTests/UIImageExtensionsTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* added testCompressedData() UTest to improove codeCov

* added testCompressedData() UTest to improove codeCov
 + updated changelog

* Update Tests/UIKitTests/UIImageExtensionsTests.swift

Bundle.init

Co-Authored-By: Guy Kogus <[email protected]>

* Update CHANGELOG.md

* Update UIImageExtensionsTests.swift

* Update CHANGELOG.md

Co-Authored-By: Guy Kogus <[email protected]>

* Update CHANGELOG.md

Co-Authored-By: Guy Kogus <[email protected]>

Co-authored-by: Guy Kogus <[email protected]>
Co-authored-by: Luciano Almeida <[email protected]>

* Added zoom extension to MapView (SwifterSwift#723)

* Added multipleCoordinateZoom extension to MapView

* added changelog

* edited edgeInsets

* Update Sources/SwifterSwift/MapKit/MKMapViewExtensions.swift

removed self

Co-Authored-By: Guy Kogus <[email protected]>

* Update Sources/SwifterSwift/MapKit/MKMapViewExtensions.swift

removed self

Co-Authored-By: Guy Kogus <[email protected]>

* remove available operator

* empty control of arrays was performed.

* insets parameter and changelog update

* comments update

* method name and changelog update

* added testWithEmptyItemArray test method

* added testWithOneItemArray test method

* added testWithMultiItemArray test method

* update changelog and zoom method

* Update CHANGELOG.md

Co-Authored-By: Luciano Almeida <[email protected]>

* space update

* Update Tests/MapKitTests/MKMapViewTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Update Tests/MapKitTests/MKMapViewTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Update Tests/MapKitTests/MKMapViewTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Update Tests/MapKitTests/MKMapViewTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Update Tests/MapKitTests/MKMapViewTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Update Tests/MapKitTests/MKMapViewTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* update spaces

* Update CHANGELOG.md

Co-Authored-By: Guy Kogus <[email protected]>

* zoom test methods edited

* Tests for zoom the MapView extension have been edited

* edited emptyArray test and imported UIKit

* EdgeInsets added as typealias

* pod lint issue fixed

* EdgeInsets typealias moved to MKMapViewExtensions file

* removed typealias from MKMapViewExtensions

* edited all zoom test functions and EdgeInsets

* Update Tests/MapKitTests/MKMapViewTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* swiftlint warning fixed

Co-authored-by: Guy Kogus <[email protected]>
Co-authored-by: Luciano Almeida <[email protected]>

* Update .codecov.yml (SwifterSwift#788)

* Add cURL extension to URLRequest

* Added is12HourTimeFormat to indicate if locale has 12h format (SwifterSwift#793)

* Improvement of NSAttributedString extension's 'applying' function (SwifterSwift#791)

* Add CLVisit extensions

* Add sort(by:and:), sorted(by:and:), sort(by:and:and:), and sorted(by:and:and:) to sort collections/sequences by multiple key paths (SwifterSwift#796)

* Added model parsing extension to codable (SwifterSwift#797)

* [CoreLocation] add extension to calculate all elements distance in array

* Upgrade swifterswift ios version (SwifterSwift#800)

* changrd ios version target

* removed < 10.0 available checks for ios

* updated pod spec

* updated readme

* updated pull request template

Co-authored-by: Luciano Almeida <[email protected]>

* [BugFix] Making String.base64Decoded a safe base64 decode by including padding. (SwifterSwift#801)

* Making String.base64Decoded a safe base64 decode  by including padding.

* Changelog

* Add min. platform to SPM (SwifterSwift#803)

* Add min. platform to SPM

Fixes SwifterSwift#800 .

* Remove trailing comma

* Conform Optional to Equatable when Wrapped conforms to RawRepresentable and RawValue is Equatable (SwifterSwift#804)

* Conform RawRepresentable to Equatable with its RawValue

* Make the extensions public

* Clean comment

* Add != operators

* Fix compilation for Linux

* Remove unnecessary RawRepresentable implementation

* Mark equality functions as inlinable to match the Swift stdlib

* Update bundle

* Remove reverted  CHANGELOG entry

* Remove unnecessary non-optional implementations

* [tests] Using automatic tests discovery on linux (SwifterSwift#808)

* [tests] Using automatic tests discovery of tests in linux

* Updating swift version on linux

* Fix image cropped issue when scale not equal to 1 (SwifterSwift#811)

* Fix image cropped issue when scale not equal to 1

* Update change log

* Fix swiftlint

* Convert ISO region code into flag emoji (SwifterSwift#813)

* Convert ISO region code into flag emoji

* Fix tests for Linux

* Observe a single posting of a notification (SwifterSwift#812)

* Observe a single post of a notification

* Remove old references to XCTestManifests files

* Added CGRect extensions and its tests (SwifterSwift#814)

* Added CGRect extensions and its tests

* Define anchor as CGPoint instead of enum

Co-authored-by: Guy Kogus <[email protected]>

* Updated center text and image extension for UIButton (SwifterSwift#807)

Refactor `centerTextAndImage(spacing:)`: so that the image position can be above the text

* Add initializer for a `URL` with an optional `String` (SwifterSwift#818)

* String Safely subscript - out of bounds (Issue SwifterSwift#815) (SwifterSwift#816)

* String Safely subscript - out of bounds SwifterSwift#815

* Updated CHANGELOG.md

* 🚨 Fix SwiftLint issues

* 👌 Updating code due to code review changes.

* String Safely subscript - out of bounds SwifterSwift#815

* Updated CHANGELOG.md

* 🚨 Fix SwiftLint issues

* 👌 Updating code due to code review changes.

* 🚨 Fix SwiftLint issues

* Refactored String subscript (safe substring)

👌 Updating code due to code review changes.

* Update Sources/SwifterSwift/SwiftStdlib/StringExtensions.swift

Co-Authored-By: Guy Kogus <[email protected]>

Co-authored-by: Guy Kogus <[email protected]>

* Make CATransform3D Swifty (SwifterSwift#819)

* Make CATransform3D swifty

* Fix imports for test

* Add rule for ignoring x, y, z for SwitLint identifier_name rule

* Project clean (SwifterSwift#820)

* Fix project and tests

* Remove unnecessary availability attributes

* Fix test crashing when it fails

* Update README.md (SwifterSwift#821)

* release: v5.2.0 (SwifterSwift#823)

* patch: add available in SKProductExtensions.swift

* Access/update RangeReplaceableCollection by index offsets (SwifterSwift#826)

* Access/update RangeReplaceableCollection by index offsets

This is especially useful for `String`s.

* Make `NSAttributedString.applying(attributes:)` public (SwifterSwift#832)

* NSAttributedString make  public

* Updated changelog

* Update Tests/FoundationTests/NSAttributedStringExtensionsTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Test  doesn't have any attributes

* 👌🏼 Updated test case due to code review changes

* Update Tests/FoundationTests/NSAttributedStringExtensionsTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Update Tests/FoundationTests/NSAttributedStringExtensionsTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* 🚨 Removing linter warnings.

* Update Tests/FoundationTests/NSAttributedStringExtensionsTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

* Update Tests/FoundationTests/NSAttributedStringExtensionsTests.swift

Co-Authored-By: Guy Kogus <[email protected]>

Co-authored-by: Guy Kogus <[email protected]>

* Added `first(where:equals:)` extension to Sequence (SwifterSwift#836)

* Add `SKNode` anchor points for `center`, `topLeft`, `topRight`, `bottomLeft`, `bottomRight` (SwifterSwift#835)

* Add Unit-Tests for each anchor point get and set operation
* Change `SpriteKitTests` file and enclosing class names to `SKNodeExtensionTest`
* Add `CHANGELOG.md` entry

* [CI] Update to XCode 11.4 and package tools to 5.2 (SwifterSwift#837)

* Added `last(where:equals:)` extension to Sequence (SwifterSwift#838)

* CGSize: Added new `+`, `+=`, `-` and `-=` operator extensions for tuple (SwifterSwift#841)

* Added new `+`, `+=`, `-` and `-=` operator extensions for tuple (width: CGFloat, height: CGFloat)

* Removing semantically incorrect operator

* Little arrangements

* [Trivial] Adjust macOS on SwiftLint job

* Update UIEdgeInsets extensions link (SwifterSwift#852)

* Added WKWebView extensions (SwifterSwift#851)

* Added WKWebView extensions

* Refactoring tests

* Adding Pod subspec for WebKit and section for WebKit Extensions in Readme
Increasing WKWebView test expectation timeout

* Replacing test url with https://example.com/
Handling failed events

* Adding test for Dead URL String

Co-authored-by: Guy Kogus <[email protected]>

* Refactored init(light:dark:) to remove deployment target version restrictions. (SwifterSwift#844)

* Refactored  to remove deployment target version restrictions.

* Added test for when the dark mode color is nil.

* Updated UIColorExtensionsTests.

* Make dark in UIColor(light:dark:) non-optional.

Co-authored-by: Luciano Almeida <[email protected]>

* CoreAnimation: Make CAGradientLayer extension public. (SwifterSwift#856)

* CoreAnimation: Make CAGradientLayer extension public.

* Update CHANGELOG.

* Added convenient wrapper to asyncAfter (SwifterSwift#859)

* Added convenient wrapper to asyncAfter

* Added unit test for asyncAfter

* Added changes to changelog

* Made minor changes

Co-authored-by: Guy Kogus <[email protected]>

* Overloaded 'contains' operator for string regex matching (SwifterSwift#858)

Co-authored-by: Luciano Almeida <[email protected]>

* Deprecated map(by:), compactMap(by:), filter(by:) (SwifterSwift#862)

* Deprecated map(by:), compactMap(by:), filter(by:)

* Removed tests for map(by:), compactMap(by:), filter(by:)

Co-authored-by: Luciano Almeida <[email protected]>

* fixed "".truncated crashed (SwifterSwift#866)

* - fixed: "".truncated crashed

* Update StringExtensionsTests.swift

* Update CHANGELOG.md

* Clean up code (SwifterSwift#864)

* Clean up code
Optimise some function compilation times
`CAGradientLayer.init` - add default values for `startPoint` and `endPoint`.

* Updated CHANGELOG

* Clean up forEachInParallel

* Fix WKWebView tests

* Clean code and fix DispatchQueue tests

Co-authored-by: Ratul sharker <[email protected]>
Co-authored-by: Omar Albeik <[email protected]>
Co-authored-by: diamantidis <[email protected]>
Co-authored-by: Guy Kogus <[email protected]>
Co-authored-by: Maulik Sharma <[email protected]>
Co-authored-by: Luciano Almeida <[email protected]>
Co-authored-by: Hannes Staffler <[email protected]>
Co-authored-by: Daniel Lin <[email protected]>
Co-authored-by: Ilya Khalyapin <[email protected]>
Co-authored-by: Caleb Kleveter <[email protected]>
Co-authored-by: Alexei <[email protected]>
Co-authored-by: Hannes Staffler <[email protected]>
Co-authored-by: Quentin Jin <[email protected]>
Co-authored-by: Cruz <[email protected]>
Co-authored-by: Maxim Tsvetkov <[email protected]>
Co-authored-by: Difeng Chen <[email protected]>
Co-authored-by: Adrian <[email protected]>
Co-authored-by: Marco Capano <[email protected]>
Co-authored-by: towry <[email protected]>
Co-authored-by: Stephen Feather <[email protected]>
Co-authored-by: lowol <[email protected]>
Co-authored-by: Piotr Byzia <[email protected]>
Co-authored-by: Chad Hulbert <[email protected]>
Co-authored-by: Cihat Gündüz <[email protected]>
Co-authored-by: Max Härtwig <[email protected]>
Co-authored-by: Julius Wilson Lundang <[email protected]>
Co-authored-by: 书生 <[email protected]>
Co-authored-by: dirtmelon <[email protected]>
Co-authored-by: John <[email protected]>
Co-authored-by: Roman Podymov <[email protected]>
Co-authored-by: Ahmed Hamdy <[email protected]>
Co-authored-by: Mohshin Shah <[email protected]>
Co-authored-by: Emil Bellmann <[email protected]>
Co-authored-by: matthewyan <[email protected]>
Co-authored-by: xiaozao2008 <[email protected]>
Co-authored-by: Shannon Chou <[email protected]>
Co-authored-by: Benjamin Meyer <[email protected]>
Co-authored-by: Zach Frew <[email protected]>
Co-authored-by: Jay Mehta <[email protected]>
Co-authored-by: Moritz Sternemann <[email protected]>
Co-authored-by: Michael Hulet <[email protected]>
Co-authored-by: Francesco Deliro <[email protected]>
Co-authored-by: Henry <[email protected]>
Co-authored-by: iglushchuk <[email protected]>
Co-authored-by: Morgan Dock <[email protected]>
Co-authored-by: Soltan Gheorghe <[email protected]>
Co-authored-by: Francesco Deliro <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Batuhan Saka <[email protected]>
Co-authored-by: Henry <[email protected]>
Co-authored-by: Mustafa GÜNEŞ <[email protected]>
Co-authored-by: DimaZava <[email protected]>
Co-authored-by: Trevor Phillips <[email protected]>
Co-authored-by: Wouter Bron <[email protected]>
Co-authored-by: Chen <[email protected]>
Co-authored-by: Omar Albeik <[email protected]>
Co-authored-by: Tigran Hambardzumyan <[email protected]>
Co-authored-by: Rypyak <[email protected]>
Co-authored-by: Tigran Hambardzumyan <[email protected]>
Co-authored-by: Matt Weathers <[email protected]>
Co-authored-by: Vincent <[email protected]>
Co-authored-by: Den Andreychuk <[email protected]>
Co-authored-by: Vato Kostava <[email protected]>
Co-authored-by: phil zhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants