Skip to content

Commit 6872294

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents d72c6b1 + e730a0b commit 6872294

File tree

245 files changed

+8879
-778
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+8879
-778
lines changed

AsposeWordsCloud.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 = 'AsposeWordsCloud'
3-
s.version = '22.1'
3+
s.version = '22.2'
44
s.summary = 'Aspose Words for Cloud.'
55
s.homepage = 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git'
66
s.license = { :type => 'MIT', :file => 'LICENSE' }

Jenkinsfile

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ properties([
66
[$class: 'StringParameterDefinition', name: 'apiUrl', defaultValue: 'https://api-qa.aspose.cloud', description: 'api url'],
77
[$class: 'BooleanParameterDefinition', name: 'ignoreCiSkip', defaultValue: false, description: 'ignore CI Skip'],
88
[$class: 'StringParameterDefinition', name: 'credentialsId', defaultValue: '6839cbe8-39fa-40c0-86ce-90706f0bae5d', description: 'credentials id'],
9+
[$class: 'BooleanParameterDefinition', name: 'packageTesting', defaultValue: false, description: 'Testing package from repository without local sources. Used for prodhealthcheck'],
910
]
1011
]
1112
])
1213

1314
def needToBuild = false
15+
def packageTesting = false
1416

1517
node('words-linux') {
1618
cleanWs()
@@ -22,7 +24,8 @@ node('words-linux') {
2224
sh 'git show -s HEAD > gitMessage'
2325
def commitMessage = readFile('gitMessage').trim()
2426
echo commitMessage
25-
needToBuild = params.ignoreCiSkip || !commitMessage.contains('[ci skip]')
27+
needToBuild = params.ignoreCiSkip || !commitMessage.contains('[ci skip]')
28+
packageTesting = params.packageTesting
2629
sh 'git clean -fdx'
2730

2831
if (needToBuild) {
@@ -33,7 +36,32 @@ node('words-linux') {
3336
}
3437
}
3538

36-
if (needToBuild) {
39+
if (packageTesting) {
40+
docker.image('swift:5.0').inside{
41+
stage('build'){
42+
sh "rm -rf ./Sources/AsposeWordsCloud"
43+
sh "mkdir ./Sources/AsposeWordsCloudHealthProdCheck"
44+
sh "cp ./Scripts/AsposeWordsCloudHealthProdCheck.swift ./Sources/AsposeWordsCloudHealthProdCheck/AsposeWordsCloudHealthProdCheck.swift"
45+
sh "cp ./PackageHealthProdCheck.swift ./Package.swift"
46+
sh "mv ./Tests/AsposeWordsCloudTests ./Tests/AsposeWordsCloudHealthProdCheckTests"
47+
sh "cp ./Scripts/AsposeWordsCloudHealthProdCheckLinuxMain.swift ./Tests/LinuxMain.swift"
48+
sh "swift build"
49+
}
50+
51+
stage('tests'){
52+
try{
53+
sh "swift test --enable-code-coverage"
54+
} finally{
55+
junit 'tests.xml'
56+
}
57+
}
58+
59+
stage('clean-compiled'){
60+
sh "rm -rf %s"
61+
}
62+
}
63+
}
64+
else if (needToBuild) {
3765
docker.image('swift:5.0').inside{
3866
stage('build'){
3967
sh "swift build"

PackageHealthProdCheck.swift

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// swift-tools-version:4.2
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "AsposeWordsCloudHealthProdCheck",
8+
products: [
9+
// Products define the executables and libraries produced by a package, and make them visible to other packages.
10+
.library(
11+
name: "AsposeWordsCloudHealthProdCheck",
12+
targets: ["AsposeWordsCloudHealthProdCheck"]),
13+
],
14+
dependencies: [
15+
// Dependencies declare other packages that this package depends on.
16+
.package(url: "https://github.com/allegro/swift-junit.git", from: "1.0.0"),
17+
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git", .branch("release"))
18+
],
19+
targets: [
20+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
21+
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
22+
.target(
23+
name: "AsposeWordsCloudHealthProdCheck",
24+
dependencies: []),
25+
.testTarget(
26+
name: "AsposeWordsCloudHealthProdCheckTests",
27+
dependencies: ["AsposeWordsCloud", "AsposeWordsCloudHealthProdCheck", "SwiftTestReporter"]),
28+
]
29+
)

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ This repository contains Aspose.Words Cloud SDK for Swift source code. This SDK
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16+
## Enhancements in Version 22.2
17+
18+
- Made 'SaveOprionsData.SaveFormat' property readonly with default value.
19+
- Added subclasses for all formats of SaveOprionsData with specified SaveFormat.
20+
- 'SaveOptionsData', 'FixedPageSaveOptionsData', 'ImageSaveOptionsData', 'OoxmlSaveOptionsData', 'TxtSaveOptionsBaseData' classes now is abstract.
21+
22+
1623
## Enhancements in Version 22.1
1724

1825
- Added 'FieldOptions.FieldUpdateCultureName' to set Culture for fields
@@ -182,7 +189,7 @@ Add link to this repository as dependency to your Package.swift:
182189

183190
dependencies: [
184191
// Dependencies declare other packages that this package depends on.
185-
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift", from: "22.1"),
192+
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift", from: "22.2"),
186193
],
187194
targets: [
188195
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
@@ -200,7 +207,7 @@ targets: [
200207
Add link to git repository as dependency to your Podfile:
201208

202209
```ruby
203-
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '22.1'
210+
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '22.2'
204211
```
205212

206213
## Getting Started
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Foundation
2+
3+
@available(macOS 10.12, iOS 10.3, watchOS 3.3, tvOS 12.0, *)
4+
public class AsposeWordsCloudHealthProdCheck {
5+
public func getSomeValue() -> String {
6+
return "Aspose.Words.Healthcheck";
7+
}
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import XCTest
2+
import SwiftTestReporter
3+
import AsposeWordsCloudHealthProdCheckTests
4+
5+
_ = TestObserver();
6+
7+
var tests = [XCTestCaseEntry]()
8+
tests += AsposeWordsCloudHealthProdCheckTests.allTests()
9+
XCTMain(tests)

Sources/AsposeWordsCloud/Api/Configuration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,6 @@ public class Configuration : Codable {
130130

131131
// Returns SDK version for using in statistics headers
132132
public func getSdkVersion() -> String {
133-
return "22.1";
133+
return "22.2";
134134
}
135135
}

Sources/AsposeWordsCloud/Api/WordsAPI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13863,7 +13863,7 @@ public class WordsAPI {
1386313863

1386413864
var result = [Any?]();
1386513865
for partData in parts {
13866-
var requestId = partData.getHeaders()["RequestId"];
13866+
let requestId = partData.getHeaders()["RequestId"];
1386713867
if (requestId == nil || sortedRequests[requestId!] == nil) {
1386813868
throw WordsApiError.invalidMultipartResponse(message: "Failed to parse batch response.");
1386913869
}

Sources/AsposeWordsCloud/Model/ApiError.swift

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,64 @@ import Foundation
3131
@available(macOS 10.12, iOS 10.3, watchOS 3.3, tvOS 12.0, *)
3232
public class ApiError : Codable, WordsApiModel {
3333
// Field of code. Api error.
34-
public var code : String?;
34+
private var _code : String? = nil;
35+
36+
public var code : String? {
37+
get {
38+
return self._code;
39+
}
40+
set {
41+
self._code = newValue;
42+
}
43+
}
3544

3645
// Field of dateTime. Api error.
37-
public var dateTime : Date?;
46+
private var _dateTime : Date? = nil;
47+
48+
public var dateTime : Date? {
49+
get {
50+
return self._dateTime;
51+
}
52+
set {
53+
self._dateTime = newValue;
54+
}
55+
}
3856

3957
// Field of description. Api error.
40-
public var description : String?;
58+
private var _description : String? = nil;
59+
60+
public var description : String? {
61+
get {
62+
return self._description;
63+
}
64+
set {
65+
self._description = newValue;
66+
}
67+
}
4168

4269
// Field of innerError. Api error.
43-
public var innerError : ApiError?;
70+
private var _innerError : ApiError? = nil;
71+
72+
public var innerError : ApiError? {
73+
get {
74+
return self._innerError;
75+
}
76+
set {
77+
self._innerError = newValue;
78+
}
79+
}
4480

4581
// Field of message. Api error.
46-
public var message : String?;
82+
private var _message : String? = nil;
83+
84+
public var message : String? {
85+
get {
86+
return self._message;
87+
}
88+
set {
89+
self._message = newValue;
90+
}
91+
}
4792

4893
private enum CodingKeys: String, CodingKey {
4994
case code = "Code";
@@ -101,6 +146,7 @@ public class ApiError : Codable, WordsApiModel {
101146
return self.code;
102147
}
103148

149+
104150
// Sets dateTime. Gets or sets the server DateTime.
105151
public func setDateTime(dateTime : Date?) -> ApiError {
106152
self.dateTime = dateTime;
@@ -112,6 +158,7 @@ public class ApiError : Codable, WordsApiModel {
112158
return self.dateTime;
113159
}
114160

161+
115162
// Sets description. Gets or sets the error description.
116163
public func setDescription(description : String?) -> ApiError {
117164
self.description = description;
@@ -123,6 +170,7 @@ public class ApiError : Codable, WordsApiModel {
123170
return self.description;
124171
}
125172

173+
126174
// Sets innerError. Gets or sets the inner error.
127175
public func setInnerError(innerError : ApiError?) -> ApiError {
128176
self.innerError = innerError;
@@ -134,6 +182,7 @@ public class ApiError : Codable, WordsApiModel {
134182
return self.innerError;
135183
}
136184

185+
137186
// Sets message. Gets or sets the error message.
138187
public func setMessage(message : String?) -> ApiError {
139188
self.message = message;

Sources/AsposeWordsCloud/Model/AvailableFontsResponse.swift

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,40 @@ import Foundation
3131
@available(macOS 10.12, iOS 10.3, watchOS 3.3, tvOS 12.0, *)
3232
public class AvailableFontsResponse : WordsResponse {
3333
// Field of additionalFonts. The REST response with data on system, additional and custom fonts, available for document processing.
34-
public var additionalFonts : [FontInfo]?;
34+
private var _additionalFonts : [FontInfo]? = nil;
35+
36+
public var additionalFonts : [FontInfo]? {
37+
get {
38+
return self._additionalFonts;
39+
}
40+
set {
41+
self._additionalFonts = newValue;
42+
}
43+
}
3544

3645
// Field of customFonts. The REST response with data on system, additional and custom fonts, available for document processing.
37-
public var customFonts : [FontInfo]?;
46+
private var _customFonts : [FontInfo]? = nil;
47+
48+
public var customFonts : [FontInfo]? {
49+
get {
50+
return self._customFonts;
51+
}
52+
set {
53+
self._customFonts = newValue;
54+
}
55+
}
3856

3957
// Field of systemFonts. The REST response with data on system, additional and custom fonts, available for document processing.
40-
public var systemFonts : [FontInfo]?;
58+
private var _systemFonts : [FontInfo]? = nil;
59+
60+
public var systemFonts : [FontInfo]? {
61+
get {
62+
return self._systemFonts;
63+
}
64+
set {
65+
self._systemFonts = newValue;
66+
}
67+
}
4168

4269
private enum CodingKeys: String, CodingKey {
4370
case additionalFonts = "AdditionalFonts";
@@ -83,6 +110,7 @@ public class AvailableFontsResponse : WordsResponse {
83110
return self.additionalFonts;
84111
}
85112

113+
86114
// Sets customFonts. Gets or sets the list of custom user fonts from user cloud storage. To use them, you should specify "fontsLocation" parameter in any request.
87115
public func setCustomFonts(customFonts : [FontInfo]?) -> AvailableFontsResponse {
88116
self.customFonts = customFonts;
@@ -94,6 +122,7 @@ public class AvailableFontsResponse : WordsResponse {
94122
return self.customFonts;
95123
}
96124

125+
97126
// Sets systemFonts. Gets or sets the list of system fonts, available on the server.
98127
public func setSystemFonts(systemFonts : [FontInfo]?) -> AvailableFontsResponse {
99128
self.systemFonts = systemFonts;

0 commit comments

Comments
 (0)