From 23df5af3dcc506fe50ac562a759bc3cbb922b2f2 Mon Sep 17 00:00:00 2001
From: akidon0000 <akidon0000@gmail.com>
Date: Fri, 1 Mar 2024 13:58:58 +0900
Subject: [PATCH 1/7] [170] update gitignore

---
 .gitignore | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 66 insertions(+), 5 deletions(-)

diff --git a/.gitignore b/.gitignore
index 65ba14d7..ebf77335 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,8 @@
-UserInterfaceState.xcuserstate
-vendor/
+# Xcode
+#
+# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
+
+
 R.generated.swift
 GoogleService-Info.plist
 
@@ -29,6 +32,30 @@ DerivedData/
 *.perspectivev3
 !default.perspectivev3
 
+## Obj-C/Swift specific
+*.hmap
+
+## App packaging
+*.ipa
+*.dSYM.zip
+*.dSYM
+
+## Playgrounds
+timeline.xctimeline
+playground.xcworkspace
+
+# Swift Package Manager
+#
+# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
+# Packages/
+# Package.pins
+# Package.resolved
+# *.xcodeproj
+#
+# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
+# hence it is not needed unless you have added a package configuration file to your project
+# .swiftpm
+
 .build/
 
 # CocoaPods
@@ -36,8 +63,42 @@ DerivedData/
 # We recommend against adding the Pods directory to your .gitignore. However
 # you should judge for yourself, the pros and cons are mentioned at:
 # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
-#
+
 Pods/
-#
+
 # Add this line if you want to avoid checking in source code from the Xcode workspace
-*.xcworkspace
\ No newline at end of file
+*.xcworkspace
+
+# Carthage
+#
+# Add this line if you want to avoid checking in source code from Carthage dependencies.
+# Carthage/Checkouts
+
+Carthage/Build/
+
+# Accio dependency management
+Dependencies/
+.accio/
+
+# fastlane
+#
+# It is recommended to not store the screenshots in the git repo.
+# Instead, use fastlane to re-generate the screenshots whenever they are needed.
+# For more information about the recommended setup visit:
+# https://docs.fastlane.tools/best-practices/source-control/#source-control
+
+fastlane/report.xml
+fastlane/Preview.html
+fastlane/screenshots/**/*.png
+fastlane/test_output
+
+# Code Injection
+#
+# After new code Injection tools there's a generated folder /iOSInjectionProject
+# https://github.com/johnno1962/injectionforxcode
+
+iOSInjectionProject/
+
+# Mint
+
+.mint

From 4b4a428795fd23260c5633857b2ad948649d2ba2 Mon Sep 17 00:00:00 2001
From: akidon0000 <akidon0000@gmail.com>
Date: Fri, 1 Mar 2024 13:59:40 +0900
Subject: [PATCH 2/7] add Makefile and Mintfile

---
 Makefile | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Mintfile |  3 ++
 2 files changed, 101 insertions(+)
 create mode 100644 Makefile
 create mode 100644 Mintfile

diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..eea60ebc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,98 @@
+# 参考: https://github.com/uhooi/UhooiPicBook/blob/develop/Makefile
+# Variables {{{
+
+# Project
+product_name := univIP
+workspace_name := $(product_name).xcworkspace
+package_name := $(product_name)Package
+
+# Production
+production_project_name := Production
+production_log_name := $(product_name)_$(production_project_name)_Build.log
+
+# Develop
+develop_project_name := Develop
+develop_log_name := $(product_name)_$(develop_project_name)_Build.log
+
+# Test
+TEST_SDK := iphonesimulator
+TEST_CONFIGURATION := Debug
+TEST_PLATFORM := iOS Simulator
+TEST_DESTINATION := 'generic/platform=$(TEST_PLATFORM)'
+
+# Commands
+MINT := mint
+SWIFTLINT := $(MINT) run realm/SwiftLint swiftlint
+
+# Mint
+MINT_ROOT := ./.mint
+export MINT_PATH := $(MINT_ROOT)/lib
+export MINT_LINK_PATH := $(MINT_ROOT)/bin
+
+# }}}
+
+# Targets {{{
+
+.PHONY: setup
+setup:
+	$(MAKE) install-mint-dependencies
+	$(MAKE) open
+
+.PHONY: install-mint-dependencies
+install-mint-dependencies:
+	$(MINT) bootstrap --overwrite y
+
+.PHONY: open
+open:
+	open ./$(workspace_name)
+
+.PHONY: clean
+clean:
+	rm -rf ./$(package_name)/.build/
+
+.PHONY: distclean
+distclean:
+	rm -rf $(MINT_ROOT)
+	rm -rf ./$(production_log_name)
+	rm -rf ./$(develop_log_name)
+	rm -rf ~/Library/Developer/Xcode/DerivedData
+	rm -rf ./$(package_name)/.swiftpm/
+	$(MAKE) clean
+
+$(develop_log_name):
+	$(MAKE) build-debug-develop
+
+.PHONY: build-debug-production
+build-debug-production:
+	$(MAKE) build-debug PROJECT_NAME=$(production_project_name)
+
+.PHONY: build-debug-develop
+build-debug-develop:
+	$(MAKE) build-debug PROJECT_NAME=$(develop_project_name)
+
+.PHONY: build-debug
+build-debug:
+	set -o pipefail \
+&& xcodebuild \
+-sdk $(TEST_SDK) \
+-configuration $(TEST_CONFIGURATION) \
+-workspace $(workspace_name) \
+-scheme '$(PROJECT_NAME)' \
+-destination $(TEST_DESTINATION) \
+-skipPackagePluginValidation \
+clean build \
+| tee $(product_name)_$(PROJECT_NAME)_Build.log
+
+.PHONY: lint
+lint:
+	$(SWIFTLINT)
+
+.PHONY: fix
+fix:
+	$(SWIFTLINT) --fix --format
+
+.PHONY: analyze
+analyze: $(develop_log_name)
+	$(SWIFTLINT) analyze --fix --compiler-log-path $(develop_log_name)
+
+# }}}
diff --git a/Mintfile b/Mintfile
new file mode 100644
index 00000000..36d77498
--- /dev/null
+++ b/Mintfile
@@ -0,0 +1,3 @@
+realm/SwiftLint@0.54.0
+IBDecodable/IBLinter@0.5.0
+fromkk/SpellChecker@0.1.0

From 1cbd30a69c565f96a9cf29436d3d88bc7f354e3b Mon Sep 17 00:00:00 2001
From: akidon0000 <akidon0000@gmail.com>
Date: Fri, 1 Mar 2024 14:00:20 +0900
Subject: [PATCH 3/7] [170] update cocoapods version

---
 Podfile.lock | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Podfile.lock b/Podfile.lock
index 357cc919..bc177b9a 100644
--- a/Podfile.lock
+++ b/Podfile.lock
@@ -195,4 +195,4 @@ SPEC CHECKSUMS:
 
 PODFILE CHECKSUM: 310558f561793f179059aed0fc9ec538b65a0d98
 
-COCOAPODS: 1.14.2
+COCOAPODS: 1.14.3

From 8fcb265f3e376396ec722e1c90889ada809310b3 Mon Sep 17 00:00:00 2001
From: akidon0000 <akidon0000@gmail.com>
Date: Fri, 1 Mar 2024 14:08:06 +0900
Subject: [PATCH 4/7] [170] fix make setup

---
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index eea60ebc..3835aaea 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,7 @@ export MINT_LINK_PATH := $(MINT_ROOT)/bin
 
 .PHONY: setup
 setup:
+	$(MAKE) pod-install
 	$(MAKE) install-mint-dependencies
 	$(MAKE) open
 
@@ -42,6 +43,10 @@ setup:
 install-mint-dependencies:
 	$(MINT) bootstrap --overwrite y
 
+.PHONY: pod-install
+pod-install:
+	pod install
+
 .PHONY: open
 open:
 	open ./$(workspace_name)

From 9bad5be996595e8bed361d6c8972618c8fbfe15e Mon Sep 17 00:00:00 2001
From: akidon0000 <akidon0000@gmail.com>
Date: Sat, 2 Mar 2024 02:15:57 +0900
Subject: [PATCH 5/7] [170] Unified CocoaPods version management through
 Gemfile

---
 .gitignore   | 13 +++++++++----
 Gemfile      |  2 +-
 Gemfile.lock | 48 ++++++++++++++++++++++++++++++------------------
 Makefile     |  5 +++++
 4 files changed, 45 insertions(+), 23 deletions(-)

diff --git a/.gitignore b/.gitignore
index ebf77335..4efeaf43 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,15 @@
 R.generated.swift
 GoogleService-Info.plist
 
