Skip to content

Commit

Permalink
Remove OAuthSwift and its dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
brentsimmons committed Jun 26, 2023
1 parent d31c9c1 commit 7078e6f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 116 deletions.
4 changes: 2 additions & 2 deletions Mac/MainWindow/MainWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ private extension MainWindowController {
return currentLink != nil
}

if let webfeed = currentTimelineViewController?.selectedArticles.first?.webFeed {
if currentTimelineViewController?.selectedArticles.first?.webFeed != nil {
toolbarButton.isEnabled = true
}

Expand All @@ -1171,7 +1171,7 @@ private extension MainWindowController {
return currentLink != nil
}

if let webfeed = currentTimelineViewController?.selectedArticles.first?.webFeed {
if currentTimelineViewController?.selectedArticles.first?.webFeed != nil {
toolbarButton.isEnabled = true
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,51 +1,6 @@
{
"object": {
"pins": [
{
"package": "BrightFutures",
"repositoryURL": "https://github.com/Thomvis/BrightFutures.git",
"state": {
"branch": null,
"revision": "939858b811026f85e87847a808f0bea2f187e5c4",
"version": "8.1.0"
}
},
{
"package": "Erik",
"repositoryURL": "https://github.com/phimage/Erik.git",
"state": {
"branch": null,
"revision": "109a130e9cdb00789a43a7a625293eeb12d22989",
"version": "5.1.0"
}
},
{
"package": "FileKit",
"repositoryURL": "https://github.com/nvzqz/FileKit.git",
"state": {
"branch": null,
"revision": "826d9161b184509f80d85c28cd612d630646de98",
"version": "6.0.0"
}
},
{
"package": "Kanna",
"repositoryURL": "https://github.com/tid-kijyun/Kanna.git",
"state": {
"branch": null,
"revision": "f9e4922223dd0d3dfbf02ca70812cf5531fc0593",
"version": "5.2.7"
}
},
{
"package": "OAuthSwift",
"repositoryURL": "https://github.com/OAuthSwift/OAuthSwift.git",
"state": {
"branch": null,
"revision": "fde77955e6983fbfaabd491709d52b8a82fda4d0",
"version": "2.1.2"
}
},
{
"package": "PLCrashReporter",
"repositoryURL": "https://github.com/microsoft/plcrashreporter.git",
Expand Down Expand Up @@ -109,15 +64,6 @@
"version": "2.0.1"
}
},
{
"package": "Swifter",
"repositoryURL": "https://github.com/httpswift/swifter.git",
"state": {
"branch": null,
"revision": "9483a5d459b45c3ffd059f7b55f9638e268632fd",
"version": "1.5.0"
}
},
{
"package": "Zip",
"repositoryURL": "https://github.com/marmelroy/Zip.git",
Expand Down
12 changes: 5 additions & 7 deletions Secrets/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ let package = Package(
.library(
name: "Secrets",
type: .dynamic,
targets: ["Secrets"]),
],
dependencies: [
.package(url: "https://github.com/OAuthSwift/OAuthSwift.git", .exact("2.1.2")),
targets: ["Secrets"]
)
],
dependencies: [],
targets: [
.target(
name: "Secrets",
dependencies: [
"OAuthSwift",
]),
dependencies: []
)
]
)
17 changes: 0 additions & 17 deletions Secrets/Sources/Secrets/OAuth1SwiftProvider.swift

This file was deleted.

19 changes: 0 additions & 19 deletions Secrets/Sources/Secrets/OAuth2SwiftProvider.swift

This file was deleted.

8 changes: 7 additions & 1 deletion Shared/Extensions/URL-Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ extension URL {

/// Percent encoded `mailto` URL for use with `canOpenUrl`. If the URL doesn't contain the `mailto` scheme, this is `nil`.
var percentEncodedEmailAddress: URL? {
scheme == "mailto" ? self.string.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)?.url : nil
guard scheme == "mailto" else {
return nil
}
guard let urlString = absoluteString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else {
return nil
}
return URL(string: urlString)
}

/// Reverse chronological list of release notes.
Expand Down
18 changes: 2 additions & 16 deletions Technotes/Dependencies.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,9 @@ In addition to our own frameworks (RSCore, RSDatabase, RSParser, RSTree, and RSW

Thank you to the authors of these!

## [BrightFutures](https://github.com/Thomvis/BrightFutures)
Required by OAuthSwift (through Erik) as a testing dependency. Not shipped in NNW.

## [Erik](https://github.com/phimage/Erik)
Required by OAuthSwift as a testing dependency. Not shipped in NNW.

## [FileKit](https://github.com/nvzqz/FileKit)
Required by OAuthSwift (through Erik) as a testing dependency. Not shipped in NNW.

## [FMDB](https://github.com/ccgus/fmdb)
RSDatabase uses FMDB for SQLite persistence.

## [Kanna](https://github.com/tid-kijyun/Kanna)
Required by OAuthSwift as a testing dependency. Not shipped in NNW.

## [OAuthSwift](https://github.com/OAuthSwift/OAuthSwift)
Our Reddit integration uses the OAuth framework to authenticate with the services
and then service requests to them.

## [PLCrashReporter](https://github.com/microsoft/plcrashreporter)
Used to collect crash reports and send them to Brent. Mac only.

Expand All @@ -31,3 +15,5 @@ Used to provide application updates to users. Mac only.

## [Swifter](https://github.com/httpswift/swifter)
Required by OAuthSwift as a testing dependency. Not shipped in NNW.

## [Zip]

0 comments on commit 7078e6f

Please sign in to comment.