From a690802ee6aecbd21dd3c9b171f58d67e9fbc327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20Gu=CC=88ndu=CC=88z?= Date: Sun, 21 Feb 2021 19:40:25 +0100 Subject: [PATCH 1/4] Update formula to version 4.5.0 --- Formula/bartycrouch.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/bartycrouch.rb b/Formula/bartycrouch.rb index 640b1f17..f95a066a 100644 --- a/Formula/bartycrouch.rb +++ b/Formula/bartycrouch.rb @@ -1,7 +1,7 @@ class Bartycrouch < Formula desc "Incrementally update/translate your Strings files" homepage "https://github.com/Flinesoft/BartyCrouch" - url "https://github.com/Flinesoft/BartyCrouch.git", :tag => "4.4.1", :revision => "d0ea3568044e2348e5fa87b9fdbc9254561039e2" + url "https://github.com/Flinesoft/BartyCrouch.git", :tag => "4.5.0", :revision => "34ca469548e5ed8c39ddc394683b5cfcd510d866" head "https://github.com/Flinesoft/BartyCrouch.git" depends_on :xcode => ["12.0", :build] From bd4aa19f709e4879a5f7cb245383052d42b7e00c Mon Sep 17 00:00:00 2001 From: Matt Sanford Date: Wed, 28 Apr 2021 16:43:01 -0700 Subject: [PATCH 2/4] Add support for XCode 12.5, Swift 5.4 --- Package.resolved | 4 ++-- Package.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Package.resolved b/Package.resolved index f44aba4e..dd10338d 100644 --- a/Package.resolved +++ b/Package.resolved @@ -42,8 +42,8 @@ "repositoryURL": "https://github.com/apple/swift-syntax.git", "state": { "branch": null, - "revision": "844574d683f53d0737a9c6d706c3ef31ed2955eb", - "version": "0.50300.0" + "revision": "2fff9fc25cdc059379b6bd309377cfab45d8520c", + "version": "0.50400.0" } }, { diff --git a/Package.swift b/Package.swift index 99059cbc..d3302fa5 100644 --- a/Package.swift +++ b/Package.swift @@ -16,7 +16,7 @@ let package = Package( .package(name: "Rainbow", url: "https://github.com/onevcat/Rainbow.git", from: "3.1.5"), .package(name: "SwiftCLI", url: "https://github.com/jakeheis/SwiftCLI.git", from: "6.0.1"), .package(name: "Toml", url: "https://github.com/jdfergason/swift-toml.git", .branch("master")), - .package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .exact("0.50300.0")), + .package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", from: "0.50400.0") ], targets: [ .target( From e056e1869757f670252493b923218ced73af9c99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20Gu=CC=88ndu=CC=88z?= Date: Sat, 8 May 2021 21:19:25 +0200 Subject: [PATCH 3/4] Update dependencies + document new requirements --- .swiftlint.yml | 1 - CHANGELOG.md | 3 ++- Package.resolved | 6 +++--- README.md | 6 +++--- Sources/BartyCrouchTranslator/BartyCrouchTranslator.swift | 4 ++-- Sources/BartyCrouchTranslator/DeeplApi/DeepLApi.swift | 8 ++++---- .../MicrosoftTranslatorApi/MicrosoftTranslatorApi.swift | 8 ++++---- .../DeepLTranslatorApiTests.swift | 2 +- .../MicrosoftTranslatorApiTests.swift | 2 +- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.swiftlint.yml b/.swiftlint.yml index 3e530b55..4f5e8b79 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -43,7 +43,6 @@ opt_in_rules: - quick_discouraged_focused_test - quick_discouraged_pending_test - redundant_nil_coalescing -- redundant_type_annotation - single_test_class - sorted_first_last - sorted_imports diff --git a/CHANGELOG.md b/CHANGELOG.md index d44867d6..f5d409b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,8 @@ If needed, pluralize to `Tasks`, `PRs` or `Authors` and list multiple entries se ### Added - None. ### Changed -- None. +- Updated swift-syntax to match Swift 5.4 to support Xcode 12.5. + Issues: [#222](https://github.com/Flinesoft/BartyCrouch/issues/222) | PR: [#223](https://github.com/Flinesoft/BartyCrouch/pull/223) | Author: [Matt Sanford](https://github.com/mzsanford) ### Deprecated - None. ### Removed diff --git a/Package.resolved b/Package.resolved index dd10338d..b47fe533 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/Flinesoft/HandySwift.git", "state": { "branch": null, - "revision": "4f1f96beb8a4c45b01a2479d8cbaf91bda7d1cb5", - "version": "3.2.1" + "revision": "50b84f0fa735cae0e2bc3155609d4b00e2ce854c", + "version": "3.3.0" } }, { @@ -15,7 +15,7 @@ "repositoryURL": "https://github.com/Flinesoft/Microya.git", "state": { "branch": "main", - "revision": "29eb0d6fd650e99f33d26aaea44d18a042731ac5", + "revision": "fa994e12c0c0a383c66cb7fd644b9ec6ee534bf9", "version": null } }, diff --git a/README.md b/README.md index f07a0bfd..e53e0057 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ Version: 4.5.0 - Swift: 5.3 + Swift: 5.4 License: MIT @@ -58,7 +58,7 @@ Checkout [this blog post](https://medium.com/@Jeehut/localization-in-swift-like- ## Requirements -- Xcode 11.4+ & Swift 5.2+ +- Xcode 12.5+ & Swift 5.4+ - Xcode Command Line Tools (see [here](http://stackoverflow.com/a/9329325/3451975) for installation instructions) ## Getting Started diff --git a/Sources/BartyCrouchTranslator/BartyCrouchTranslator.swift b/Sources/BartyCrouchTranslator/BartyCrouchTranslator.swift index 4d888cdc..4eefa889 100644 --- a/Sources/BartyCrouchTranslator/BartyCrouchTranslator.swift +++ b/Sources/BartyCrouchTranslator/BartyCrouchTranslator.swift @@ -19,8 +19,8 @@ public final class BartyCrouchTranslator { case deepL(apiKey: String) } - private let microsoftProvider = ApiProvider() - private let deepLProvider = ApiProvider() + private let microsoftProvider = ApiProvider(baseUrl: MicrosoftTranslatorApi.baseUrl) + private let deepLProvider = ApiProvider(baseUrl: DeepLApi.baseUrl) private let translationService: TranslationService diff --git a/Sources/BartyCrouchTranslator/DeeplApi/DeepLApi.swift b/Sources/BartyCrouchTranslator/DeeplApi/DeepLApi.swift index fc6378e2..7ab78ca4 100644 --- a/Sources/BartyCrouchTranslator/DeeplApi/DeepLApi.swift +++ b/Sources/BartyCrouchTranslator/DeeplApi/DeepLApi.swift @@ -33,6 +33,10 @@ enum DeepLApi { extension DeepLApi: Endpoint { typealias ClientErrorType = DeepLTranslateErrorResponse + static var baseUrl: URL { + URL(string: "https://api.deepl.com")! + } + var decoder: JSONDecoder { let decoder = JSONDecoder() decoder.keyDecodingStrategy = .convertFromSnakeCase @@ -43,10 +47,6 @@ extension DeepLApi: Endpoint { JSONEncoder() } - var baseUrl: URL { - URL(string: "https://api.deepl.com")! - } - var subpath: String { switch self { case .translate: diff --git a/Sources/BartyCrouchTranslator/MicrosoftTranslatorApi/MicrosoftTranslatorApi.swift b/Sources/BartyCrouchTranslator/MicrosoftTranslatorApi/MicrosoftTranslatorApi.swift index 17646aa0..2f462ed5 100644 --- a/Sources/BartyCrouchTranslator/MicrosoftTranslatorApi/MicrosoftTranslatorApi.swift +++ b/Sources/BartyCrouchTranslator/MicrosoftTranslatorApi/MicrosoftTranslatorApi.swift @@ -33,6 +33,10 @@ enum MicrosoftTranslatorApi { extension MicrosoftTranslatorApi: Endpoint { typealias ClientErrorType = EmptyBodyResponse + static var baseUrl: URL { + return URL(string: "https://api.cognitive.microsofttranslator.com")! + } + var decoder: JSONDecoder { return JSONDecoder() } @@ -41,10 +45,6 @@ extension MicrosoftTranslatorApi: Endpoint { return JSONEncoder() } - var baseUrl: URL { - return URL(string: "https://api.cognitive.microsofttranslator.com")! - } - var subpath: String { switch self { case .translate: diff --git a/Tests/BartyCrouchTranslatorTests/DeepLTranslatorApiTests.swift b/Tests/BartyCrouchTranslatorTests/DeepLTranslatorApiTests.swift index 94be107b..ba15c743 100644 --- a/Tests/BartyCrouchTranslatorTests/DeepLTranslatorApiTests.swift +++ b/Tests/BartyCrouchTranslatorTests/DeepLTranslatorApiTests.swift @@ -15,7 +15,7 @@ class DeepLTranslatorApiTests: XCTestCase { apiKey: apiKey ) - let apiProvider = ApiProvider() + let apiProvider = ApiProvider(baseUrl: DeepLApi.baseUrl) switch apiProvider.performRequestAndWait(on: endpoint, decodeBodyTo: DeepLTranslateResponse.self) { case let .success(translateResponses): diff --git a/Tests/BartyCrouchTranslatorTests/MicrosoftTranslatorApiTests.swift b/Tests/BartyCrouchTranslatorTests/MicrosoftTranslatorApiTests.swift index 1502b455..7dbf99fd 100644 --- a/Tests/BartyCrouchTranslatorTests/MicrosoftTranslatorApiTests.swift +++ b/Tests/BartyCrouchTranslatorTests/MicrosoftTranslatorApiTests.swift @@ -21,7 +21,7 @@ class MicrosoftTranslatorApiTests: XCTestCase { microsoftSubscriptionKey: microsoftSubscriptionKey ) - let apiProvider = ApiProvider() + let apiProvider = ApiProvider(baseUrl: MicrosoftTranslatorApi.baseUrl) switch apiProvider.performRequestAndWait(on: endpoint, decodeBodyTo: [TranslateResponse].self) { case let .success(translateResponses): From c3b0ecd3d2ae3fbb3e4625316ec578b3942feee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20Gu=CC=88ndu=CC=88z?= Date: Sat, 8 May 2021 21:22:44 +0200 Subject: [PATCH 4/4] Bump version num & finalize new Changelog section --- BartyCrouch.podspec | 2 +- CHANGELOG.md | 8 ++++++-- README.md | 4 ++-- Sources/BartyCrouch/main.swift | 2 +- Sources/SupportingFiles/Info.plist | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/BartyCrouch.podspec b/BartyCrouch.podspec index beea0a87..a0ba8ba8 100644 --- a/BartyCrouch.podspec +++ b/BartyCrouch.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "BartyCrouch" - s.version = "4.5.0" + s.version = "4.6.0" s.summary = "Localization/I18n: Incrementally update/translate your Strings files from .swift, .h, .m(m), .storyboard or .xib files." s.description = <<-DESC diff --git a/CHANGELOG.md b/CHANGELOG.md index f5d409b2..91d1cd1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,8 +21,7 @@ If needed, pluralize to `Tasks`, `PRs` or `Authors` and list multiple entries se ### Added - None. ### Changed -- Updated swift-syntax to match Swift 5.4 to support Xcode 12.5. - Issues: [#222](https://github.com/Flinesoft/BartyCrouch/issues/222) | PR: [#223](https://github.com/Flinesoft/BartyCrouch/pull/223) | Author: [Matt Sanford](https://github.com/mzsanford) +- None. ### Deprecated - None. ### Removed @@ -32,6 +31,11 @@ If needed, pluralize to `Tasks`, `PRs` or `Authors` and list multiple entries se ### Security - None. +## [4.6.0] - 2021-05-08 +### Changed +- Updated swift-syntax to match Swift 5.4 to support Xcode 12.5. + Issues: [#222](https://github.com/Flinesoft/BartyCrouch/issues/222) | PR: [#223](https://github.com/Flinesoft/BartyCrouch/pull/223) | Author: [Matt Sanford](https://github.com/mzsanford) + ## [4.5.0] - 2021-02-21 ### Added - Add support for DeepL API as an alternative for Microsoft Translator API. diff --git a/README.md b/README.md index e53e0057..9df90912 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ - Version: 4.5.0 + Version: 4.6.0 Swift: 5.4 diff --git a/Sources/BartyCrouch/main.swift b/Sources/BartyCrouch/main.swift index 3e2689c8..0b593cc8 100644 --- a/Sources/BartyCrouch/main.swift +++ b/Sources/BartyCrouch/main.swift @@ -5,7 +5,7 @@ import SwiftCLI // MARK: - CLI let cli = CLI( name: "bartycrouch", - version: "4.5.0", + version: "4.6.0", description: "Incrementally update & translate your Strings files from code or interface files." ) diff --git a/Sources/SupportingFiles/Info.plist b/Sources/SupportingFiles/Info.plist index de912c9b..fb2fbdef 100644 --- a/Sources/SupportingFiles/Info.plist +++ b/Sources/SupportingFiles/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.5.0 + 4.6.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSHumanReadableCopyright