-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from dbukowski/feature/first_refactoring_to_sw…
…ift_and_swift_ui Feature/first refactoring to swift and swift UI
- Loading branch information
Showing
64 changed files
with
2,585 additions
and
3,459 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
127 changes: 0 additions & 127 deletions
127
DBDebugToolkit/Classes/Console/DBConsoleViewController.m
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import Foundation | ||
|
||
@objc | ||
public extension Bundle { | ||
static var applicationName: String { | ||
|
28 changes: 28 additions & 0 deletions
28
DBDebugToolkit/Classes/Extensions/DBRequestModel+responseDescription.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Foundation | ||
|
||
extension DBRequestModel { | ||
var responseDescription: String { | ||
var value = "" | ||
if !finished { | ||
let dateString = DateFormatter.localizedString( | ||
from: sendingDate, | ||
dateStyle: .medium, | ||
timeStyle: .medium | ||
) | ||
value.append("Sent at \(dateString)...") | ||
} else if didFinishWithError { | ||
value.append("Error \(errorCode): \(localizedErrorDescription ?? "")") | ||
} else { | ||
let formattedValue = String(format: "%.2lfs", duration) | ||
value.append("\(formattedValue)") | ||
if let statusCode = statusCode { | ||
value.append(", HTTP \(statusCode)") | ||
} | ||
if let localizedStatusCodeString = localizedStatusCodeString { | ||
value.append(" - \(localizedStatusCodeString)") | ||
} | ||
} | ||
|
||
return value | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
DBDebugToolkit/Classes/Extensions/URLRequest.CachePolicy+readableDescription.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Foundation | ||
|
||
extension URLRequest.CachePolicy { | ||
var readableDescription: String { | ||
switch self { | ||
case .reloadIgnoringLocalAndRemoteCacheData: | ||
return "Reload ignoring local and remote cache data" | ||
case .reloadIgnoringLocalCacheData: | ||
return "Reload ignoring local cache data" | ||
case .returnCacheDataElseLoad: | ||
return "Return cache data else load" | ||
case .reloadRevalidatingCacheData: | ||
return "Reload revalidating cache data" | ||
case .returnCacheDataDontLoad: | ||
return "Return cache data, don't load" | ||
case .useProtocolCachePolicy: | ||
return "Use protocol cache policy" | ||
case .reloadIgnoringCacheData: | ||
return "Reload ignoring cache data" | ||
@unknown default: | ||
return "unknown" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.