From f714eb5d0812b41d6aeca2e2000dcf568f53b320 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Sun, 11 Dec 2022 19:52:18 +0100 Subject: [PATCH 1/3] Defined the "Dependencies" target and test target in the Libraries package. --- Libraries/Package.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Libraries/Package.swift b/Libraries/Package.swift index e38b3b0..14d92b0 100644 --- a/Libraries/Package.swift +++ b/Libraries/Package.swift @@ -15,6 +15,7 @@ let package = Package( ), ], dependencies: [ + .package(path: "../Cores"), .package( url: "https://github.com/kishikawakatsumi/KeychainAccess.git", from: "4.0.0" @@ -22,6 +23,13 @@ let package = Package( ], targets: [ .target(name: "APIService"), + .target( + name: "Dependencies", + dependencies: [ + "Cores", + "APIService" + ] + ), .target( name: "KeychainStorage", dependencies: [ @@ -32,6 +40,10 @@ let package = Package( name: "APIServiceTests", dependencies: ["APIService"] ), + .testTarget( + name: "DependenciesTests", + dependencies: ["Dependencies"] + ), .testTarget( name: "KeychainStorageTests", dependencies: ["KeychainStorage"] From cd4147ba754daa6d0703f1b1e3498082507f7d6a Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Sun, 11 Dec 2022 19:55:21 +0100 Subject: [PATCH 2/3] Fixed the library name in the file header of the Dependency Injection sources. --- .../DependencyInjection/Property Wrappers/Dependency.swift | 2 +- Cores/Sources/DependencyInjection/Protocols/DependencyKey.swift | 2 +- Cores/Sources/DependencyInjection/Structs/DependencyStore.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cores/Sources/DependencyInjection/Property Wrappers/Dependency.swift b/Cores/Sources/DependencyInjection/Property Wrappers/Dependency.swift index d8f21fd..56589a6 100644 --- a/Cores/Sources/DependencyInjection/Property Wrappers/Dependency.swift +++ b/Cores/Sources/DependencyInjection/Property Wrappers/Dependency.swift @@ -1,6 +1,6 @@ // // Dependency.swift -// DependencyService +// DependencyInjection // // Created by Javier Cicchelli on 05/12/2022. // Copyright © 2022 Röck+Cöde. All rights reserved. diff --git a/Cores/Sources/DependencyInjection/Protocols/DependencyKey.swift b/Cores/Sources/DependencyInjection/Protocols/DependencyKey.swift index da0254c..54f3aeb 100644 --- a/Cores/Sources/DependencyInjection/Protocols/DependencyKey.swift +++ b/Cores/Sources/DependencyInjection/Protocols/DependencyKey.swift @@ -1,6 +1,6 @@ // // DependencyKey.swift -// DependencyService +// DependencyInjection // // Created by Javier Cicchelli on 05/12/2022. // Copyright © 2022 Röck+Cöde. All rights reserved. diff --git a/Cores/Sources/DependencyInjection/Structs/DependencyStore.swift b/Cores/Sources/DependencyInjection/Structs/DependencyStore.swift index 88ad1e0..680cf69 100644 --- a/Cores/Sources/DependencyInjection/Structs/DependencyStore.swift +++ b/Cores/Sources/DependencyInjection/Structs/DependencyStore.swift @@ -1,6 +1,6 @@ // // DependencyStore.swift -// DependencyService +// DependencyInjection // // Created by Javier Cicchelli on 05/12/2022. // Copyright © 2022 Röck+Cöde. All rights reserved. From e1eb8435bc37d803dde5bc696fb568672a3a6f64 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Sun, 11 Dec 2022 19:57:13 +0100 Subject: [PATCH 3/3] Implemented the APIServiceKey dependency key and integrated it to the DependencyStore in the DependencyStore+Keys extension. --- .../xcshareddata/xcschemes/Libraries.xcscheme | 12 ++++++ .../Extensions/DependencyStore+Keys.swift | 17 ++++++++ .../Dependencies/Keys/APIServiceKey.swift | 14 +++++++ .../Cases/Dependencies+APIServiceTests.swift | 41 +++++++++++++++++++ .../KeychainStorage+InitTests.swift | 26 ++++++++---- 5 files changed, 101 insertions(+), 9 deletions(-) create mode 100644 Libraries/Sources/Dependencies/Extensions/DependencyStore+Keys.swift create mode 100644 Libraries/Sources/Dependencies/Keys/APIServiceKey.swift create mode 100644 Libraries/Tests/DependenciesTests/Cases/Dependencies+APIServiceTests.swift diff --git a/Libraries/.swiftpm/xcode/xcshareddata/xcschemes/Libraries.xcscheme b/Libraries/.swiftpm/xcode/xcshareddata/xcschemes/Libraries.xcscheme index d847438..dc8d94b 100644 --- a/Libraries/.swiftpm/xcode/xcshareddata/xcschemes/Libraries.xcscheme +++ b/Libraries/.swiftpm/xcode/xcshareddata/xcschemes/Libraries.xcscheme @@ -53,6 +53,18 @@ ReferencedContainer = "container:"> + + + +