diff --git a/.ci/buildkite/pipeline.template.yml b/.ci/buildkite/pipeline.template.yml index e9a8aa6..c37d45b 100755 --- a/.ci/buildkite/pipeline.template.yml +++ b/.ci/buildkite/pipeline.template.yml @@ -3,21 +3,19 @@ steps: name: "Lint" command: .ci/scripts/lint agents: - iOS-Simulator: false xcode: "$BUILDKITE_AGENT_META_DATA_XCODE" - + - name: "Mac" command: .ci/scripts/test-osx agents: - iOS-Simulator: false xcode: "$BUILDKITE_AGENT_META_DATA_XCODE" - name: "iOS" command: .ci/scripts/test-ios agents: - iOS-Simulator: true + queue: "iOS-Simulator" xcode: "$BUILDKITE_AGENT_META_DATA_XCODE" env: FL_SLATHER_BUILDKITE_ENABLED: true - FL_SLATHER_COVERALLS_ENABLED: true \ No newline at end of file + FL_SLATHER_COVERALLS_ENABLED: true diff --git a/.fastlane/Fastfile b/.fastlane/Fastfile index de11db0..f2ebe8a 100644 --- a/.fastlane/Fastfile +++ b/.fastlane/Fastfile @@ -1,7 +1,7 @@ lane :lint do swiftLint( - mode: :lint, + mode: :lint, config_file: '.swiftlint.yml' ) end @@ -11,11 +11,11 @@ platform :ios do desc "Runs all the tests" lane :test do - + scan( project: "ValueCoding.xcodeproj", - scheme: "ValueCoding", - destination: "platform=iOS Simulator,OS=10.0,name=iPhone 5s", + scheme: "ValueCoding", + destination: "platform=iOS Simulator,OS=11.0,name=iPhone SE", code_coverage: true ) @@ -23,14 +23,14 @@ platform :ios do end platform :mac do - + desc "Runs all the tests" lane :test do scan( project: "ValueCoding.xcodeproj", - scheme: "ValueCoding", - device: "My Mac" + scheme: "ValueCoding", + device: "My Mac" ) end diff --git a/.jazzy.json b/.jazzy.json index 1d898ff..b1ce152 100644 --- a/.jazzy.json +++ b/.jazzy.json @@ -3,12 +3,12 @@ "author_url": "http://danthorpe.me", "github_url": "https://github.com/danthorpe/ValueCoding", "module": "ValueCoding", - "module_version": "2.0.0", + "module_version": "2.2.0", "readme": "README.md", - "swift_version": "2.3", + "swift_version": "3.2", "xcodebuild_arguments": [ - "-project", "ValueCoding.xcodeproj", + "-project", "ValueCoding.xcodeproj", "-scheme", "ValueCoding" ], "exclude": ["Tests"] -} \ No newline at end of file +} diff --git a/.swift-version b/.swift-version index 9f55b2c..a3ec5a4 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.0 +3.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3be7f6e..541116e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 2.2.0 +This is for Xcode 9, Swift 3.2 + # 2.1.0 This is for Xcode 8.1, Swift 3.0.1 @@ -18,7 +21,7 @@ This is a Swift 2.3 compatible version # 1.2.0 1. [[VCD-9, VCD-10](https://github.com/danthorpe/ValueCoding/pull/10)]: Adds support for a single level of nesting inside SequenceType values. For example it is now possible to encode and decode `[[Foo]]` structures where `Foo` conforms to `ValueCoding`. - + # 1.1.1 1. [[VCD-7](https://github.com/danthorpe/ValueCoding/pull/7)]: Updates CI stuff. 2. [[VCD-8](https://github.com/danthorpe/ValueCoding/pull/8)]: Updates documentation and README. Thanks [@mrackwitz](https://github.com/danthorpe/ValueCoding/commit/489809da1ba70abf09bc519b784d77a3c47b9f41). diff --git a/README.md b/README.md index 8573c55..507b15d 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ struct Foo: ValueCoding { class FooCoder: NSObject, NSCoding, CodingType { enum Keys: String { - case Bar = "bar" + case bar = "bar" } let value: Foo @@ -87,4 +87,3 @@ ValueCoding builds as a cross platform (iOS, OS X, watchOS, tvOS) extension comp ```ruby pod 'ValueCoding' ``` - diff --git a/Sources/ValueCoding.swift b/Sources/ValueCoding.swift index 290b90f..7f48790 100644 --- a/Sources/ValueCoding.swift +++ b/Sources/ValueCoding.swift @@ -1,9 +1,11 @@ // -// ValueCoding.swift -// ValueCoding +// ValueCoding +// File created on 11/10/2015. // -// Created by Daniel Thorpe on 11/10/2015. +// Copyright (c) 2015-2017 Daniel Thorpe // +// ValueCoding is licensed under the MIT License. Read the full license at +// https://github.com/danthorpe/ValueCoding/blob/master/LICENSE // import Foundation @@ -23,7 +25,6 @@ public protocol CodedValue { var value: Value { get } } - /** A generic protocol for classes which can encode/decode value types. diff --git a/Supporting Files/ValueCoding.xcconfig b/Supporting Files/ValueCoding.xcconfig index 37abc2d..b4b4359 100644 --- a/Supporting Files/ValueCoding.xcconfig +++ b/Supporting Files/ValueCoding.xcconfig @@ -24,7 +24,7 @@ APPLICATION_EXTENSION_API_ONLY_xctest = NO APPLICATION_EXTENSION_API_ONLY = $(APPLICATION_EXTENSION_API_ONLY_$(WRAPPER_EXTENSION)) // Build Settings -SWIFT_VERSION = 3.0 +SWIFT_VERSION = 3.2 SUPPORTED_PLATFORMS = macosx iphoneos appletvos watchos appletvsimulator iphonesimulator watchsimulator CLANG_ENABLE_CODE_COVERAGE = YES diff --git a/Supporting Files/Version.xcconfig b/Supporting Files/Version.xcconfig index 70e6e70..f7555ee 100644 --- a/Supporting Files/Version.xcconfig +++ b/Supporting Files/Version.xcconfig @@ -1 +1 @@ -VALUECODING_VERSION = 2.1.0 +VALUECODING_VERSION = 2.2.0 diff --git a/Tests/Support.swift b/Tests/Support.swift index 4ece566..8fad42b 100644 --- a/Tests/Support.swift +++ b/Tests/Support.swift @@ -1,9 +1,11 @@ // -// Support.swift -// ValueCoding +// ValueCoding +// File created on 11/10/2015. // -// Created by Daniel Thorpe on 11/10/2015. +// Copyright (c) 2015-2017 Daniel Thorpe // +// ValueCoding is licensed under the MIT License. Read the full license at +// https://github.com/danthorpe/ValueCoding/blob/master/LICENSE // import Foundation @@ -17,7 +19,7 @@ struct Foo: ValueCoding { class FooCoder: NSObject, NSCoding, CodingProtocol { enum Keys: String { - case Bar = "bar" + case bar } let value: Foo @@ -27,12 +29,12 @@ class FooCoder: NSObject, NSCoding, CodingProtocol { } required init?(coder aDecoder: NSCoder) { - let bar = aDecoder.decodeObject(forKey: Keys.Bar.rawValue) as? String + let bar = aDecoder.decodeObject(forKey: Keys.bar.rawValue) as? String value = Foo(bar: bar!) } func encode(with aCoder: NSCoder) { - aCoder.encode(value.bar, forKey: Keys.Bar.rawValue) + aCoder.encode(value.bar, forKey: Keys.bar.rawValue) } } @@ -56,7 +58,7 @@ func == (lhs: Baz, rhs: Baz) -> Bool { class BazCoder: NSObject, NSCoding, CodingProtocol { enum Keys: String { - case Bat = "bat" + case baz } let value: Baz @@ -66,11 +68,11 @@ class BazCoder: NSObject, NSCoding, CodingProtocol { } required init?(coder aDecoder: NSCoder) { - let bat = aDecoder.decodeObject(forKey: Keys.Bat.rawValue) as? String + let bat = aDecoder.decodeObject(forKey: Keys.baz.rawValue) as? String value = Baz(bat: bat!) } func encode(with aCoder: NSCoder) { - aCoder.encode(value.bat, forKey: Keys.Bat.rawValue) + aCoder.encode(value.bat, forKey: Keys.baz.rawValue) } } diff --git a/Tests/ValueCodingTests.swift b/Tests/ValueCodingTests.swift index c4b79c4..b601183 100644 --- a/Tests/ValueCodingTests.swift +++ b/Tests/ValueCodingTests.swift @@ -1,16 +1,17 @@ // -// ValueCodingTests.swift -// ValueCoding +// ValueCoding +// File created on 11/10/2015. // -// Created by Daniel Thorpe on 11/10/2015. +// Copyright (c) 2015-2017 Daniel Thorpe // +// ValueCoding is licensed under the MIT License. Read the full license at +// https://github.com/danthorpe/ValueCoding/blob/master/LICENSE // import Foundation import XCTest @testable import ValueCoding - class ValueCodingTests: XCTestCase { var item: Foo! @@ -36,7 +37,7 @@ class ValueCodingTests: XCTestCase { Foo(bar: "Bonjour le monde"), Foo(bar: "Hallo Welt"), Foo(bar: "हैलो वर्ल्ड"), - Foo(bar: "こんにちは世界"), + Foo(bar: "こんにちは世界") ] nested = [ items diff --git a/ValueCoding.podspec b/ValueCoding.podspec index 3c62ec0..1b1e9bc 100644 --- a/ValueCoding.podspec +++ b/ValueCoding.podspec @@ -1,16 +1,16 @@ Pod::Spec.new do |s| s.name = "ValueCoding" - s.version = "2.1.0" + s.version = "2.2.0" s.summary = "Swift protocols for encoding/decoding value types." s.description = <<-DESC - - ValueCoding is a simple pair of protocols to support the archiving + + ValueCoding is a simple pair of protocols to support the archiving and unarchiving of Swift value types. - It works by allowing a value type, which must conform to ValueCoding - to define via a typealias its archiver. The archiver is another type - which implements the ArchiverType protocol. This type will typically - be an NSObject which implements NSCoding and is an adaptor which is + It works by allowing a value type, which must conform to ValueCoding + to define via a typealias its archiver. The archiver is another type + which implements the ArchiverType protocol. This type will typically + be an NSObject which implements NSCoding and is an adaptor which is responsible for encoding and decoding the properties of the value. DESC @@ -24,7 +24,6 @@ Pod::Spec.new do |s| s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.tvos.deployment_target = '9.0' - s.watchos.deployment_target = '2.0' - s.source_files = 'Sources/*.swift' + s.watchos.deployment_target = '2.0' + s.source_files = 'Sources/*.swift' end - diff --git a/ValueCoding.xcodeproj/xcshareddata/IDETemplateMacros.plist b/ValueCoding.xcodeproj/xcshareddata/IDETemplateMacros.plist new file mode 100644 index 0000000..d5c2200 --- /dev/null +++ b/ValueCoding.xcodeproj/xcshareddata/IDETemplateMacros.plist @@ -0,0 +1,16 @@ + + + + + FILEHEADER + +// ___PROJECTNAME___ +// File created on ___DATE___. +// +// Copyright (c) 2015-___YEAR___ Daniel Thorpe +// +// ValueCoding is licensed under the MIT License. Read the full license at +// https://github.com/danthorpe/ValueCoding/blob/master/LICENSE +// + +