From be2b4d09c1d914f37acc2b24012bfc234af83f37 Mon Sep 17 00:00:00 2001 From: "tattn (Tatsuya Tanaka)" Date: Thu, 20 Sep 2018 21:00:50 +0900 Subject: [PATCH 1/4] Update Swift to Swift 4.2 --- MoreCodable.xcodeproj/project.pbxproj | 11 ++++++----- Tests/CodableDictionaryTests.swift | 11 ++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/MoreCodable.xcodeproj/project.pbxproj b/MoreCodable.xcodeproj/project.pbxproj index 8a8f0a0..ce46d6d 100644 --- a/MoreCodable.xcodeproj/project.pbxproj +++ b/MoreCodable.xcodeproj/project.pbxproj @@ -218,11 +218,12 @@ TargetAttributes = { 24A4FF3E20302322001618E1 = { CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 0920; + LastSwiftMigration = 1000; ProvisioningStyle = Automatic; }; 24A4FF5320302490001618E1 = { CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1000; ProvisioningStyle = Automatic; }; }; @@ -446,7 +447,7 @@ PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -467,7 +468,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.github.tattn.MoreCodable; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; @@ -481,7 +482,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.github.tattn.MoreCodableTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -495,7 +496,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.github.tattn.MoreCodableTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; diff --git a/Tests/CodableDictionaryTests.swift b/Tests/CodableDictionaryTests.swift index ed60bed..df3642e 100644 --- a/Tests/CodableDictionaryTests.swift +++ b/Tests/CodableDictionaryTests.swift @@ -21,21 +21,18 @@ class CodableDictionaryTests: XCTestCase { func testEnumKey() { enum Key: String, Codable, CodingKey { case foo - case bar } let originalEnumKeyedDictionary: [Key: Int] = [ - .foo: 100, - .bar: 200 + .foo: 100 ] let enumKeyedDictionary: CodableDictionary = [ - .foo: 100, - .bar: 200 + .foo: 100 ] - let json = "{\"foo\":100,\"bar\":200}" - let unexpectedJSON = "[\"foo\",100,\"bar\",200]" + let json = "{\"foo\":100}" + let unexpectedJSON = "[\"foo\",100]" do { let encodedData = try! jsonEncoder.encode(originalEnumKeyedDictionary) From 1dbf593ae9f15b8fb32404a5bd8d09f82225c121 Mon Sep 17 00:00:00 2001 From: "tattn (Tatsuya Tanaka)" Date: Thu, 20 Sep 2018 21:01:15 +0900 Subject: [PATCH 2/4] Update .swift-version --- .swift-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.swift-version b/.swift-version index 5186d07..bf77d54 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.0 +4.2 From 4472481b0b08951c3d70925795a20ae8a0c38b95 Mon Sep 17 00:00:00 2001 From: "tattn (Tatsuya Tanaka)" Date: Thu, 20 Sep 2018 21:02:57 +0900 Subject: [PATCH 3/4] Update CI --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 089536e..e423f26 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: objective-c os: osx -osx_image: xcode9.3 +osx_image: xcode10 env: global: @@ -26,7 +26,7 @@ matrix: script: - set -o pipefail - - xcodebuild $ACTION -project $PROJECT -scheme $SCHEME -sdk $SDK -destination 'name=iPhone 8,OS=11.3' -configuration $CONFIG ENABLE_TESTABILITY=YES | xcpretty + - xcodebuild $ACTION -project $PROJECT -scheme $SCHEME -sdk $SDK -destination 'name=iPhone XS,OS=12.0' -configuration $CONFIG ENABLE_TESTABILITY=YES | xcpretty notifications: email: false From 2f06156ab330bb20d38f7ff8934d7840ffe4a1b6 Mon Sep 17 00:00:00 2001 From: "tattn (Tatsuya Tanaka)" Date: Thu, 20 Sep 2018 21:04:07 +0900 Subject: [PATCH 4/4] Update podspec --- MoreCodable.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MoreCodable.podspec b/MoreCodable.podspec index fbde4a8..1cf423c 100644 --- a/MoreCodable.podspec +++ b/MoreCodable.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'MoreCodable' - s.version = '0.1.2' + s.version = '0.2.0' s.summary = 'MoreCodable expands the possibilities of Codable.' s.description = <<-DESC @@ -19,7 +19,7 @@ It contains DictionaryEncoder/Decoder, URLQueryItemsEncoder/Decoder, ObjectMerge s.watchos.deployment_target = '2.0' s.tvos.deployment_target = '9.0' - s.source_files = 'Sources/**/*' + s.source_files = 'Sources/**/*.{swift,h,m}' s.public_header_files = 'Sources/**/*.h' s.frameworks = 'Foundation'