+
+# Mintfile
+.mint
+
+# Gemfile
+vendor/
+.bundle
+
+
 # Xcode Patch
 *.xcodeproj/*
 !*.xcodeproj/project.pbxproj
@@ -98,7 +107,3 @@ fastlane/test_output
 # https://github.com/johnno1962/injectionforxcode
 
 iOSInjectionProject/
-
-# Mint
-
-.mint
diff --git a/Gemfile b/Gemfile
index a55e88cf..513067e0 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,4 +2,4 @@
 
 source "https://rubygems.org"
 
-gem 'cocoapods'
+gem 'cocoapods' , '1.15.2'
diff --git a/Gemfile.lock b/Gemfile.lock
index 207580d0..8d01e7fc 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,27 +1,35 @@
 GEM
   remote: https://rubygems.org/
   specs:
-    CFPropertyList (3.0.6)
+    CFPropertyList (3.0.7)
+      base64
+      nkf
       rexml
-    activesupport (6.1.7.4)
+    activesupport (7.1.3.2)
+      base64
+      bigdecimal
       concurrent-ruby (~> 1.0, >= 1.0.2)
+      connection_pool (>= 2.2.5)
+      drb
       i18n (>= 1.6, < 2)
       minitest (>= 5.1)
+      mutex_m
       tzinfo (~> 2.0)
-      zeitwerk (~> 2.3)
-    addressable (2.8.4)
+    addressable (2.8.6)
       public_suffix (>= 2.0.2, < 6.0)
     algoliasearch (1.27.5)
       httpclient (~> 2.8, >= 2.8.3)
       json (>= 1.5.1)
     atomos (0.1.3)
+    base64 (0.2.0)
+    bigdecimal (3.1.6)
     claide (1.1.0)
-    cocoapods (1.12.1)
+    cocoapods (1.15.2)
       addressable (~> 2.8)
       claide (>= 1.0.2, < 2.0)
-      cocoapods-core (= 1.12.1)
+      cocoapods-core (= 1.15.2)
       cocoapods-deintegrate (>= 1.0.3, < 2.0)
-      cocoapods-downloader (>= 1.6.0, < 2.0)
+      cocoapods-downloader (>= 2.1, < 3.0)
       cocoapods-plugins (>= 1.0.0, < 2.0)
       cocoapods-search (>= 1.0.0, < 2.0)
       cocoapods-trunk (>= 1.6.0, < 2.0)
@@ -33,8 +41,8 @@ GEM
       molinillo (~> 0.8.0)
       nap (~> 1.0)
       ruby-macho (>= 2.3.0, < 3.0)
-      xcodeproj (>= 1.21.0, < 2.0)
-    cocoapods-core (1.12.1)
+      xcodeproj (>= 1.23.0, < 2.0)
+    cocoapods-core (1.15.2)
       activesupport (>= 5.0, < 8)
       addressable (~> 2.8)
       algoliasearch (~> 1.0)
@@ -45,7 +53,7 @@ GEM
       public_suffix (~> 4.0)
       typhoeus (~> 1.0)
     cocoapods-deintegrate (1.0.5)
-    cocoapods-downloader (1.6.3)
+    cocoapods-downloader (2.1)
     cocoapods-plugins (1.0.0)
       nap
     cocoapods-search (1.0.1)
@@ -54,44 +62,48 @@ GEM
       netrc (~> 0.11)
     cocoapods-try (1.2.0)
     colored2 (3.1.2)
-    concurrent-ruby (1.2.2)
+    concurrent-ruby (1.2.3)
+    connection_pool (2.4.1)
+    drb (2.2.1)
     escape (0.0.4)
     ethon (0.16.0)
       ffi (>= 1.15.0)
-    ffi (1.15.5)
+    ffi (1.16.3)
     fourflusher (2.3.1)
     fuzzy_match (2.0.4)
     gh_inspector (1.1.3)
     httpclient (2.8.3)
     i18n (1.14.1)
       concurrent-ruby (~> 1.0)
-    json (2.6.3)
-    minitest (5.19.0)
+    json (2.7.1)
+    minitest (5.22.2)
     molinillo (0.8.0)
+    mutex_m (0.2.0)
     nanaimo (0.3.0)
     nap (1.1.0)
     netrc (0.11.0)
+    nkf (0.2.0)
     public_suffix (4.0.7)
     rexml (3.2.6)
     ruby-macho (2.5.1)
-    typhoeus (1.4.0)
+    typhoeus (1.4.1)
       ethon (>= 0.9.0)
     tzinfo (2.0.6)
       concurrent-ruby (~> 1.0)
-    xcodeproj (1.22.0)
+    xcodeproj (1.24.0)
       CFPropertyList (>= 2.3.3, < 4.0)
       atomos (~> 0.1.3)
       claide (>= 1.0.2, < 2.0)
       colored2 (~> 3.1)
       nanaimo (~> 0.3.0)
       rexml (~> 3.2.4)
-    zeitwerk (2.6.10)
 
 PLATFORMS
   x86_64-darwin-22
+  x86_64-darwin-23
 
 DEPENDENCIES
-  cocoapods
+  cocoapods (= 1.15.2)
 
 BUNDLED WITH
    2.4.4
diff --git a/Makefile b/Makefile
index 3835aaea..256dca63 100644
--- a/Makefile
+++ b/Makefile
@@ -35,10 +35,15 @@ export MINT_LINK_PATH := $(MINT_ROOT)/bin
 
 .PHONY: setup
 setup:
+	$(MAKE) cocoapods-version-setup
 	$(MAKE) pod-install
 	$(MAKE) install-mint-dependencies
 	$(MAKE) open
 
+.PHONY: cocoapods-version-setup
+cocoapods-version-setup:
+	bundle install --path vendor/bundle
+
 .PHONY: install-mint-dependencies
 install-mint-dependencies:
 	$(MINT) bootstrap --overwrite y

From 77047a0102b8a09221ddf0b6b94428c3ef51580c Mon Sep 17 00:00:00 2001
From: akidon0000 <akidon0000@gmail.com>
Date: Wed, 6 Mar 2024 01:14:53 +0900
Subject: [PATCH 6/7] [170] create prepare-commit-msg

---
 .githooks/README.md          | 20 ++++++++++++++++++++
 .githooks/prepare-commit-msg | 19 +++++++++++++++++++
 Makefile                     |  6 ++++++
 3 files changed, 45 insertions(+)
 create mode 100644 .githooks/README.md
 create mode 100644 .githooks/prepare-commit-msg

diff --git a/.githooks/README.md b/.githooks/README.md
new file mode 100644
index 00000000..97e84058
--- /dev/null
+++ b/.githooks/README.md
@@ -0,0 +1,20 @@
+# githooks
+このディレクトリは本来であれば、.git/hooks/ に配置するディレクトリです。
+
+.git は、リポジトリの設定を管理するディレクトリであり、バージョン管理対象外です。
+
+そのため、.githooks/の内容を.git/hooks/へコピーすることで、リポジトリのGit操作に適用しています。
+
+以下のコマンドは、mint setupの一部として実行されます。
+
+
+```zsh
+$ cp -r .githooks .git/hooks
+
+$ chmod -R +x .git/hooks
+```
+
+# 参考
+https://git-scm.com/docs/githooks
+
+https://www.farend.co.jp/blog/2020/04/git-hook/
diff --git a/.githooks/prepare-commit-msg b/.githooks/prepare-commit-msg
new file mode 100644
index 00000000..f9fe83a3
--- /dev/null
+++ b/.githooks/prepare-commit-msg
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+# コミットメッセージは .git/COMMIT_EDITMSG に保存されてる
+COMMIT_MSG_FILE_PATH="$1"
+
+# コミットメッセージ読み込み
+COMMIT_MSG=$(cat "$COMMIT_MSG_FILE_PATH")
+
+# [Int値] の正規表現
+PATTERN="^\[\d+\]"
+
+# コミットメッセージの検証
+if ! echo "$COMMIT_MSG" | grep -qE "$PATTERN"; then
+	# \033[31m は赤文字にするANSIエスケープシーケンス
+    echo "\033[31mERROR: コミットメッセージは '[Issue番号]' で始めてください。"
+    exit 1
+fi
+
+exit 0
\ No newline at end of file
diff --git a/Makefile b/Makefile
index 256dca63..d8e1d51b 100644
--- a/Makefile
+++ b/Makefile
@@ -35,11 +35,17 @@ export MINT_LINK_PATH := $(MINT_ROOT)/bin
 
 .PHONY: setup
 setup:
+	$(MAKE) setup-githooks
 	$(MAKE) cocoapods-version-setup
 	$(MAKE) pod-install
 	$(MAKE) install-mint-dependencies
 	$(MAKE) open
 
+.PHONY: setup-githooks
+setup-githooks:
+	cp -r .githooks/* .git/hooks
+	chmod -R +x .git/hooks
+
 .PHONY: cocoapods-version-setup
 cocoapods-version-setup:
 	bundle install --path vendor/bundle

From fdba5a3d81f424f0563873431f59e8e3cb91d87e Mon Sep 17 00:00:00 2001
From: akidon0000 <akidon0000@gmail.com>
Date: Wed, 6 Mar 2024 01:56:06 +0900
Subject: [PATCH 7/7] [170] create post-checkout

---
 .githooks/post-checkout | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 .githooks/post-checkout

diff --git a/.githooks/post-checkout b/.githooks/post-checkout
new file mode 100644
index 00000000..6550af03
--- /dev/null
+++ b/.githooks/post-checkout
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+git fetch
+make setup