Renamed the BundleServicing protocol in the library target as Bundleable.

This commit is contained in:
Javier Cicchelli 2025-01-18 19:52:40 +01:00
parent c08dbe5602
commit d3283c912f
3 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
import Foundation
// MARK: - BundleServicing
// MARK: - Bundleable
extension Bundle: BundleServicing {}
extension Bundle: Bundleable {}

View File

@ -1,6 +1,6 @@
import Foundation
public protocol BundleServicing {
public protocol Bundleable {
// MARK: Functions

View File

@ -4,16 +4,16 @@ public struct CopyFilesTask {
// MARK: Properties
private let bundleService: BundleServicing
private let bundle: Bundleable
private let fileService: FileServicing
// MARK: Initialisers
public init(
bundleService: BundleServicing? = nil,
bundle: Bundleable? = nil,
fileService: FileServicing
) {
self.bundleService = bundleService ?? Bundle.module
self.bundle = bundle ?? Bundle.module
self.fileService = fileService
}
@ -21,7 +21,7 @@ public struct CopyFilesTask {
public func callAsFunction(to rootFolder: URL) async throws (FileServiceError) {
for file in File.allCases {
guard let source = bundleService.url(
guard let source = bundle.url(
forResource: file.rawValue,
withExtension: nil,
subdirectory: file.resourcePath