From 8fec220fdd1c48c624d8bfde28692d719811188e Mon Sep 17 00:00:00 2001 From: Shohei-Yamamoto Date: Sun, 27 Sep 2020 18:30:56 +0900 Subject: [PATCH 01/11] Refactor unit testing --- .../MonsterListPresenterTests.swift | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/UhooiPicBookTests/Modules/MonsterList/Presenters/MonsterListPresenterTests.swift b/UhooiPicBookTests/Modules/MonsterList/Presenters/MonsterListPresenterTests.swift index 928601ed..8332db82 100644 --- a/UhooiPicBookTests/Modules/MonsterList/Presenters/MonsterListPresenterTests.swift +++ b/UhooiPicBookTests/Modules/MonsterList/Presenters/MonsterListPresenterTests.swift @@ -82,18 +82,18 @@ final class MonsterListPresenterTests: XCTestCase { } func test_viewDidLoad_newLine() { - typealias TestCase = (line: UInt, description: String, expect: String) + typealias TestCase = (description: String, expected: String, line: UInt) let testCases: [TestCase] = [ - (#line, "", "" ), - (#line, "¥¥n", "¥¥n" ), - (#line, "\n", "\n" ), - (#line, "\\n", "\n" ), - // (#line, "\\\n", "\\n" ), - (#line, "\\n\\n", "\n\n" ), - (#line, "test\\nuhooi", "test\nuhooi" ), + ("", "" , #line), + ("¥¥n", "¥¥n" , #line), + ("\n", "\n" , #line), + ("\\n", "\n" , #line), + // ("\\\n", "\\n" ,#line), + ("\\n\\n", "\n\n" , #line), + ("test\\nuhooi", "test\nuhooi" , #line), ] - for (line, description, expect) in testCases { + for (description, expected, line) in testCases { reset() let monsterDTO = MonsterDTO( name: "monster's name", @@ -107,7 +107,7 @@ final class MonsterListPresenterTests: XCTestCase { completion(.success([monsterDTO])) } self.viewMock.showMonstersHandler = { monsters in - XCTAssertEqual(monsters[0].description, expect, line: line) + XCTAssertEqual(monsters[0].description, expected, line: line) } self.presenter.viewDidLoad() From 2b981ae6e0f738de1e7b654d59b3ac875e699794 Mon Sep 17 00:00:00 2001 From: 417-72KI <417.72ki@gmail.com> Date: Fri, 25 Sep 2020 17:00:40 +0900 Subject: [PATCH 02/11] move `*Info.plist` to Resources --- UhooiPicBook/{ => Resources}/GoogleService-Info.plist | 0 UhooiPicBook/{ => Resources}/Info.plist | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename UhooiPicBook/{ => Resources}/GoogleService-Info.plist (100%) rename UhooiPicBook/{ => Resources}/Info.plist (100%) diff --git a/UhooiPicBook/GoogleService-Info.plist b/UhooiPicBook/Resources/GoogleService-Info.plist similarity index 100% rename from UhooiPicBook/GoogleService-Info.plist rename to UhooiPicBook/Resources/GoogleService-Info.plist diff --git a/UhooiPicBook/Info.plist b/UhooiPicBook/Resources/Info.plist similarity index 100% rename from UhooiPicBook/Info.plist rename to UhooiPicBook/Resources/Info.plist From 82e696c08348684ddac060f21719401d73f803cf Mon Sep 17 00:00:00 2001 From: 417-72KI <417.72ki@gmail.com> Date: Mon, 28 Sep 2020 09:21:43 +0900 Subject: [PATCH 03/11] move entitlements --- UhooiPicBook/{ => Resources}/UhooiPicBook.entitlements | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename UhooiPicBook/{ => Resources}/UhooiPicBook.entitlements (100%) diff --git a/UhooiPicBook/UhooiPicBook.entitlements b/UhooiPicBook/Resources/UhooiPicBook.entitlements similarity index 100% rename from UhooiPicBook/UhooiPicBook.entitlements rename to UhooiPicBook/Resources/UhooiPicBook.entitlements From c07e87716b013d665187d9cd14fdd3b533dc64fc Mon Sep 17 00:00:00 2001 From: 417-72KI <417.72ki@gmail.com> Date: Mon, 28 Sep 2020 11:07:06 +0900 Subject: [PATCH 04/11] move LaunchScreen --- UhooiPicBook/{ => Resources}/Base.lproj/LaunchScreen.storyboard | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename UhooiPicBook/{ => Resources}/Base.lproj/LaunchScreen.storyboard (100%) diff --git a/UhooiPicBook/Base.lproj/LaunchScreen.storyboard b/UhooiPicBook/Resources/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from UhooiPicBook/Base.lproj/LaunchScreen.storyboard rename to UhooiPicBook/Resources/Base.lproj/LaunchScreen.storyboard From 7bcf7262b5daed1cf927ff441cf79c52128da1e8 Mon Sep 17 00:00:00 2001 From: 417-72KI <417.72ki@gmail.com> Date: Fri, 25 Sep 2020 17:00:50 +0900 Subject: [PATCH 05/11] apply to project.yml --- project.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project.yml b/project.yml index d1126bfa..33871d0a 100644 --- a/project.yml +++ b/project.yml @@ -30,8 +30,8 @@ targets: MARKETING_VERSION: 1.1.0 CURRENT_PROJECT_VERSION: 9 DEVELOPMENT_TEAM: 47E56DYP3N - INFOPLIST_FILE: UhooiPicBook/Info.plist - CODE_SIGN_ENTITLEMENTS: UhooiPicBook/UhooiPicBook.entitlements + INFOPLIST_FILE: UhooiPicBook/Resources/Info.plist + CODE_SIGN_ENTITLEMENTS: UhooiPicBook/Resources/UhooiPicBook.entitlements OTHER_LDFLAGS: $(inherited) $(OTHER_LDFLAGS) -ObjC DEVELOPMENT_LANGUAGE: jp dependencies: From 1e9e02f5cb53dfd613a7e45d99409fffbd6d27e8 Mon Sep 17 00:00:00 2001 From: takehito koshimizu Date: Fri, 2 Oct 2020 20:49:47 +0900 Subject: [PATCH 06/11] fix #98 --- .../Views/MonsterDetail.storyboard | 123 ++++++++++++------ 1 file changed, 80 insertions(+), 43 deletions(-) diff --git a/UhooiPicBook/Modules/MonsterDetail/Views/MonsterDetail.storyboard b/UhooiPicBook/Modules/MonsterDetail/Views/MonsterDetail.storyboard index c013b929..9326a6b9 100644 --- a/UhooiPicBook/Modules/MonsterDetail/Views/MonsterDetail.storyboard +++ b/UhooiPicBook/Modules/MonsterDetail/Views/MonsterDetail.storyboard @@ -1,9 +1,11 @@ - + - + + + @@ -15,49 +17,78 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + - + + + - + + - - - - - - - - + + + + - @@ -68,10 +99,10 @@ - - - - + + + + @@ -80,6 +111,12 @@ - + + + + + + + From e57e777155bba5cc5b5dae7ab923ef319be6170e Mon Sep 17 00:00:00 2001 From: uhooi Date: Sat, 3 Oct 2020 19:13:57 +0900 Subject: [PATCH 07/11] Bump XcodeGen to 2.18.0 --- Mintfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mintfile b/Mintfile index 992b4086..e93582b2 100644 --- a/Mintfile +++ b/Mintfile @@ -1,5 +1,5 @@ Carthage/Carthage@0.36.0 -yonaskolb/xcodegen@2.17.0 +yonaskolb/xcodegen@2.18.0 realm/SwiftLint@0.40.3 fromkk/SpellChecker@0.0.3 uber/mockolo@1.2.8 From e8928e03983348f72723be8ca360747d58063a4e Mon Sep 17 00:00:00 2001 From: uhooi Date: Sat, 3 Oct 2020 20:41:59 +0900 Subject: [PATCH 08/11] Replace instruments to xctrace --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9de4475f..7b1aa126 100644 --- a/Makefile +++ b/Makefile @@ -136,5 +136,5 @@ get-coverage: # Get code coverage .PHONY: show-devices show-devices: # Show devices - instruments -s devices + xcrun xctrace list devices From dea88b44b0d6ed23cf71e18943f080a1eae40176 Mon Sep 17 00:00:00 2001 From: uhooi Date: Sat, 3 Oct 2020 21:27:17 +0900 Subject: [PATCH 09/11] Add license info --- Makefile | 2 +- UhooiPicBook/Settings.bundle/Root.plist | 19 ++++++++++++++++++ .../Settings.bundle/en.lproj/Root.strings | Bin 0 -> 546 bytes 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 UhooiPicBook/Settings.bundle/Root.plist create mode 100644 UhooiPicBook/Settings.bundle/en.lproj/Root.strings diff --git a/Makefile b/Makefile index 7b1aa126..839b7723 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ install-templates: # Install Generamba templates .PHONY: generate-licenses generate-licenses: # Generate licenses with LicensePlist and regenerate project - mint run LicensePlist license-plist --output-path ${PRODUCT_NAME}/Settings.bundle + mint run LicensePlist license-plist --output-path ${PRODUCT_NAME}/Settings.bundle --add-version-numbers $(MAKE) generate-xcodeproj .PHONY: generate-module diff --git a/UhooiPicBook/Settings.bundle/Root.plist b/UhooiPicBook/Settings.bundle/Root.plist new file mode 100644 index 00000000..c5017883 --- /dev/null +++ b/UhooiPicBook/Settings.bundle/Root.plist @@ -0,0 +1,19 @@ + + + + + StringsTable + Root + PreferenceSpecifiers + + + Type + PSChildPaneSpecifier + Title + Licenses + File + com.mono0926.LicensePlist + + + + diff --git a/UhooiPicBook/Settings.bundle/en.lproj/Root.strings b/UhooiPicBook/Settings.bundle/en.lproj/Root.strings new file mode 100644 index 0000000000000000000000000000000000000000..8cd87b9d6b20c1fbf87bd4db3db267fca5ad4df9 GIT binary patch literal 546 zcmaixOHRW;5JYRuDMndFh#Ua1V1d}N;sVAV2TO?uC3a9aJn*VxFrY}tnon0(S66#J z-d9>G>6W!ur(SDqlp`9nn~*(m%iWnv?yq`Qfp6XbK1?+om~~#r)ZnhkYQU_VbfjuT zHNn`CX<0sd*m1A}>&5sU$akD=GTXJ1e literal 0 HcmV?d00001 From 83815cbbd40feb0d4f010c611293cd3f9a8473c2 Mon Sep 17 00:00:00 2001 From: Shohei-Yamamoto Date: Sat, 3 Oct 2020 21:33:25 +0900 Subject: [PATCH 10/11] Replace test methods name Replace setUp() with setUpWithError() Replace tearDown() with tearDownWithError() --- .../Interactors/MonsterDetailInteractorTests.swift | 4 ++-- .../Presenters/MonsterDetailPresenterTests.swift | 4 ++-- .../MonsterList/Interactors/MonsterListInteractorTests.swift | 4 ++-- .../MonsterList/Presenters/MonsterListPresenterTests.swift | 4 ++-- .../Repository/Temp/UserDefaultsClientTests.swift | 4 ++-- UhooiPicBookUITests/TestCases/UhooiPicBookUITests.swift | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/UhooiPicBookTests/Modules/MonsterDetail/Interactors/MonsterDetailInteractorTests.swift b/UhooiPicBookTests/Modules/MonsterDetail/Interactors/MonsterDetailInteractorTests.swift index 8fabc3d1..f7be27f3 100644 --- a/UhooiPicBookTests/Modules/MonsterDetail/Interactors/MonsterDetailInteractorTests.swift +++ b/UhooiPicBookTests/Modules/MonsterDetail/Interactors/MonsterDetailInteractorTests.swift @@ -18,11 +18,11 @@ final class MonsterDetailInteractorTests: XCTestCase { // MARK: TestCase Life-Cycle Methods - override func setUp() { + override func setUpWithError() throws { reset() } - override func tearDown() { + override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } diff --git a/UhooiPicBookTests/Modules/MonsterDetail/Presenters/MonsterDetailPresenterTests.swift b/UhooiPicBookTests/Modules/MonsterDetail/Presenters/MonsterDetailPresenterTests.swift index 6ad3845a..8b373745 100644 --- a/UhooiPicBookTests/Modules/MonsterDetail/Presenters/MonsterDetailPresenterTests.swift +++ b/UhooiPicBookTests/Modules/MonsterDetail/Presenters/MonsterDetailPresenterTests.swift @@ -20,11 +20,11 @@ final class MonsterDetailPresenterTests: XCTestCase { // MARK: TestCase Life-Cycle Methods - override func setUp() { + override func setUpWithError() throws { reset() } - override func tearDown() { + override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } diff --git a/UhooiPicBookTests/Modules/MonsterList/Interactors/MonsterListInteractorTests.swift b/UhooiPicBookTests/Modules/MonsterList/Interactors/MonsterListInteractorTests.swift index 9e020bf1..901ae50e 100644 --- a/UhooiPicBookTests/Modules/MonsterList/Interactors/MonsterListInteractorTests.swift +++ b/UhooiPicBookTests/Modules/MonsterList/Interactors/MonsterListInteractorTests.swift @@ -21,11 +21,11 @@ final class MonsterListInteractorTests: XCTestCase { // MARK: TestCase Life-Cycle Methods - override func setUp() { + override func setUpWithError() throws { reset() } - override func tearDown() { + override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } diff --git a/UhooiPicBookTests/Modules/MonsterList/Presenters/MonsterListPresenterTests.swift b/UhooiPicBookTests/Modules/MonsterList/Presenters/MonsterListPresenterTests.swift index 8332db82..ac63a246 100644 --- a/UhooiPicBookTests/Modules/MonsterList/Presenters/MonsterListPresenterTests.swift +++ b/UhooiPicBookTests/Modules/MonsterList/Presenters/MonsterListPresenterTests.swift @@ -20,11 +20,11 @@ final class MonsterListPresenterTests: XCTestCase { // MARK: TestCase Life-Cycle Methods - override func setUp() { + override func setUpWithError() throws { reset() } - override func tearDown() { + override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } diff --git a/UhooiPicBookTests/Repository/Temp/UserDefaultsClientTests.swift b/UhooiPicBookTests/Repository/Temp/UserDefaultsClientTests.swift index ce6ca434..09b28e66 100644 --- a/UhooiPicBookTests/Repository/Temp/UserDefaultsClientTests.swift +++ b/UhooiPicBookTests/Repository/Temp/UserDefaultsClientTests.swift @@ -16,11 +16,11 @@ final class UserDefaultsClientTests: XCTestCase { // MARK: TestCase Life-Cycle Methods - override func setUp() { + override func setUpWithError() throws { reset() } - override func tearDown() { + override func tearDownWithError() throws { } // MARK: - Test Methods diff --git a/UhooiPicBookUITests/TestCases/UhooiPicBookUITests.swift b/UhooiPicBookUITests/TestCases/UhooiPicBookUITests.swift index 0c2b062c..87880d57 100644 --- a/UhooiPicBookUITests/TestCases/UhooiPicBookUITests.swift +++ b/UhooiPicBookUITests/TestCases/UhooiPicBookUITests.swift @@ -12,7 +12,7 @@ final class UhooiPicBookUITests: XCTestCase { // MARK: TestCase Life-Cycle Methods - override func setUp() { + override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. @@ -21,7 +21,7 @@ final class UhooiPicBookUITests: XCTestCase { // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } - override func tearDown() { + override func tearDownWithError() throws { // Put teardown code here. This method is called after the invocation of each test method in the class. } From 6109dcc383260e893d93f64adf09b2494051cf8d Mon Sep 17 00:00:00 2001 From: uhooi Date: Sat, 3 Oct 2020 22:15:52 +0900 Subject: [PATCH 11/11] Increment version --- project.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/project.yml b/project.yml index 184cf9e9..60a3cb3d 100644 --- a/project.yml +++ b/project.yml @@ -27,8 +27,8 @@ targets: type: file settings: base: - MARKETING_VERSION: 1.2.0 - CURRENT_PROJECT_VERSION: 10 + MARKETING_VERSION: 1.2.1 + CURRENT_PROJECT_VERSION: 11 DEVELOPMENT_TEAM: 47E56DYP3N INFOPLIST_FILE: UhooiPicBook/Resources/Info.plist CODE_SIGN_ENTITLEMENTS: UhooiPicBook/Resources/UhooiPicBook.entitlements @@ -181,7 +181,7 @@ targets: CLANG_ENABLE_OBJC_WEAK: YES CODE_SIGN_IDENTITY: "iPhone Developer" CODE_SIGN_STYLE: Automatic - CURRENT_PROJECT_VERSION: 10 + CURRENT_PROJECT_VERSION: 11 DEBUG_INFORMATION_FORMAT: dwarf DEVELOPMENT_TEAM: 47E56DYP3N GCC_PREPROCESSOR_DEFINITIONS: @@ -190,7 +190,7 @@ targets: INFOPLIST_FILE: UhooiPicBookStickers/Info.plist IPHONEOS_DEPLOYMENT_TARGET: 11.0 LD_RUNPATH_SEARCH_PATHS: "" - MARKETING_VERSION: 1.2.0 + MARKETING_VERSION: 1.2.1 MTL_ENABLE_DEBUG_INFO: INCLUDE_SOURCE MTL_FAST_MATH: YES PRODUCT_BUNDLE_IDENTIFIER: com.theuhooi.UhooiPicBook.Stickers