From d3283c912f91b557f7e0d70eddc0c89b258dbbfa Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Sat, 18 Jan 2025 19:52:40 +0100 Subject: [PATCH] Renamed the BundleServicing protocol in the library target as Bundleable. --- .../Sources/Internal/Extensions/Bundle+Conformances.swift | 4 ++-- .../Protocols/{BundleServicing.swift => Bundleable.swift} | 2 +- Library/Sources/Public/Tasks/CopyFilesTask.swift | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) rename Library/Sources/Public/Protocols/{BundleServicing.swift => Bundleable.swift} (82%) diff --git a/Library/Sources/Internal/Extensions/Bundle+Conformances.swift b/Library/Sources/Internal/Extensions/Bundle+Conformances.swift index 1dcd2e6..d8b5fbc 100644 --- a/Library/Sources/Internal/Extensions/Bundle+Conformances.swift +++ b/Library/Sources/Internal/Extensions/Bundle+Conformances.swift @@ -1,5 +1,5 @@ import Foundation -// MARK: - BundleServicing +// MARK: - Bundleable -extension Bundle: BundleServicing {} +extension Bundle: Bundleable {} diff --git a/Library/Sources/Public/Protocols/BundleServicing.swift b/Library/Sources/Public/Protocols/Bundleable.swift similarity index 82% rename from Library/Sources/Public/Protocols/BundleServicing.swift rename to Library/Sources/Public/Protocols/Bundleable.swift index f5a4734..308682e 100644 --- a/Library/Sources/Public/Protocols/BundleServicing.swift +++ b/Library/Sources/Public/Protocols/Bundleable.swift @@ -1,6 +1,6 @@ import Foundation -public protocol BundleServicing { +public protocol Bundleable { // MARK: Functions diff --git a/Library/Sources/Public/Tasks/CopyFilesTask.swift b/Library/Sources/Public/Tasks/CopyFilesTask.swift index 65fce3d..3888d05 100644 --- a/Library/Sources/Public/Tasks/CopyFilesTask.swift +++ b/Library/Sources/Public/Tasks/CopyFilesTask.swift @@ -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