From cd36b0303e31eb88ad9e1def81683a7c85dba2b8 Mon Sep 17 00:00:00 2001 From: Okhan Okbay Date: Wed, 24 Jan 2024 19:15:04 +0000 Subject: [PATCH] Make request property of RequestConfiguration public-read and private-set --- .github/scripts/lintEditedFiles.sh | 2 +- .../HTTPMethod.swift | 0 .../MIMEType.swift | 0 .../{Configuration Models => ConfigurationModels}/Path.swift | 0 .../RequestConfiguration.swift | 4 ++-- 5 files changed, 3 insertions(+), 3 deletions(-) rename Sources/CheckoutNetwork/{Configuration Models => ConfigurationModels}/HTTPMethod.swift (100%) rename Sources/CheckoutNetwork/{Configuration Models => ConfigurationModels}/MIMEType.swift (100%) rename Sources/CheckoutNetwork/{Configuration Models => ConfigurationModels}/Path.swift (100%) rename Sources/CheckoutNetwork/{Configuration Models => ConfigurationModels}/RequestConfiguration.swift (98%) diff --git a/.github/scripts/lintEditedFiles.sh b/.github/scripts/lintEditedFiles.sh index f799125..2abdcdc 100644 --- a/.github/scripts/lintEditedFiles.sh +++ b/.github/scripts/lintEditedFiles.sh @@ -5,7 +5,7 @@ git fetch origin main echo "Fetched" # Use a conditional to check if there are edited files -if EDITED_FILES=$(git diff HEAD origin/main --name-only --diff-filter=d | grep "\.swift" | grep -v "\.swiftlint\.yml" | xargs echo | tr ' ' ',' | sed 's/,/, /g'); then +if EDITED_FILES=$(git diff HEAD origin/main --name-only --diff-filter=d | sed 's/ //g' | grep "\.swift" | grep -v "\.swiftlint\.yml" | xargs echo | tr ' ' ',' | sed 's/,/, /g'); then echo "Got edited files" echo $EDITED_FILES diff --git a/Sources/CheckoutNetwork/Configuration Models/HTTPMethod.swift b/Sources/CheckoutNetwork/ConfigurationModels/HTTPMethod.swift similarity index 100% rename from Sources/CheckoutNetwork/Configuration Models/HTTPMethod.swift rename to Sources/CheckoutNetwork/ConfigurationModels/HTTPMethod.swift diff --git a/Sources/CheckoutNetwork/Configuration Models/MIMEType.swift b/Sources/CheckoutNetwork/ConfigurationModels/MIMEType.swift similarity index 100% rename from Sources/CheckoutNetwork/Configuration Models/MIMEType.swift rename to Sources/CheckoutNetwork/ConfigurationModels/MIMEType.swift diff --git a/Sources/CheckoutNetwork/Configuration Models/Path.swift b/Sources/CheckoutNetwork/ConfigurationModels/Path.swift similarity index 100% rename from Sources/CheckoutNetwork/Configuration Models/Path.swift rename to Sources/CheckoutNetwork/ConfigurationModels/Path.swift diff --git a/Sources/CheckoutNetwork/Configuration Models/RequestConfiguration.swift b/Sources/CheckoutNetwork/ConfigurationModels/RequestConfiguration.swift similarity index 98% rename from Sources/CheckoutNetwork/Configuration Models/RequestConfiguration.swift rename to Sources/CheckoutNetwork/ConfigurationModels/RequestConfiguration.swift index 2947281..045ba5d 100644 --- a/Sources/CheckoutNetwork/Configuration Models/RequestConfiguration.swift +++ b/Sources/CheckoutNetwork/ConfigurationModels/RequestConfiguration.swift @@ -11,8 +11,8 @@ import Foundation public struct RequestConfiguration { /// Request created from the consumers configuration - let request: URLRequest - + private(set) public var request: URLRequest + /// Create request configuration with provided parameters. In case of failure will throw a `CheckoutNetworkError` /// /// - Parameter path: Should be an enum case that is able to generate URL for request