Skip to content
This repository has been archived by the owner on Jun 11, 2018. It is now read-only.

Commit

Permalink
2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
danthorpe authored Sep 14, 2017
2 parents b9c2fcf + 23a8a15 commit 48e6e88
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 50 deletions.
8 changes: 3 additions & 5 deletions .ci/buildkite/pipeline.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
FL_SLATHER_COVERALLS_ENABLED: true
14 changes: 7 additions & 7 deletions .fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
lane :lint do

swiftLint(
mode: :lint,
mode: :lint,
config_file: '.swiftlint.yml'
)
end
Expand All @@ -11,26 +11,26 @@ 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
)

end
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
Expand Down
8 changes: 4 additions & 4 deletions .jazzy.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}
}
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0
3.2
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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).
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct Foo: ValueCoding {
class FooCoder: NSObject, NSCoding, CodingType {

enum Keys: String {
case Bar = "bar"
case bar = "bar"
}

let value: Foo
Expand Down Expand Up @@ -87,4 +87,3 @@ ValueCoding builds as a cross platform (iOS, OS X, watchOS, tvOS) extension comp
```ruby
pod 'ValueCoding'
```

9 changes: 5 additions & 4 deletions Sources/ValueCoding.swift
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -23,7 +25,6 @@ public protocol CodedValue {
var value: Value { get }
}


/**
A generic protocol for classes which can
encode/decode value types.
Expand Down
2 changes: 1 addition & 1 deletion Supporting Files/ValueCoding.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Supporting Files/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VALUECODING_VERSION = 2.1.0
VALUECODING_VERSION = 2.2.0
20 changes: 11 additions & 9 deletions Tests/Support.swift
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -17,7 +19,7 @@ struct Foo: ValueCoding {
class FooCoder: NSObject, NSCoding, CodingProtocol {

enum Keys: String {
case Bar = "bar"
case bar
}

let value: Foo
Expand All @@ -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)
}
}

Expand All @@ -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
Expand All @@ -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)
}
}
11 changes: 6 additions & 5 deletions Tests/ValueCodingTests.swift
Original file line number Diff line number Diff line change
@@ -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!
Expand All @@ -36,7 +37,7 @@ class ValueCodingTests: XCTestCase {
Foo(bar: "Bonjour le monde"),
Foo(bar: "Hallo Welt"),
Foo(bar: "हैलो वर्ल्ड"),
Foo(bar: "こんにちは世界"),
Foo(bar: "こんにちは世界")
]
nested = [
items
Expand Down
19 changes: 9 additions & 10 deletions ValueCoding.podspec
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

16 changes: 16 additions & 0 deletions ValueCoding.xcodeproj/xcshareddata/IDETemplateMacros.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>FILEHEADER</key>
<string>
// ___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
//</string>
</dict>
</plist>

0 comments on commit 48e6e88

Please sign in to comment.