From 4006a3570f35bb99fae1baeac97851bcbb3e93b8 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Mon, 13 Jan 2020 19:07:53 +0300 Subject: [PATCH 01/11] carthage without binaries --- Cartfile | 13 +++---------- Cartfile.resolved | 11 +++++------ 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/Cartfile b/Cartfile index dfea7fe..96c5d86 100644 --- a/Cartfile +++ b/Cartfile @@ -1,10 +1,3 @@ -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftDate/SwiftDate.json" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/LeadKit/LeadKit.json" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/Alamofire/Alamofire.json" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxAlamofire/RxAlamofire.json" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/KeychainAccess/KeychainAccess.json" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/CryptoSwift/CryptoSwift.json" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftValidator/SwiftValidator.json" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/TableKit/TableKit.json" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxSwift/RxSwift.json" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/UIScrollView_InfiniteScroll/UIScrollView_InfiniteScroll.json" +github "krzyzanowskim/CryptoSwift" +github "TouchInstinct/LeadKit" "0.9.15" +github "petropavel13/SwiftValidator" diff --git a/Cartfile.resolved b/Cartfile.resolved index e168b3e..057f7d1 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,10 +1,9 @@ binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/Alamofire/Alamofire.json" "4.8.1" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/CryptoSwift/CryptoSwift.json" "0.14.0" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/KeychainAccess/KeychainAccess.json" "3.2.0" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/LeadKit/LeadKit.json" "0.9.15" binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxAlamofire/RxAlamofire.json" "4.3.0" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxSwift/RxSwift.json" "4.4.2" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftDate/SwiftDate.json" "5.1.0" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftValidator/SwiftValidator.json" "5.0.0" +binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxSwift/RxSwift.json" "4.5.0" +binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftDate/SwiftDate.json" "6.0.3" binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/TableKit/TableKit.json" "2.10008.1" binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/UIScrollView_InfiniteScroll/UIScrollView_InfiniteScroll.json" "1.1.0" +github "TouchInstinct/LeadKit" "0.9.15" +github "krzyzanowskim/CryptoSwift" "1.3.0" +github "petropavel13/SwiftValidator" "5.0.0" From fc168d6d24cdd5d95c039cd54784eb91bad28361 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Tue, 14 Jan 2020 13:35:16 +0300 Subject: [PATCH 02/11] update dependencies, pin swiftlint version --- Cartfile | 2 +- Cartfile.resolved | 15 ++++++++------- LeadKitAdditions.xcodeproj/project.pbxproj | 2 +- download_swiftlint.sh | 12 ++++++++++++ 4 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 download_swiftlint.sh diff --git a/Cartfile b/Cartfile index 96c5d86..8beba06 100644 --- a/Cartfile +++ b/Cartfile @@ -1,3 +1,3 @@ github "krzyzanowskim/CryptoSwift" -github "TouchInstinct/LeadKit" "0.9.15" +github "TouchInstinct/LeadKit" "carthage_without_binary" github "petropavel13/SwiftValidator" diff --git a/Cartfile.resolved b/Cartfile.resolved index 057f7d1..6b5032f 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,9 +1,10 @@ -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/Alamofire/Alamofire.json" "4.8.1" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxAlamofire/RxAlamofire.json" "4.3.0" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/RxSwift/RxSwift.json" "4.5.0" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/SwiftDate/SwiftDate.json" "6.0.3" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/TableKit/TableKit.json" "2.10008.1" -binary "https://raw.github.com/TouchInstinct/CarthageBinaries/master/UIScrollView_InfiniteScroll/UIScrollView_InfiniteScroll.json" "1.1.0" -github "TouchInstinct/LeadKit" "0.9.15" +github "Alamofire/Alamofire" "4.9.1" +github "ReactiveX/RxSwift" "4.5.0" +github "RxSwiftCommunity/RxAlamofire" "4.5.0" +github "SnapKit/SnapKit" "4.2.0" +github "TouchInstinct/LeadKit" "1f6370fd73c79aea1dcc5f7e831ed58be834e7b7" +github "TouchInstinct/TableKit" "2.10008.1" github "krzyzanowskim/CryptoSwift" "1.3.0" +github "malcommac/SwiftDate" "6.1.0" github "petropavel13/SwiftValidator" "5.0.0" +github "pronebird/UIScrollView-InfiniteScroll" "1.1.0" diff --git a/LeadKitAdditions.xcodeproj/project.pbxproj b/LeadKitAdditions.xcodeproj/project.pbxproj index 1d65acf..9a328f7 100644 --- a/LeadKitAdditions.xcodeproj/project.pbxproj +++ b/LeadKitAdditions.xcodeproj/project.pbxproj @@ -369,7 +369,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml\n\nif which swiftlint >/dev/null; then\nswiftlint autocorrect --path Sources --config ${CONFIG_PATH} && swiftlint --path Sources --config ${CONFIG_PATH}\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + shellScript = "CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml\n\n. ${PROJECT_DIR}/download_swiftlint.sh\n\n${PROJECT_DIR}/Downloads/swiftlint autocorrect --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} && swiftlint --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH}\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/download_swiftlint.sh b/download_swiftlint.sh new file mode 100644 index 0000000..b731b36 --- /dev/null +++ b/download_swiftlint.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +SWIFTLINT_VERSION=0.31.0 +SWIFTLINT_PORTABLE_FILENAME=portable_swiftlint.zip + +SWIFTLINT_PORTABLE_URL=https://github.com/realm/SwiftLint/releases/download/${SWIFTLINT_VERSION}/${SWIFTLINT_PORTABLE_FILENAME} + +rm ${PROJECT_DIR}/Downloads/${SWIFTLINT_PORTABLE_FILENAME} + +. ${PROJECT_DIR}/build-scripts/xcode/aux_scripts/download_file.sh ${SWIFTLINT_PORTABLE_FILENAME} ${SWIFTLINT_PORTABLE_URL} + +cd Downloads && unzip -o ${SWIFTLINT_PORTABLE_FILENAME} \ No newline at end of file From 0f0a1861f112e4270ff7d8001ab9e63294e8aa11 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 15 Jan 2020 21:13:07 +0300 Subject: [PATCH 03/11] add forgotten KeychainAccess --- Cartfile | 1 + Cartfile.resolved | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cartfile b/Cartfile index 8beba06..42ca177 100644 --- a/Cartfile +++ b/Cartfile @@ -1,3 +1,4 @@ github "krzyzanowskim/CryptoSwift" github "TouchInstinct/LeadKit" "carthage_without_binary" github "petropavel13/SwiftValidator" +github "kishikawakatsumi/KeychainAccess" diff --git a/Cartfile.resolved b/Cartfile.resolved index 6b5032f..cd9552e 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -6,5 +6,6 @@ github "TouchInstinct/LeadKit" "1f6370fd73c79aea1dcc5f7e831ed58be834e7b7" github "TouchInstinct/TableKit" "2.10008.1" github "krzyzanowskim/CryptoSwift" "1.3.0" github "malcommac/SwiftDate" "6.1.0" -github "petropavel13/SwiftValidator" "5.0.0" +github "petropavel13/SwiftValidator" "be856202cd70e6549ebc8c9d07ec47bbff784b07" github "pronebird/UIScrollView-InfiniteScroll" "1.1.0" +github "kishikawakatsumi/KeychainAccess" "v3.2.0" From cb8a37f9c945cc76d480be9e3051eb2321b2c115 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 15 Jan 2020 21:13:13 +0300 Subject: [PATCH 04/11] add Romefile --- Romefile | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Romefile diff --git a/Romefile b/Romefile new file mode 100644 index 0000000..2151ab1 --- /dev/null +++ b/Romefile @@ -0,0 +1,2 @@ +cache: + local: ~/Library/Caches/Rome \ No newline at end of file From 8320179e0106e1913962237118730736570febfd Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 15 Jan 2020 22:01:54 +0300 Subject: [PATCH 05/11] fix linter warnings --- .../BaseTextFieldViewModel/BaseTextFieldViewModel.swift | 3 +-- Sources/Services/ValidationService/ValidationService.swift | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Sources/Classes/BaseTextFieldViewModel/BaseTextFieldViewModel.swift b/Sources/Classes/BaseTextFieldViewModel/BaseTextFieldViewModel.swift index 9e1b0e4..c0ebcdd 100644 --- a/Sources/Classes/BaseTextFieldViewModel/BaseTextFieldViewModel.swift +++ b/Sources/Classes/BaseTextFieldViewModel/BaseTextFieldViewModel.swift @@ -105,8 +105,7 @@ public extension BaseTextFieldViewModelEvents { } let passedRules = offlineRules - .map { $0.validate(nonEmptyString) } - .reduce(true) { $0 && $1 } + .allSatisfy { $0.validate(nonEmptyString) } guard passedRules else { return .just(.initial) diff --git a/Sources/Services/ValidationService/ValidationService.swift b/Sources/Services/ValidationService/ValidationService.swift index 29b39e2..5662744 100644 --- a/Sources/Services/ValidationService/ValidationService.swift +++ b/Sources/Services/ValidationService/ValidationService.swift @@ -71,7 +71,7 @@ public final class ValidationService { public func validate() -> Bool { validationStateReactType = .all - let isValid = validationItems.map { $0.manualValidate() }.reduce(true) { $0 && $1 } + let isValid = validationItems.allSatisfy { $0.manualValidate() } validationStateReactType = .each return isValid @@ -95,7 +95,7 @@ public final class ValidationService { stateObservables.forEach { observable in observable .map { states -> Bool in - states.map { $0.isValid }.reduce(true) { $0 && $1 } + states.allSatisfy { $0.isValid } } .map { $0 ? ValidationServiceState.valid : .invalid } .bind(to: stateHolder) From b91144f0ff2704705cb0c8ad4d31d4da71a9fae0 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 15 Jan 2020 22:03:05 +0300 Subject: [PATCH 06/11] update .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 653e319..5df8b4e 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,6 @@ fastlane/report.xml fastlane/Preview.html fastlane/screenshots fastlane/test_output + +# Touch Instinct custom +Downloads/ From 4fd075cbc8096712c259019c3e9edb9fb41bec46 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Thu, 16 Jan 2020 12:49:17 +0300 Subject: [PATCH 07/11] add PinLayout --- Cartfile | 1 + Cartfile.resolved | 1 + 2 files changed, 2 insertions(+) diff --git a/Cartfile b/Cartfile index 42ca177..3790436 100644 --- a/Cartfile +++ b/Cartfile @@ -2,3 +2,4 @@ github "krzyzanowskim/CryptoSwift" github "TouchInstinct/LeadKit" "carthage_without_binary" github "petropavel13/SwiftValidator" github "kishikawakatsumi/KeychainAccess" +github "layoutBox/PinLayout" diff --git a/Cartfile.resolved b/Cartfile.resolved index cd9552e..9fa9369 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -9,3 +9,4 @@ github "malcommac/SwiftDate" "6.1.0" github "petropavel13/SwiftValidator" "be856202cd70e6549ebc8c9d07ec47bbff784b07" github "pronebird/UIScrollView-InfiniteScroll" "1.1.0" github "kishikawakatsumi/KeychainAccess" "v3.2.0" +github "layoutBox/PinLayout" "1.8.6" From 131d3c7b7869f56e132d1d5e69198c58014e263d Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 22 Jan 2020 14:12:35 +0300 Subject: [PATCH 08/11] fix swiftlint --- LeadKitAdditions.xcodeproj/project.pbxproj | 2 +- build-scripts | 2 +- download_swiftlint.sh | 12 ------------ run_swiftlint.sh | 14 ++++++++++++++ 4 files changed, 16 insertions(+), 14 deletions(-) delete mode 100644 download_swiftlint.sh create mode 100644 run_swiftlint.sh diff --git a/LeadKitAdditions.xcodeproj/project.pbxproj b/LeadKitAdditions.xcodeproj/project.pbxproj index 9a328f7..186993c 100644 --- a/LeadKitAdditions.xcodeproj/project.pbxproj +++ b/LeadKitAdditions.xcodeproj/project.pbxproj @@ -369,7 +369,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml\n\n. ${PROJECT_DIR}/download_swiftlint.sh\n\n${PROJECT_DIR}/Downloads/swiftlint autocorrect --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} && swiftlint --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH}\n"; + shellScript = ". run_swiftlint.sh\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/build-scripts b/build-scripts index 54935bb..1f83bf5 160000 --- a/build-scripts +++ b/build-scripts @@ -1 +1 @@ -Subproject commit 54935bbe26063cdf04e72b8cb76d61c727ff99a7 +Subproject commit 1f83bf5d08bbc2c2346141621a42b2d2e0dd6517 diff --git a/download_swiftlint.sh b/download_swiftlint.sh deleted file mode 100644 index b731b36..0000000 --- a/download_swiftlint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -SWIFTLINT_VERSION=0.31.0 -SWIFTLINT_PORTABLE_FILENAME=portable_swiftlint.zip - -SWIFTLINT_PORTABLE_URL=https://github.com/realm/SwiftLint/releases/download/${SWIFTLINT_VERSION}/${SWIFTLINT_PORTABLE_FILENAME} - -rm ${PROJECT_DIR}/Downloads/${SWIFTLINT_PORTABLE_FILENAME} - -. ${PROJECT_DIR}/build-scripts/xcode/aux_scripts/download_file.sh ${SWIFTLINT_PORTABLE_FILENAME} ${SWIFTLINT_PORTABLE_URL} - -cd Downloads && unzip -o ${SWIFTLINT_PORTABLE_FILENAME} \ No newline at end of file diff --git a/run_swiftlint.sh b/run_swiftlint.sh new file mode 100644 index 0000000..01c1db0 --- /dev/null +++ b/run_swiftlint.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +readonly CONFIG_PATH=${PROJECT_DIR}/build-scripts/xcode/.swiftlint.yml + +readonly SWIFTLINT_VERSION=0.31.0 +readonly SWIFTLINT_PORTABLE_FILENAME=portable_swiftlint.zip + +readonly SWIFTLINT_PORTABLE_URL=https://github.com/realm/SwiftLint/releases/download/${SWIFTLINT_VERSION}/${SWIFTLINT_PORTABLE_FILENAME} + +. build-scripts/xcode/aux_scripts/download_file.sh ${SWIFTLINT_PORTABLE_FILENAME} ${SWIFTLINT_PORTABLE_URL} Downloads --remove-cached + +cd Downloads && unzip -o ${SWIFTLINT_PORTABLE_FILENAME} + +${PROJECT_DIR}/Downloads/swiftlint autocorrect --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} && ${PROJECT_DIR}/Downloads/swiftlint --path ${PROJECT_DIR}/Sources --config ${CONFIG_PATH} \ No newline at end of file From 4904449b854010e5f6e615a68e9d7069d0488f3b Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 22 Jan 2020 19:04:59 +0300 Subject: [PATCH 09/11] remove Romefile --- Romefile | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 Romefile diff --git a/Romefile b/Romefile deleted file mode 100644 index 2151ab1..0000000 --- a/Romefile +++ /dev/null @@ -1,2 +0,0 @@ -cache: - local: ~/Library/Caches/Rome \ No newline at end of file From ffffc847f7b686580f3514b3b08c97d1234aa7b2 Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 22 Jan 2020 20:06:33 +0300 Subject: [PATCH 10/11] update LeadKit version --- Cartfile | 2 +- Cartfile.resolved | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cartfile b/Cartfile index 3790436..c7be97c 100644 --- a/Cartfile +++ b/Cartfile @@ -1,5 +1,5 @@ github "krzyzanowskim/CryptoSwift" -github "TouchInstinct/LeadKit" "carthage_without_binary" +github "TouchInstinct/LeadKit" github "petropavel13/SwiftValidator" github "kishikawakatsumi/KeychainAccess" github "layoutBox/PinLayout" diff --git a/Cartfile.resolved b/Cartfile.resolved index 9fa9369..21c02ac 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -2,7 +2,7 @@ github "Alamofire/Alamofire" "4.9.1" github "ReactiveX/RxSwift" "4.5.0" github "RxSwiftCommunity/RxAlamofire" "4.5.0" github "SnapKit/SnapKit" "4.2.0" -github "TouchInstinct/LeadKit" "1f6370fd73c79aea1dcc5f7e831ed58be834e7b7" +github "TouchInstinct/LeadKit" "0.9.29" github "TouchInstinct/TableKit" "2.10008.1" github "krzyzanowskim/CryptoSwift" "1.3.0" github "malcommac/SwiftDate" "6.1.0" From 6daa551dd3b90591d2ba66fa868f57edee24e02d Mon Sep 17 00:00:00 2001 From: Ivan Smolin Date: Wed, 22 Jan 2020 20:07:27 +0300 Subject: [PATCH 11/11] update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b50fcf8..9bb9181 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### 0.3.14 +- **Update**: remove Carthage binary dependencies, update build scripts. + ### 0.3.13 - **[Breaking change]**: `LabelTableViewCell` moved to `LeadKit`. - **[Breaking change]**: Removed `PinLayout` dependency.