Skip to content

Commit 04be331

Browse files
committed
Fix broken build & refactoring
1 parent 416d2aa commit 04be331

18 files changed

Lines changed: 70 additions & 67 deletions

Examples/Screens/City Explorer/CityExplorerDetails.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ struct CityDetailsEntry: View {
8282
Text(city.description ?? "")
8383
.font(.body)
8484
}
85-
.padding([.leading, .trailing, .bottom], 20)
85+
.padding([.leading, .trailing, .bottom, .top], 20)
8686
}
8787
}
8888

Examples/Screens/City Explorer/CityExplorerView.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ struct CityRow: View {
9292
}
9393

9494
var thumbView: AnyView {
95-
96-
9795
let request = Router<CityRoute>().request(for: .thumb(city: city))
9896
return AnyView(
9997
TermiNetwork.Image(withRequest: request, resize: CGSize(width: thumbWidth * UIScreen.main.scale,

Examples/Screens/ContentView.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ struct ContentView: View {
3939
DemoAppRow(app: app)
4040
}
4141
}
42-
.navigationTitle(Text("TermiNetwork"))
42+
.navigationBarTitleDisplayMode(.inline)
43+
.toolbar(content: {
44+
ToolbarItem(placement: .principal, content: {
45+
Text("Widget").bold()
46+
})
47+
})
4348
}
4449
}
4550
}

Examples/Screens/Middlewares/EncryptedCommunicationView.swift renamed to Examples/Screens/Encrypted Communication/EncryptedCommunicationView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct EncryptedCommunicationView: View {
5858
.padding(.bottom, 20)
5959

6060
}
61-
.padding([.leading, .trailing], 20)
61+
.padding([.leading, .trailing, .top], 20)
6262
.navigationTitle("Encryption Layer")
6363
}
6464

Examples/Screens/File Downloader/FileDownloader.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct FileDownloader: View {
6868
action: downloadAction)
6969
.padding(.bottom, 20)
7070
}
71-
.padding([.leading, .trailing], 20)
71+
.padding([.leading, .trailing, .top], 20)
7272
.navigationTitle("File Downloader")
7373
.onDisappear(perform: clearAndCancelDownload)
7474
}

Examples/Screens/File Uploader/FileUploader.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ struct FileUploader: View {
109109
.padding(.bottom, 20)
110110

111111
}
112-
.padding([.leading, .trailing], 20)
112+
.padding([.leading, .trailing, .top], 20)
113113
.navigationTitle("File Uploader")
114114
.onDisappear(perform: clearAndCancelUpload)
115115
}

Examples/Screens/Pinning/CertificatePinningView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct CertificatePinningView: View {
4646
UIHelpers.button("Start Request", action: startRequest)
4747
.padding(.bottom, 20)
4848
}
49-
.padding([.leading, .trailing], 20)
49+
.padding([.leading, .trailing, .top], 20)
5050
.navigationTitle("Certificate Pinning")
5151
}
5252

