Skip to content

Commit

Permalink
Merge pull request #38 from fumiyasac/feature/version_up_2023
Browse files Browse the repository at this point in the history
2023年のテストケース追加&保守対応
  • Loading branch information
fumiyasac authored Dec 31, 2022
2 parents e0d8668 + 831d6d7 commit b2d96c3
Show file tree
Hide file tree
Showing 9 changed files with 223 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on: [push, pull_request]

env:
DEVELOPER_DIR: /Applications/Xcode_12.4.app
DEVELOPER_DIR: /Applications/Xcode_14.1.app

jobs:
build:
Expand Down
8 changes: 4 additions & 4 deletions CalculateCalendarLogic.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "CalculateCalendarLogic"
s.swift_versions = '5.0'
s.version = "0.5.0"
s.version = "0.6.0"
s.summary = "This library CalculateCalendarLogic (sample project name is handMadeCalendarAdvance) can judge a holiday in Japan."
s.description = <<-DESC
This library 'CalculateCalendarLogic' can judge a holiday in Japan.
Expand All @@ -11,12 +11,12 @@ Pod::Spec.new do |s|
s.homepage = "http://qiita.com/fumiyasac@github/items/33bfc07ad36dfffcdf8f"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Fumiya Sakai" => "[email protected]" }
s.platform = :ios, '9.0'
s.platform = :ios, '13.0'
s.source = { :git => "https://github.com/fumiyasac/handMadeCalendarAdvance.git", :tag => "#{s.version}" }
s.social_media_url = "https://twitter.com/fumiyasac"
s.source_files = "CalculateCalendarLogic/*.swift"
s.exclude_files = "CalculateCalendarLogic/*.plist"
s.requires_arc = true
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.10'
s.ios.deployment_target = '13.0'
s.osx.deployment_target = '11.0'
end
55 changes: 29 additions & 26 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.0)
activesupport (4.2.11)
CFPropertyList (3.0.5)
rexml
activesupport (4.2.11.3)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
atomos (0.1.3)
claide (1.0.2)
cocoapods (1.6.0.beta.2)
claide (1.1.0)
cocoapods (1.7.2)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.6.0.beta.2)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-core (= 1.7.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
Expand All @@ -22,55 +23,57 @@ GEM
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (~> 2.0.1)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.3, >= 1.3.1)
xcodeproj (>= 1.7.0, < 2.0)
cocoapods-core (1.6.0.beta.2)
ruby-macho (~> 1.4)
xcodeproj (>= 1.10.0, < 2.0)
cocoapods-core (1.7.2)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.2)
cocoapods-downloader (1.2.2)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.3.1)
cocoapods-search (1.0.1)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.6.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.4)
concurrent-ruby (1.1.10)
escape (0.0.4)
fourflusher (2.0.1)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
minitest (5.11.3)
minitest (5.16.3)
molinillo (0.6.6)
nanaimo (0.2.6)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
ruby-macho (1.3.1)
rexml (3.2.5)
ruby-macho (1.4.0)
thread_safe (0.3.6)
tzinfo (1.2.5)
tzinfo (1.2.10)
thread_safe (~> 0.1)
xcodeproj (1.7.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)

PLATFORMS
ruby

DEPENDENCIES
cocoapods (= 1.6.0.beta.2)
cocoapods (= 1.7.2)

