Skip to content

Commit

Permalink
upgrade to Swift 2.2 and Xcode 7.3 on travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesquires committed Apr 2, 2016
1 parent aa35462 commit 9c4b434
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 28 deletions.
33 changes: 22 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,46 @@
language: objective-c
osx_image: xcode7.2
osx_image: xcode7.3

env:
global:
- LANG=en_US.UTF-8

- PROJECT="JSQCoreDataKit.xcodeproj"
- IOS_SCHEME="JSQCoreDataKit-iOS"
- OSX_SCHEME="JSQCoreDataKit-OSX"
- TVOS_SCHEME="JSQCoreDataKit-tvOS"
- WATCHOS_SCHEME="JSQCoreDataKit-watchOS"
- IOS_SDK=iphonesimulator9.2

- IOS_SDK=iphonesimulator9.3
- OSX_SDK=macosx10.11
- TVOS_SDK=appletvsimulator9.1
- WATCHOS_SDK=watchsimulator2.1
- TVOS_SDK=appletvsimulator9.2
- WATCHOS_SDK=watchsimulator2.2

matrix:
- DESTINATION="OS=8.1,name=iPhone 4s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=8.2,name=iPhone 5" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=8.3,name=iPhone 5s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=8.4,name=iPhone 6" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.0,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=9.1,name=iPhone 6 Plus" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"

- DESTINATION="OS=9.0,name=iPhone 5s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.1,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=9.2,name=iPhone 6 Plus" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.3,name=iPhone 6 Plus" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"

- DESTINATION="OS=8.1,name=iPad 2" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=8.4,name=iPad Retina" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.0,name=iPad Air" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=8.4,name=iPad 2" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=9.0,name=iPad Retina" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.1,name=iPad Air" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=9.2,name=iPad Air 2" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
- DESTINATION="OS=9.3,name=iPad Pro" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"

- DESTINATION="arch=x86_64" SDK="$OSX_SDK" SCHEME="$OSX_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"

- DESTINATION="OS=9.0,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.2,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"

- DESTINATION="arch=x86_64" SDK="$OSX_SDK" SCHEME="$OSX_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=9.1,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=2.1,name=Apple Watch - 38mm" SDK="$WATCHOS_SDK" SCHEME="$WATCHOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=2.0,name=Apple Watch - 38mm" SDK="$WATCHOS_SDK" SCHEME="$WATCHOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"
- DESTINATION="OS=2.2,name=Apple Watch - 38mm" SDK="$WATCHOS_SDK" SCHEME="$WATCHOS_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO"

script:

Expand Down
2 changes: 1 addition & 1 deletion Example/ExampleApp/CompanyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class CompanyViewController: UITableViewController, NSFetchedResultsControllerDe
self.navigationItem.rightBarButtonItem = UIBarButtonItem(
barButtonSystemItem: .Add,
target: self,
action: "didTapAddButton:")
action: #selector(didTapAddButton(_:)))
}


Expand Down
4 changes: 2 additions & 2 deletions Source/CoreDataStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public final class CoreDataStack: CustomStringConvertible, Equatable {
self.storeCoordinator = storeCoordinator

NSNotificationCenter.defaultCenter().addObserver(self,
selector: Selector("didReceiveChildContextDidSaveNotification:"),
selector: #selector(didReceiveChildContextDidSaveNotification(_:)),
name: NSManagedObjectContextDidSaveNotification,
object: mainContext)
}
Expand Down Expand Up @@ -109,7 +109,7 @@ public final class CoreDataStack: CustomStringConvertible, Equatable {
}

NSNotificationCenter.defaultCenter().addObserver(self,
selector: Selector("didReceiveChildContextDidSaveNotification:"),
selector: #selector(didReceiveChildContextDidSaveNotification(_:)),
name: NSManagedObjectContextDidSaveNotification,
object: childContext)

