diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 040a09f..39d8a48 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -37,7 +37,7 @@ PODS: - NSString-Helper (1.0.5) - nv-ios-http-status (0.0.1) - PEAR-FileManager-iOS (1.3.1) - - PNObject (1.3.0): + - PNObject (1.3.1): - AFNetworking - CodFis-Helper - DDDKeychainWrapper @@ -55,7 +55,7 @@ PODS: - UIDevice-Utils - PureLayout (3.0.2) - RZDataBinding (2.1.0) - - Specta (1.0.5) + - Specta (1.0.6) - StrongestPasswordValidator (0.1.2) - UIDevice-Utils (1.0.0) @@ -84,10 +84,10 @@ SPEC CHECKSUMS: NSString-Helper: 459e1b6a62b3bf7db10f01b0d102548608e945c4 nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3 - PNObject: d085a7b5f0dc2a06ac60012556ba1dd44ab6c66d + PNObject: fce7072deed194ed45fca961cb72084b9a0e48d1 PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109 - Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2 + Specta: f506f3a8361de16bc0dcf3b17b75e269072ba465 StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7 UIDevice-Utils: ff37bd042127117572d6ce4c5ff074f4f54ab5ed diff --git a/Example/Pods/Local Podspecs/PNObject.podspec.json b/Example/Pods/Local Podspecs/PNObject.podspec.json index 6671201..0ab55aa 100644 --- a/Example/Pods/Local Podspecs/PNObject.podspec.json +++ b/Example/Pods/Local Podspecs/PNObject.podspec.json @@ -1,6 +1,6 @@ { "name": "PNObject", - "version": "1.3.0", + "version": "1.3.1", "summary": "PNObject is a simple replica of the more complex ParseObject", "homepage": "https://github.com/giuseppenucifora/PNObject", "license": { @@ -12,7 +12,7 @@ }, "source": { "git": "https://github.com/giuseppenucifora/PNObject.git", - "tag": "1.3.0" + "tag": "1.3.1" }, "platforms": { "ios": "8.0" diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 040a09f..39d8a48 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -37,7 +37,7 @@ PODS: - NSString-Helper (1.0.5) - nv-ios-http-status (0.0.1) - PEAR-FileManager-iOS (1.3.1) - - PNObject (1.3.0): + - PNObject (1.3.1): - AFNetworking - CodFis-Helper - DDDKeychainWrapper @@ -55,7 +55,7 @@ PODS: - UIDevice-Utils - PureLayout (3.0.2) - RZDataBinding (2.1.0) - - Specta (1.0.5) + - Specta (1.0.6) - StrongestPasswordValidator (0.1.2) - UIDevice-Utils (1.0.0) @@ -84,10 +84,10 @@ SPEC CHECKSUMS: NSString-Helper: 459e1b6a62b3bf7db10f01b0d102548608e945c4 nv-ios-http-status: b6c2b5fc8656cc19e0d3000dadce2080b99d0e2f PEAR-FileManager-iOS: 3bc403f68a53483f5629aa822f4649e40275c4d3 - PNObject: d085a7b5f0dc2a06ac60012556ba1dd44ab6c66d + PNObject: fce7072deed194ed45fca961cb72084b9a0e48d1 PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd RZDataBinding: 6981e90ddaae2f5e02028323b1043f8c31013109 - Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2 + Specta: f506f3a8361de16bc0dcf3b17b75e269072ba465 StrongestPasswordValidator: 921e42615bdf353513c6f925bffd4fc29865dbd7 UIDevice-Utils: ff37bd042127117572d6ce4c5ff074f4f54ab5ed diff --git a/Example/Pods/Specta/README.md b/Example/Pods/Specta/README.md index 431b121..d9b59e2 100644 --- a/Example/Pods/Specta/README.md +++ b/Example/Pods/Specta/README.md @@ -1,11 +1,7 @@ -# Specta +# Specta [![Build Status](https://travis-ci.org/specta/specta.svg)](https://travis-ci.org/specta/specta) [![Coverage Status](https://coveralls.io/repos/specta/specta/badge.svg)](https://coveralls.io/r/specta/specta) A light-weight TDD / BDD framework for Objective-C. -### Status -[![Build Status](https://travis-ci.org/specta/specta.png)](https://travis-ci.org/specta/specta) -[![Coverage Status](https://coveralls.io/repos/specta/specta/badge.svg)](https://coveralls.io/r/specta/specta) - ## FEATURES * An Objective-C RSpec-like BDD DSL @@ -15,56 +11,7 @@ A light-weight TDD / BDD framework for Objective-C. ## SCREENSHOT -![Specta Screenshot](https://raw.githubusercontent.com/specta/specta/master/misc/specta_screenshot.jpg) - -## SETUP - -Use [CocoaPods](http://github.com/CocoaPods/CocoaPods), [Carthage](https://github.com/carthage/carthage) or [Set up manually](#setting-up-manually) - -### CocoaPods - -1. Add Specta to your project's `Podfile`: - - ```ruby - target :MyApp do - # your app dependencies - end - - target :MyAppTests do - pod 'Specta', '~> 1.0' - # pod 'Expecta', '~> 1.0' # expecta matchers - # pod 'OCMock', '~> 2.2' # OCMock - # pod 'OCHamcrest', '~> 3.0' # hamcrest matchers - # pod 'OCMockito', '~> 1.0' # OCMock - # pod 'LRMocky', '~> 0.9' # LRMocky - end - ``` - -2. Run `pod update` or `pod install` in your project directory. - -### Carthage - -1. Add Specta to your project's `Cartfile.private` - - ``` - github "specta/specta" ~> 1.0 - ``` - -2. Run `carthage update` in your project directory -3. Drag the appropriate `Specta.framework` for your platform (located in Carthage/Build/) into your application’s Xcode project, and add it to your test target(s). -4. If you are building for iOS, a new `Run Script Phase` must be added to copy the framework. The instructions can be found on [Carthage's getting started instructions](https://github.com/carthage/carthage#getting-started) - -### SETTING UP MANUALLY - -1. Clone from Github. -2. Run `rake` in project root to build. -3. Add a "Cocoa/Cocoa Touch Unit Testing Bundle" target if you don't already have one. -4. Copy and add all header files in `Products` folder to the Test target in your Xcode project. -5. For **OS X projects**, copy and add `Specta.framework` in `Products/osx` folder to the test target in your Xcode project. - For **iOS projects**, copy and add `Specta.framework` in `Products/ios` folder to the test target in your Xcode project. - You can alternatively use `libSpecta.a`, if you prefer to add it as a static library for your project. (iOS 7 and below require this) -6. Add `-ObjC` and `-all_load` to the "Other Linker Flags" build setting for the test target in your Xcode project. -7. If you encounter linking issues with `_llvm_*` symbols, ensure your target's "Generate Test Coverage Files" and "Instrument Program Flow" build settings are set to `Yes`. + ## EXAMPLE @@ -156,12 +103,17 @@ SpecEnd * Do `#define SPT_CEDAR_SYNTAX` before importing Specta if you prefer to write `SPEC_BEGIN` and `SPEC_END` instead of `SpecBegin` and `SpecEnd`. * Prepend `f` to your `describe`, `context`, `example`, `it`, and `specify` to set focus on examples or groups. When specs are focused, all unfocused specs are skipped. * To use original XCTest reporter, set an environment variable named `SPECTA_REPORTER_CLASS` to `SPTXCTestReporter` in your test scheme. -* Set an environment variable `SPECTA_NO_SHUFFLE` with value `1` to disable test shuffling. +* Set an environment variable `SPECTA_SHUFFLE` with value `1` to enable test shuffling. * Set an environment variable `SPECTA_SEED` to specify the random seed for test shuffling. -Standard XCTest matchers such as `XCTAssertEqualObjects` and `XCTAssertNil` work, but you probably want to add a nicer matcher framework - [Expecta](http://github.com/specta/expecta/) to your setup. Or if you really prefer, [OCHamcrest](https://github.com/jonreid/OCHamcrest) works fine too. Also, add a mocking framework: [OCMock](http://ocmock.org/). +Standard XCTest matchers such as `XCTAssertEqualObjects` and `XCTAssertNil` work, but you probably want to add a nicer matcher framework - [Expecta](https://github.com/specta/expecta/) to your setup. Or if you really prefer, [OCHamcrest](https://github.com/hamcrest/OCHamcrest) works fine too. Also, add a mocking framework: [OCMock](http://ocmock.org/). -## RUNNING TESTS IN COMMAND LINE +## STATUS + +Specta is considered a done project, there are no plans for _active_ development on the project at the moment aside from ensuring future Xcode compatability. +Therefore it is a stable dependency, but will not be moving into the Swift world. If you are looking for that, we recommend you consider [Quick](https://github.com/quick/quick). + +## RUNNING SPECTA'S TESTS IN COMMAND LINE * Run `rake test` in the cloned folder. @@ -171,6 +123,57 @@ Standard XCTest matchers such as `XCTAssertEqualObjects` and `XCTAssertNil` work * Please prefix instance variable names with a single underscore (`_`). * Please prefix custom classes and functions defined in the global scope with `SPT`. +## Installation + +Use [CocoaPods](https://github.com/CocoaPods/CocoaPods), [Carthage](https://github.com/carthage/carthage) or [Set up manually](#setting-up-manually) + +### CocoaPods + +1. Add Specta to your project's `Podfile`: + +```ruby +target :MyApp do +# your app dependencies + + target :MyAppTests do + inherit! :search_paths + + pod 'Specta', '~> 1.0' + # pod 'Expecta', '~> 1.0' # expecta matchers + # pod 'OCMock', '~> 2.2' # OCMock + # pod 'OCHamcrest', '~> 3.0' # hamcrest matchers + # pod 'OCMockito', '~> 1.0' # OCMock + # pod 'LRMocky', '~> 0.9' # LRMocky + end +end +``` + +2. Run `pod install` in your project directory. + +### Carthage + +1. Add Specta to your project's `Cartfile.private` + + ``` + github "specta/specta" ~> 1.0 + ``` + +2. Run `carthage update` in your project directory +3. Drag the appropriate `Specta.framework` for your platform (located in Carthage/Build/) into your application’s Xcode project, and add it to your test target(s). +4. If you are building for iOS, a new `Run Script Phase` must be added to copy the framework. The instructions can be found on [Carthage's getting started instructions](https://github.com/carthage/carthage#getting-started) + +### SETTING UP MANUALLY + +1. Clone from Github. +2. Run `rake` in project root to build. +3. Add a "Cocoa/Cocoa Touch Unit Testing Bundle" target if you don't already have one. +4. Copy and add all header files in `Products` folder to the Test target in your Xcode project. +5. For **OS X projects**, copy and add `Specta.framework` in `Products/osx` folder to the test target in your Xcode project. + For **iOS projects**, copy and add `Specta.framework` in `Products/ios` folder to the test target in your Xcode project. + You can alternatively use `libSpecta.a`, if you prefer to add it as a static library for your project. (iOS 7 and below require this) +6. Add `-ObjC` and `-all_load` to the "Other Linker Flags" build setting for the test target in your Xcode project. +7. If you encounter linking issues with `_llvm_*` symbols, ensure your target's "Generate Test Coverage Files" and "Instrument Program Flow" build settings are set to `Yes`. + ## LICENSE -Copyright (c) 2012-2015 [Specta Team](https://github.com/specta?tab=members). This software is licensed under the [MIT License](http://github.com/specta/specta/raw/master/LICENSE). +Copyright (c) 2012-2016 [Specta Team](https://github.com/orgs/specta/people). This software is licensed under the [MIT License](http://github.com/specta/specta/raw/master/LICENSE). diff --git a/Example/Pods/Specta/Specta/Specta/SPTSpec.m b/Example/Pods/Specta/Specta/Specta/SPTSpec.m index 35ad313..bda0d3f 100644 --- a/Example/Pods/Specta/Specta/Specta/SPTSpec.m +++ b/Example/Pods/Specta/Specta/Specta/SPTSpec.m @@ -19,7 +19,7 @@ [spec spec]; } @catch (NSException *exception) { - fprintf(stderr, "%s: An exception has occured outside of tests, aborting.\n\n%s (%s) \n", [specName UTF8String], [[exception name] UTF8String], [[exception reason] UTF8String]); + fprintf(stderr, "%s: An exception has occurred outside of tests, aborting.\n\n%s (%s) \n", [specName UTF8String], [[exception name] UTF8String], [[exception reason] UTF8String]); if ([exception respondsToSelector:@selector(callStackSymbols)]) { NSArray *callStackSymbols = [exception callStackSymbols]; if (callStackSymbols) { @@ -145,6 +145,7 @@ example.block(self); } else if (!example.pending) { self.spt_skipped = YES; + NSLog(@"Skipping '%@'", example.name); } [[[NSThread currentThread] threadDictionary] removeObjectForKey:spt_kCurrentSpecKey]; diff --git a/Example/Pods/Specta/Specta/Specta/SpectaDSL.h b/Example/Pods/Specta/Specta/Specta/SpectaDSL.h index 284d4f5..3505862 100644 --- a/Example/Pods/Specta/Specta/Specta/SpectaDSL.h +++ b/Example/Pods/Specta/Specta/Specta/SpectaDSL.h @@ -54,7 +54,7 @@ OBJC_EXTERN void waitUntil(void (^block)(DoneCallback done)); * * @param timeout timeout for this @c block only; does not affect the global * timeout, as @c setAsyncSpecTimeout() does. - * @param ^block runs test code + * @param block runs test code */ OBJC_EXTERN void waitUntilTimeout(NSTimeInterval timeout, void (^block)(DoneCallback done)); diff --git a/Example/Pods/Specta/Specta/Specta/XCTestCase+Specta.m b/Example/Pods/Specta/Specta/Specta/XCTestCase+Specta.m index 4c503ee..ff801a1 100644 --- a/Example/Pods/Specta/Specta/Specta/XCTestCase+Specta.m +++ b/Example/Pods/Specta/Specta/Specta/XCTestCase+Specta.m @@ -42,7 +42,10 @@ [self spt_dequeueFailures]; }; - if ([NSThread isMainThread]) { + BOOL isMainThread = [NSThread isMainThread]; + BOOL isSpectaTest = [self isKindOfClass:[SPTSpec class]]; + + if (!isSpectaTest || isMainThread) { dequeueFailures(); } else { dispatch_sync(dispatch_get_main_queue(), dequeueFailures); diff --git a/Example/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests.debug.xcconfig index 3205ecd..768a8bf 100644 --- a/Example/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests.debug.xcconfig @@ -1,4 +1,4 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$(PLATFORM_DIR)/Developer/Library/Frameworks" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status" LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Expecta" "$PODS_CONFIGURATION_BUILD_DIR/Specta" "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/Bolts" "$PODS_CONFIGURATION_BUILD_DIR/CodFis-Helper" "$PODS_CONFIGURATION_BUILD_DIR/DDDKeychainWrapper" "$PODS_CONFIGURATION_BUILD_DIR/DJLocalization" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKShareKit" "$PODS_CONFIGURATION_BUILD_DIR/NSDataAES" "$PODS_CONFIGURATION_BUILD_DIR/NSDate_Utils" "$PODS_CONFIGURATION_BUILD_DIR/NSString-Helper" "$PODS_CONFIGURATION_BUILD_DIR/PEAR-FileManager-iOS" "$PODS_CONFIGURATION_BUILD_DIR/PNObject" "$PODS_CONFIGURATION_BUILD_DIR/PureLayout" "$PODS_CONFIGURATION_BUILD_DIR/RZDataBinding" "$PODS_CONFIGURATION_BUILD_DIR/StrongestPasswordValidator" "$PODS_CONFIGURATION_BUILD_DIR/UIDevice-Utils" "$PODS_CONFIGURATION_BUILD_DIR/nv-ios-http-status" diff --git a/Example/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests.release.xcconfig index 3205ecd..768a8bf 100644 --- a/Example/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-PNObject_Tests/Pods-PNObject_Tests.release.xcconfig @@ -1,4 +1,4 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$(PLATFORM_DIR)/Developer/Library/Frameworks" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Bolts" "${PODS_ROOT}/Headers/Public/CodFis-Helper" "${PODS_ROOT}/Headers/Public/DDDKeychainWrapper" "${PODS_ROOT}/Headers/Public/DJLocalization" "${PODS_ROOT}/Headers/Public/Expecta" "${PODS_ROOT}/Headers/Public/FBSDKCoreKit" "${PODS_ROOT}/Headers/Public/FBSDKLoginKit" "${PODS_ROOT}/Headers/Public/FBSDKShareKit" "${PODS_ROOT}/Headers/Public/NSDataAES" "${PODS_ROOT}/Headers/Public/NSDate_Utils" "${PODS_ROOT}/Headers/Public/NSString-Helper" "${PODS_ROOT}/Headers/Public/PEAR-FileManager-iOS" "${PODS_ROOT}/Headers/Public/PNObject" "${PODS_ROOT}/Headers/Public/PureLayout" "${PODS_ROOT}/Headers/Public/RZDataBinding" "${PODS_ROOT}/Headers/Public/Specta" "${PODS_ROOT}/Headers/Public/StrongestPasswordValidator" "${PODS_ROOT}/Headers/Public/UIDevice-Utils" "${PODS_ROOT}/Headers/Public/nv-ios-http-status" LIBRARY_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Expecta" "$PODS_CONFIGURATION_BUILD_DIR/Specta" "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/Bolts" "$PODS_CONFIGURATION_BUILD_DIR/CodFis-Helper" "$PODS_CONFIGURATION_BUILD_DIR/DDDKeychainWrapper" "$PODS_CONFIGURATION_BUILD_DIR/DJLocalization" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKShareKit" "$PODS_CONFIGURATION_BUILD_DIR/NSDataAES" "$PODS_CONFIGURATION_BUILD_DIR/NSDate_Utils" "$PODS_CONFIGURATION_BUILD_DIR/NSString-Helper" "$PODS_CONFIGURATION_BUILD_DIR/PEAR-FileManager-iOS" "$PODS_CONFIGURATION_BUILD_DIR/PNObject" "$PODS_CONFIGURATION_BUILD_DIR/PureLayout" "$PODS_CONFIGURATION_BUILD_DIR/RZDataBinding" "$PODS_CONFIGURATION_BUILD_DIR/StrongestPasswordValidator" "$PODS_CONFIGURATION_BUILD_DIR/UIDevice-Utils" "$PODS_CONFIGURATION_BUILD_DIR/nv-ios-http-status" diff --git a/PNObject/Classes/PNClasses/PNUser.m b/PNObject/Classes/PNClasses/PNUser.m index 248b437..1fe6527 100644 --- a/PNObject/Classes/PNClasses/PNUser.m +++ b/PNObject/Classes/PNClasses/PNUser.m @@ -320,8 +320,6 @@ static bool isFirstAccess = YES; [user setFirstName:[result objectForKey:@"first_name"]]; [user setLastName:[result objectForKey:@"last_name"]]; [user setEmail:[result objectForKey:@"email"]]; - [user setFacebookId:[result objectForKey:@"id"]]; - [user setFacebookUser:YES]; [user setBirthDate:[[NSDate dateFromString:[result objectForKey:@"birthday"] withFormat:kNSDateHelperFormatSQLDateEN_shashSeparated] toLocalTime]]; if (success) {