Skip to content

Commit

Permalink
Merge pull request #6 from tattn/swift4.2
Browse files Browse the repository at this point in the history
Swift 4.2 support
  • Loading branch information
tattn committed Sep 20, 2018
2 parents 32a3612 + 2f06156 commit d1eb167
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0
4.2
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: objective-c
os: osx
osx_image: xcode9.3
osx_image: xcode10

env:
global:
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions MoreCodable.podspec
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -15,11 +15,11 @@ It contains DictionaryEncoder/Decoder, URLQueryItemsEncoder/Decoder, ObjectMerge
s.social_media_url = 'https://twitter.com/tanakasan2525'

s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
# s.osx.deployment_target = '10.10'
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'
Expand Down
11 changes: 6 additions & 5 deletions MoreCodable.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,12 @@
TargetAttributes = {
24A4FF3E20302322001618E1 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 0920;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
};
24A4FF5320302490001618E1 = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 1000;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
11 changes: 4 additions & 7 deletions Tests/CodableDictionaryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<Key, Int> = [
.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)
Expand Down

0 comments on commit d1eb167

Please sign in to comment.