BUNDLED WITH
1.13.7
1.17.2
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public func judgeJapaneseHoliday(year: Int, month: Int, day: Int) -> Bool {

### Requirements & Support

+ iOS 9 or later
+ macOS 10.10 or later
+ iOS 13.0 or later
+ macOS 11.0 or later

### Installation

Expand All @@ -43,7 +43,7 @@ Create Podfile and specify it in your Podfile:
★ Example of Podfile

```
platform :ios, '9.0'
platform :ios, '13.0'
use_frameworks!
target [YOUR PROJECT NAME]' do
pod 'CalculateCalendarLogic'
Expand Down Expand Up @@ -156,8 +156,8 @@ public func judgeJapaneseHoliday(year: Int, month: Int, day: Int) -> Bool {

### 対応バージョンとサポート

+ iOS 9 or later
+ macOS 10.10 or later
+ iOS 13.0 or later
+ macOS 11.0 or later

### 導入方法

Expand Down Expand Up @@ -247,6 +247,7 @@ print("2016年1月1日:\(result)")

まだまだ甘い部分があるかもしれませんが、その際はPullRequest等を送っていただければ幸いです。アプリ開発の中でこのサンプルが少しでもお役にたつ事ができれば嬉しい限りです。

+ 2023.01.01: 保守対応&iOS16で利用可能なUICalendarViewのサンプル追加を行いました。
+ 2021.06.05: Gihub Actions追加([uhooi](https://github.com/uhooi)様)
+ 2020.12.02: Xcode12.2への対応/2021年の祝日に関する追加対応/サンプルコード修正等を行いました。
+ 2019.06.26: Swift5.0及びXcode10.2.1への対応を行いました。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,58 @@ class CalculateCalendarLogicTests: XCTestCase {

// 勤労感謝の日: 2022年11月23日(水曜日)
(2022, 11, 23, true),

// 2023年
// 元日: 2023年1月1日(日曜日)
(2023, 1, 1, true),

// 振替休日: 2023年1月2日(月曜日)
(2023, 1, 2, true),

// 成人の日: 2023年1月9日(月曜日)
(2023, 1, 9, true),

// 建国記念の日: 2023年2月11日(土曜日)
(2023, 2, 11, true),

// 天皇誕生日: 2023年2月23日(木曜日)
(2023, 2, 23, true),

// 春分の日: 2023年3月21日(火曜日)
(2023, 3, 21, true),

// 昭和の日: 2023年4月29日(土曜日)
(2023, 4, 29, true),

// 憲法記念日: 2023年5月3日(水曜日)
(2023, 5, 3, true),

// みどりの日: 2023年5月4日(木曜日)
(2023, 5, 4, true),

// こどもの日: 2023年5月5日(金曜日)
(2023, 5, 5, true),

// 海の日: 2023年7月17日(月曜日)
(2023, 7, 17, true),

// 山の日: 2023年8月11日(金曜日)
(2023, 8, 11, true),

// 敬老の日: 2023年9月18日(月曜日)
(2023, 9, 18, true),

// 秋分の日: 2023年9月23日(土曜日)
(2023, 9, 23, true),

// スポーツの日: 2023年10月9日(月曜日)
(2023, 10, 9, true),

// 文化の日: 2023年11月3日(金曜日)
(2023, 11, 3, true),

// 勤労感謝の日: 2023年11月23日(木曜日)
(2023, 11, 23, true),
]
testCases.forEach { (arg) in

Expand Down
23 changes: 16 additions & 7 deletions handMadeCalendarAdvance.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
31889D151E29F3B600DFD4CB /* CalculateCalendarLogic.swift in Sources */ = {isa = PBXBuildFile; fileRef = E517AF681CE0F669006847A0 /* CalculateCalendarLogic.swift */; };
31889D161E29F3BC00DFD4CB /* CalculateCalendarLogicTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E517AF5A1CE0F63C006847A0 /* CalculateCalendarLogicTests.swift */; };
DE0166BC1CDE5892002BB133 /* CalendarCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0166BB1CDE5892002BB133 /* CalendarCell.swift */; };
DE03CFF329608C650054BCF1 /* NewCalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE03CFF229608C650054BCF1 /* NewCalendarViewController.swift */; };
DE7396FA1CCB4EC100A9A222 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE7396F91CCB4EC100A9A222 /* AppDelegate.swift */; };
DE7396FC1CCB4EC100A9A222 /* MonthlyCalendarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE7396FB1CCB4EC100A9A222 /* MonthlyCalendarViewController.swift */; };
DE7396FF1CCB4EC100A9A222 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DE7396FD1CCB4EC100A9A222 /* Main.storyboard */; };
Expand Down Expand Up @@ -92,6 +93,7 @@
31889CFE1E29F37F00DFD4CB /* CalculateCalendarLogic.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CalculateCalendarLogic.framework; sourceTree = BUILT_PRODUCTS_DIR; };
31889D061E29F37F00DFD4CB /* CalculateCalendarLogic OSXTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "CalculateCalendarLogic OSXTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
DE0166BB1CDE5892002BB133 /* CalendarCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CalendarCell.swift; sourceTree = "<group>"; };
DE03CFF229608C650054BCF1 /* NewCalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewCalendarViewController.swift; sourceTree = "<group>"; };
DE7396F61CCB4EC100A9A222 /* handMadeCalendarAdvance.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = handMadeCalendarAdvance.app; sourceTree = BUILT_PRODUCTS_DIR; };
DE7396F91CCB4EC100A9A222 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
DE7396FB1CCB4EC100A9A222 /* MonthlyCalendarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MonthlyCalendarViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -246,6 +248,7 @@
DEE369B3257C8A1600A22800 /* MainViewController.swift */,
DE7396FB1CCB4EC100A9A222 /* MonthlyCalendarViewController.swift */,
DEE369C2257C8E5A00A22800 /* DatePickerCalendarViewController.swift */,
DE03CFF229608C650054BCF1 /* NewCalendarViewController.swift */,
);
name = ViewController;
sourceTree = "<group>";
Expand All @@ -266,7 +269,8 @@
E517AF5A1CE0F63C006847A0 /* CalculateCalendarLogicTests.swift */,
E517AF5C1CE0F63C006847A0 /* Info.plist */,
);
path = CalculateCalendarLogicTests;
name = CalculateCalendarLogicTests;
path = Tests/CalculateCalendarLogicTests;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand Down Expand Up @@ -606,6 +610,7 @@
files = (
DEE369D1257CCD3400A22800 /* DisplayDateTextField.swift in Sources */,
DEE369C3257C8E5A00A22800 /* DatePickerCalendarViewController.swift in Sources */,
DE03CFF329608C650054BCF1 /* NewCalendarViewController.swift in Sources */,
DE7396FC1CCB4EC100A9A222 /* MonthlyCalendarViewController.swift in Sources */,
DE7396FA1CCB4EC100A9A222 /* AppDelegate.swift in Sources */,
DE0166BC1CDE5892002BB133 /* CalendarCell.swift in Sources */,
Expand Down Expand Up @@ -767,9 +772,9 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = CalculateCalendarLogicTests/Info.plist;
INFOPLIST_FILE = Tests/CalculateCalendarLogicTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = "net.just1factory.CalculateCalendarLogic-OSXTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
Expand All @@ -787,9 +792,9 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = CalculateCalendarLogicTests/Info.plist;
INFOPLIST_FILE = Tests/CalculateCalendarLogicTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 11.0;
PRODUCT_BUNDLE_IDENTIFIER = "net.just1factory.CalculateCalendarLogic-OSXTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
Expand Down Expand Up @@ -939,6 +944,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = handMadeCalendarAdvanceTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.handMadeCalendarAdvanceTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -952,6 +958,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = handMadeCalendarAdvanceTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.handMadeCalendarAdvanceTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1036,7 +1043,8 @@
E517AF631CE0F63D006847A0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = CalculateCalendarLogicTests/Info.plist;
INFOPLIST_FILE = Tests/CalculateCalendarLogicTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.CalculateCalendarLogicTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -1048,7 +1056,8 @@
E517AF641CE0F63D006847A0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = CalculateCalendarLogicTests/Info.plist;
INFOPLIST_FILE = Tests/CalculateCalendarLogicTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.just1factory.CalculateCalendarLogicTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b2d96c3

Please sign in to comment.