Renamed the BundleServicing protocol in the library target as Bundleable.
This commit is contained in:
parent
c08dbe5602
commit
d3283c912f
@ -1,5 +1,5 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
// MARK: - BundleServicing
|
// MARK: - Bundleable
|
||||||
|
|
||||||
extension Bundle: BundleServicing {}
|
extension Bundle: Bundleable {}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public protocol BundleServicing {
|
public protocol Bundleable {
|
||||||
|
|
||||||
// MARK: Functions
|
// MARK: Functions
|
||||||
|
|
@ -4,16 +4,16 @@ public struct CopyFilesTask {
|
|||||||
|
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
|
|
||||||
private let bundleService: BundleServicing
|
private let bundle: Bundleable
|
||||||
private let fileService: FileServicing
|
private let fileService: FileServicing
|
||||||
|
|
||||||
// MARK: Initialisers
|
// MARK: Initialisers
|
||||||
|
|
||||||
public init(
|
public init(
|
||||||
bundleService: BundleServicing? = nil,
|
bundle: Bundleable? = nil,
|
||||||
fileService: FileServicing
|
fileService: FileServicing
|
||||||
) {
|
) {
|
||||||
self.bundleService = bundleService ?? Bundle.module
|
self.bundle = bundle ?? Bundle.module
|
||||||
self.fileService = fileService
|
self.fileService = fileService
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ public struct CopyFilesTask {
|
|||||||
|
|
||||||
public func callAsFunction(to rootFolder: URL) async throws (FileServiceError) {
|
public func callAsFunction(to rootFolder: URL) async throws (FileServiceError) {
|
||||||
for file in File.allCases {
|
for file in File.allCases {
|
||||||
guard let source = bundleService.url(
|
guard let source = bundle.url(
|
||||||
forResource: file.rawValue,
|
forResource: file.rawValue,
|
||||||
withExtension: nil,
|
withExtension: nil,
|
||||||
subdirectory: file.resourcePath
|
subdirectory: file.resourcePath
|
||||||
|
Loading…
x
Reference in New Issue
Block a user