Expand Down
4 changes: 2 additions & 2 deletions Source/CoreDataStackFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public struct CoreDataStackFactory: CustomStringConvertible, Equatable {
completion: StackResultClosure) {

dispatch_async(queue) {
assert(!NSThread.isMainThread(), "*** Error: cannot create a stack on the main queue via \(__FUNCTION__)")
assert(!NSThread.isMainThread(), "*** Error: cannot create a stack on the main queue via \(#function)")

let storeCoordinator: NSPersistentStoreCoordinator
do {
Expand Down Expand Up @@ -122,7 +122,7 @@ public struct CoreDataStackFactory: CustomStringConvertible, Equatable {
- returns: A `CoreDataStackResult` instance, describing the success or failure of creating the stack.
*/
public func createStack() -> CoreDataStackResult {
assert(NSThread.isMainThread(), "*** Error: \(__FUNCTION__) must be called on main thread")
assert(NSThread.isMainThread(), "*** Error: \(#function) must be called on main thread")

let storeCoordinator: NSPersistentStoreCoordinator
do {
Expand Down
2 changes: 1 addition & 1 deletion Tests/ModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class ModelTests: XCTestCase {
}

func test_Model_Description() {
print("\(__FUNCTION__)")
print("\(#function)")

let model = CoreDataModel(name: modelName, bundle: modelBundle, storeType: .InMemory)
print(model)
Expand Down
6 changes: 3 additions & 3 deletions Tests/ResetStackTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ResetStackTests: TestCase {
let stack = self.inMemoryStack
generateCompaniesInContext(stack.mainContext, count: 3)

let expectation = expectationWithDescription("\(__FUNCTION__)")
let expectation = expectationWithDescription("\(#function)")

// WHEN: we attempt to reset the stack
resetStack(stack) { (result: CoreDataStackResult) in
Expand All @@ -56,7 +56,7 @@ class ResetStackTests: TestCase {
let stack = self.inMemoryStack
generateCompaniesInContext(stack.backgroundContext, count: 3)

let expectation = expectationWithDescription("\(__FUNCTION__)")
let expectation = expectationWithDescription("\(#function)")

// WHEN: we attempt to reset the stack
resetStack(stack) { (result: CoreDataStackResult) in
Expand Down Expand Up @@ -91,7 +91,7 @@ class ResetStackTests: TestCase {
XCTAssertNil(error)
XCTAssertEqual(objectsBefore, 3)

let expectation = expectationWithDescription("\(__FUNCTION__)")
let expectation = expectationWithDescription("\(#function)")

// WHEN: we attempt to reset the stack
resetStack(stack) { (result: CoreDataStackResult) in
Expand Down
2 changes: 1 addition & 1 deletion Tests/SaveResultTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class SaveResultTests: XCTestCase {
}

func test_SaveResult_Description() {
print("\(__FUNCTION__)")
print("\(#function)")

let success = CoreDataSaveResult.Success
print(success)
Expand Down
6 changes: 3 additions & 3 deletions Tests/SaveTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SaveTests: TestCase {
return true
}

let saveExpectation = expectationWithDescription("\(__FUNCTION__)")
let saveExpectation = expectationWithDescription("\(#function)")

// WHEN: we attempt to save the context
saveContext(stack.mainContext, wait: true) { result in
Expand Down Expand Up @@ -141,7 +141,7 @@ class SaveTests: TestCase {
return true
}

let saveExpectation = expectationWithDescription("\(__FUNCTION__)")
let saveExpectation = expectationWithDescription("\(#function)")

// WHEN: we attempt to save the context asynchronously
saveContext(stack.mainContext, wait: false) { result in
Expand Down Expand Up @@ -184,7 +184,7 @@ class SaveTests: TestCase {
return true
}

let saveExpectation = expectationWithDescription("\(__FUNCTION__)")
let saveExpectation = expectationWithDescription("\(#function)")

// WHEN: we attempt to save the context
saveContext(childContext) { result in
Expand Down
4 changes: 2 additions & 2 deletions Tests/StackFactoryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class StackFactoryTests: TestCase {
let factory = CoreDataStackFactory(model: sqliteModel)

var stack: CoreDataStack?
let expectation = expectationWithDescription("\(__FUNCTION__)")
let expectation = expectationWithDescription("\(#function)")

// WHEN: we create a stack in the background
factory.createStackInBackground { (result: CoreDataStackResult) in
Expand Down Expand Up @@ -113,7 +113,7 @@ class StackFactoryTests: TestCase {
}

func test_StackFactory_Description() {
print("\(__FUNCTION__)")
print("\(#function)")

let factory = CoreDataStackFactory(model: inMemoryModel)
print(factory)
Expand Down
2 changes: 1 addition & 1 deletion Tests/StackResultTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class StackResultTests: TestCase {
}

func test_StackResult_Description() {
print("\(__FUNCTION__)")
print("\(#function)")

let success = CoreDataStackResult.Success(inMemoryStack)
print(success)
Expand Down
2 changes: 1 addition & 1 deletion Tests/StoreTypeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class StoreTypeTests: XCTestCase {
}

func test_StoreType_Description() {
print("\(__FUNCTION__)")
print("\(#function)")
let url = DefaultDirectoryURL()

let sqlite = StoreType.SQLite(url)
Expand Down

0 comments on commit 9c4b434

Please sign in to comment.