TermiNetwork.xcodeproj/project.pbxproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
F383AEAD257ED51500DE43FA /* forums.swift.org.cer in Resources */ = {isa = PBXBuildFile; fileRef = F383AEAB257ED51500DE43FA /* forums.swift.org.cer */; };
6969
F383AEAE257ED51500DE43FA /* herokuapp.com.cer in Resources */ = {isa = PBXBuildFile; fileRef = F383AEAC257ED51500DE43FA /* herokuapp.com.cer */; };
7070
F3850C87243D103700F7CC13 /* TestExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3850C79243D103700F7CC13 /* TestExtensions.swift */; };
71-
F3850C88243D103700F7CC13 /* Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3850C7A243D103700F7CC13 /* Environment.swift */; };
71+
F3850C88243D103700F7CC13 /* Env.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3850C7A243D103700F7CC13 /* Env.swift */; };
7272
F3850C89243D103700F7CC13 /* TestTNQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3850C7B243D103700F7CC13 /* TestTNQueue.swift */; };
7373
F3850C8A243D103700F7CC13 /* TestTNEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3850C7C243D103700F7CC13 /* TestTNEnvironment.swift */; };
7474
F3850C8B243D103700F7CC13 /* APIRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3850C7D243D103700F7CC13 /* APIRoute.swift */; };
@@ -207,7 +207,7 @@
207207
F383AEAB257ED51500DE43FA /* forums.swift.org.cer */ = {isa = PBXFileReference; lastKnownFileType = file; name = forums.swift.org.cer; path = Tests/forums.swift.org.cer; sourceTree = SOURCE_ROOT; };
208208
F383AEAC257ED51500DE43FA /* herokuapp.com.cer */ = {isa = PBXFileReference; lastKnownFileType = file; name = herokuapp.com.cer; path = Tests/herokuapp.com.cer; sourceTree = SOURCE_ROOT; };
209209
F3850C79243D103700F7CC13 /* TestExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestExtensions.swift; sourceTree = "<group>"; };
210-
F3850C7A243D103700F7CC13 /* Environment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Environment.swift; sourceTree = "<group>"; };
210+
F3850C7A243D103700F7CC13 /* Env.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Env.swift; sourceTree = "<group>"; };
211211
F3850C7B243D103700F7CC13 /* TestTNQueue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestTNQueue.swift; sourceTree = "<group>"; };
212212
F3850C7C243D103700F7CC13 /* TestTNEnvironment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestTNEnvironment.swift; sourceTree = "<group>"; };
213213
F3850C7D243D103700F7CC13 /* APIRoute.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIRoute.swift; sourceTree = "<group>"; };
@@ -441,12 +441,12 @@
441441
path = "Error Handlers";
442442
sourceTree = "<group>";
443443
};
444-
F3211EC4258018E40085E873 /* Middlewares */ = {
444+
F3211EC4258018E40085E873 /* Encrypted Communication */ = {
445445
isa = PBXGroup;
446446
children = (
447447
F3211EC5258019280085E873 /* EncryptedCommunicationView.swift */,
448448
);
449-
path = Middlewares;
449+
path = "Encrypted Communication";
450450
sourceTree = "<group>";
451451
};
452452
F32195B625783EBB000941F1 /* ErrorHandlers */ = {
@@ -478,7 +478,7 @@
478478
children = (
479479
F363507E25894A77002AF5DE /* File Uploader */,
480480
F33ACF52258809FB004DAC46 /* File Downloader */,
481-
F3211EC4258018E40085E873 /* Middlewares */,
481+
F3211EC4258018E40085E873 /* Encrypted Communication */,
482482
F383AE99257ECBF900DE43FA /* Pinning */,
483483
F37A17F0257D2927003EFB1F /* City Explorer */,
484484
F33ACF5E25880ABD004DAC46 /* UIHelpers.swift */,
@@ -601,7 +601,7 @@
601601
F387B0FA2579590C00A8C0C7 /* Communication */ = {
602602
isa = PBXGroup;
603603
children = (
604-
F3850C7A243D103700F7CC13 /* Environment.swift */,
604+
F3850C7A243D103700F7CC13 /* Env.swift */,
605605
F3850C7D243D103700F7CC13 /* APIRoute.swift */,
606606
);
607607
name = Communication;
@@ -944,7 +944,7 @@
944944
F3850C8C243D103700F7CC13 /* TestParams.swift in Sources */,
945945
F387B0ED2579531200A8C0C7 /* TestTransformer.swift in Sources */,
946946
F31126AD257A563600775D7E /* FileResponse.swift in Sources */,
947-
F3850C88243D103700F7CC13 /* Environment.swift in Sources */,
947+
F3850C88243D103700F7CC13 /* Env.swift in Sources */,
948948
F32C3D13243E499E004497BC /* TestPinning.swift in Sources */,
949949
F3AA5147256EF53000D64D31 /* TestHelpers.swift in Sources */,
950950
F3850C8D243D103700F7CC13 /* TestJSONParams.swift in Sources */,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// TestsEnvironment.swift
1+
// Env.swift
22
//
33
// Copyright © 2018-2021 Vasilis Panagiotopoulos. All rights reserved.
44
//
@@ -22,7 +22,7 @@ import TermiNetwork
2222

2323
// swiftlint:disable function_body_length
2424

25-
enum TestsEnvironment: EnvironmentProtocol {
25+
enum Env: EnvironmentProtocol {
2626
case httpHost
2727
case httpHostWithPort
2828
case httpHostWithPortAndSuffix

Tests/TestDownloadOperations.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ class TestDownloadOperations: XCTestCase {
2727
}()
2828

2929
lazy var router: Router<APIRoute> = {
30-
return Router<APIRoute>(environment: TestsEnvironment.termiNetworkRemote,
30+
return Router<APIRoute>(environment: Env.termiNetworkRemote,
3131
configuration: configuration)
3232
}()
3333

3434
override func setUp() {
3535
super.setUp()
3636
// Put setup code here. This method is called before the invocation of each test method in the class.
37-
Environment.set(TestsEnvironment.termiNetworkLocal)
37+
Environment.set(Env.termiNetworkLocal)
3838
}
3939

4040
override func tearDown() {

0 commit comments

Comments
 (0)