Skip to content

Commit a7a6f40

Browse files
authored
New Feature: Health Check (#134)
* New Feature: Health Check * Fix test for linux comparison * Simplify error check for linux * Remove debugDescription in ParseHealth
1 parent 2704ee9 commit a7a6f40

File tree

17 files changed

+350
-21
lines changed

17 files changed

+350
-21
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# Parse-Swift Changelog
22

33
### main
4-
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.7.0...main)
4+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.7.1...main)
55
* _Contributing to this repo? Add info about your change here to be included in the next release_
66

7+
### 1.7.1
8+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.7.0...1.7.1)
9+
10+
__New features__
11+
- Can now check the health of a Parse Server using ParseHealth. ([#134](https://github.com/parse-community/Parse-Swift/pull/134)), thanks to [Corey Baker](https://github.com/cbaker6).
12+
713
### 1.7.0
814
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.6.0...1.7.0)
915

ParseSwift.playground/Pages/1 - Your first Object.xcplaygroundpage/Contents.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ npm start -- --appId applicationId --clientKey clientKey --masterKey masterKey -
1818

1919
initializeParse()
2020

21+
//: Check the health of your Parse Server.
22+
print(try ParseHealth.check())
23+
2124
//: Create your own value typed `ParseObject`.
2225
struct GameScore: ParseObject {
2326
//: Those are required for Object

ParseSwift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "ParseSwift"
3-
s.version = "1.7.0"
3+
s.version = "1.7.1"
44
s.summary = "Parse Pure Swift SDK"
55
s.homepage = "https://github.com/parse-community/Parse-Swift"
66
s.authors = {

ParseSwift.xcodeproj/project.pbxproj

Lines changed: 44 additions & 8 deletions
Large diffs are not rendered by default.

Scripts/jazzy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ bundle exec jazzy \
55
--author_url http://parseplatform.org \
66
--github_url https://github.com/parse-community/Parse-Swift \
77
--root-url http://parseplatform.org/Parse-Swift/api/ \
8-
--module-version 1.7.0 \
8+
--module-version 1.7.1 \
99
--theme fullwidth \
1010
--skip-undocumented \
1111
--output ./docs/api \

Sources/ParseSwift/API/API.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public struct API {
3636
case jobs(name: String)
3737
case aggregate(className: String)
3838
case config
39+
case health
3940
case any(String)
4041

4142
var urlComponent: String {
@@ -80,6 +81,8 @@ public struct API {
8081
return "/aggregate/\(className)"
8182
case .config:
8283
return "/config"
84+
case .health:
85+
return "/health"
8386
case .any(let path):
8487
return path
8588
}

Sources/ParseSwift/API/Responses.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,8 @@ internal struct ConfigFetchResponse<T>: Codable where T: ParseConfig {
124124
internal struct ConfigUpdateResponse: Codable {
125125
let result: Bool
126126
}
127+
128+
// MARK: HealthResponse
129+
internal struct HealthResponse: Codable {
130+
let status: String
131+
}

Sources/ParseSwift/Objects/ParseUser.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ extension ParseUser {
331331
unless your code is already running from a background thread.
332332
- parameter options: A set of header options sent to the server. Defaults to an empty set.
333333
- parameter callbackQueue: The queue to return to after completion. Default value of .main.
334-
- parameter completion: A block that will be called when logging out, completes or fails.
334+
- parameter completion: A block that will be called when logging out completes or fails.
335335
*/
336336
public static func logout(options: API.Options = [], callbackQueue: DispatchQueue = .main,
337337
completion: @escaping (Result<Void, ParseError>) -> Void) {

Sources/ParseSwift/ParseConstants.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import Foundation
1010

1111
enum ParseConstants {
12-
static let parseVersion = "1.7.0"
12+
static let parseVersion = "1.7.1"
1313
static let hashingKey = "parseSwift"
1414
static let fileManagementDirectory = "parse/"
1515
static let fileManagementPrivateDocumentsDirectory = "Private Documents/"

Sources/ParseSwift/Types/ParseCloud+combine.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public extension ParseCloud {
3232
// MARK: Jobs - Combine
3333

3434
/**
35-
Starts a Cloud Code job *asynchronously* and returns a result with the jobStatusId of the job.
35+
Starts a Cloud Code Job *asynchronously* and returns a result with the jobStatusId of the job.
3636
Publishes when complete.
3737
- parameter options: A set of header options sent to the server. Defaults to an empty set.
3838
- returns: A publisher that eventually produces a single value and then finishes or fails.

0 commit comments

Comments
 (0)