Skip to content

Commit

Permalink
Prepare for release v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
billp committed Dec 29, 2021
1 parent 006e205 commit 17ec894
Show file tree
Hide file tree
Showing 89 changed files with 1,527 additions and 3,584 deletions.
2 changes: 1 addition & 1 deletion TermiNetwork.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'TermiNetwork'
s.version = '2.1.1'
s.version = '3.0.0'
s.summary = 'A zero-dependency networking solution for building modern and secure iOS, watchOS, macOS and tvOS applications.'
s.homepage = 'https://github.com/billp/TermiNetwork.git'
s.license = 'MIT'
Expand Down
7 changes: 3 additions & 4 deletions TermiNetwork.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint --path \"./Tests\" --config \"$PROJECT_DIR/.swiftlint.yml\"\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
shellScript = "export PATH=\"/opt/homebrew/bin/:$PATH\"\nif which swiftlint >/dev/null; then\n swiftlint --path \"./Tests\" --config \"$PROJECT_DIR/.swiftlint.yml\"\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -960,7 +960,6 @@
F3116AB62460A09E00DFE453 /* UIImageView+Extensions.swift in Sources */,
F3AA5132256EA13E00D64D31 /* FileStreamer.swift in Sources */,
F309C0ED25A512AB00D10877 /* Request+ResponseTypes.swift in Sources */,
F3116AB72460A09E00DFE453 /* String+Extensions.swift in Sources */,
F3850CAE243D104900F7CC13 /* Configuration.swift in Sources */,
F3850CAA243D104900F7CC13 /* Path.swift in Sources */,
F32195B325782E1A000941F1 /* InterceptorProtocol.swift in Sources */,
Expand Down Expand Up @@ -1204,7 +1203,7 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.1.0;
MARKETING_VERSION = 3.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.billp.TermiNetwork;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
RESOURCES_TARGETED_DEVICE_FAMILY = "";
Expand Down Expand Up @@ -1236,7 +1235,7 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 2.1.0;
MARKETING_VERSION = 3.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.billp.TermiNetwork;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
RESOURCES_TARGETED_DEVICE_FAMILY = "";
Expand Down
10 changes: 5 additions & 5 deletions Tests/TestQueue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class TestQueue: XCTestCase {
let queue = Queue()
let expectation = XCTestExpectation(description: "testQueue")

queue.afterAllRequestsCallback = { error in
queue.afterAllRequestsCallback = { _ in
expectation.fulfill()
}

Expand Down Expand Up @@ -194,7 +194,7 @@ class TestQueue: XCTestCase {
expectation.fulfill()
}

queue.beforeEachRequestCallback = { req in
queue.beforeEachRequestCallback = { _ in
startedRequests += 1
}

Expand Down Expand Up @@ -224,7 +224,7 @@ class TestQueue: XCTestCase {
let queue = Queue()
let expectation = XCTestExpectation(description: "testQueueCancellation")

queue.afterAllRequestsCallback = { error in
queue.afterAllRequestsCallback = { _ in
DispatchQueue.main.asyncAfter(deadline: .now() + 2, execute: {
expectation.fulfill()
})
Expand Down Expand Up @@ -267,7 +267,7 @@ class TestQueue: XCTestCase {
numberOfRequests -= 1
}
.failure { error in
if case .cancelled(_) = error {
if case .cancelled = error {
} else {
numberOfRequests -= 1
}
Expand All @@ -288,7 +288,7 @@ class TestQueue: XCTestCase {
let expectation = XCTestExpectation(description: "testQueueFailureModeContinue")
queue.maxConcurrentOperationCount = 1

queue.afterAllRequestsCallback = { error in
queue.afterAllRequestsCallback = { _ in
DispatchQueue.main.asyncAfter(deadline: .now() + 2, execute: {
expectation.fulfill()
})
Expand Down
5 changes: 2 additions & 3 deletions Tests/TestRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class TestRequest: XCTestCase {
let queue = Queue()
var failed = true

queue.afterAllRequestsCallback = { error in
queue.afterAllRequestsCallback = { _ in
failed = queue.operations.count > 0
expectation.fulfill()
}
Expand Down Expand Up @@ -252,7 +252,7 @@ class TestRequest: XCTestCase {
var failed = true
Queue.shared.cancelAllOperations()

Queue.shared.afterEachRequestCallback = { call, data, URLResponse, error in
Queue.shared.afterEachRequestCallback = { _, _, _, _ in
failed = false
expectation.fulfill()
}
Expand Down Expand Up @@ -402,7 +402,6 @@ class TestRequest: XCTestCase {
expectation.fulfill()
}


wait(for: [expectation], timeout: 60)
XCTAssert(!failed)
}
Expand Down
1 change: 0 additions & 1 deletion Tests/TestTransformers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ class TestTransformers: XCTestCase {
XCTAssert(!failed)
}


func testGetParamsWithTransformerFailure() {
let expectation = XCTestExpectation(description: "testGetParamsWithTransformer")
var failed = true
Expand Down
91 changes: 45 additions & 46 deletions docs/Classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="index.html">
TermiNetwork 2.1.0 Docs
TermiNetwork 3.0.0 Docs
</a>
(100% documented)
</p>

<p class="header-col--secondary">
<div class="header-col--secondary">
<form role="search" action="search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>

<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/billp/TermiNetwork">
<img class="header-icon" src="img/gh.png"/>
<img class="header-icon" src="img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>

<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fbillp.github.io%2FTermiNetwork%2Fdocsets%2FTermiNetwork.xml">
<img class="header-icon" src="img/dash.png"/>
<img class="header-icon" src="img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>

<p class="breadcrumbs">
<a class="breadcrumb" href="index.html">TermiNetwork Reference</a>
<img class="carat" src="img/carat.png" />
<img class="carat" src="img/carat.png" alt=""/>
Classes Reference
</p>

Expand Down Expand Up @@ -273,13 +273,13 @@ <h4>Declaration</h4>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A configuration class that can be used with Environment, RouteConfiguration and Request.
<p>A configuration class that can be used with Environment, Router, Route and Request.
A configuration object follows the following rules:</p>

<ol>
<li>When a Configuration object is passed to a Environment,
each Router (with its routes) will inherit this configuration.</li>
<li>When a Configuration object is passed to Router, all its routes will inherit this configuration.</li>
<li>When a Configuration object is passed to an Environment,
each Router with its routes and requests will inherit this configuration.</li>
<li>When a Configuration object is passed to Router, all its routes and requests will inherit this configuration.</li>
</ol>

<a href="Classes/Configuration.html" class="slightly-smaller">See more</a>
Expand All @@ -296,42 +296,28 @@ <h4>Declaration</h4>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Enums"></a>
<a name="//apple_ref/swift/Section/Enums" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Enums"></a>
<h3 class="section-name"><p>Enums</p>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/c:@M@TermiNetwork@objc(cs)Request"></a>
<a name="//apple_ref/swift/Class/Request" class="dashAnchor"></a>
<a class="token" href="#/c:@M@TermiNetwork@objc(cs)Request">Request</a>
<a name="/s:12TermiNetwork11EnvironmentC"></a>
<a name="//apple_ref/swift/Class/Environment" class="dashAnchor"></a>
<a class="token" href="#/s:12TermiNetwork11EnvironmentC">Environment</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The core class of TermiNetwork. It handles the request creation and its execution.</p>
<p>The Environment contains information about host, port, configuration and it&rsquo;s used in Request instances.</p>

<a href="Classes/Request.html" class="slightly-smaller">See more</a>
<a href="Classes/Environment.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Request</span> <span class="p">:</span> <span class="kt"><a href="Classes/Operation.html">Operation</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Request</span><span class="p">:</span> <span class="kt">NSCopying</span></code></pre>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">Environment</span></code></pre>

</div>
</div>
Expand All @@ -341,54 +327,68 @@ <h4>Declaration</h4>
<li class="item">
<div>
<code>
<a name="/s:12TermiNetwork11EnvironmentC"></a>
<a name="//apple_ref/swift/Class/Environment" class="dashAnchor"></a>
<a class="token" href="#/s:12TermiNetwork11EnvironmentC">Environment</a>
<a name="/s:12TermiNetwork11TransformerC"></a>
<a name="//apple_ref/swift/Class/Transformer" class="dashAnchor"></a>
<a class="token" href="#/s:12TermiNetwork11TransformerC">Transformer</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The Environment contains information about host, port, configuration and it&rsquo;s used in Request instances.</p>
<p>Inherit this class as to create your transformers.
You should pass FromType and ToType (generic types) in your subclass definition.</p>

<a href="Classes/Environment.html" class="slightly-smaller">See more</a>
<a href="Classes/Transformer.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">Environment</span></code></pre>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">Transformer</span><span class="o">&lt;</span><span class="kt">FromType</span><span class="p">,</span> <span class="kt">ToType</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt">NSObject</span><span class="p">,</span> <span class="kt">TransformerProtocol</span></code></pre>

</div>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<div class="task-name-container">
<a name="/Enums"></a>
<a name="//apple_ref/swift/Section/Enums" class="dashAnchor"></a>
<div class="section-name-container">
<a class="section-name-link" href="#/Enums"></a>
<h3 class="section-name"><span>Enums</span>
</h3>
</div>
</div>
<ul class="item-container">
<li class="item">
<div>
<code>
<a name="/s:12TermiNetwork11TransformerC"></a>
<a name="//apple_ref/swift/Class/Transformer" class="dashAnchor"></a>
<a class="token" href="#/s:12TermiNetwork11TransformerC">Transformer</a>
<a name="/c:@M@TermiNetwork@objc(cs)Request"></a>
<a name="//apple_ref/swift/Class/Request" class="dashAnchor"></a>
<a class="token" href="#/c:@M@TermiNetwork@objc(cs)Request">Request</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Inherit this class as to create your transformers.
You should pass FromType and ToType (generic types) in your subclass definition.</p>
<p>The core class of TermiNetwork. It handles the request creation and its execution.</p>

<a href="Classes/Transformer.html" class="slightly-smaller">See more</a>
<a href="Classes/Request.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">Transformer</span><span class="o">&lt;</span><span class="kt">FromType</span><span class="p">,</span> <span class="kt">ToType</span><span class="o">&gt;</span> <span class="p">:</span> <span class="kt">NSObject</span><span class="p">,</span> <span class="kt">TransformerProtocol</span></code></pre>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Request</span> <span class="p">:</span> <span class="kt"><a href="Classes/Operation.html">Operation</a></span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">Request</span><span class="p">:</span> <span class="kt">NSCopying</span></code></pre>

</div>
</div>
Expand Down Expand Up @@ -543,9 +543,8 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://github.com/billp/TermiNetwork" target="_blank" rel="external">Vasilis Panagiotopoulos</a>. All rights reserved. (Last updated: 2021-02-02)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2021 <a class="link" href="https://github.com/billp/TermiNetwork" target="_blank" rel="external noopener">Vasilis Panagiotopoulos</a>. All rights reserved. (Last updated: 2021-12-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</div>
</html>
17 changes: 8 additions & 9 deletions docs/Classes/Cache.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="../index.html">
TermiNetwork 2.1.0 Docs
TermiNetwork 3.0.0 Docs
</a>
(100% documented)
</p>

<p class="header-col--secondary">
<div class="header-col--secondary">
<form role="search" action="../search.json">
<input type="text" placeholder="Search documentation" data-typeahead>
</form>
</p>
</div>

<p class="header-col header-col--secondary">
<a class="header-link" href="https://github.com/billp/TermiNetwork">
<img class="header-icon" src="../img/gh.png"/>
<img class="header-icon" src="../img/gh.png" alt="GitHub"/>
View on GitHub
</a>
</p>

<p class="header-col header-col--secondary">
<a class="header-link" href="dash-feed://https%3A%2F%2Fbillp.github.io%2FTermiNetwork%2Fdocsets%2FTermiNetwork.xml">
<img class="header-icon" src="../img/dash.png"/>
<img class="header-icon" src="../img/dash.png" alt="Dash"/>
Install in Dash
</a>
</p>
</header>

<p class="breadcrumbs">
<a class="breadcrumb" href="../index.html">TermiNetwork Reference</a>
<img class="carat" src="../img/carat.png" />
<img class="carat" src="../img/carat.png" alt=""/>
Cache Class Reference
</p>

Expand Down Expand Up @@ -359,9 +359,8 @@ <h4>Declaration</h4>
</article>
</div>
<section class="footer">
<p>&copy; 2021 <a class="link" href="https://github.com/billp/TermiNetwork" target="_blank" rel="external">Vasilis Panagiotopoulos</a>. All rights reserved. (Last updated: 2021-02-02)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
<p>&copy; 2021 <a class="link" href="https://github.com/billp/TermiNetwork" target="_blank" rel="external noopener">Vasilis Panagiotopoulos</a>. All rights reserved. (Last updated: 2021-12-29)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
</section>
</body>
</div>
</html>
Loading

0 comments on commit 17ec894

Please sign in to comment.