├── .gitignore
├── .travis.yml
├── Example
├── MBTNetworking.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ ├── MBTNetworking-Example.xcscheme
│ │ └── MBTNetworking.xcscheme
├── MBTNetworking.xcworkspace
│ └── contents.xcworkspacedata
├── MBTNetworking
│ ├── Base.lproj
│ │ ├── Main_iPad.storyboard
│ │ └── Main_iPhone.storyboard
│ ├── CPDAppDelegate.h
│ ├── CPDAppDelegate.m
│ ├── CPDViewController.h
│ ├── CPDViewController.m
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── MBTAppDelegate.h
│ ├── MBTAppDelegate.m
│ ├── MBTHTTPBinGetModel.h
│ ├── MBTHTTPBinGetModel.m
│ ├── MBTHTTPBinHeadersModel.h
│ ├── MBTHTTPBinHeadersModel.m
│ ├── MBTNetworking-Info.plist
│ ├── MBTNetworking-Prefix.pch
│ ├── MBTSampleRequests.h
│ ├── MBTSampleRequests.m
│ ├── MBTViewController.h
│ ├── MBTViewController.m
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ └── main.m
├── Podfile
├── Podfile.lock
├── Pods
│ ├── AFNetworking
│ │ ├── AFNetworking
│ │ │ ├── AFHTTPRequestOperation.h
│ │ │ ├── AFHTTPRequestOperation.m
│ │ │ ├── AFHTTPRequestOperationManager.h
│ │ │ ├── AFHTTPRequestOperationManager.m
│ │ │ ├── AFHTTPSessionManager.h
│ │ │ ├── AFHTTPSessionManager.m
│ │ │ ├── AFNetworkReachabilityManager.h
│ │ │ ├── AFNetworkReachabilityManager.m
│ │ │ ├── AFNetworking.h
│ │ │ ├── AFSecurityPolicy.h
│ │ │ ├── AFSecurityPolicy.m
│ │ │ ├── AFURLConnectionOperation.h
│ │ │ ├── AFURLConnectionOperation.m
│ │ │ ├── AFURLRequestSerialization.h
│ │ │ ├── AFURLRequestSerialization.m
│ │ │ ├── AFURLResponseSerialization.h
│ │ │ ├── AFURLResponseSerialization.m
│ │ │ ├── AFURLSessionManager.h
│ │ │ └── AFURLSessionManager.m
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── UIKit+AFNetworking
│ │ │ ├── AFNetworkActivityIndicatorManager.h
│ │ │ ├── AFNetworkActivityIndicatorManager.m
│ │ │ ├── UIActivityIndicatorView+AFNetworking.h
│ │ │ ├── UIActivityIndicatorView+AFNetworking.m
│ │ │ ├── UIAlertView+AFNetworking.h
│ │ │ ├── UIAlertView+AFNetworking.m
│ │ │ ├── UIButton+AFNetworking.h
│ │ │ ├── UIButton+AFNetworking.m
│ │ │ ├── UIImageView+AFNetworking.h
│ │ │ ├── UIImageView+AFNetworking.m
│ │ │ ├── UIKit+AFNetworking.h
│ │ │ ├── UIProgressView+AFNetworking.h
│ │ │ ├── UIProgressView+AFNetworking.m
│ │ │ ├── UIRefreshControl+AFNetworking.h
│ │ │ ├── UIRefreshControl+AFNetworking.m
│ │ │ ├── UIWebView+AFNetworking.h
│ │ │ └── UIWebView+AFNetworking.m
│ ├── Expecta
│ │ ├── Expecta
│ │ │ ├── EXPBlockDefinedMatcher.h
│ │ │ ├── EXPBlockDefinedMatcher.m
│ │ │ ├── EXPDefines.h
│ │ │ ├── EXPDoubleTuple.h
│ │ │ ├── EXPDoubleTuple.m
│ │ │ ├── EXPExpect.h
│ │ │ ├── EXPExpect.m
│ │ │ ├── EXPFloatTuple.h
│ │ │ ├── EXPFloatTuple.m
│ │ │ ├── EXPMatcher.h
│ │ │ ├── EXPUnsupportedObject.h
│ │ │ ├── EXPUnsupportedObject.m
│ │ │ ├── Expecta.h
│ │ │ ├── ExpectaObject.h
│ │ │ ├── ExpectaObject.m
│ │ │ ├── ExpectaSupport.h
│ │ │ ├── ExpectaSupport.m
│ │ │ ├── Matchers
│ │ │ │ ├── EXPMatcherHelpers.h
│ │ │ │ ├── EXPMatcherHelpers.m
│ │ │ │ ├── EXPMatchers+beCloseTo.h
│ │ │ │ ├── EXPMatchers+beCloseTo.m
│ │ │ │ ├── EXPMatchers+beFalsy.h
│ │ │ │ ├── EXPMatchers+beFalsy.m
│ │ │ │ ├── EXPMatchers+beGreaterThan.h
│ │ │ │ ├── EXPMatchers+beGreaterThan.m
│ │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.h
│ │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.m
│ │ │ │ ├── EXPMatchers+beIdenticalTo.h
│ │ │ │ ├── EXPMatchers+beIdenticalTo.m
│ │ │ │ ├── EXPMatchers+beInTheRangeOf.h
│ │ │ │ ├── EXPMatchers+beInTheRangeOf.m
│ │ │ │ ├── EXPMatchers+beInstanceOf.h
│ │ │ │ ├── EXPMatchers+beInstanceOf.m
│ │ │ │ ├── EXPMatchers+beKindOf.h
│ │ │ │ ├── EXPMatchers+beKindOf.m
│ │ │ │ ├── EXPMatchers+beLessThan.h
│ │ │ │ ├── EXPMatchers+beLessThan.m
│ │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.h
│ │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.m
│ │ │ │ ├── EXPMatchers+beNil.h
│ │ │ │ ├── EXPMatchers+beNil.m
│ │ │ │ ├── EXPMatchers+beSubclassOf.h
│ │ │ │ ├── EXPMatchers+beSubclassOf.m
│ │ │ │ ├── EXPMatchers+beSupersetOf.h
│ │ │ │ ├── EXPMatchers+beSupersetOf.m
│ │ │ │ ├── EXPMatchers+beTruthy.h
│ │ │ │ ├── EXPMatchers+beTruthy.m
│ │ │ │ ├── EXPMatchers+beginWith.h
│ │ │ │ ├── EXPMatchers+beginWith.m
│ │ │ │ ├── EXPMatchers+conformTo.h
│ │ │ │ ├── EXPMatchers+conformTo.m
│ │ │ │ ├── EXPMatchers+contain.h
│ │ │ │ ├── EXPMatchers+contain.m
│ │ │ │ ├── EXPMatchers+endWith.h
│ │ │ │ ├── EXPMatchers+endWith.m
│ │ │ │ ├── EXPMatchers+equal.h
│ │ │ │ ├── EXPMatchers+equal.m
│ │ │ │ ├── EXPMatchers+haveCountOf.h
│ │ │ │ ├── EXPMatchers+haveCountOf.m
│ │ │ │ ├── EXPMatchers+postNotification.h
│ │ │ │ ├── EXPMatchers+postNotification.m
│ │ │ │ ├── EXPMatchers+raise.h
│ │ │ │ ├── EXPMatchers+raise.m
│ │ │ │ ├── EXPMatchers+raiseWithReason.h
│ │ │ │ ├── EXPMatchers+raiseWithReason.m
│ │ │ │ ├── EXPMatchers+respondTo.h
│ │ │ │ ├── EXPMatchers+respondTo.m
│ │ │ │ └── EXPMatchers.h
│ │ │ ├── NSObject+Expecta.h
│ │ │ ├── NSValue+Expecta.h
│ │ │ └── NSValue+Expecta.m
│ │ ├── LICENSE
│ │ └── README.md
│ ├── Headers
│ │ ├── Private
│ │ │ ├── AFNetworking
│ │ │ │ ├── AFHTTPRequestOperation.h
│ │ │ │ ├── AFHTTPRequestOperationManager.h
│ │ │ │ ├── AFHTTPSessionManager.h
│ │ │ │ ├── AFNetworkActivityIndicatorManager.h
│ │ │ │ ├── AFNetworkReachabilityManager.h
│ │ │ │ ├── AFNetworking.h
│ │ │ │ ├── AFSecurityPolicy.h
│ │ │ │ ├── AFURLConnectionOperation.h
│ │ │ │ ├── AFURLRequestSerialization.h
│ │ │ │ ├── AFURLResponseSerialization.h
│ │ │ │ ├── AFURLSessionManager.h
│ │ │ │ ├── UIActivityIndicatorView+AFNetworking.h
│ │ │ │ ├── UIAlertView+AFNetworking.h
│ │ │ │ ├── UIButton+AFNetworking.h
│ │ │ │ ├── UIImageView+AFNetworking.h
│ │ │ │ ├── UIKit+AFNetworking.h
│ │ │ │ ├── UIProgressView+AFNetworking.h
│ │ │ │ ├── UIRefreshControl+AFNetworking.h
│ │ │ │ └── UIWebView+AFNetworking.h
│ │ │ ├── MBTNetworking
│ │ │ │ ├── AFNetworking+PromiseKit.h
│ │ │ │ ├── MBTHTTPRequest.h
│ │ │ │ ├── MBTModel.h
│ │ │ │ └── MBTNetworkManager.h
│ │ │ ├── Mantle
│ │ │ │ ├── EXTKeyPathCoding.h
│ │ │ │ ├── EXTRuntimeExtensions.h
│ │ │ │ ├── EXTScope.h
│ │ │ │ ├── MTLJSONAdapter.h
│ │ │ │ ├── MTLModel+NSCoding.h
│ │ │ │ ├── MTLModel.h
│ │ │ │ ├── MTLReflection.h
│ │ │ │ ├── MTLTransformerErrorHandling.h
│ │ │ │ ├── MTLValueTransformer.h
│ │ │ │ ├── Mantle.h
│ │ │ │ ├── NSArray+MTLManipulationAdditions.h
│ │ │ │ ├── NSDictionary+MTLJSONKeyPath.h
│ │ │ │ ├── NSDictionary+MTLManipulationAdditions.h
│ │ │ │ ├── NSDictionary+MTLMappingAdditions.h
│ │ │ │ ├── NSError+MTLModelException.h
│ │ │ │ ├── NSObject+MTLComparisonAdditions.h
│ │ │ │ ├── NSValueTransformer+MTLInversionAdditions.h
│ │ │ │ ├── NSValueTransformer+MTLPredefinedTransformerAdditions.h
│ │ │ │ └── metamacros.h
│ │ │ └── PromiseKit
│ │ │ │ ├── Promise.h
│ │ │ │ ├── PromiseKit.h
│ │ │ │ └── fwd.h
│ │ └── Public
│ │ │ ├── AFNetworking
│ │ │ ├── AFHTTPRequestOperation.h
│ │ │ ├── AFHTTPRequestOperationManager.h
│ │ │ ├── AFHTTPSessionManager.h
│ │ │ ├── AFNetworkActivityIndicatorManager.h
│ │ │ ├── AFNetworkReachabilityManager.h
│ │ │ ├── AFNetworking.h
│ │ │ ├── AFSecurityPolicy.h
│ │ │ ├── AFURLConnectionOperation.h
│ │ │ ├── AFURLRequestSerialization.h
│ │ │ ├── AFURLResponseSerialization.h
│ │ │ ├── AFURLSessionManager.h
│ │ │ ├── UIActivityIndicatorView+AFNetworking.h
│ │ │ ├── UIAlertView+AFNetworking.h
│ │ │ ├── UIButton+AFNetworking.h
│ │ │ ├── UIImageView+AFNetworking.h
│ │ │ ├── UIKit+AFNetworking.h
│ │ │ ├── UIProgressView+AFNetworking.h
│ │ │ ├── UIRefreshControl+AFNetworking.h
│ │ │ └── UIWebView+AFNetworking.h
│ │ │ ├── MBTNetworking
│ │ │ ├── AFNetworking+PromiseKit.h
│ │ │ ├── MBTHTTPRequest.h
│ │ │ ├── MBTModel.h
│ │ │ └── MBTNetworkManager.h
│ │ │ ├── Mantle
│ │ │ ├── MTLJSONAdapter.h
│ │ │ ├── MTLModel+NSCoding.h
│ │ │ ├── MTLModel.h
│ │ │ ├── MTLReflection.h
│ │ │ ├── MTLTransformerErrorHandling.h
│ │ │ ├── MTLValueTransformer.h
│ │ │ ├── Mantle.h
│ │ │ ├── NSArray+MTLManipulationAdditions.h
│ │ │ ├── NSDictionary+MTLJSONKeyPath.h
│ │ │ ├── NSDictionary+MTLManipulationAdditions.h
│ │ │ ├── NSDictionary+MTLMappingAdditions.h
│ │ │ ├── NSError+MTLModelException.h
│ │ │ ├── NSObject+MTLComparisonAdditions.h
│ │ │ ├── NSValueTransformer+MTLInversionAdditions.h
│ │ │ └── NSValueTransformer+MTLPredefinedTransformerAdditions.h
│ │ │ └── PromiseKit
│ │ │ ├── Promise.h
│ │ │ ├── PromiseKit.h
│ │ │ └── fwd.h
│ ├── Local Podspecs
│ │ └── MBTNetworking.podspec.json
│ ├── Manifest.lock
│ ├── Mantle
│ │ ├── LICENSE.md
│ │ ├── Mantle
│ │ │ ├── MTLJSONAdapter.h
│ │ │ ├── MTLJSONAdapter.m
│ │ │ ├── MTLModel+NSCoding.h
│ │ │ ├── MTLModel+NSCoding.m
│ │ │ ├── MTLModel.h
│ │ │ ├── MTLModel.m
│ │ │ ├── MTLReflection.h
│ │ │ ├── MTLReflection.m
│ │ │ ├── MTLTransformerErrorHandling.h
│ │ │ ├── MTLTransformerErrorHandling.m
│ │ │ ├── MTLValueTransformer.h
│ │ │ ├── MTLValueTransformer.m
│ │ │ ├── Mantle.h
│ │ │ ├── NSArray+MTLManipulationAdditions.h
│ │ │ ├── NSArray+MTLManipulationAdditions.m
│ │ │ ├── NSDictionary+MTLJSONKeyPath.h
│ │ │ ├── NSDictionary+MTLJSONKeyPath.m
│ │ │ ├── NSDictionary+MTLManipulationAdditions.h
│ │ │ ├── NSDictionary+MTLManipulationAdditions.m
│ │ │ ├── NSDictionary+MTLMappingAdditions.h
│ │ │ ├── NSDictionary+MTLMappingAdditions.m
│ │ │ ├── NSError+MTLModelException.h
│ │ │ ├── NSError+MTLModelException.m
│ │ │ ├── NSObject+MTLComparisonAdditions.h
│ │ │ ├── NSObject+MTLComparisonAdditions.m
│ │ │ ├── NSValueTransformer+MTLInversionAdditions.h
│ │ │ ├── NSValueTransformer+MTLInversionAdditions.m
│ │ │ ├── NSValueTransformer+MTLPredefinedTransformerAdditions.h
│ │ │ ├── NSValueTransformer+MTLPredefinedTransformerAdditions.m
│ │ │ └── extobjc
│ │ │ │ ├── EXTKeyPathCoding.h
│ │ │ │ ├── EXTRuntimeExtensions.h
│ │ │ │ ├── EXTRuntimeExtensions.m
│ │ │ │ ├── EXTScope.h
│ │ │ │ ├── EXTScope.m
│ │ │ │ └── metamacros.h
│ │ └── README.md
│ ├── Pods.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── MBTNetworking.xcscheme
│ │ │ ├── Pods-MBTNetworking-MBTNetworking-MBTNetworking.xcscheme
│ │ │ ├── Pods-MBTNetworking-MBTNetworking.xcscheme
│ │ │ ├── Pods-Tests-MBTNetworking-MBTNetworking.xcscheme
│ │ │ └── Pods-Tests-MBTNetworking.xcscheme
│ ├── PromiseKit
│ │ ├── LICENSE.text
│ │ ├── README.markdown
│ │ └── objc
│ │ │ ├── PMKPromise.m
│ │ │ ├── Private
│ │ │ └── NSMethodSignatureForBlock.m
│ │ │ ├── PromiseKit.h
│ │ │ └── PromiseKit
│ │ │ ├── Promise+Hang.h
│ │ │ ├── Promise+Join.h
│ │ │ ├── Promise+Pause.h
│ │ │ ├── Promise+Until.h
│ │ │ ├── Promise+When.h
│ │ │ ├── Promise+Zalgo.h
│ │ │ ├── Promise.h
│ │ │ └── fwd.h
│ ├── Specta
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── src
│ │ │ ├── SPTExample.h
│ │ │ ├── SPTExample.m
│ │ │ ├── SPTExampleGroup.h
│ │ │ ├── SPTExampleGroup.m
│ │ │ ├── SPTNestedReporter.h
│ │ │ ├── SPTNestedReporter.m
│ │ │ ├── SPTReporter.h
│ │ │ ├── SPTReporter.m
│ │ │ ├── SPTSharedExampleGroups.h
│ │ │ ├── SPTSharedExampleGroups.m
│ │ │ ├── SPTSpec.h
│ │ │ ├── SPTSpec.m
│ │ │ ├── SPTXCTestCase.h
│ │ │ ├── SPTXCTestCase.m
│ │ │ ├── SPTXCTestReporter.h
│ │ │ ├── SPTXCTestReporter.m
│ │ │ ├── Specta.h
│ │ │ ├── Specta.m
│ │ │ ├── SpectaSupport.h
│ │ │ ├── SpectaTypes.h
│ │ │ ├── SpectaUtility.h
│ │ │ ├── SpectaUtility.m
│ │ │ ├── XCTestCase+Specta.h
│ │ │ ├── XCTestCase+Specta.m
│ │ │ ├── XCTestLog+Specta.h
│ │ │ ├── XCTestLog+Specta.m
│ │ │ ├── XCTestRun+Specta.h
│ │ │ └── XCTestRun+Specta.m
│ └── Target Support Files
│ │ ├── AFNetworking
│ │ ├── AFNetworking-Private.xcconfig
│ │ ├── AFNetworking-dummy.m
│ │ ├── AFNetworking-prefix.pch
│ │ └── AFNetworking.xcconfig
│ │ ├── MBTNetworking
│ │ ├── MBTNetworking-Private.xcconfig
│ │ ├── MBTNetworking-dummy.m
│ │ ├── MBTNetworking-prefix.pch
│ │ └── MBTNetworking.xcconfig
│ │ ├── Mantle
│ │ ├── Mantle-Private.xcconfig
│ │ ├── Mantle-dummy.m
│ │ ├── Mantle-prefix.pch
│ │ └── Mantle.xcconfig
│ │ ├── Pods-MBTNetworking
│ │ ├── Pods-MBTNetworking-acknowledgements.markdown
│ │ ├── Pods-MBTNetworking-acknowledgements.plist
│ │ ├── Pods-MBTNetworking-dummy.m
│ │ ├── Pods-MBTNetworking-resources.sh
│ │ ├── Pods-MBTNetworking.debug.xcconfig
│ │ └── Pods-MBTNetworking.release.xcconfig
│ │ ├── Pods-Tests
│ │ ├── Pods-Tests-acknowledgements.markdown
│ │ ├── Pods-Tests-acknowledgements.plist
│ │ ├── Pods-Tests-dummy.m
│ │ ├── Pods-Tests-resources.sh
│ │ ├── Pods-Tests.debug.xcconfig
│ │ └── Pods-Tests.release.xcconfig
│ │ └── PromiseKit
│ │ ├── PromiseKit-Private.xcconfig
│ │ ├── PromiseKit-dummy.m
│ │ ├── PromiseKit-prefix.pch
│ │ └── PromiseKit.xcconfig
└── Tests
│ ├── Tests-Info.plist
│ ├── Tests-Prefix.pch
│ ├── Tests.m
│ └── en.lproj
│ └── InfoPlist.strings
├── LICENSE
├── MBTNetworking.podspec
├── Pod
├── Assets
│ └── .gitkeep
└── Classes
│ ├── .gitkeep
│ ├── AFNetworking+PromiseKit.h
│ ├── AFNetworking+PromiseKit.m
│ ├── MBTHTTPRequest.h
│ ├── MBTHTTPRequest.m
│ ├── MBTModel.h
│ ├── MBTModel.m
│ ├── MBTNetworkManager.h
│ └── MBTNetworkManager.m
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | # OS X
2 | .DS_Store
3 |
4 | # Xcode
5 | build/
6 | *.pbxuser
7 | !default.pbxuser
8 | *.mode1v3
9 | !default.mode1v3
10 | *.mode2v3
11 | !default.mode2v3
12 | *.perspectivev3
13 | !default.perspectivev3
14 | xcuserdata
15 | *.xccheckout
16 | profile
17 | *.moved-aside
18 | DerivedData
19 | *.hmap
20 | *.ipa
21 |
22 | # Bundler
23 | .bundle
24 |
25 | # We recommend against adding the Pods directory to your .gitignore. However
26 | # you should judge for yourself, the pros and cons are mentioned at:
27 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
28 | #
29 | # Note: if you ignore the Pods directory, make sure to uncomment
30 | # `pod install` in .travis.yml
31 | #
32 | # Pods/
33 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | # references:
2 | # * http://www.objc.io/issue-6/travis-ci.html
3 | # * https://github.com/supermarin/xcpretty#usage
4 |
5 | language: objective-c
6 | # cache: cocoapods
7 | # podfile: Example/Podfile
8 | # before_install:
9 | # - gem install cocoapods # Since Travis is not always on latest version
10 | # - pod install --project-directory=Example
11 | install:
12 | - gem install xcpretty --no-rdoc --no-ri --no-document --quiet
13 | script:
14 | - set -o pipefail && xcodebuild test -workspace Example/MBTNetworking.xcworkspace -scheme MBTNetworking-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c
15 | - pod lib lint --quick
16 |
--------------------------------------------------------------------------------
/Example/MBTNetworking.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/MBTNetworking.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/Base.lproj/Main_iPad.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/Base.lproj/Main_iPhone.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/CPDAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // MBTAppDelegate.h
3 | // MBTNetworking
4 | //
5 | // Created by CocoaPods on 08/23/2014.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MBTAppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/CPDAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // MBTAppDelegate.m
3 | // MBTNetworking
4 | //
5 | // Created by CocoaPods on 08/23/2014.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import "MBTAppDelegate.h"
10 |
11 | @implementation MBTAppDelegate
12 |
13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
14 | {
15 | // Override point for customization after application launch.
16 | return YES;
17 | }
18 |
19 | - (void)applicationWillResignActive:(UIApplication *)application
20 | {
21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
23 | }
24 |
25 | - (void)applicationDidEnterBackground:(UIApplication *)application
26 | {
27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
29 | }
30 |
31 | - (void)applicationWillEnterForeground:(UIApplication *)application
32 | {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | - (void)applicationDidBecomeActive:(UIApplication *)application
37 | {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application
42 | {
43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/CPDViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // MBTViewController.h
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 08/23/2014.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MBTViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/CPDViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // MBTViewController.m
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 08/23/2014.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import "MBTViewController.h"
10 |
11 | @interface MBTViewController ()
12 |
13 | @end
14 |
15 | @implementation MBTViewController
16 |
17 | - (void)viewDidLoad
18 | {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view, typically from a nib.
21 | }
22 |
23 | - (void)didReceiveMemoryWarning
24 | {
25 | [super didReceiveMemoryWarning];
26 | // Dispose of any resources that can be recreated.
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "ipad",
20 | "size" : "29x29",
21 | "scale" : "1x"
22 | },
23 | {
24 | "idiom" : "ipad",
25 | "size" : "29x29",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "ipad",
30 | "size" : "40x40",
31 | "scale" : "1x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "40x40",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "76x76",
41 | "scale" : "1x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "76x76",
46 | "scale" : "2x"
47 | }
48 | ],
49 | "info" : {
50 | "version" : 1,
51 | "author" : "xcode"
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | },
18 | {
19 | "orientation" : "portrait",
20 | "idiom" : "ipad",
21 | "extent" : "full-screen",
22 | "minimum-system-version" : "7.0",
23 | "scale" : "1x"
24 | },
25 | {
26 | "orientation" : "landscape",
27 | "idiom" : "ipad",
28 | "extent" : "full-screen",
29 | "minimum-system-version" : "7.0",
30 | "scale" : "1x"
31 | },
32 | {
33 | "orientation" : "portrait",
34 | "idiom" : "ipad",
35 | "extent" : "full-screen",
36 | "minimum-system-version" : "7.0",
37 | "scale" : "2x"
38 | },
39 | {
40 | "orientation" : "landscape",
41 | "idiom" : "ipad",
42 | "extent" : "full-screen",
43 | "minimum-system-version" : "7.0",
44 | "scale" : "2x"
45 | }
46 | ],
47 | "info" : {
48 | "version" : 1,
49 | "author" : "xcode"
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/MBTAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // MBTAppDelegate.h
3 | // MBTNetworking
4 | //
5 | // Created by CocoaPods on 03/08/2015.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MBTAppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/MBTAppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // MBTAppDelegate.m
3 | // MBTNetworking
4 | //
5 | // Created by CocoaPods on 03/08/2015.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import "MBTAppDelegate.h"
10 |
11 | @implementation MBTAppDelegate
12 |
13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
14 | {
15 | // Override point for customization after application launch.
16 | return YES;
17 | }
18 |
19 | - (void)applicationWillResignActive:(UIApplication *)application
20 | {
21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
23 | }
24 |
25 | - (void)applicationDidEnterBackground:(UIApplication *)application
26 | {
27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
29 | }
30 |
31 | - (void)applicationWillEnterForeground:(UIApplication *)application
32 | {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | - (void)applicationDidBecomeActive:(UIApplication *)application
37 | {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application
42 | {
43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/MBTHTTPBinGetModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // MBTHTTPBinGetModel.h
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 08/03/15.
6 | // Copyright (c) 2015 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import "MBTModel.h"
10 |
11 | @class MBTHTTPBinHeadersModel;
12 |
13 | @interface MBTHTTPBinGetModel : MBTModel
14 |
15 | @property (nonatomic, strong) NSDictionary *args;
16 | @property (nonatomic, strong) MBTHTTPBinHeadersModel *headers;
17 | @property (nonatomic, strong) NSString *origin;
18 | @property (nonatomic, strong) NSURL *url;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/MBTHTTPBinGetModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // MBTHTTPBinGetModel.m
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 08/03/15.
6 | // Copyright (c) 2015 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import "MBTHTTPBinGetModel.h"
10 | #import "MBTHTTPBinHeadersModel.h"
11 |
12 | @implementation MBTHTTPBinGetModel
13 |
14 | + (NSDictionary *)JSONKeyPathsByPropertyKey {
15 | return @{
16 | selStr(args): @"args",
17 | selStr(headers): @"headers",
18 | selStr(origin): @"origin",
19 | selStr(url): @"url"
20 | };
21 | }
22 |
23 | + (NSValueTransformer *)urlJSONTransformer {
24 | return [NSValueTransformer valueTransformerForName:MTLURLValueTransformerName];
25 | }
26 |
27 | + (NSValueTransformer *)headersJSONTransformer {
28 | return [MTLJSONAdapter dictionaryTransformerWithModelClass:[MBTHTTPBinHeadersModel class]];
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/MBTHTTPBinHeadersModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // MBTHTTPBinHeadersModel.h
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 08/03/15.
6 | // Copyright (c) 2015 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import "MBTModel.h"
10 |
11 | @interface MBTHTTPBinHeadersModel : MBTModel
12 |
13 | @property (nonatomic, strong) NSString *accept;
14 | @property (nonatomic, strong) NSString *acceptEncoding;
15 | @property (nonatomic, strong) NSString *acceptLanguage;
16 | @property (nonatomic, strong) NSString *cookie;
17 | @property (nonatomic, strong) NSString *host;
18 | @property (nonatomic, strong) NSString *referer;
19 | @property (nonatomic, strong) NSString *userAgent;
20 |
21 | @end
22 |
23 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/MBTHTTPBinHeadersModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // MBTHTTPBinHeadersModel.m
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 08/03/15.
6 | // Copyright (c) 2015 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import "MBTHTTPBinHeadersModel.h"
10 |
11 | @implementation MBTHTTPBinHeadersModel
12 |
13 | + (NSDictionary *)JSONKeyPathsByPropertyKey {
14 | return @{ selStr(accept): @"Accept",
15 | selStr(acceptEncoding): @"Accept-Encoding",
16 | selStr(acceptLanguage): @"Accept-Language",
17 | selStr(cookie): @"Cookie",
18 | selStr(host): @"Host",
19 | selStr(referer): @"Referer",
20 | selStr(userAgent): @"User-Agent" };
21 | }
22 |
23 | @end
24 |
25 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/MBTNetworking-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIMainStoryboardFile
28 | Main_iPhone
29 | UIMainStoryboardFile~ipad
30 | Main_iPad
31 | UIRequiredDeviceCapabilities
32 |
33 | armv7
34 |
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UISupportedInterfaceOrientations~ipad
42 |
43 | UIInterfaceOrientationPortrait
44 | UIInterfaceOrientationPortraitUpsideDown
45 | UIInterfaceOrientationLandscapeLeft
46 | UIInterfaceOrientationLandscapeRight
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/MBTNetworking-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_5_0
10 | #warning "This project uses features only available in iOS SDK 5.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/MBTSampleRequests.h:
--------------------------------------------------------------------------------
1 | //
2 | // MBTSampleRequests.h
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 08/03/15.
6 | // Copyright (c) 2015 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface MBTSampleRequests : NSObject
13 |
14 | + (MBTHTTPRequest *)get;
15 |
16 | + (MBTHTTPRequest *)headers;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/MBTSampleRequests.m:
--------------------------------------------------------------------------------
1 | //
2 | // MBTSampleRequests.m
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 08/03/15.
6 | // Copyright (c) 2015 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import "MBTSampleRequests.h"
10 | #import "MBTHTTPBinGetModel.h"
11 | #import "MBTHTTPBinHeadersModel.h"
12 |
13 | @implementation MBTSampleRequests
14 |
15 | + (MBTHTTPRequest *)get {
16 | return [MBTHTTPRequest requestWithMethod:MBT_GET path:@"/get" params:nil modelClass:[MBTHTTPBinGetModel class]];
17 | }
18 |
19 | + (MBTHTTPRequest *)headers {
20 | return [MBTHTTPRequest requestWithMethod:MBT_GET path:@"/headers" params:nil modelClass:[MBTHTTPBinHeadersModel class] jsonRootPath:@"headers"];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/MBTViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // MBTViewController.h
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 03/08/2015.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MBTViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/MBTViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // MBTViewController.m
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 03/08/2015.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import "MBTViewController.h"
10 |
11 | #import
12 | #import "MBTSampleRequests.h"
13 | #import "MBTHTTPBinGetModel.h"
14 | #import "MBTHTTPBinHeadersModel.h"
15 |
16 | @interface MBTViewController ()
17 |
18 | @end
19 |
20 | @implementation MBTViewController
21 |
22 | - (void)viewDidLoad {
23 | [super viewDidLoad];
24 |
25 | MBTNetworkManager *manager = [[MBTNetworkManager alloc] initWithBaseURL:[NSURL URLWithString:@"http://httpbin.org"]];
26 |
27 | [manager performRequest:[MBTSampleRequests get]].then(^(MBTHTTPBinGetModel *getModel, NSURLSessionTask *task) {
28 | NSLog(@"Origin: %@", getModel.origin);
29 | NSLog(@"User-Agent: %@", getModel.headers.userAgent);
30 |
31 | return [manager performRequest:[MBTSampleRequests headers]];
32 | }).then(^(MBTHTTPBinHeadersModel *headersModel, NSURLSessionTask *task) {
33 | NSLog(@"Headers: %@", headersModel);
34 | }).catch(^(NSError *error) {
35 | NSLog(@"Error: %@", error);
36 | });
37 |
38 | }
39 |
40 | - (void)didReceiveMemoryWarning {
41 | [super didReceiveMemoryWarning];
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Example/MBTNetworking/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 03/08/2015.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "MBTAppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([MBTAppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Example/Podfile:
--------------------------------------------------------------------------------
1 | source 'https://github.com/CocoaPods/Specs.git'
2 |
3 | target 'MBTNetworking', :exclusive => true do
4 | pod "MBTNetworking", :path => "../"
5 | end
6 |
7 | target 'Tests', :exclusive => true do
8 | pod "MBTNetworking", :path => "../"
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/Example/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - AFNetworking (2.5.4):
3 | - AFNetworking/NSURLConnection (= 2.5.4)
4 | - AFNetworking/NSURLSession (= 2.5.4)
5 | - AFNetworking/Reachability (= 2.5.4)
6 | - AFNetworking/Security (= 2.5.4)
7 | - AFNetworking/Serialization (= 2.5.4)
8 | - AFNetworking/UIKit (= 2.5.4)
9 | - AFNetworking/NSURLConnection (2.5.4):
10 | - AFNetworking/Reachability
11 | - AFNetworking/Security
12 | - AFNetworking/Serialization
13 | - AFNetworking/NSURLSession (2.5.4):
14 | - AFNetworking/Reachability
15 | - AFNetworking/Security
16 | - AFNetworking/Serialization
17 | - AFNetworking/Reachability (2.5.4)
18 | - AFNetworking/Security (2.5.4)
19 | - AFNetworking/Serialization (2.5.4)
20 | - AFNetworking/UIKit (2.5.4):
21 | - AFNetworking/NSURLConnection
22 | - AFNetworking/NSURLSession
23 | - Mantle (2.0.2):
24 | - Mantle/extobjc (= 2.0.2)
25 | - Mantle/extobjc (2.0.2)
26 | - MBTNetworking (0.4.1):
27 | - AFNetworking (~> 2.5)
28 | - Mantle (~> 2.0)
29 | - PromiseKit/Promise (~> 1.5)
30 | - PromiseKit/Promise (1.6.0)
31 |
32 | DEPENDENCIES:
33 | - MBTNetworking (from `../`)
34 |
35 | EXTERNAL SOURCES:
36 | MBTNetworking:
37 | :path: "../"
38 |
39 | SPEC CHECKSUMS:
40 | AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e
41 | Mantle: 967fd31ea0220890b2e76589198996b534bb3fb1
42 | MBTNetworking: 3d88dc4ef12fd7493a7f18a82c19ff5b36607cce
43 | PromiseKit: 6be651503d4af22830b5313be993c5a0ef77bf77
44 |
45 | COCOAPODS: 0.38.2
46 |
--------------------------------------------------------------------------------
/Example/Pods/AFNetworking/AFNetworking/AFNetworking.h:
--------------------------------------------------------------------------------
1 | // AFNetworking.h
2 | //
3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/)
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in
13 | // all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | // THE SOFTWARE.
22 |
23 | #import
24 | #import
25 |
26 | #ifndef _AFNETWORKING_
27 | #define _AFNETWORKING_
28 |
29 | #import "AFURLRequestSerialization.h"
30 | #import "AFURLResponseSerialization.h"
31 | #import "AFSecurityPolicy.h"
32 | #import "AFNetworkReachabilityManager.h"
33 |
34 | #import "AFURLConnectionOperation.h"
35 | #import "AFHTTPRequestOperation.h"
36 | #import "AFHTTPRequestOperationManager.h"
37 |
38 | #if ( ( defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || \
39 | ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 ) )
40 | #import "AFURLSessionManager.h"
41 | #import "AFHTTPSessionManager.h"
42 | #endif
43 |
44 | #endif /* _AFNETWORKING_ */
45 |
--------------------------------------------------------------------------------
/Example/Pods/AFNetworking/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Example/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h:
--------------------------------------------------------------------------------
1 | // UIActivityIndicatorView+AFNetworking.h
2 | // Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/)
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
5 | // of this software and associated documentation files (the "Software"), to deal
6 | // in the Software without restriction, including without limitation the rights
7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | // copies of the Software, and to permit persons to whom the Software is
9 | // furnished to do so, subject to the following conditions:
10 | //
11 | // The above copyright notice and this permission notice shall be included in
12 | // all copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | // THE SOFTWARE.
21 |
22 | #import
23 |
24 | #import
25 |
26 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
27 |
28 | #import
29 |
30 | @class AFURLConnectionOperation;
31 |
32 | /**
33 | This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a request operation or session task.
34 | */
35 | @interface UIActivityIndicatorView (AFNetworking)
36 |
37 | ///----------------------------------
38 | /// @name Animating for Session Tasks
39 | ///----------------------------------
40 |
41 | /**
42 | Binds the animating state to the state of the specified task.
43 |
44 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled.
45 | */
46 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
47 | - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task;
48 | #endif
49 |
50 | ///---------------------------------------
51 | /// @name Animating for Request Operations
52 | ///---------------------------------------
53 |
54 | /**
55 | Binds the animating state to the execution state of the specified operation.
56 |
57 | @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled.
58 | */
59 | - (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation;
60 |
61 | @end
62 |
63 | #endif
64 |
--------------------------------------------------------------------------------
/Example/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h:
--------------------------------------------------------------------------------
1 | // UIKit+AFNetworking.h
2 | //
3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/)
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in
13 | // all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | // THE SOFTWARE.
22 |
23 | #import
24 |
25 | #ifndef _UIKIT_AFNETWORKING_
26 | #define _UIKIT_AFNETWORKING_
27 |
28 | #import "AFNetworkActivityIndicatorManager.h"
29 |
30 | #import "UIActivityIndicatorView+AFNetworking.h"
31 | #import "UIAlertView+AFNetworking.h"
32 | #import "UIButton+AFNetworking.h"
33 | #import "UIImageView+AFNetworking.h"
34 | #import "UIKit+AFNetworking.h"
35 | #import "UIProgressView+AFNetworking.h"
36 | #import "UIRefreshControl+AFNetworking.h"
37 | #import "UIWebView+AFNetworking.h"
38 | #endif /* _UIKIT_AFNETWORKING_ */
39 |
--------------------------------------------------------------------------------
/Example/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h:
--------------------------------------------------------------------------------
1 | // UIRefreshControl+AFNetworking.m
2 | //
3 | // Copyright (c) 2014 AFNetworking (http://afnetworking.com)
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in
13 | // all copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | // THE SOFTWARE.
22 |
23 | #import
24 |
25 | #import
26 |
27 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
28 |
29 | #import
30 |
31 | @class AFURLConnectionOperation;
32 |
33 | /**
34 | This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically begining and ending refreshing depending on the loading state of a request operation or session task.
35 | */
36 | @interface UIRefreshControl (AFNetworking)
37 |
38 | ///-----------------------------------
39 | /// @name Refreshing for Session Tasks
40 | ///-----------------------------------
41 |
42 | /**
43 | Binds the refreshing state to the state of the specified task.
44 |
45 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled.
46 | */
47 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
48 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task;
49 | #endif
50 |
51 | ///----------------------------------------
52 | /// @name Refreshing for Request Operations
53 | ///----------------------------------------
54 |
55 | /**
56 | Binds the refreshing state to the execution state of the specified operation.
57 |
58 | @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled.
59 | */
60 | - (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation;
61 |
62 | @end
63 |
64 | #endif
65 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPBlockDefinedMatcher.h:
--------------------------------------------------------------------------------
1 | //
2 | // EXPRuntimeMatcher.h
3 | // Expecta
4 | //
5 | // Created by Luke Redpath on 26/03/2012.
6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "EXPMatcher.h"
11 | #import "EXPDefines.h"
12 |
13 | @interface EXPBlockDefinedMatcher : NSObject {
14 | EXPBoolBlock prerequisiteBlock;
15 | EXPBoolBlock matchBlock;
16 | EXPStringBlock failureMessageForToBlock;
17 | EXPStringBlock failureMessageForNotToBlock;
18 | }
19 |
20 | @property(nonatomic, copy) EXPBoolBlock prerequisiteBlock;
21 | @property(nonatomic, copy) EXPBoolBlock matchBlock;
22 | @property(nonatomic, copy) EXPStringBlock failureMessageForToBlock;
23 | @property(nonatomic, copy) EXPStringBlock failureMessageForNotToBlock;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPBlockDefinedMatcher.m:
--------------------------------------------------------------------------------
1 | //
2 | // EXPRuntimeMatcher.m
3 | // Expecta
4 | //
5 | // Created by Luke Redpath on 26/03/2012.
6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved.
7 | //
8 |
9 | #import "EXPBlockDefinedMatcher.h"
10 |
11 | @implementation EXPBlockDefinedMatcher
12 |
13 | - (void)dealloc
14 | {
15 | self.prerequisiteBlock = nil;
16 | self.matchBlock = nil;
17 | self.failureMessageForToBlock = nil;
18 | self.failureMessageForNotToBlock = nil;
19 |
20 | [super dealloc];
21 | }
22 |
23 | @synthesize prerequisiteBlock;
24 | @synthesize matchBlock;
25 | @synthesize failureMessageForToBlock;
26 | @synthesize failureMessageForNotToBlock;
27 |
28 | - (BOOL)meetsPrerequesiteFor:(id)actual
29 | {
30 | if (self.prerequisiteBlock) {
31 | return self.prerequisiteBlock();
32 | }
33 | return YES;
34 | }
35 |
36 | - (BOOL)matches:(id)actual
37 | {
38 | if (self.matchBlock) {
39 | return self.matchBlock();
40 | }
41 | return YES;
42 | }
43 |
44 | - (NSString *)failureMessageForTo:(id)actual
45 | {
46 | if (self.failureMessageForToBlock) {
47 | return self.failureMessageForToBlock();
48 | }
49 | return nil;
50 | }
51 |
52 | - (NSString *)failureMessageForNotTo:(id)actual
53 | {
54 | if (self.failureMessageForNotToBlock) {
55 | return self.failureMessageForNotToBlock();
56 | }
57 | return nil;
58 | }
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPDefines.h:
--------------------------------------------------------------------------------
1 | //
2 | // EXPDefines.h
3 | // Expecta
4 | //
5 | // Created by Luke Redpath on 26/03/2012.
6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved.
7 | //
8 |
9 | #ifndef Expecta_EXPDefines_h
10 | #define Expecta_EXPDefines_h
11 |
12 | typedef void (^EXPBasicBlock)();
13 | typedef id (^EXPIdBlock)();
14 | typedef BOOL (^EXPBoolBlock)();
15 | typedef NSString *(^EXPStringBlock)();
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPDoubleTuple.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface EXPDoubleTuple : NSObject {
4 | double *_values;
5 | size_t _size;
6 | }
7 |
8 | @property (nonatomic, assign) double *values;
9 | @property (nonatomic, assign) size_t size;
10 |
11 | - (instancetype)initWithDoubleValues:(double *)values size:(size_t)size NS_DESIGNATED_INITIALIZER;
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPDoubleTuple.m:
--------------------------------------------------------------------------------
1 | #import "EXPDoubleTuple.h"
2 |
3 | @implementation EXPDoubleTuple
4 |
5 | @synthesize values = _values, size = _size;
6 |
7 | - (instancetype)initWithDoubleValues:(double *)values size:(size_t)size {
8 | if ((self = [super init])) {
9 | self.values = malloc(sizeof(double) * size);
10 | memcpy(self.values, values, sizeof(double) * size);
11 | self.size = size;
12 | }
13 | return self;
14 | }
15 |
16 | - (void)dealloc {
17 | free(self.values);
18 | [super dealloc];
19 | }
20 |
21 | - (BOOL)isEqual:(id)object {
22 | if (![object isKindOfClass:[EXPDoubleTuple class]]) return NO;
23 | EXPDoubleTuple *other = (EXPDoubleTuple *)object;
24 | if (self.size == other.size) {
25 | for (int i = 0; i < self.size; ++i) {
26 | if (self.values[i] != other.values[i]) return NO;
27 | }
28 | return YES;
29 | }
30 | return NO;
31 | }
32 |
33 | - (NSString *)description {
34 | if (self.size == 2) {
35 | return [NSString stringWithFormat:@"Double tuple: {%f, %f}", self.values[0], self.values[1]];
36 | } else if (self.size == 4) {
37 | return [NSString stringWithFormat:@"Double tuple: {%f, %f, %f, %f}", self.values[0], self.values[1], self.values[2], self.values[3]];
38 | }
39 | return [NSString stringWithFormat:@"Double tuple of unexpected size %zd, sadly", self.size];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPExpect.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "EXPMatcher.h"
3 | #import "EXPDefines.h"
4 |
5 | @interface EXPExpect : NSObject {
6 | EXPIdBlock _actualBlock;
7 | id _testCase;
8 | int _lineNumber;
9 | char *_fileName;
10 | BOOL _negative;
11 | BOOL _asynchronous;
12 | NSTimeInterval _timeout;
13 | }
14 |
15 | @property(nonatomic, copy) EXPIdBlock actualBlock;
16 | @property(nonatomic, readonly) id actual;
17 | @property(nonatomic, assign) id testCase;
18 | @property(nonatomic) int lineNumber;
19 | @property(nonatomic) const char *fileName;
20 | @property(nonatomic) BOOL negative;
21 | @property(nonatomic) BOOL asynchronous;
22 | @property(nonatomic) NSTimeInterval timeout;
23 |
24 | @property(nonatomic, readonly) EXPExpect *to;
25 | @property(nonatomic, readonly) EXPExpect *toNot;
26 | @property(nonatomic, readonly) EXPExpect *notTo;
27 | @property(nonatomic, readonly) EXPExpect *will;
28 | @property(nonatomic, readonly) EXPExpect *willNot;
29 | @property(nonatomic, readonly) EXPExpect *(^after)(NSTimeInterval timeInterval);
30 |
31 | - (instancetype)initWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName NS_DESIGNATED_INITIALIZER;
32 | + (EXPExpect *)expectWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName;
33 |
34 | - (void)applyMatcher:(id)matcher;
35 | - (void)applyMatcher:(id)matcher to:(NSObject **)actual;
36 |
37 | @end
38 |
39 | @interface EXPDynamicPredicateMatcher : NSObject {
40 | EXPExpect *_expectation;
41 | SEL _selector;
42 | }
43 | - (instancetype)initWithExpectation:(EXPExpect *)expectation selector:(SEL)selector NS_DESIGNATED_INITIALIZER;
44 | @property (nonatomic, readonly, copy) void (^dispatch)(void);
45 | @end
46 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPFloatTuple.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface EXPFloatTuple : NSObject {
4 | float *_values;
5 | size_t _size;
6 | }
7 |
8 | @property (nonatomic, assign) float *values;
9 | @property (nonatomic, assign) size_t size;
10 |
11 | - (instancetype)initWithFloatValues:(float *)values size:(size_t)size NS_DESIGNATED_INITIALIZER;
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPFloatTuple.m:
--------------------------------------------------------------------------------
1 | #import "EXPFloatTuple.h"
2 |
3 | @implementation EXPFloatTuple
4 |
5 | @synthesize values = _values, size = _size;
6 |
7 | - (instancetype)initWithFloatValues:(float *)values size:(size_t)size {
8 | if ((self = [super init])) {
9 | self.values = malloc(sizeof(float) * size);
10 | memcpy(self.values, values, sizeof(float) * size);
11 | self.size = size;
12 | }
13 | return self;
14 | }
15 |
16 | - (void)dealloc {
17 | free(self.values);
18 | [super dealloc];
19 | }
20 |
21 | - (BOOL)isEqual:(id)object {
22 | if (![object isKindOfClass:[EXPFloatTuple class]]) return NO;
23 | EXPFloatTuple *other = (EXPFloatTuple *)object;
24 | if (self.size == other.size) {
25 | for (int i = 0; i < self.size; ++i) {
26 | if (self.values[i] != other.values[i]) return NO;
27 | }
28 | return YES;
29 | }
30 | return NO;
31 | }
32 |
33 | - (NSString *)description {
34 | if (self.size == 2) {
35 | return [NSString stringWithFormat:@"Float tuple: {%f, %f}", self.values[0], self.values[1]];
36 | } else if (self.size == 4) {
37 | return [NSString stringWithFormat:@"Float tuple: {%f, %f, %f, %f}", self.values[0], self.values[1], self.values[2], self.values[3]];
38 | }
39 | return [NSString stringWithFormat:@"Float tuple of unexpected size %zd, sadly", self.size];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPMatcher.h:
--------------------------------------------------------------------------------
1 | //
2 | // EXPMatcher.h
3 | // Expecta
4 | //
5 | // Created by Luke Redpath on 26/03/2012.
6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol EXPMatcher
12 |
13 | - (BOOL)matches:(id)actual;
14 |
15 | @optional
16 | - (BOOL)meetsPrerequesiteFor:(id)actual;
17 | - (NSString *)failureMessageForTo:(id)actual;
18 | - (NSString *)failureMessageForNotTo:(id)actual;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPUnsupportedObject.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface EXPUnsupportedObject : NSObject {
4 | NSString *_type;
5 | }
6 |
7 | @property (nonatomic, retain) NSString *type;
8 |
9 | - (instancetype)initWithType:(NSString *)type NS_DESIGNATED_INITIALIZER;
10 |
11 | @end
12 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPUnsupportedObject.m:
--------------------------------------------------------------------------------
1 | #import "EXPUnsupportedObject.h"
2 |
3 | @implementation EXPUnsupportedObject
4 |
5 | @synthesize type=_type;
6 |
7 | - (instancetype)initWithType:(NSString *)type {
8 | self = [super init];
9 | if(self) {
10 | self.type = type;
11 | }
12 | return self;
13 | }
14 |
15 | - (void)dealloc {
16 | self.type = nil;
17 | [super dealloc];
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Expecta.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | //! Project version number for Expecta.
4 | FOUNDATION_EXPORT double ExpectaVersionNumber;
5 |
6 | //! Project version string for Expecta.
7 | FOUNDATION_EXPORT const unsigned char ExpectaVersionString[];
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | // Enable shorthand by default
14 | #define expect(...) EXP_expect((__VA_ARGS__))
15 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/ExpectaObject.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #define EXPObjectify(value) _EXPObjectify(@encode(__typeof__((value))), (value))
4 | #define EXP_expect(actual) _EXP_expect(self, __LINE__, __FILE__, ^id{ return EXPObjectify((actual)); })
5 | #define EXPMatcherInterface(matcherName, matcherArguments) _EXPMatcherInterface(matcherName, matcherArguments)
6 | #define EXPMatcherImplementationBegin(matcherName, matcherArguments) _EXPMatcherImplementationBegin(matcherName, matcherArguments)
7 | #define EXPMatcherImplementationEnd _EXPMatcherImplementationEnd
8 |
9 | @interface Expecta : NSObject
10 |
11 | + (NSTimeInterval)asynchronousTestTimeout;
12 | + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/ExpectaObject.m:
--------------------------------------------------------------------------------
1 | #import "ExpectaObject.h"
2 |
3 | @implementation Expecta
4 |
5 | static NSTimeInterval _asynchronousTestTimeout = 1.0;
6 |
7 | + (NSTimeInterval)asynchronousTestTimeout {
8 | return _asynchronousTestTimeout;
9 | }
10 |
11 | + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout {
12 | _asynchronousTestTimeout = timeout;
13 | }
14 |
15 | @end
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/ExpectaSupport.h:
--------------------------------------------------------------------------------
1 | #import "EXPExpect.h"
2 | #import "EXPBlockDefinedMatcher.h"
3 |
4 | #ifdef __cplusplus
5 | extern "C" {
6 | #endif
7 |
8 | id _EXPObjectify(const char *type, ...);
9 | EXPExpect *_EXP_expect(id testCase, int lineNumber, const char *fileName, EXPIdBlock actualBlock);
10 |
11 | void EXPFail(id testCase, int lineNumber, const char *fileName, NSString *message);
12 | NSString *EXPDescribeObject(id obj);
13 |
14 | void EXP_prerequisite(EXPBoolBlock block);
15 | void EXP_match(EXPBoolBlock block);
16 | void EXP_failureMessageForTo(EXPStringBlock block);
17 | void EXP_failureMessageForNotTo(EXPStringBlock block);
18 |
19 | #if __has_feature(objc_arc)
20 | #define _EXP_release(x)
21 | #define _EXP_autorelease(x) (x)
22 |
23 | #else
24 | #define _EXP_release(x) [x release]
25 | #define _EXP_autorelease(x) [x autorelease]
26 | #endif
27 |
28 | // workaround for the categories bug: http://developer.apple.com/library/mac/#qa/qa1490/_index.html
29 | #define EXPFixCategoriesBug(name) \
30 | __attribute__((constructor)) static void EXPFixCategoriesBug##name() {}
31 |
32 | #define _EXPMatcherInterface(matcherName, matcherArguments) \
33 | @interface EXPExpect (matcherName##Matcher) \
34 | @property (nonatomic, readonly) void(^ matcherName) matcherArguments; \
35 | @end
36 |
37 | #define _EXPMatcherImplementationBegin(matcherName, matcherArguments) \
38 | EXPFixCategoriesBug(EXPMatcher##matcherName##Matcher); \
39 | @implementation EXPExpect (matcherName##Matcher) \
40 | @dynamic matcherName;\
41 | - (void(^) matcherArguments) matcherName { \
42 | EXPBlockDefinedMatcher *matcher = [[EXPBlockDefinedMatcher alloc] init]; \
43 | [[[NSThread currentThread] threadDictionary] setObject:matcher forKey:@"EXP_currentMatcher"]; \
44 | __block id actual = self.actual; \
45 | __block void (^prerequisite)(EXPBoolBlock block) = ^(EXPBoolBlock block) { EXP_prerequisite(block); }; \
46 | __block void (^match)(EXPBoolBlock block) = ^(EXPBoolBlock block) { EXP_match(block); }; \
47 | __block void (^failureMessageForTo)(EXPStringBlock block) = ^(EXPStringBlock block) { EXP_failureMessageForTo(block); }; \
48 | __block void (^failureMessageForNotTo)(EXPStringBlock block) = ^(EXPStringBlock block) { EXP_failureMessageForNotTo(block); }; \
49 | prerequisite(nil); match(nil); failureMessageForTo(nil); failureMessageForNotTo(nil); \
50 | void (^matcherBlock) matcherArguments = [^ matcherArguments { \
51 | {
52 |
53 | #define _EXPMatcherImplementationEnd \
54 | } \
55 | [self applyMatcher:matcher to:&actual]; \
56 | } copy]; \
57 | _EXP_release(matcher); \
58 | return _EXP_autorelease(matcherBlock); \
59 | } \
60 | @end
61 |
62 | #ifdef __cplusplus
63 | }
64 | #endif
65 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatcherHelpers.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | BOOL EXPIsValuePointer(NSValue *value);
4 | BOOL EXPIsNumberFloat(NSNumber *number);
5 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatcherHelpers.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatcherHelpers.h"
2 |
3 | BOOL EXPIsValuePointer(NSValue *value) {
4 | return [value objCType][0] == @encode(void *)[0];
5 | }
6 |
7 | BOOL EXPIsNumberFloat(NSNumber *number) {
8 | return strcmp([number objCType], @encode(float)) == 0;
9 | }
10 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beCloseTo.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beCloseToWithin, (id expected, id within));
4 | EXPMatcherInterface(beCloseToWithin, (id expected, id within));
5 |
6 | #define beCloseTo(expected) _beCloseToWithin(EXPObjectify((expected)), nil)
7 | #define beCloseToWithin(expected, range) _beCloseToWithin(EXPObjectify((expected)), EXPObjectify((range)))
8 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beCloseTo.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beCloseTo.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_beCloseToWithin, (id expected, id within)) {
5 | prerequisite(^BOOL{
6 | return [actual isKindOfClass:[NSNumber class]] &&
7 | [expected isKindOfClass:[NSNumber class]] &&
8 | ([within isKindOfClass:[NSNumber class]] || (within == nil));
9 | });
10 |
11 | match(^BOOL{
12 | double actualValue = [actual doubleValue];
13 | double expectedValue = [expected doubleValue];
14 |
15 | if (within != nil) {
16 | double withinValue = [within doubleValue];
17 | double lowerBound = expectedValue - withinValue;
18 | double upperBound = expectedValue + withinValue;
19 | return (actualValue >= lowerBound) && (actualValue <= upperBound);
20 | } else {
21 | double diff = fabs(actualValue - expectedValue);
22 | actualValue = fabs(actualValue);
23 | expectedValue = fabs(expectedValue);
24 | double largest = (expectedValue > actualValue) ? expectedValue : actualValue;
25 | return (diff <= largest * FLT_EPSILON);
26 | }
27 | });
28 |
29 | failureMessageForTo(^NSString *{
30 | if (within) {
31 | return [NSString stringWithFormat:@"expected %@ to be close to %@ within %@",
32 | EXPDescribeObject(actual), EXPDescribeObject(expected), EXPDescribeObject(within)];
33 | } else {
34 | return [NSString stringWithFormat:@"expected %@ to be close to %@",
35 | EXPDescribeObject(actual), EXPDescribeObject(expected)];
36 | }
37 | });
38 |
39 | failureMessageForNotTo(^NSString *{
40 | if (within) {
41 | return [NSString stringWithFormat:@"expected %@ not to be close to %@ within %@",
42 | EXPDescribeObject(actual), EXPDescribeObject(expected), EXPDescribeObject(within)];
43 | } else {
44 | return [NSString stringWithFormat:@"expected %@ not to be close to %@",
45 | EXPDescribeObject(actual), EXPDescribeObject(expected)];
46 | }
47 | });
48 | }
49 | EXPMatcherImplementationEnd
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beFalsy.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beFalsy, (void));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beFalsy.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beFalsy.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(beFalsy, (void)) {
5 | match(^BOOL{
6 | if([actual isKindOfClass:[NSNumber class]]) {
7 | return ![(NSNumber *)actual boolValue];
8 | } else if([actual isKindOfClass:[NSValue class]]) {
9 | if(EXPIsValuePointer((NSValue *)actual)) {
10 | return ![(NSValue *)actual pointerValue];
11 | }
12 | }
13 | return !actual;
14 | });
15 |
16 | failureMessageForTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: a falsy value, got: %@, which is truthy", EXPDescribeObject(actual)];
18 | });
19 |
20 | failureMessageForNotTo(^NSString *{
21 | return [NSString stringWithFormat:@"expected: a non-falsy value, got: %@, which is falsy", EXPDescribeObject(actual)];
22 | });
23 | }
24 | EXPMatcherImplementationEnd
25 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThan.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beGreaterThan, (id expected));
4 | EXPMatcherInterface(beGreaterThan, (id expected));
5 |
6 | #define beGreaterThan(expected) _beGreaterThan(EXPObjectify((expected)))
7 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThan.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beGreaterThan.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_beGreaterThan, (id expected)) {
5 | match(^BOOL{
6 | if ([actual respondsToSelector:@selector(compare:)]) {
7 | return [actual compare:expected] == NSOrderedDescending;
8 | }
9 | return NO;
10 | });
11 |
12 | failureMessageForTo(^NSString *{
13 | return [NSString stringWithFormat:@"expected: %@ to be greater than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
14 | });
15 |
16 | failureMessageForNotTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: %@ not to be greater than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
18 | });
19 | }
20 | EXPMatcherImplementationEnd
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beGreaterThanOrEqualTo, (id expected));
4 | EXPMatcherInterface(beGreaterThanOrEqualTo, (id expected));
5 |
6 | #define beGreaterThanOrEqualTo(expected) _beGreaterThanOrEqualTo(EXPObjectify((expected)))
7 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beGreaterThanOrEqualTo.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_beGreaterThanOrEqualTo, (id expected)) {
5 | match(^BOOL{
6 | if ([actual respondsToSelector:@selector(compare:)]) {
7 | return [actual compare:expected] != NSOrderedAscending;
8 | }
9 | return NO;
10 | });
11 |
12 | failureMessageForTo(^NSString *{
13 | return [NSString stringWithFormat:@"expected: %@ to be greater than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
14 | });
15 |
16 | failureMessageForNotTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: %@ not to be greater than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
18 | });
19 | }
20 | EXPMatcherImplementationEnd
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beIdenticalTo.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beIdenticalTo, (void *expected));
4 | EXPMatcherInterface(beIdenticalTo, (void *expected)); // to aid code completion
5 |
6 | #if __has_feature(objc_arc)
7 | #define beIdenticalTo(expected) _beIdenticalTo((__bridge void*)expected)
8 | #else
9 | #define beIdenticalTo _beIdenticalTo
10 | #endif
11 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beIdenticalTo.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+equal.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(beIdenticalTo, (void *expected)) {
5 | match(^BOOL{
6 | if(actual == expected) {
7 | return YES;
8 | } else if([actual isKindOfClass:[NSValue class]] && EXPIsValuePointer((NSValue *)actual)) {
9 | if([(NSValue *)actual pointerValue] == expected) {
10 | return YES;
11 | }
12 | }
13 | return NO;
14 | });
15 |
16 | failureMessageForTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: <%p>, got: <%p>", expected, actual];
18 | });
19 |
20 | failureMessageForNotTo(^NSString *{
21 | return [NSString stringWithFormat:@"expected: not <%p>, got: <%p>", expected, actual];
22 | });
23 | }
24 | EXPMatcherImplementationEnd
25 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beInTheRangeOf.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound));
4 | EXPMatcherInterface(beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound));
5 |
6 | #define beInTheRangeOf(expectedLowerBound, expectedUpperBound) _beInTheRangeOf(EXPObjectify((expectedLowerBound)), EXPObjectify((expectedUpperBound)))
7 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beInTheRangeOf.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beInTheRangeOf.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)) {
5 | match(^BOOL{
6 | if ([actual respondsToSelector:@selector(compare:)]) {
7 | NSComparisonResult compareLowerBound = [expectedLowerBound compare: actual];
8 | NSComparisonResult compareUpperBound = [expectedUpperBound compare: actual];
9 | if (compareLowerBound == NSOrderedSame) {
10 | return YES;
11 | }
12 | if (compareUpperBound == NSOrderedSame) {
13 | return YES;
14 | }
15 | if ((compareLowerBound == NSOrderedAscending) && (compareUpperBound == NSOrderedDescending)) {
16 | return YES;
17 | }
18 | }
19 | return NO;
20 | });
21 |
22 | failureMessageForTo(^NSString *{
23 | return [NSString stringWithFormat:@"expected: %@ to be in the range [%@, %@] (inclusive)", EXPDescribeObject(actual), EXPDescribeObject(expectedLowerBound), EXPDescribeObject(expectedUpperBound)];
24 | });
25 |
26 | failureMessageForNotTo(^NSString *{
27 | return [NSString stringWithFormat:@"expected: %@ not to be in the range [%@, %@] (inclusive)", EXPDescribeObject(actual), EXPDescribeObject(expectedLowerBound), EXPDescribeObject(expectedUpperBound)];
28 | });
29 | }
30 | EXPMatcherImplementationEnd
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beInstanceOf.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beInstanceOf, (Class expected));
4 |
5 | #define beAnInstanceOf beInstanceOf
6 | #define beMemberOf beInstanceOf
7 | #define beAMemberOf beInstanceOf
8 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beInstanceOf.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beInstanceOf.h"
2 |
3 | EXPMatcherImplementationBegin(beInstanceOf, (Class expected)) {
4 | BOOL actualIsNil = (actual == nil);
5 | BOOL expectedIsNil = (expected == nil);
6 |
7 | prerequisite(^BOOL{
8 | return !(actualIsNil || expectedIsNil);
9 | });
10 |
11 | match(^BOOL{
12 | return [actual isMemberOfClass:expected];
13 | });
14 |
15 | failureMessageForTo(^NSString *{
16 | if(actualIsNil) return @"the actual value is nil/null";
17 | if(expectedIsNil) return @"the expected value is nil/null";
18 | return [NSString stringWithFormat:@"expected: an instance of %@, got: an instance of %@", [expected class], [actual class]];
19 | });
20 |
21 | failureMessageForNotTo(^NSString *{
22 | if(actualIsNil) return @"the actual value is nil/null";
23 | if(expectedIsNil) return @"the expected value is nil/null";
24 | return [NSString stringWithFormat:@"expected: not an instance of %@, got: an instance of %@", [expected class], [actual class]];
25 | });
26 | }
27 | EXPMatcherImplementationEnd
28 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beKindOf.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beKindOf, (Class expected));
4 |
5 | #define beAKindOf beKindOf
6 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beKindOf.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beKindOf.h"
2 |
3 | EXPMatcherImplementationBegin(beKindOf, (Class expected)) {
4 | BOOL actualIsNil = (actual == nil);
5 | BOOL expectedIsNil = (expected == nil);
6 |
7 | prerequisite(^BOOL{
8 | return !(actualIsNil || expectedIsNil);
9 | });
10 |
11 | match(^BOOL{
12 | return [actual isKindOfClass:expected];
13 | });
14 |
15 | failureMessageForTo(^NSString *{
16 | if(actualIsNil) return @"the actual value is nil/null";
17 | if(expectedIsNil) return @"the expected value is nil/null";
18 | return [NSString stringWithFormat:@"expected: a kind of %@, got: an instance of %@, which is not a kind of %@", [expected class], [actual class], [expected class]];
19 | });
20 |
21 | failureMessageForNotTo(^NSString *{
22 | if(actualIsNil) return @"the actual value is nil/null";
23 | if(expectedIsNil) return @"the expected value is nil/null";
24 | return [NSString stringWithFormat:@"expected: not a kind of %@, got: an instance of %@, which is a kind of %@", [expected class], [actual class], [expected class]];
25 | });
26 | }
27 | EXPMatcherImplementationEnd
28 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThan.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beLessThan, (id expected));
4 | EXPMatcherInterface(beLessThan, (id expected));
5 |
6 | #define beLessThan(expected) _beLessThan(EXPObjectify((expected)))
7 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThan.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beLessThan.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_beLessThan, (id expected)) {
5 | match(^BOOL{
6 | if ([actual respondsToSelector:@selector(compare:)]) {
7 | return [actual compare:expected] == NSOrderedAscending;
8 | }
9 | return NO;
10 | });
11 |
12 | failureMessageForTo(^NSString *{
13 | return [NSString stringWithFormat:@"expected: %@ to be less than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
14 | });
15 |
16 | failureMessageForNotTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: %@ not to be less than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
18 | });
19 | }
20 | EXPMatcherImplementationEnd
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThanOrEqualTo.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beLessThanOrEqualTo, (id expected));
4 | EXPMatcherInterface(beLessThanOrEqualTo, (id expected));
5 |
6 | #define beLessThanOrEqualTo(expected) _beLessThanOrEqualTo(EXPObjectify((expected)))
7 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThanOrEqualTo.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beLessThanOrEqualTo.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_beLessThanOrEqualTo, (id expected)) {
5 | match(^BOOL{
6 | if ([actual respondsToSelector:@selector(compare:)]) {
7 | return [actual compare:expected] != NSOrderedDescending;
8 | }
9 | return NO;
10 | });
11 |
12 | failureMessageForTo(^NSString *{
13 | return [NSString stringWithFormat:@"expected: %@ to be less than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
14 | });
15 |
16 | failureMessageForNotTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: %@ not to be less than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
18 | });
19 | }
20 | EXPMatcherImplementationEnd
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beNil.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beNil, (void));
4 |
5 | #define beNull beNil
6 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beNil.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beNil.h"
2 |
3 | EXPMatcherImplementationBegin(beNil, (void)) {
4 | match(^BOOL{
5 | return actual == nil;
6 | });
7 |
8 | failureMessageForTo(^NSString *{
9 | return [NSString stringWithFormat:@"expected: nil/null, got: %@", EXPDescribeObject(actual)];
10 | });
11 |
12 | failureMessageForNotTo(^NSString *{
13 | return [NSString stringWithFormat:@"expected: not nil/null, got: %@", EXPDescribeObject(actual)];
14 | });
15 | }
16 | EXPMatcherImplementationEnd
17 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beSubclassOf.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beSubclassOf, (Class expected));
4 |
5 | #define beASubclassOf beSubclassOf
6 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beSubclassOf.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beSubclassOf.h"
2 | #import "NSValue+Expecta.h"
3 | #import
4 |
5 | EXPMatcherImplementationBegin(beSubclassOf, (Class expected)) {
6 | __block BOOL actualIsClass = YES;
7 |
8 | prerequisite(^BOOL {
9 | actualIsClass = class_isMetaClass(object_getClass(actual));
10 | return actualIsClass;
11 | });
12 |
13 | match(^BOOL{
14 | return [actual isSubclassOfClass:expected];
15 | });
16 |
17 | failureMessageForTo(^NSString *{
18 | if(!actualIsClass) return @"the actual value is not a Class";
19 | return [NSString stringWithFormat:@"expected: a subclass of %@, got: a class %@, which is not a subclass of %@", [expected class], actual, [expected class]];
20 | });
21 |
22 | failureMessageForNotTo(^NSString *{
23 | if(!actualIsClass) return @"the actual value is not a Class";
24 | return [NSString stringWithFormat:@"expected: not a subclass of %@, got: a class %@, which is a subclass of %@", [expected class], actual, [expected class]];
25 | });
26 | }
27 | EXPMatcherImplementationEnd
28 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beSupersetOf.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beSupersetOf, (id subset));
4 |
5 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beSupersetOf.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+contain.h"
2 |
3 | EXPMatcherImplementationBegin(beSupersetOf, (id subset)) {
4 | BOOL actualIsCompatible = [actual isKindOfClass:[NSDictionary class]] || [actual respondsToSelector:@selector(containsObject:)];
5 | BOOL subsetIsNil = (subset == nil);
6 |
7 | // For some instances the isKindOfClass: method returns false, even though
8 | // they are both actually dictionaries. e.g. Comparing a NSCFDictionary and a
9 | // NSDictionary.
10 | BOOL bothAreDictionaries = [actual isKindOfClass:[NSDictionary class]] && [subset isKindOfClass:[NSDictionary class]];
11 |
12 | BOOL classMatches = bothAreDictionaries || [subset isKindOfClass:[actual class]];
13 |
14 | prerequisite(^BOOL{
15 | return actualIsCompatible && !subsetIsNil && classMatches;
16 | });
17 |
18 | match(^BOOL{
19 | if(!actualIsCompatible) return NO;
20 |
21 | if([actual isKindOfClass:[NSDictionary class]]) {
22 | for (id key in subset) {
23 | id actualValue = [actual valueForKey:key];
24 | id subsetValue = [subset valueForKey:key];
25 |
26 | if (![subsetValue isEqual:actualValue]) return NO;
27 | }
28 | } else {
29 | for (id object in subset) {
30 | if (![actual containsObject:object]) return NO;
31 | }
32 | }
33 |
34 | return YES;
35 | });
36 |
37 | failureMessageForTo(^NSString *{
38 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSDictionary and does not implement -containsObject:", EXPDescribeObject(actual)];
39 |
40 | if(subsetIsNil) return @"the expected value is nil/null";
41 |
42 | if(!classMatches) return [NSString stringWithFormat:@"%@ does not match the class of %@", EXPDescribeObject(subset), EXPDescribeObject(actual)];
43 |
44 | return [NSString stringWithFormat:@"expected %@ to be a superset of %@", EXPDescribeObject(actual), EXPDescribeObject(subset)];
45 | });
46 |
47 | failureMessageForNotTo(^NSString *{
48 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSDictionary and does not implement -containsObject:", EXPDescribeObject(actual)];
49 |
50 | if(subsetIsNil) return @"the expected value is nil/null";
51 |
52 | if(!classMatches) return [NSString stringWithFormat:@"%@ does not match the class of %@", EXPDescribeObject(subset), EXPDescribeObject(actual)];
53 |
54 | return [NSString stringWithFormat:@"expected %@ not to be a superset of %@", EXPDescribeObject(actual), EXPDescribeObject(subset)];
55 | });
56 | }
57 | EXPMatcherImplementationEnd
58 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beTruthy.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beTruthy, (void));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beTruthy.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beTruthy.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(beTruthy, (void)) {
5 | match(^BOOL{
6 | if([actual isKindOfClass:[NSNumber class]]) {
7 | return !![(NSNumber *)actual boolValue];
8 | } else if([actual isKindOfClass:[NSValue class]]) {
9 | if(EXPIsValuePointer((NSValue *)actual)) {
10 | return !![(NSValue *)actual pointerValue];
11 | }
12 | }
13 | return !!actual;
14 | });
15 |
16 | failureMessageForTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: a truthy value, got: %@, which is falsy", EXPDescribeObject(actual)];
18 | });
19 |
20 | failureMessageForNotTo(^NSString *{
21 | return [NSString stringWithFormat:@"expected: a non-truthy value, got: %@, which is truthy", EXPDescribeObject(actual)];
22 | });
23 | }
24 | EXPMatcherImplementationEnd
25 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beginWith.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beginWith, (id expected));
4 |
5 | #define startWith beginWith
6 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beginWith.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beginWith.h"
2 |
3 | EXPMatcherImplementationBegin(beginWith, (id expected)) {
4 | BOOL actualIsNil = (actual == nil);
5 | BOOL expectedIsNil = (expected == nil);
6 | //This condition allows the comparison of an immutable string or ordered collection to the mutable type of the same
7 | BOOL actualAndExpectedAreCompatible = (([actual isKindOfClass:[NSString class]] && [expected isKindOfClass:[NSString class]])
8 | || ([actual isKindOfClass:[NSArray class]] && [expected isKindOfClass:[NSArray class]])
9 | || ([actual isKindOfClass:[NSOrderedSet class]] && [expected isKindOfClass:[NSOrderedSet class]]));
10 |
11 | prerequisite(^BOOL {
12 | return actualAndExpectedAreCompatible;
13 | });
14 |
15 | match(^BOOL {
16 | if ([actual isKindOfClass:[NSString class]]) {
17 | return [actual hasPrefix:expected];
18 | } else if ([actual isKindOfClass:[NSArray class]]) {
19 | if ([expected count] > [actual count] || [expected count] == 0) {
20 | return NO;
21 | }
22 | NSArray *subArray = [actual subarrayWithRange:NSMakeRange(0, [expected count])];
23 | return [subArray isEqualToArray:expected];
24 | } else {
25 | if ([expected count] > [actual count] || [expected count] == 0) {
26 | return NO;
27 | }
28 |
29 | NSOrderedSet *subset = [NSOrderedSet orderedSetWithOrderedSet:actual range:NSMakeRange(0, [expected count]) copyItems:NO];
30 | return [subset isEqualToOrderedSet:expected];
31 | }
32 | });
33 |
34 | failureMessageForTo(^NSString *{
35 | if (actualIsNil) return @"the object is nil/null";
36 | if (expectedIsNil) return @"the expected value is nil/null";
37 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]];
38 | return [NSString stringWithFormat:@"expected: %@ to begin with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
39 | });
40 |
41 | failureMessageForNotTo(^NSString *{
42 | if (actualIsNil) return @"the object is nil/null";
43 | if (expectedIsNil) return @"the expected value is nil/null";
44 | if (!actualAndExpectedAreCompatible) return [NSString stringWithFormat:@"%@ and %@ are not instances of one of %@, %@, or %@", EXPDescribeObject(actual), EXPDescribeObject(expected), [NSString class], [NSArray class], [NSOrderedSet class]];
45 |
46 | return [NSString stringWithFormat:@"expected: %@ not to begin with %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
47 | });
48 | }
49 | EXPMatcherImplementationEnd
50 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+conformTo.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(conformTo, (Protocol *expected));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+conformTo.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+conformTo.h"
2 | #import "NSValue+Expecta.h"
3 | #import
4 |
5 | EXPMatcherImplementationBegin(conformTo, (Protocol *expected)) {
6 | BOOL actualIsNil = (actual == nil);
7 | BOOL expectedIsNil = (expected == nil);
8 |
9 | prerequisite(^BOOL{
10 | return !(actualIsNil || expectedIsNil);
11 | });
12 |
13 | match(^BOOL{
14 | return [actual conformsToProtocol:expected];
15 | });
16 |
17 | failureMessageForTo(^NSString *{
18 | if(actualIsNil) return @"the object is nil/null";
19 | if(expectedIsNil) return @"the protocol is nil/null";
20 |
21 | NSString *name = NSStringFromProtocol(expected);
22 | return [NSString stringWithFormat:@"expected: %@ to conform to %@", actual, name];
23 | });
24 |
25 | failureMessageForNotTo(^NSString *{
26 | if(actualIsNil) return @"the object is nil/null";
27 | if(expectedIsNil) return @"the protocol is nil/null";
28 |
29 | NSString *name = NSStringFromProtocol(expected);
30 | return [NSString stringWithFormat:@"expected: %@ not to conform to %@", actual, name];
31 | });
32 | }
33 | EXPMatcherImplementationEnd
34 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+contain.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_contain, (id expected));
4 | EXPMatcherInterface(contain, (id expected)); // to aid code completion
5 | #define contain(expected) _contain(EXPObjectify((expected)))
6 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+contain.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+contain.h"
2 |
3 | EXPMatcherImplementationBegin(_contain, (id expected)) {
4 | BOOL actualIsCompatible = [actual isKindOfClass:[NSString class]] || [actual conformsToProtocol:@protocol(NSFastEnumeration)];
5 | BOOL expectedIsNil = (expected == nil);
6 |
7 | prerequisite(^BOOL{
8 | return actualIsCompatible && !expectedIsNil;
9 | });
10 |
11 | match(^BOOL{
12 | if(actualIsCompatible) {
13 | if([actual isKindOfClass:[NSString class]]) {
14 | return [(NSString *)actual rangeOfString:[expected description]].location != NSNotFound;
15 | } else {
16 | for (id object in actual) {
17 | if ([object isEqual:expected]) {
18 | return YES;
19 | }
20 | }
21 | }
22 | }
23 | return NO;
24 | });
25 |
26 | failureMessageForTo(^NSString *{
27 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString or NSFastEnumeration", EXPDescribeObject(actual)];
28 | if(expectedIsNil) return @"the expected value is nil/null";
29 | return [NSString stringWithFormat:@"expected %@ to contain %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
30 | });
31 |
32 | failureMessageForNotTo(^NSString *{
33 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString or NSFastEnumeration", EXPDescribeObject(actual)];
34 | if(expectedIsNil) return @"the expected value is nil/null";
35 | return [NSString stringWithFormat:@"expected %@ not to contain %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
36 | });
37 | }
38 | EXPMatcherImplementationEnd
39 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+endWith.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(endWith, (id expected));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+equal.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_equal, (id expected));
4 | EXPMatcherInterface(equal, (id expected)); // to aid code completion
5 | #define equal(...) _equal(EXPObjectify((__VA_ARGS__)))
6 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+equal.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+equal.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_equal, (id expected)) {
5 | match(^BOOL{
6 | if((actual == expected) || [actual isEqual:expected]) {
7 | return YES;
8 | } else if([actual isKindOfClass:[NSNumber class]] && [expected isKindOfClass:[NSNumber class]]) {
9 | if([actual isKindOfClass:[NSDecimalNumber class]] || [expected isKindOfClass:[NSDecimalNumber class]]) {
10 | NSDecimalNumber *actualDecimalNumber = [NSDecimalNumber decimalNumberWithDecimal:[(NSNumber *) actual decimalValue]];
11 | NSDecimalNumber *expectedDecimalNumber = [NSDecimalNumber decimalNumberWithDecimal:[(NSNumber *) expected decimalValue]];
12 | return [actualDecimalNumber isEqualToNumber:expectedDecimalNumber];
13 | }
14 | else {
15 | if(EXPIsNumberFloat((NSNumber *)actual) || EXPIsNumberFloat((NSNumber *)expected)) {
16 | return [(NSNumber *)actual floatValue] == [(NSNumber *)expected floatValue];
17 | }
18 | }
19 | }
20 | return NO;
21 | });
22 |
23 | failureMessageForTo(^NSString *{
24 | return [NSString stringWithFormat:@"expected: %@, got: %@", EXPDescribeObject(expected), EXPDescribeObject(actual)];
25 | });
26 |
27 | failureMessageForNotTo(^NSString *{
28 | return [NSString stringWithFormat:@"expected: not %@, got: %@", EXPDescribeObject(expected), EXPDescribeObject(actual)];
29 | });
30 | }
31 | EXPMatcherImplementationEnd
32 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+haveCountOf.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(haveCountOf, (NSUInteger expected));
4 |
5 | #define haveCount haveCountOf
6 | #define haveACountOf haveCountOf
7 | #define haveLength haveCountOf
8 | #define haveLengthOf haveCountOf
9 | #define haveALengthOf haveCountOf
10 | #define beEmpty() haveCountOf(0)
11 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+haveCountOf.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+haveCountOf.h"
2 |
3 | EXPMatcherImplementationBegin(haveCountOf, (NSUInteger expected)) {
4 | BOOL actualIsStringy = [actual isKindOfClass:[NSString class]] || [actual isKindOfClass:[NSAttributedString class]];
5 | BOOL actualIsCompatible = actualIsStringy || [actual respondsToSelector:@selector(count)];
6 |
7 | prerequisite(^BOOL{
8 | return actualIsCompatible;
9 | });
10 |
11 | NSUInteger (^count)(id) = ^(id actual) {
12 | if(actualIsStringy) {
13 | return [actual length];
14 | } else {
15 | return [actual count];
16 | }
17 | };
18 |
19 | match(^BOOL{
20 | if(actualIsCompatible) {
21 | return count(actual) == expected;
22 | }
23 | return NO;
24 | });
25 |
26 | failureMessageForTo(^NSString *{
27 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString, NSAttributedString, NSArray, NSSet, NSOrderedSet, or NSDictionary", EXPDescribeObject(actual)];
28 | return [NSString stringWithFormat:@"expected %@ to have a count of %zi but got %zi", EXPDescribeObject(actual), expected, count(actual)];
29 | });
30 |
31 | failureMessageForNotTo(^NSString *{
32 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString, NSAttributedString, NSArray, NSSet, NSOrderedSet, or NSDictionary", EXPDescribeObject(actual)];
33 | return [NSString stringWithFormat:@"expected %@ not to have a count of %zi", EXPDescribeObject(actual), expected];
34 | });
35 | }
36 | EXPMatcherImplementationEnd
37 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+postNotification.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(postNotification, (id expectedNotification));
4 |
5 | #define notify postNotification
6 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+raise.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(raise, (NSString *expectedExceptionName));
4 | #define raiseAny() raise(nil)
5 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+raise.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+raise.h"
2 | #import "EXPDefines.h"
3 |
4 | EXPMatcherImplementationBegin(raise, (NSString *expectedExceptionName)) {
5 | __block NSException *exceptionCaught = nil;
6 |
7 | match(^BOOL{
8 | BOOL expectedExceptionCaught = NO;
9 | @try {
10 | ((EXPBasicBlock)actual)();
11 | } @catch(NSException *e) {
12 | exceptionCaught = e;
13 | expectedExceptionCaught = (expectedExceptionName == nil) || [[exceptionCaught name] isEqualToString:expectedExceptionName];
14 | }
15 | return expectedExceptionCaught;
16 | });
17 |
18 | failureMessageForTo(^NSString *{
19 | return [NSString stringWithFormat:@"expected: %@, got: %@",
20 | expectedExceptionName ? expectedExceptionName : @"any exception",
21 | exceptionCaught ? [exceptionCaught name] : @"no exception"];
22 | });
23 |
24 | failureMessageForNotTo(^NSString *{
25 | return [NSString stringWithFormat:@"expected: %@, got: %@",
26 | expectedExceptionName ? [NSString stringWithFormat:@"not %@", expectedExceptionName] : @"no exception",
27 | exceptionCaught ? [exceptionCaught name] : @"no exception"];
28 | });
29 | }
30 | EXPMatcherImplementationEnd
31 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+raiseWithReason.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(raiseWithReason, (NSString *expectedExceptionName, NSString *expectedReason));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+raiseWithReason.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+raiseWithReason.h"
2 | #import "EXPDefines.h"
3 |
4 | EXPMatcherImplementationBegin(raiseWithReason, (NSString *expectedExceptionName, NSString *expectedReason)) {
5 | __block NSException *exceptionCaught = nil;
6 |
7 | match(^BOOL{
8 | BOOL expectedExceptionCaught = NO;
9 | @try {
10 | ((EXPBasicBlock)actual)();
11 | } @catch(NSException *e) {
12 | exceptionCaught = e;
13 | expectedExceptionCaught = (((expectedExceptionName == nil) || [[exceptionCaught name] isEqualToString:expectedExceptionName]) &&
14 | ((expectedReason == nil) || ([[exceptionCaught reason] isEqualToString:expectedReason])));
15 | }
16 | return expectedExceptionCaught;
17 | });
18 |
19 | failureMessageForTo(^NSString *{
20 | return [NSString stringWithFormat:@"expected: %@ (%@), got: %@ (%@)",
21 | expectedExceptionName ?: @"any exception",
22 | expectedReason ?: @"any reason",
23 | exceptionCaught ? [exceptionCaught name] : @"no exception",
24 | exceptionCaught ? [exceptionCaught reason] : @""];
25 | });
26 |
27 | failureMessageForNotTo(^NSString *{
28 | return [NSString stringWithFormat:@"expected: %@ (%@), got: %@ (%@)",
29 | expectedExceptionName ? [NSString stringWithFormat:@"not %@", expectedExceptionName] : @"no exception",
30 | expectedReason ? [NSString stringWithFormat:@"not '%@'", expectedReason] : @"no reason",
31 | exceptionCaught ? [exceptionCaught name] : @"no exception",
32 | exceptionCaught ? [exceptionCaught reason] : @"no reason"];
33 | });
34 | }
35 | EXPMatcherImplementationEnd
36 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+respondTo.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(respondTo, (SEL expected));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+respondTo.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+respondTo.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(respondTo, (SEL expected)) {
5 | BOOL actualIsNil = (actual == nil);
6 | BOOL expectedIsNull = (expected == NULL);
7 |
8 | prerequisite (^BOOL {
9 | return !(actualIsNil || expectedIsNull);
10 | });
11 |
12 | match(^BOOL {
13 | return [actual respondsToSelector:expected];
14 | });
15 |
16 | failureMessageForTo(^NSString *{
17 | if (actualIsNil) return @"the object is nil/null";
18 | if (expectedIsNull) return @"the selector is null";
19 | return [NSString stringWithFormat:@"expected: %@ to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)];
20 | });
21 |
22 | failureMessageForNotTo(^NSString *{
23 | if (actualIsNil) return @"the object is nil/null";
24 | if (expectedIsNull) return @"the selector is null";
25 | return [NSString stringWithFormat:@"expected: %@ not to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)];
26 | });
27 | }
28 | EXPMatcherImplementationEnd
29 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers.h:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beNil.h"
2 | #import "EXPMatchers+equal.h"
3 | #import "EXPMatchers+beInstanceOf.h"
4 | #import "EXPMatchers+beKindOf.h"
5 | #import "EXPMatchers+beSubclassOf.h"
6 | #import "EXPMatchers+conformTo.h"
7 | #import "EXPMatchers+beTruthy.h"
8 | #import "EXPMatchers+beFalsy.h"
9 | #import "EXPMatchers+contain.h"
10 | #import "EXPMatchers+beSupersetOf.h"
11 | #import "EXPMatchers+haveCountOf.h"
12 | #import "EXPMatchers+beIdenticalTo.h"
13 | #import "EXPMatchers+beGreaterThan.h"
14 | #import "EXPMatchers+beGreaterThanOrEqualTo.h"
15 | #import "EXPMatchers+beLessThan.h"
16 | #import "EXPMatchers+beLessThanOrEqualTo.h"
17 | #import "EXPMatchers+beInTheRangeOf.h"
18 | #import "EXPMatchers+beCloseTo.h"
19 | #import "EXPMatchers+raise.h"
20 | #import "EXPMatchers+raiseWithReason.h"
21 | #import "EXPMatchers+respondTo.h"
22 | #import "EXPMatchers+postNotification.h"
23 | #import "EXPMatchers+beginWith.h"
24 | #import "EXPMatchers+endWith.h"
25 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/NSObject+Expecta.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface NSObject (Expecta)
4 |
5 | - (void)recordFailureWithDescription:(NSString *)description
6 | inFile:(NSString *)filename
7 | atLine:(NSUInteger)lineNumber
8 | expected:(BOOL)expected;
9 |
10 | @end
11 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/NSValue+Expecta.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface NSValue (Expecta)
4 |
5 | @property (nonatomic) const char *_EXP_objCType;
6 |
7 | @end
8 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/NSValue+Expecta.m:
--------------------------------------------------------------------------------
1 | #import "NSValue+Expecta.h"
2 | #import
3 | #import "Expecta.h"
4 |
5 | EXPFixCategoriesBug(NSValue_Expecta);
6 |
7 | @implementation NSValue (Expecta)
8 |
9 | static char _EXP_typeKey;
10 |
11 | - (const char *)_EXP_objCType {
12 | return [(NSString *)objc_getAssociatedObject(self, &_EXP_typeKey) cStringUsingEncoding:NSASCIIStringEncoding];
13 | }
14 |
15 | - (void)set_EXP_objCType:(const char *)_EXP_objCType {
16 | objc_setAssociatedObject(self, &_EXP_typeKey,
17 | @(_EXP_objCType),
18 | OBJC_ASSOCIATION_COPY_NONATOMIC);
19 | }
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-2015 Specta Team - https://github.com/specta
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/AFHTTPRequestOperation.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFHTTPRequestOperation.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/AFHTTPRequestOperationManager.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/AFHTTPSessionManager.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/AFNetworkActivityIndicatorManager.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/AFURLConnectionOperation.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFURLConnectionOperation.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/AFURLSessionManager.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/UIActivityIndicatorView+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/UIAlertView+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/UIButton+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/UIImageView+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/UIKit+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/UIProgressView+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/UIRefreshControl+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/AFNetworking/UIWebView+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/MBTNetworking/AFNetworking+PromiseKit.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/AFNetworking+PromiseKit.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/MBTNetworking/MBTHTTPRequest.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/MBTHTTPRequest.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/MBTNetworking/MBTModel.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/MBTModel.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/MBTNetworking/MBTNetworkManager.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/MBTNetworkManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/EXTKeyPathCoding.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/extobjc/EXTKeyPathCoding.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/EXTRuntimeExtensions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/extobjc/EXTRuntimeExtensions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/EXTScope.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/extobjc/EXTScope.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/MTLJSONAdapter.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/MTLJSONAdapter.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/MTLModel+NSCoding.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/MTLModel+NSCoding.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/MTLModel.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/MTLModel.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/MTLReflection.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/MTLReflection.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/MTLTransformerErrorHandling.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/MTLTransformerErrorHandling.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/MTLValueTransformer.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/MTLValueTransformer.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/Mantle.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/Mantle.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/NSArray+MTLManipulationAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSArray+MTLManipulationAdditions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/NSDictionary+MTLJSONKeyPath.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSDictionary+MTLJSONKeyPath.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/NSDictionary+MTLManipulationAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSDictionary+MTLManipulationAdditions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/NSDictionary+MTLMappingAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSDictionary+MTLMappingAdditions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/NSError+MTLModelException.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSError+MTLModelException.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/NSObject+MTLComparisonAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSObject+MTLComparisonAdditions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/NSValueTransformer+MTLInversionAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/Mantle/metamacros.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/extobjc/metamacros.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/PromiseKit/Promise.h:
--------------------------------------------------------------------------------
1 | ../../../PromiseKit/objc/PromiseKit/Promise.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/PromiseKit/PromiseKit.h:
--------------------------------------------------------------------------------
1 | ../../../PromiseKit/objc/PromiseKit.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Private/PromiseKit/fwd.h:
--------------------------------------------------------------------------------
1 | ../../../PromiseKit/objc/PromiseKit/fwd.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperation.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFHTTPRequestOperation.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperationManager.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/AFNetworkActivityIndicatorManager.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/AFURLConnectionOperation.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFURLConnectionOperation.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/AFURLSessionManager.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/UIActivityIndicatorView+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/UIAlertView+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/UIButton+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/UIImageView+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/UIKit+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/UIProgressView+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/UIRefreshControl+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/AFNetworking/UIWebView+AFNetworking.h:
--------------------------------------------------------------------------------
1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/MBTNetworking/AFNetworking+PromiseKit.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/AFNetworking+PromiseKit.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/MBTNetworking/MBTHTTPRequest.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/MBTHTTPRequest.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/MBTNetworking/MBTModel.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/MBTModel.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/MBTNetworking/MBTNetworkManager.h:
--------------------------------------------------------------------------------
1 | ../../../../../Pod/Classes/MBTNetworkManager.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/MTLJSONAdapter.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/MTLJSONAdapter.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/MTLModel+NSCoding.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/MTLModel+NSCoding.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/MTLModel.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/MTLModel.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/MTLReflection.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/MTLReflection.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/MTLTransformerErrorHandling.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/MTLTransformerErrorHandling.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/MTLValueTransformer.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/MTLValueTransformer.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/Mantle.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/Mantle.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/NSArray+MTLManipulationAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSArray+MTLManipulationAdditions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/NSDictionary+MTLJSONKeyPath.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSDictionary+MTLJSONKeyPath.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/NSDictionary+MTLManipulationAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSDictionary+MTLManipulationAdditions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/NSDictionary+MTLMappingAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSDictionary+MTLMappingAdditions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/NSError+MTLModelException.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSError+MTLModelException.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/NSObject+MTLComparisonAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSObject+MTLComparisonAdditions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/NSValueTransformer+MTLInversionAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h:
--------------------------------------------------------------------------------
1 | ../../../Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/PromiseKit/Promise.h:
--------------------------------------------------------------------------------
1 | ../../../PromiseKit/objc/PromiseKit/Promise.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/PromiseKit/PromiseKit.h:
--------------------------------------------------------------------------------
1 | ../../../PromiseKit/objc/PromiseKit.h
--------------------------------------------------------------------------------
/Example/Pods/Headers/Public/PromiseKit/fwd.h:
--------------------------------------------------------------------------------
1 | ../../../PromiseKit/objc/PromiseKit/fwd.h
--------------------------------------------------------------------------------
/Example/Pods/Local Podspecs/MBTNetworking.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "MBTNetworking",
3 | "version": "0.4.1",
4 | "summary": "A simple networking library for iOS based on AFNetworking 2, Mantle and PromiseKit.",
5 | "description": "A simple networking library for iOS based on AFNetworking 2, Mantle and PromiseKit.\nThe aim of MBTNetworking is to streamline the implementation of\nrequests to REST APIs and the mapping of the response objects to\nmodel objects.",
6 | "homepage": "https://github.com/madbat/MBTNetworking",
7 | "license": "MIT",
8 | "authors": {
9 | "Matteo Battaglio": "m4dbat@gmail.com"
10 | },
11 | "source": {
12 | "git": "https://github.com/madbat/MBTNetworking.git",
13 | "tag": "0.4.1"
14 | },
15 | "social_media_url": "https://twitter.com/m4dbat",
16 | "platforms": {
17 | "ios": "7.0"
18 | },
19 | "requires_arc": true,
20 | "source_files": "Pod/Classes/**/*",
21 | "resource_bundles": {
22 | "MBTNetworking": [
23 | "Pod/Assets/*.png"
24 | ]
25 | },
26 | "dependencies": {
27 | "AFNetworking": [
28 | "~> 2.5"
29 | ],
30 | "Mantle": [
31 | "~> 2.0"
32 | ],
33 | "PromiseKit/Promise": [
34 | "~> 1.5"
35 | ]
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Example/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - AFNetworking (2.5.4):
3 | - AFNetworking/NSURLConnection (= 2.5.4)
4 | - AFNetworking/NSURLSession (= 2.5.4)
5 | - AFNetworking/Reachability (= 2.5.4)
6 | - AFNetworking/Security (= 2.5.4)
7 | - AFNetworking/Serialization (= 2.5.4)
8 | - AFNetworking/UIKit (= 2.5.4)
9 | - AFNetworking/NSURLConnection (2.5.4):
10 | - AFNetworking/Reachability
11 | - AFNetworking/Security
12 | - AFNetworking/Serialization
13 | - AFNetworking/NSURLSession (2.5.4):
14 | - AFNetworking/Reachability
15 | - AFNetworking/Security
16 | - AFNetworking/Serialization
17 | - AFNetworking/Reachability (2.5.4)
18 | - AFNetworking/Security (2.5.4)
19 | - AFNetworking/Serialization (2.5.4)
20 | - AFNetworking/UIKit (2.5.4):
21 | - AFNetworking/NSURLConnection
22 | - AFNetworking/NSURLSession
23 | - Mantle (2.0.2):
24 | - Mantle/extobjc (= 2.0.2)
25 | - Mantle/extobjc (2.0.2)
26 | - MBTNetworking (0.4.1):
27 | - AFNetworking (~> 2.5)
28 | - Mantle (~> 2.0)
29 | - PromiseKit/Promise (~> 1.5)
30 | - PromiseKit/Promise (1.6.0)
31 |
32 | DEPENDENCIES:
33 | - MBTNetworking (from `../`)
34 |
35 | EXTERNAL SOURCES:
36 | MBTNetworking:
37 | :path: "../"
38 |
39 | SPEC CHECKSUMS:
40 | AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e
41 | Mantle: 967fd31ea0220890b2e76589198996b534bb3fb1
42 | MBTNetworking: 3d88dc4ef12fd7493a7f18a82c19ff5b36607cce
43 | PromiseKit: 6be651503d4af22830b5313be993c5a0ef77bf77
44 |
45 | COCOAPODS: 0.38.2
46 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/LICENSE.md:
--------------------------------------------------------------------------------
1 | **Copyright (c) GitHub, Inc.**
2 | **All rights reserved.**
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 |
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 |
10 | ---
11 |
12 | **This project uses portions of code from the Proton framework.**
13 | **Proton is copyright (c) 2012, Bitswift, Inc.**
14 | **All rights reserved.**
15 |
16 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
17 |
18 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
19 | * Neither the name of the Bitswift, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/MTLReflection.h:
--------------------------------------------------------------------------------
1 | //
2 | // MTLReflection.h
3 | // Mantle
4 | //
5 | // Created by Justin Spahr-Summers on 2013-03-12.
6 | // Copyright (c) 2013 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /// Creates a selector from a key and a constant string.
12 | ///
13 | /// key - The key to insert into the generated selector. This key should be in
14 | /// its natural case.
15 | /// suffix - A string to append to the key as part of the selector.
16 | ///
17 | /// Returns a selector, or NULL if the input strings cannot form a valid
18 | /// selector.
19 | SEL MTLSelectorWithKeyPattern(NSString *key, const char *suffix) __attribute__((pure, nonnull(1, 2)));
20 |
21 | /// Creates a selector from a key and a constant prefix and suffix.
22 | ///
23 | /// prefix - A string to prepend to the key as part of the selector.
24 | /// key - The key to insert into the generated selector. This key should be in
25 | /// its natural case, and will have its first letter capitalized when
26 | /// inserted.
27 | /// suffix - A string to append to the key as part of the selector.
28 | ///
29 | /// Returns a selector, or NULL if the input strings cannot form a valid
30 | /// selector.
31 | SEL MTLSelectorWithCapitalizedKeyPattern(const char *prefix, NSString *key, const char *suffix) __attribute__((pure, nonnull(1, 2, 3)));
32 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/MTLReflection.m:
--------------------------------------------------------------------------------
1 | //
2 | // MTLReflection.m
3 | // Mantle
4 | //
5 | // Created by Justin Spahr-Summers on 2013-03-12.
6 | // Copyright (c) 2013 GitHub. All rights reserved.
7 | //
8 |
9 | #import "MTLReflection.h"
10 | #import
11 |
12 | SEL MTLSelectorWithKeyPattern(NSString *key, const char *suffix) {
13 | NSUInteger keyLength = [key maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding];
14 | NSUInteger suffixLength = strlen(suffix);
15 |
16 | char selector[keyLength + suffixLength + 1];
17 |
18 | BOOL success = [key getBytes:selector maxLength:keyLength usedLength:&keyLength encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0, key.length) remainingRange:NULL];
19 | if (!success) return NULL;
20 |
21 | memcpy(selector + keyLength, suffix, suffixLength);
22 | selector[keyLength + suffixLength] = '\0';
23 |
24 | return sel_registerName(selector);
25 | }
26 |
27 | SEL MTLSelectorWithCapitalizedKeyPattern(const char *prefix, NSString *key, const char *suffix) {
28 | NSUInteger prefixLength = strlen(prefix);
29 | NSUInteger suffixLength = strlen(suffix);
30 |
31 | NSString *initial = [key substringToIndex:1].uppercaseString;
32 | NSUInteger initialLength = [initial maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding];
33 |
34 | NSString *rest = [key substringFromIndex:1];
35 | NSUInteger restLength = [rest maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding];
36 |
37 | char selector[prefixLength + initialLength + restLength + suffixLength + 1];
38 | memcpy(selector, prefix, prefixLength);
39 |
40 | BOOL success = [initial getBytes:selector + prefixLength maxLength:initialLength usedLength:&initialLength encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0, initial.length) remainingRange:NULL];
41 | if (!success) return NULL;
42 |
43 | success = [rest getBytes:selector + prefixLength + initialLength maxLength:restLength usedLength:&restLength encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0, rest.length) remainingRange:NULL];
44 | if (!success) return NULL;
45 |
46 | memcpy(selector + prefixLength + initialLength + restLength, suffix, suffixLength);
47 | selector[prefixLength + initialLength + restLength + suffixLength] = '\0';
48 |
49 | return sel_registerName(selector);
50 | }
51 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/MTLTransformerErrorHandling.h:
--------------------------------------------------------------------------------
1 | //
2 | // MTLTransformerErrorHandling.h
3 | // Mantle
4 | //
5 | // Created by Robert Böhnke on 10/6/13.
6 | // Copyright (c) 2013 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /// The domain for errors originating from the MTLTransformerErrorHandling
12 | /// protocol.
13 | ///
14 | /// Transformers conforming to this protocol are expected to use this error
15 | /// domain if the transformation fails.
16 | extern NSString * const MTLTransformerErrorHandlingErrorDomain;
17 |
18 | /// Used to indicate that the input value was illegal.
19 | ///
20 | /// Transformers conforming to this protocol are expected to use this error code
21 | /// if the transformation fails due to an invalid input value.
22 | extern const NSInteger MTLTransformerErrorHandlingErrorInvalidInput;
23 |
24 | /// Associated with the invalid input value.
25 | ///
26 | /// Transformers conforming to this protocol are expected to associate this key
27 | /// with the invalid input in the userInfo dictionary.
28 | extern NSString * const MTLTransformerErrorHandlingInputValueErrorKey;
29 |
30 | /// This protocol can be implemented by NSValueTransformer subclasses to
31 | /// communicate errors that occur during transformation.
32 | @protocol MTLTransformerErrorHandling
33 | @required
34 |
35 | /// Transforms a value, returning any error that occurred during transformation.
36 | ///
37 | /// value - The value to transform.
38 | /// success - If not NULL, this will be set to a boolean indicating whether the
39 | /// transformation was successful.
40 | /// error - If not NULL, this may be set to an error that occurs during
41 | /// transforming the value.
42 | ///
43 | /// Returns the result of the transformation which may be nil. Clients should
44 | /// inspect the success parameter to decide how to proceed with the result.
45 | - (id)transformedValue:(id)value success:(BOOL *)success error:(NSError **)error;
46 |
47 | @optional
48 |
49 | /// Reverse-transforms a value, returning any error that occurred during
50 | /// transformation.
51 | ///
52 | /// Transformers conforming to this protocol are expected to implemented this
53 | /// method if they support reverse transformation.
54 | ///
55 | /// value - The value to transform.
56 | /// success - If not NULL, this will be set to a boolean indicating whether the
57 | /// transformation was successful.
58 | /// error - If not NULL, this may be set to an error that occurs during
59 | /// transforming the value.
60 | ///
61 | /// Returns the result of the reverse transformation which may be nil. Clients
62 | /// should inspect the success parameter to decide how to proceed with the
63 | /// result.
64 | - (id)reverseTransformedValue:(id)value success:(BOOL *)success error:(NSError **)error;
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/MTLTransformerErrorHandling.m:
--------------------------------------------------------------------------------
1 | //
2 | // MTLTransformerErrorHandling.h
3 | // Mantle
4 | //
5 | // Created by Robert Böhnke on 10/6/13.
6 | // Copyright (c) 2013 GitHub. All rights reserved.
7 | //
8 |
9 | #import "MTLTransformerErrorHandling.h"
10 |
11 | NSString * const MTLTransformerErrorHandlingErrorDomain = @"MTLTransformerErrorHandlingErrorDomain";
12 |
13 | const NSInteger MTLTransformerErrorHandlingErrorInvalidInput = 1;
14 |
15 | NSString * const MTLTransformerErrorHandlingInputValueErrorKey = @"MTLTransformerErrorHandlingInputValueErrorKey";
16 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/MTLValueTransformer.h:
--------------------------------------------------------------------------------
1 | //
2 | // MTLValueTransformer.h
3 | // Mantle
4 | //
5 | // Created by Justin Spahr-Summers on 2012-09-11.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "MTLTransformerErrorHandling.h"
12 |
13 | /// A block that represents a transformation.
14 | ///
15 | /// value - The value to transform.
16 | /// success - The block must set this parameter to indicate whether the
17 | /// transformation was successful.
18 | /// MTLValueTransformer will always call this block with *success
19 | /// initialized to YES.
20 | /// error - If not NULL, this may be set to an error that occurs during
21 | /// transforming the value.
22 | ///
23 | /// Returns the result of the transformation, which may be nil.
24 | typedef id (^MTLValueTransformerBlock)(id value, BOOL *success, NSError **error);
25 |
26 | ///
27 | /// A value transformer supporting block-based transformation.
28 | ///
29 | @interface MTLValueTransformer : NSValueTransformer
30 |
31 | /// Returns a transformer which transforms values using the given block. Reverse
32 | /// transformations will not be allowed.
33 | + (instancetype)transformerUsingForwardBlock:(MTLValueTransformerBlock)transformation;
34 |
35 | /// Returns a transformer which transforms values using the given block, for
36 | /// forward or reverse transformations.
37 | + (instancetype)transformerUsingReversibleBlock:(MTLValueTransformerBlock)transformation;
38 |
39 | /// Returns a transformer which transforms values using the given blocks.
40 | + (instancetype)transformerUsingForwardBlock:(MTLValueTransformerBlock)forwardTransformation reverseBlock:(MTLValueTransformerBlock)reverseTransformation;
41 |
42 | @end
43 |
44 | @interface MTLValueTransformer (Deprecated)
45 |
46 | + (NSValueTransformer *)transformerWithBlock:(id (^)(id))transformationBlock __attribute__((deprecated("Replaced by +transformerUsingForwardBlock:")));
47 |
48 | + (NSValueTransformer *)reversibleTransformerWithBlock:(id (^)(id))transformationBlock __attribute__((deprecated("Replaced by +transformerUsingReversibleBlock:")));
49 |
50 | + (NSValueTransformer *)reversibleTransformerWithForwardBlock:(id (^)(id))forwardBlock reverseBlock:(id (^)(id))reverseBlock __attribute__((deprecated("Replaced by +transformerUsingForwardBlock:reverseBlock:")));
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/Mantle.h:
--------------------------------------------------------------------------------
1 | //
2 | // Mantle.h
3 | // Mantle
4 | //
5 | // Created by Justin Spahr-Summers on 2012-09-04.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for Mantle.
12 | FOUNDATION_EXPORT double MantleVersionNumber;
13 |
14 | //! Project version string for Mantle.
15 | FOUNDATION_EXPORT const unsigned char MantleVersionString[];
16 |
17 | #import
18 | #import
19 | #import
20 | #import
21 | #import
22 | #import
23 | #import
24 | #import
25 | #import
26 | #import
27 | #import
28 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSArray+MTLManipulationAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MTLManipulationAdditions.h
3 | // Mantle
4 | //
5 | // Created by Josh Abernathy on 9/19/12.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSArray (MTLManipulationAdditions)
12 |
13 | /// The first object in the array or nil if the array is empty.
14 | /// Forwards to `firstObject` which has been first declared in iOS7, but works with iOS4/10.6.
15 | @property (nonatomic, readonly, strong) id mtl_firstObject;
16 |
17 | /// Returns a new array without all instances of the given object.
18 | - (NSArray *)mtl_arrayByRemovingObject:(id)object;
19 |
20 | /// Returns a new array without the first object. If the array is empty, it
21 | /// returns the empty array.
22 | - (NSArray *)mtl_arrayByRemovingFirstObject;
23 |
24 | /// Returns a new array without the last object. If the array is empty, it
25 | /// returns the empty array.
26 | - (NSArray *)mtl_arrayByRemovingLastObject;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSArray+MTLManipulationAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSArray+MTLManipulationAdditions.m
3 | // Mantle
4 | //
5 | // Created by Josh Abernathy on 9/19/12.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "NSArray+MTLManipulationAdditions.h"
10 |
11 | @interface NSArray (MTLDeclarations)
12 |
13 | // This declaration is needed so Mantle can be compiled with SDK 6 / 10.8.
14 | - (id)firstObject;
15 |
16 | @end
17 |
18 | @implementation NSArray (MTLManipulationAdditions)
19 |
20 | - (id)mtl_firstObject {
21 | return self.firstObject;
22 | }
23 |
24 | - (instancetype)mtl_arrayByRemovingObject:(id)object {
25 | NSMutableArray *result = [self mutableCopy];
26 | [result removeObject:object];
27 | return result;
28 | }
29 |
30 | - (instancetype)mtl_arrayByRemovingFirstObject {
31 | if (self.count == 0) return self;
32 |
33 | return [self subarrayWithRange:NSMakeRange(1, self.count - 1)];
34 | }
35 |
36 | - (instancetype)mtl_arrayByRemovingLastObject {
37 | if (self.count == 0) return self;
38 |
39 | return [self subarrayWithRange:NSMakeRange(0, self.count - 1)];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+MTLJSONKeyPath.h
3 | // Mantle
4 | //
5 | // Created by Robert Böhnke on 19/03/14.
6 | // Copyright (c) 2014 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSDictionary (MTLJSONKeyPath)
12 |
13 | /// Looks up the value of a key path in the receiver.
14 | ///
15 | /// JSONKeyPath - The key path that should be resolved. Every element along this
16 | /// key path needs to be an instance of NSDictionary for the
17 | /// resolving to be successful.
18 | /// success - If not NULL, this will be set to a boolean indicating whether
19 | /// the key path was resolved successfully.
20 | /// error - If not NULL, this may be set to an error that occurs during
21 | /// resolving the value.
22 | ///
23 | /// Returns the value for the key path which may be nil. Clients should inspect
24 | /// the success parameter to decide how to proceed with the result.
25 | - (id)mtl_valueForJSONKeyPath:(NSString *)JSONKeyPath success:(BOOL *)success error:(NSError **)error;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+MTLJSONKeyPath.m
3 | // Mantle
4 | //
5 | // Created by Robert Böhnke on 19/03/14.
6 | // Copyright (c) 2014 GitHub. All rights reserved.
7 | //
8 |
9 | #import "NSDictionary+MTLJSONKeyPath.h"
10 |
11 | #import "MTLJSONAdapter.h"
12 |
13 | @implementation NSDictionary (MTLJSONKeyPath)
14 |
15 | - (id)mtl_valueForJSONKeyPath:(NSString *)JSONKeyPath success:(BOOL *)success error:(NSError **)error {
16 | NSArray *components = [JSONKeyPath componentsSeparatedByString:@"."];
17 |
18 | id result = self;
19 | for (NSString *component in components) {
20 | // Check the result before resolving the key path component to not
21 | // affect the last value of the path.
22 | if (result == nil || result == NSNull.null) break;
23 |
24 | if (![result isKindOfClass:NSDictionary.class]) {
25 | if (error != NULL) {
26 | NSDictionary *userInfo = @{
27 | NSLocalizedDescriptionKey: NSLocalizedString(@"Invalid JSON dictionary", @""),
28 | NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"JSON key path %1$@ could not resolved because an incompatible JSON dictionary was supplied: \"%2$@\"", @""), JSONKeyPath, self]
29 | };
30 |
31 | *error = [NSError errorWithDomain:MTLJSONAdapterErrorDomain code:MTLJSONAdapterErrorInvalidJSONDictionary userInfo:userInfo];
32 | }
33 |
34 | if (success != NULL) *success = NO;
35 |
36 | return nil;
37 | }
38 |
39 | result = result[component];
40 | }
41 |
42 | if (success != NULL) *success = YES;
43 |
44 | return result;
45 | }
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSDictionary+MTLManipulationAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+MTLManipulationAdditions.h
3 | // Mantle
4 | //
5 | // Created by Justin Spahr-Summers on 2012-09-24.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSDictionary (MTLManipulationAdditions)
12 |
13 | /// Merges the keys and values from the given dictionary into the receiver. If
14 | /// both the receiver and `dictionary` have a given key, the value from
15 | /// `dictionary` is used.
16 | ///
17 | /// Returns a new dictionary containing the entries of the receiver combined with
18 | /// those of `dictionary`.
19 | - (NSDictionary *)mtl_dictionaryByAddingEntriesFromDictionary:(NSDictionary *)dictionary;
20 |
21 | /// Creates a new dictionary with all the entries for the given keys removed from
22 | /// the receiver.
23 | - (NSDictionary *)mtl_dictionaryByRemovingValuesForKeys:(NSArray *)keys;
24 |
25 | @end
26 |
27 | @interface NSDictionary (MTLManipulationAdditions_Deprecated)
28 |
29 | - (NSDictionary *)mtl_dictionaryByRemovingEntriesWithKeys:(NSSet *)keys __attribute__((deprecated("Replaced by -mtl_dictionaryByRemovingValuesForKeys:")));
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSDictionary+MTLManipulationAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+MTLManipulationAdditions.m
3 | // Mantle
4 | //
5 | // Created by Justin Spahr-Summers on 2012-09-24.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 |
9 | #import "NSDictionary+MTLManipulationAdditions.h"
10 |
11 | @implementation NSDictionary (MTLManipulationAdditions)
12 |
13 | - (NSDictionary *)mtl_dictionaryByAddingEntriesFromDictionary:(NSDictionary *)dictionary {
14 | NSMutableDictionary *result = [self mutableCopy];
15 | [result addEntriesFromDictionary:dictionary];
16 | return result;
17 | }
18 |
19 | - (NSDictionary *)mtl_dictionaryByRemovingValuesForKeys:(NSArray *)keys {
20 | NSMutableDictionary *result = [self mutableCopy];
21 | [result removeObjectsForKeys:keys];
22 | return result;
23 | }
24 |
25 | @end
26 |
27 | @implementation NSDictionary (MTLManipulationAdditions_Deprecated)
28 |
29 | #pragma clang diagnostic push
30 | #pragma clang diagnostic ignored "-Wdeprecated"
31 |
32 | - (NSDictionary *)mtl_dictionaryByRemovingEntriesWithKeys:(NSSet *)keys {
33 | return [self mtl_dictionaryByRemovingValuesForKeys:keys.allObjects];
34 | }
35 |
36 | #pragma clang diagnostic pop
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSDictionary+MTLMappingAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+MTLMappingAdditions.h
3 | // Mantle
4 | //
5 | // Created by Robert Böhnke on 10/31/13.
6 | // Copyright (c) 2013 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSDictionary (MTLMappingAdditions)
12 |
13 | /// Creates an identity mapping for serialization.
14 | ///
15 | /// class - A subclass of MTLModel.
16 | ///
17 | /// Returns a dictionary that maps all properties of the given class to
18 | /// themselves.
19 | + (NSDictionary *)mtl_identityPropertyMapWithModel:(Class)modelClass;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSDictionary+MTLMappingAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSDictionary+MTLMappingAdditions.m
3 | // Mantle
4 | //
5 | // Created by Robert Böhnke on 10/31/13.
6 | // Copyright (c) 2013 GitHub. All rights reserved.
7 | //
8 |
9 | #import "MTLModel.h"
10 |
11 | #import "NSDictionary+MTLMappingAdditions.h"
12 |
13 | @implementation NSDictionary (MTLMappingAdditions)
14 |
15 | + (NSDictionary *)mtl_identityPropertyMapWithModel:(Class)modelClass {
16 | NSCParameterAssert([modelClass isSubclassOfClass:MTLModel.class]);
17 |
18 | NSArray *propertyKeys = [modelClass propertyKeys].allObjects;
19 |
20 | return [NSDictionary dictionaryWithObjects:propertyKeys forKeys:propertyKeys];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSError+MTLModelException.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSError+MTLModelException.h
3 | // Mantle
4 | //
5 | // Created by Robert Böhnke on 7/6/13.
6 | // Copyright (c) 2013 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSError (MTLModelException)
12 |
13 | /// Creates a new error for an exception that occurred during updating an
14 | /// MTLModel.
15 | ///
16 | /// exception - The exception that was thrown while updating the model.
17 | /// This argument must not be nil.
18 | ///
19 | /// Returns an error that takes its localized description and failure reason
20 | /// from the exception.
21 | + (instancetype)mtl_modelErrorWithException:(NSException *)exception;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSError+MTLModelException.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSError+MTLModelException.m
3 | // Mantle
4 | //
5 | // Created by Robert Böhnke on 7/6/13.
6 | // Copyright (c) 2013 GitHub. All rights reserved.
7 | //
8 |
9 | #import "MTLModel.h"
10 |
11 | #import "NSError+MTLModelException.h"
12 |
13 | // The domain for errors originating from MTLModel.
14 | static NSString * const MTLModelErrorDomain = @"MTLModelErrorDomain";
15 |
16 | // An exception was thrown and caught.
17 | static const NSInteger MTLModelErrorExceptionThrown = 1;
18 |
19 | // Associated with the NSException that was caught.
20 | static NSString * const MTLModelThrownExceptionErrorKey = @"MTLModelThrownException";
21 |
22 | @implementation NSError (MTLModelException)
23 |
24 | + (instancetype)mtl_modelErrorWithException:(NSException *)exception {
25 | NSParameterAssert(exception != nil);
26 |
27 | NSDictionary *userInfo = @{
28 | NSLocalizedDescriptionKey: exception.description,
29 | NSLocalizedFailureReasonErrorKey: exception.reason,
30 | MTLModelThrownExceptionErrorKey: exception
31 | };
32 |
33 | return [NSError errorWithDomain:MTLModelErrorDomain code:MTLModelErrorExceptionThrown userInfo:userInfo];
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSObject+MTLComparisonAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MTLComparisonAdditions.h
3 | // Mantle
4 | //
5 | // Created by Josh Vera on 10/26/12.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 | // Portions copyright (c) 2011 Bitswift. All rights reserved.
9 | // See the LICENSE file for more information.
10 | //
11 |
12 | #import
13 |
14 | /// Returns whether both objects are identical or equal via -isEqual:
15 | BOOL MTLEqualObjects(id obj1, id obj2);
16 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSObject+MTLComparisonAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+MTLComparisonAdditions.m
3 | // Mantle
4 | //
5 | // Created by Josh Vera on 10/26/12.
6 | // Copyright (c) 2012 GitHub. All rights reserved.
7 | //
8 | // Portions copyright (c) 2011 Bitswift. All rights reserved.
9 | // See the LICENSE file for more information.
10 | //
11 |
12 | #import "NSObject+MTLComparisonAdditions.h"
13 |
14 | BOOL MTLEqualObjects(id obj1, id obj2) {
15 | return (obj1 == obj2 || [obj1 isEqual:obj2]);
16 | }
17 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSValueTransformer+MTLInversionAdditions.h
3 | // Mantle
4 | //
5 | // Created by Justin Spahr-Summers on 2013-05-18.
6 | // Copyright (c) 2013 GitHub. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSValueTransformer (MTLInversionAdditions)
12 |
13 | /// Flips the direction of the receiver's transformation, such that
14 | /// -transformedValue: will become -reverseTransformedValue:, and vice-versa.
15 | ///
16 | /// The receiver must allow reverse transformation.
17 | ///
18 | /// Returns an inverted transformer.
19 | - (NSValueTransformer *)mtl_invertedTransformer;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSValueTransformer+MTLInversionAdditions.m
3 | // Mantle
4 | //
5 | // Created by Justin Spahr-Summers on 2013-05-18.
6 | // Copyright (c) 2013 GitHub. All rights reserved.
7 | //
8 |
9 | #import "NSValueTransformer+MTLInversionAdditions.h"
10 | #import "MTLTransformerErrorHandling.h"
11 | #import "MTLValueTransformer.h"
12 |
13 | @implementation NSValueTransformer (MTLInversionAdditions)
14 |
15 | - (NSValueTransformer *)mtl_invertedTransformer {
16 | NSParameterAssert(self.class.allowsReverseTransformation);
17 |
18 | if ([self conformsToProtocol:@protocol(MTLTransformerErrorHandling)]) {
19 | NSParameterAssert([self respondsToSelector:@selector(reverseTransformedValue:success:error:)]);
20 |
21 | id errorHandlingSelf = (id)self;
22 |
23 | return [MTLValueTransformer transformerUsingForwardBlock:^(id value, BOOL *success, NSError **error) {
24 | return [errorHandlingSelf reverseTransformedValue:value success:success error:error];
25 | } reverseBlock:^(id value, BOOL *success, NSError **error) {
26 | return [errorHandlingSelf transformedValue:value success:success error:error];
27 | }];
28 | } else {
29 | return [MTLValueTransformer transformerUsingForwardBlock:^(id value, BOOL *success, NSError **error) {
30 | return [self reverseTransformedValue:value];
31 | } reverseBlock:^(id value, BOOL *success, NSError **error) {
32 | return [self transformedValue:value];
33 | }];
34 | }
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/extobjc/EXTKeyPathCoding.h:
--------------------------------------------------------------------------------
1 | //
2 | // EXTKeyPathCoding.h
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 19.06.12.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import
11 | #import "metamacros.h"
12 |
13 | /**
14 | * \@keypath allows compile-time verification of key paths. Given a real object
15 | * receiver and key path:
16 | *
17 | * @code
18 |
19 | NSString *UTF8StringPath = @keypath(str.lowercaseString.UTF8String);
20 | // => @"lowercaseString.UTF8String"
21 |
22 | NSString *versionPath = @keypath(NSObject, version);
23 | // => @"version"
24 |
25 | NSString *lowercaseStringPath = @keypath(NSString.new, lowercaseString);
26 | // => @"lowercaseString"
27 |
28 | * @endcode
29 | *
30 | * ... the macro returns an \c NSString containing all but the first path
31 | * component or argument (e.g., @"lowercaseString.UTF8String", @"version").
32 | *
33 | * In addition to simply creating a key path, this macro ensures that the key
34 | * path is valid at compile-time (causing a syntax error if not), and supports
35 | * refactoring, such that changing the name of the property will also update any
36 | * uses of \@keypath.
37 | */
38 | #define keypath(...) \
39 | metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__))(keypath1(__VA_ARGS__))(keypath2(__VA_ARGS__))
40 |
41 | #define keypath1(PATH) \
42 | (((void)(NO && ((void)PATH, NO)), strchr(# PATH, '.') + 1))
43 |
44 | #define keypath2(OBJ, PATH) \
45 | (((void)(NO && ((void)OBJ.PATH, NO)), # PATH))
46 |
47 | /**
48 | * \@collectionKeypath allows compile-time verification of key paths across collections NSArray/NSSet etc. Given a real object
49 | * receiver, collection object receiver and related keypaths:
50 | *
51 | * @code
52 |
53 | NSString *employessFirstNamePath = @collectionKeypath(department.employees, Employee.new, firstName)
54 | // => @"employees.firstName"
55 |
56 | NSString *employessFirstNamePath = @collectionKeypath(Department.new, employees, Employee.new, firstName)
57 | // => @"employees.firstName"
58 |
59 | * @endcode
60 | *
61 | */
62 | #define collectionKeypath(...) \
63 | metamacro_if_eq(3, metamacro_argcount(__VA_ARGS__))(collectionKeypath3(__VA_ARGS__))(collectionKeypath4(__VA_ARGS__))
64 |
65 | #define collectionKeypath3(PATH, COLLECTION_OBJECT, COLLECTION_PATH) ([[NSString stringWithFormat:@"%s.%s",keypath(PATH), keypath(COLLECTION_OBJECT, COLLECTION_PATH)] UTF8String])
66 |
67 | #define collectionKeypath4(OBJ, PATH, COLLECTION_OBJECT, COLLECTION_PATH) ([[NSString stringWithFormat:@"%s.%s",keypath(OBJ, PATH), keypath(COLLECTION_OBJECT, COLLECTION_PATH)] UTF8String])
68 |
69 |
--------------------------------------------------------------------------------
/Example/Pods/Mantle/Mantle/extobjc/EXTScope.m:
--------------------------------------------------------------------------------
1 | //
2 | // EXTScope.m
3 | // extobjc
4 | //
5 | // Created by Justin Spahr-Summers on 2011-05-04.
6 | // Copyright (C) 2012 Justin Spahr-Summers.
7 | // Released under the MIT license.
8 | //
9 |
10 | #import "EXTScope.h"
11 |
12 | void mtl_executeCleanupBlock (__strong mtl_cleanupBlock_t *block) {
13 | (*block)();
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/MBTNetworking.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
34 |
35 |
45 |
46 |
47 |
48 |
54 |
55 |
57 |
58 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-MBTNetworking-MBTNetworking-MBTNetworking.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-MBTNetworking-MBTNetworking.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-Tests-MBTNetworking-MBTNetworking.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Pods-Tests-MBTNetworking.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Example/Pods/PromiseKit/LICENSE.text:
--------------------------------------------------------------------------------
1 | Copyright 2014 Max Howell
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Example/Pods/PromiseKit/README.markdown:
--------------------------------------------------------------------------------
1 | 
2 |
3 | Modern development is highly asynchronous: isn’t it about time iOS developers had tools that made programming asynchronously powerful, easy and delightful?
4 |
5 | # How To Get Started
6 |
7 | * Read PromiseKit’s [comprehensive learning guide](http://promisekit.org/introduction).
8 | * Read the [API documentation](http://cocoadocs.org/docsets/PromiseKit/).
9 | * [Integrate](http://promisekit.org/getting-started) promises into your existing projects.
10 |
11 | ## How To Get Started… Quickly
12 |
13 | ```ruby
14 | # CocoaPods
15 | pod "PromiseKit" # Objective-C PromiseKit
16 | pod "PromiseKit/Promise" # Just PMKPromise, none of the categories
17 |
18 | pod "PromiseKit/Swift" # Swift PromiseKit
19 | pod "PromiseKit/Swift/Promise" # Just Promise, none of the categories
20 |
21 | # Carthage
22 | github "mxcl/PromiseKit" # Swift PromiseKit
23 | ```
24 |
25 | # Donations
26 |
27 | PromiseKit is hundreds of hours of work almost completely by just me: [Max Howell](https://twitter.com/mxcl). I thoroughly enjoyed making PromiseKit, but nevertheless if you have found it useful then your bitcoin will give me a warm fuzzy feeling from my head right down to my toes: 1JDbV5zuym3jFw4kBCc5Z758maUD8e4dKR.
28 |
--------------------------------------------------------------------------------
/Example/Pods/PromiseKit/objc/PromiseKit.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #ifdef PMK_WHEN
4 | #import
5 | #endif
6 | #ifdef PMK_UNTIL
7 | #import
8 | #endif
9 | #ifdef PMK_PAUSE
10 | #import
11 | #endif
12 | #ifdef PMK_JOIN
13 | #import
14 | #endif
15 |
16 | #ifdef PMK_ACACCOUNTSTORE
17 | #import
18 | #endif
19 | #ifdef PMK_AVAUDIOSESSION
20 | #import
21 | #endif
22 | #ifdef PMK_CLGEOCODER
23 | #import
24 | #endif
25 | #ifdef PMK_CLLOCATIONMANAGER
26 | #import
27 | #endif
28 | #ifdef PMK_CKCONTAINER
29 | #import
30 | #endif
31 | #ifdef PMK_CKDATABASE
32 | #import
33 | #endif
34 | #ifdef PMK_MKDIRECTIONS
35 | #import
36 | #endif
37 | #ifdef PMK_MKMAPSNAPSHOTTER
38 | #import
39 | #endif
40 | #ifdef PMK_NSFILEMANAGER
41 | #import
42 | #endif
43 | #ifdef PMK_NSNOTIFICATIONCENTER
44 | #import
45 | #endif
46 | #ifdef PMK_NSTASK
47 | #import
48 | #endif
49 | #ifdef PMK_NSURLCONNECTION
50 | #import
51 | #endif
52 | #ifdef PMK_SKREQUEST
53 | #import
54 | #endif
55 | #ifdef PMK_SLREQUEST
56 | #import
57 | #endif
58 | #ifdef PMK_UIACTIONSHEET
59 | #import
60 | #endif
61 | #ifdef PMK_UIALERTVIEW
62 | #import
63 | #endif
64 | #ifdef PMK_UIVIEW
65 | #import
66 | #endif
67 | #ifdef PMK_UIVIEWCONTROLLER
68 | #import
69 | #endif
70 |
71 |
72 | #ifndef PMK_NO_UNPREFIXATION
73 | // I used a typedef but it broke the tests, turns out typedefs are new
74 | // types that have consequences with isKindOfClass and that
75 | // NOTE I will remove this at 1.1
76 | typedef PMKPromise Promise PMK_DEPRECATED("Use PMKPromise. Use of Promise is deprecated. This is a typedef, and since it is a typedef, there may be unintended side-effects.");
77 | #endif
78 |
--------------------------------------------------------------------------------
/Example/Pods/PromiseKit/objc/PromiseKit/Promise+Hang.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | /**
4 | To import `+hang:`:
5 |
6 | pod "PromiseKit/Hang"
7 | */
8 | @interface PMKPromise (Hang)
9 |
10 | /**
11 | Literally hangs this thread until the promise has resolved. By all means
12 | use this for testing and debugging, but please! Don’t leave `hang` in
13 | production code! It could literally *hang* your app! The implementation
14 | uses {CF|NS}RunLoop.
15 | */
16 | + (id)hang:(PMKPromise *)promise;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Example/Pods/PromiseKit/objc/PromiseKit/Promise+Join.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 |
5 | @interface PMKPromise (Join)
6 | /**
7 | Creates a new promise that resolves only when all provided promises have resolved.
8 |
9 | Typically, you should use `+when:`.
10 |
11 | @param promises An array of promises.
12 |
13 | @return A promise that thens two parameters:
14 |
15 | 1) An array of values from the promises that fulfilled.
16 | 2) An array of errors from the promises that rejected or nil if all promises fulfilled.
17 |
18 | This promise is not rejectable.
19 |
20 | @warning *Important* It is not possible to know which promises fulfilled and which rejected.
21 |
22 | pod "PromiseKit/join"
23 |
24 | @see when
25 | */
26 | + (PMKPromise *)join:(NSArray *)promises;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Example/Pods/PromiseKit/objc/PromiseKit/Promise+Pause.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface PMKPromise (Pause)
5 |
6 | /**
7 | Pauses the chain for the specified number of seconds.
8 |
9 | @parameter duration The duration in seconds to wait before resolving this promise.
10 |
11 | @return A new promise fulfilled with two parameters:
12 | 1. The previous promise’s fulfillment.
13 | 2. The duration the chain was suspended.
14 |
15 | For example:
16 |
17 | [PMKPromise promiseWithValue:@"mxcl"].pause(1.5).then(^(NSString *string, NSNumber *duration){
18 | // string => @"mxcl"
19 | // duration => @1.5
20 | });
21 |
22 | @warning *Caveat* Any promise that was previously resolved with `PMKManifold` will lose
23 | parameters beyond the first parameter.
24 | */
25 | - (PMKPromise *(^)(NSTimeInterval duration))pause;
26 |
27 | /**
28 | @param duration The duration in seconds to wait before resolving this promise.
29 | @return A promise that thens the duration it waited before resolving.
30 | */
31 | + (PMKPromise *)pause:(NSTimeInterval)duration;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Example/Pods/PromiseKit/objc/PromiseKit/Promise+Until.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 |
4 | @interface PMKPromise (Until)
5 | /**
6 | Loops until one or more promises have resolved.
7 |
8 | Because Promises are single-shot, the block to until must return one or more promises. They are then `when`’d. If they succeed the until loop is concluded. If they fail then the @param `catch` handler is executed.
9 |
10 | If the `catch` throws or returns an `NSError` then the loop is ended.
11 |
12 | If the `catch` handler returns a Promise then re-execution of the loop is suspended upon resolution of that Promise. If the Promise succeeds then the loop continues. If it fails the loop ends.
13 |
14 | An example usage is an app starting up that must get data from the Internet before the main ViewController can be shown. You can `until` the poll Promise and in the catch handler decide if the poll should be reattempted or not, perhaps returning a `UIAlertView.promise` allowing the user to choose if they continue or not.
15 | */
16 | + (PMKPromise *)until:(id(^)(void))blockReturningPromiseOrArrayOfPromises catch:(id)catchHandler;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Example/Pods/PromiseKit/objc/PromiseKit/Promise+When.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 |
5 | @interface PMKPromise (When)
6 | /**
7 | Returns a new promise that is fulfilled if and when all the provided promises are fulfilled.
8 |
9 | @param promiseOrArrayOfPromisesOrValue The input upon which to wait before resolving this promise.
10 |
11 | If an array is passed then the returned promise is fulfilled once all the provided promises are fulfilled. If *any* of the provided promises reject, the returned promise is immediately rejected with that promise’s rejection error.
12 |
13 | @return A promise that is resolved with either:
14 | 1. An array of values from the provided array of promises.
15 | 2. The value from the provided promise.
16 | 3. The provided non-promise object.
17 |
18 | Note that passing an `NSError` to when will reject the returned promise.
19 | */
20 | + (PMKPromise *)when:(id)promiseOrArrayOfPromisesOrValue;
21 |
22 | /**
23 | Alias for `+when:` provided due to ES6 specifications.
24 |
25 | @see when
26 | */
27 | + (PMKPromise *)all:(id)enumerable;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Example/Pods/PromiseKit/objc/PromiseKit/Promise+Zalgo.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 |
4 | /**
5 | Executes block immediately if we are not on the main thread. Otherwise
6 | dispatches to the default background queue first.
7 |
8 | Do not use this function unless you understand the implications of
9 | unleashing zalgo!
10 |
11 | This function is provided mainly as an optimization tool for *libraries*
12 | that provide promises. Typically, it is not worth the risk to use this
13 | function in your own code, the performance gains are negligible relative
14 | to the risk of damaging the integrity of your asynchronous logic.
15 |
16 | To use this function in CocoaPods you must include the optional subspec:
17 |
18 | pod "PromiseKit/Zalgo"
19 |
20 | @see dispatch_promise
21 | */
22 | PMKPromise *dispatch_zalgo(id block);
23 |
24 |
25 | @interface PMKPromise (Zalgo)
26 |
27 | /**
28 | Executes the block immediately if the promise is already resolved.
29 | Otherwise behaves like `then`.
30 |
31 | Do not use this function unless you understand the implications of
32 | unleashing zalgo!
33 |
34 | To use this method in CocoaPods you must include the optional subspec:
35 |
36 | pod "PromiseKit/Zalgo"
37 |
38 | @see then
39 | @see dispatch_zalgo
40 | */
41 | - (PMKPromise *(^)(id))thenUnleashZalgo;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Example/Pods/PromiseKit/objc/PromiseKit/fwd.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @class NSError;
4 | @class NSString;
5 | @class NSOperationQueue;
6 | @class PMKPromise;
7 |
8 | extern NSOperationQueue *PMKOperationQueue();
9 |
10 | #define PMK_DEPRECATED(msg) __attribute__((deprecated(msg)))
11 |
12 | #define PMKJSONDeserializationOptions ((NSJSONReadingOptions)(NSJSONReadingAllowFragments | NSJSONReadingMutableContainers))
13 |
14 | #define PMKHTTPURLResponseIsJSON(rsp) [@[@"application/json", @"text/json", @"text/javascript"] containsObject:[rsp MIMEType]]
15 | #define PMKHTTPURLResponseIsImage(rsp) [@[@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap"] containsObject:[rsp MIMEType]]
16 | #define PMKHTTPURLResponseIsText(rsp) [[rsp MIMEType] hasPrefix:@"text/"]
17 |
18 | extern void *PMKManualReferenceAssociatedObject;
19 |
20 | #define PMKRetain(obj) objc_setAssociatedObject(obj, PMKManualReferenceAssociatedObject, obj, OBJC_ASSOCIATION_RETAIN_NONATOMIC)
21 | #define PMKRelease(obj) objc_setAssociatedObject(obj, PMKManualReferenceAssociatedObject, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC)
22 |
23 | typedef void (^PromiseResolver)(id) PMK_DEPRECATED("Use PromiseFulfiller or PromiseRejecter");
24 | typedef void (^PromiseFulfiller)(id) PMK_DEPRECATED("Use PMKPromiseFulfiller");
25 | typedef void (^PromiseRejecter)(NSError *) PMK_DEPRECATED("Use PMKPromiseRejecter");
26 | typedef void (^PMKPromiseFulfiller)(id);
27 | typedef void (^PMKPromiseRejecter)(NSError *);
28 | typedef void (^PMKFulfiller)(id);
29 | typedef void (^PMKRejecter)(NSError *);
30 | typedef void (^PMKResolver)(id);
31 | typedef void (^PMKAdapter)(id, NSError *);
32 | typedef void (^PMKIntegerAdapter)(NSInteger, NSError *);
33 | typedef void (^PMKBooleanAdapter)(BOOL, NSError *);
34 |
35 | #define PMKErrorDomain @"PMKErrorDomain"
36 | #define PMKUnderlyingExceptionKey @"PMKUnderlyingExceptionKey"
37 | #define PMKFailingPromiseIndexKey @"PMKFailingPromiseIndexKey"
38 | #define PMKUnhandledExceptionError 1
39 | #define PMKUnknownError 2
40 | #define PMKInvalidUsageError 3
41 | #define PMKAccessDeniedError 4
42 | #define PMKOperationFailed 5
43 |
44 | #define PMKURLErrorFailingURLResponseKey @"PMKURLErrorFailingURLResponseKey"
45 | #define PMKURLErrorFailingDataKey @"PMKURLErrorFailingDataKey"
46 | #define PMKURLErrorFailingStringKey @"PMKURLErrorFailingStringKey"
47 |
48 | // deprecated
49 | #define PMKErrorCodeThrown PMKUnhandledExceptionError
50 | #define PMKErrorCodeUnknown PMKUnknownError
51 | #define PMKErrorCodeInvalidUsage PMKInvalidUsageError
52 |
53 | extern NSString const * const PMKThrown PMK_DEPRECATED("Use PMKUnderlyingExceptionKey");
54 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012-2013 Specta Team.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
21 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SPTExample.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "SpectaTypes.h"
3 |
4 | @interface SPTExample : NSObject
5 |
6 | @property (nonatomic, copy) NSString *name;
7 | @property (nonatomic, copy) id block;
8 | @property (nonatomic) BOOL pending;
9 | @property (nonatomic, getter = isFocused) BOOL focused;
10 |
11 | - (id)initWithName:(NSString *)name block:(id)block;
12 |
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SPTExample.m:
--------------------------------------------------------------------------------
1 | #import "SPTExample.h"
2 |
3 | @implementation SPTExample
4 |
5 | - (id)initWithName:(NSString *)name block:(id)block {
6 | self = [super init];
7 | if (self) {
8 | self.name = name;
9 | self.block = block;
10 | self.pending = block == nil;
11 | }
12 | return self;
13 | }
14 |
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SPTExampleGroup.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "SpectaTypes.h"
4 |
5 | @class
6 | SPTExample
7 | ;
8 |
9 | @interface SPTExampleGroup : NSObject
10 |
11 | @property (nonatomic, copy) NSString *name;
12 | @property (nonatomic, strong) SPTExampleGroup *root;
13 | @property (nonatomic, strong) SPTExampleGroup *parent;
14 | @property (nonatomic, strong) NSMutableArray *children;
15 | @property (nonatomic, strong) NSMutableArray *beforeAllArray;
16 | @property (nonatomic, strong) NSMutableArray *afterAllArray;
17 | @property (nonatomic, strong) NSMutableArray *beforeEachArray;
18 | @property (nonatomic, strong) NSMutableArray *afterEachArray;
19 | @property (nonatomic, strong) NSMutableDictionary *sharedExamples;
20 | @property (nonatomic) unsigned int exampleCount;
21 | @property (nonatomic) unsigned int ranExampleCount;
22 | @property (nonatomic, getter=isFocused) BOOL focused;
23 |
24 | + (void)setAsyncSpecTimeout:(NSTimeInterval)timeout;
25 | - (id)initWithName:(NSString *)name parent:(SPTExampleGroup *)parent root:(SPTExampleGroup *)root;
26 |
27 | - (SPTExampleGroup *)addExampleGroupWithName:(NSString *)name;
28 | - (SPTExampleGroup *)addExampleGroupWithName:(NSString *)name focused:(BOOL)focused;
29 |
30 | - (SPTExample *)addExampleWithName:(NSString *)name block:(id)block;
31 | - (SPTExample *)addExampleWithName:(NSString *)name block:(id)block focused:(BOOL)focused;
32 |
33 | - (void)addBeforeAllBlock:(SPTVoidBlock)block;
34 | - (void)addAfterAllBlock:(SPTVoidBlock)block;
35 | - (void)addBeforeEachBlock:(SPTVoidBlock)block;
36 | - (void)addAfterEachBlock:(SPTVoidBlock)block;
37 |
38 | - (NSArray *)compileExamplesWithNameStack:(NSArray *)nameStack;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SPTNestedReporter.h:
--------------------------------------------------------------------------------
1 | #import "SPTReporter.h"
2 |
3 | @interface SPTNestedReporter : SPTReporter
4 |
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SPTReporter.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface SPTReporter : XCTestLog
4 |
5 | /*
6 | * Returns a singleton reporter used to generate Specta's test output.
7 | * The type of reporter can be customized by subclassing and setting the
8 | * SPECTA_REPORTER_CLASS environment variable.
9 | *
10 | * Subclasses may override methods from XCTestObserver to change test output.
11 | * Initialization shuld be performed in the -startObserving / -stopObserving methods,
12 | * and MUST invoke the super class implementation.
13 | */
14 | + (instancetype)sharedReporter;
15 |
16 | #pragma mark - Run Stack
17 |
18 | @property (nonatomic, strong, readonly) NSArray *runStack;
19 | @property (nonatomic, assign, readonly) NSUInteger runStackCount;
20 |
21 | @property (nonatomic, assign, readonly) NSInteger numberOfTestCases;
22 | @property (nonatomic, assign, readonly) NSInteger numberOfCompletedTestCases;
23 |
24 | #pragma mark - Printing
25 |
26 | - (void)printString:(NSString *)string;
27 | - (void)printStringWithFormat:(NSString *)formatString, ... NS_FORMAT_FUNCTION(1,2);
28 |
29 | - (void)printLine;
30 | - (void)printLine:(NSString *)line;
31 | - (void)printLineWithFormat:(NSString *)formatString, ... NS_FORMAT_FUNCTION(1,2);
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SPTSharedExampleGroups.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "SpectaTypes.h"
3 |
4 | @class
5 | SPTExampleGroup
6 | ;
7 |
8 | @interface SPTSharedExampleGroups : NSObject
9 |
10 | + (void)addSharedExampleGroupWithName:(NSString *)name block:(SPTDictionaryBlock)block exampleGroup:(SPTExampleGroup *)exampleGroup;
11 | + (SPTDictionaryBlock)sharedExampleGroupWithName:(NSString *)name exampleGroup:(SPTExampleGroup *)exampleGroup;
12 | + (void)defineSharedExampleGroups;
13 |
14 | + (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)filename atLine:(NSUInteger)lineNumber expected:(BOOL)expected;
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SPTSharedExampleGroups.m:
--------------------------------------------------------------------------------
1 | #import "SPTSharedExampleGroups.h"
2 | #import "SPTExampleGroup.h"
3 | #import "SPTXCTestCase.h"
4 | #import "SpectaUtility.h"
5 | #import
6 |
7 | NSMutableDictionary *globalSharedExampleGroups = nil;
8 | BOOL initialized = NO;
9 |
10 | @implementation SPTSharedExampleGroups
11 |
12 | + (void)initialize {
13 | Class SPTSharedExampleGroupsClass = [SPTSharedExampleGroups class];
14 | if ([self class] == SPTSharedExampleGroupsClass) {
15 | if (!initialized) {
16 | initialized = YES;
17 | globalSharedExampleGroups = [[NSMutableDictionary alloc] init];
18 |
19 | Class *classes = NULL;
20 | int numClasses = objc_getClassList(NULL, 0);
21 |
22 | if (numClasses > 0) {
23 | classes = (Class *)malloc(sizeof(Class) * numClasses);
24 | numClasses = objc_getClassList(classes, numClasses);
25 |
26 | Class klass, superClass;
27 | for(uint i = 0; i < numClasses; i++) {
28 | klass = classes[i];
29 | superClass = class_getSuperclass(klass);
30 | if (superClass == SPTSharedExampleGroupsClass) {
31 | [klass defineSharedExampleGroups];
32 | }
33 | }
34 |
35 | free(classes);
36 | }
37 | }
38 | }
39 | }
40 |
41 | + (void)addSharedExampleGroupWithName:(NSString *)name block:(SPTDictionaryBlock)block exampleGroup:(SPTExampleGroup *)exampleGroup {
42 | (exampleGroup == nil ? globalSharedExampleGroups : exampleGroup.sharedExamples)[name] = [block copy];
43 | }
44 |
45 | + (SPTDictionaryBlock)sharedExampleGroupWithName:(NSString *)name exampleGroup:(SPTExampleGroup *)exampleGroup {
46 | SPTDictionaryBlock sharedExampleGroup = nil;
47 | while (exampleGroup != nil) {
48 | if ((sharedExampleGroup = exampleGroup.sharedExamples[name])) {
49 | return sharedExampleGroup;
50 | }
51 | exampleGroup = exampleGroup.parent;
52 | }
53 | return globalSharedExampleGroups[name];
54 | }
55 |
56 | + (void)defineSharedExampleGroups {}
57 |
58 | + (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)filename atLine:(NSUInteger)lineNumber expected:(BOOL)expected {
59 | [SPTCurrentTestCase recordFailureWithDescription:description inFile:filename atLine:lineNumber expected:expected];
60 | }
61 |
62 | @end
63 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SPTSpec.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @class
4 | SPTExample
5 | , SPTExampleGroup
6 | ;
7 |
8 | @interface SPTSpec : NSObject
9 |
10 | @property (nonatomic, strong) SPTExampleGroup *rootGroup;
11 | @property (nonatomic, strong) NSMutableArray *groupStack;
12 | @property (nonatomic, strong) NSArray *compiledExamples;
13 | @property (nonatomic, strong) NSString *fileName;
14 | @property (nonatomic) NSUInteger lineNumber;
15 | @property (nonatomic, getter = isDisabled) BOOL disabled;
16 | @property (nonatomic) BOOL hasFocusedExamples;
17 |
18 | - (SPTExampleGroup *)currentGroup;
19 | - (void)compile;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SPTSpec.m:
--------------------------------------------------------------------------------
1 | #import "SPTSpec.h"
2 | #import "SPTExampleGroup.h"
3 | #import "SPTExample.h"
4 |
5 | @implementation SPTSpec
6 |
7 | - (id)init {
8 | self = [super init];
9 | if (self) {
10 | self.rootGroup = [[SPTExampleGroup alloc] init];
11 | self.rootGroup.root = self.rootGroup;
12 | self.groupStack = [NSMutableArray arrayWithObject:self.rootGroup];
13 | }
14 | return self;
15 | }
16 |
17 | - (SPTExampleGroup *)currentGroup {
18 | return [self.groupStack lastObject];
19 | }
20 |
21 | - (void)compile {
22 | self.compiledExamples = [self.rootGroup compileExamplesWithNameStack:@[]];
23 | for (SPTExample *example in self.compiledExamples) {
24 | if (example.focused) {
25 | self.hasFocusedExamples = YES;
26 | break;
27 | }
28 | }
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SPTXCTestCase.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "XCTestCase+Specta.h"
3 |
4 | @class
5 | SPTSpec
6 | , SPTExample
7 | ;
8 |
9 | @interface SPTXCTestCase : XCTestCase
10 |
11 | @property (nonatomic, strong) NSInvocation *spt_invocation;
12 | @property (nonatomic, strong) XCTestCaseRun *spt_run;
13 | @property (nonatomic, assign) BOOL spt_skipped;
14 | @property (nonatomic, assign, readonly, getter = spt_isPending) BOOL spt_pending;
15 |
16 | + (BOOL)spt_isDisabled;
17 | + (void)spt_setDisabled:(BOOL)disabled;
18 | + (BOOL)spt_focusedExamplesExist;
19 |
20 | + (SPTSpec *)spt_spec;
21 | - (void)spt_setCurrentSpecWithFileName:(const char *)fileName lineNumber:(NSUInteger)lineNumber;
22 | - (void)spt_defineSpec;
23 | - (void)spt_unsetCurrentSpec;
24 | - (void)spt_runExampleAtIndex:(NSUInteger)index;
25 | - (SPTExample *)spt_getCurrentExample;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SPTXCTestReporter.h:
--------------------------------------------------------------------------------
1 | #import "SPTReporter.h"
2 |
3 | /**
4 | * Reporter that produces output identical to XCode's default output. Useful when integrating with 3rd-party tools that
5 | * may not like SPTNestedReporter's indented output.
6 | */
7 | @interface SPTXCTestReporter : SPTReporter
8 |
9 | @end
10 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SPTXCTestReporter.m:
--------------------------------------------------------------------------------
1 | #import "SPTXCTestReporter.h"
2 |
3 | @implementation SPTXCTestReporter
4 |
5 | /*
6 | * Intentionally left blank.
7 | * This class is included for future-compatibility just in case we need to
8 | * weak reporter output for users who want test output idential to XCTestLog.
9 | */
10 |
11 | @end
12 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SpectaSupport.h:
--------------------------------------------------------------------------------
1 | #ifndef SPT_SUBCLASS
2 | #define SPT_SUBCLASS SPTXCTestCase
3 | #endif
4 |
5 |
6 |
7 | #define _SPTSpecBegin(name, file, line) \
8 | @interface name##Spec : SPT_SUBCLASS \
9 | @end \
10 | @implementation name##Spec \
11 | - (void)spt_defineSpec { \
12 | const char *specFileName = file; \
13 | @try { \
14 | [self spt_setCurrentSpecWithFileName:(file) lineNumber:(line)];
15 |
16 | #define _SPTSpecEnd \
17 | [self spt_unsetCurrentSpec]; \
18 | } @catch(NSException *exception) { \
19 | fprintf(stderr, "%s: An exception has occured outside of tests, aborting.\n\n%s (%s) \n", specFileName, [[exception name] UTF8String], [[exception reason] UTF8String]); \
20 | if ([exception respondsToSelector:@selector(callStackSymbols)]) { \
21 | NSArray *callStackSymbols = [exception callStackSymbols]; \
22 | if (callStackSymbols) { \
23 | NSString *callStack = [NSString stringWithFormat:@"\n Call Stack:\n %@\n", [callStackSymbols componentsJoinedByString:@"\n "]]; \
24 | fprintf(stderr, "%s", [callStack UTF8String]); \
25 | } \
26 | } \
27 | exit(1); \
28 | } \
29 | } \
30 | @end
31 |
32 | #define _SPTSharedExampleGroupsBegin(name) \
33 | @interface name##SharedExampleGroups : SPTSharedExampleGroups \
34 | @end \
35 | @implementation name##SharedExampleGroups \
36 | + (void)defineSharedExampleGroups {
37 |
38 | #define _SPTSharedExampleGroupsEnd \
39 | } \
40 | @end
41 |
42 | #undef _XCTRegisterFailure
43 | #define _XCTRegisterFailure(condition, format...) \
44 | ({ \
45 | _XCTFailureHandler((id)self, YES, __FILE__, __LINE__, condition, @"" format); \
46 | })
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SpectaTypes.h:
--------------------------------------------------------------------------------
1 | typedef void (^SPTVoidBlock)();
2 | typedef void (^SPTAsyncBlock)(void (^)());
3 | typedef void (^SPTDictionaryBlock)(NSDictionary *dictionary);
4 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SpectaUtility.h:
--------------------------------------------------------------------------------
1 | #import
2 | extern NSString * const SPTCurrentSpecKey;
3 | extern NSString * const SPTCurrentTestCaseKey;
4 |
5 | #define SPTCurrentSpec [[NSThread currentThread] threadDictionary][SPTCurrentSpecKey]
6 | #define SPTCurrentTestCase [[NSThread currentThread] threadDictionary][SPTCurrentTestCaseKey]
7 | #define SPTCurrentGroup [SPTCurrentSpec currentGroup]
8 | #define SPTGroupStack [SPTCurrentSpec groupStack]
9 |
10 | #define SPTReturnUnlessBlockOrNil(block) if ((block) && !SPTIsBlock((block))) return;
11 | #define SPTIsBlock(obj) [(obj) isKindOfClass:NSClassFromString(@"NSBlock")]
12 |
13 | const char *SPTGetBlockSignature(id blockObject);
14 | BOOL SPTIsSpecClass(Class aClass);
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/SpectaUtility.m:
--------------------------------------------------------------------------------
1 | #import "SpectaUtility.h"
2 | #import "SPTXCTestCase.h"
3 | #import
4 |
5 | NSString * const SPTCurrentSpecKey = @"SPTCurrentSpec";
6 | NSString * const SPTCurrentTestCaseKey = @"SPTCurrentTestCase";
7 |
8 | // http://clang.llvm.org/docs/Block-ABI-Apple.html
9 | struct SPTBlockLiteral {
10 | void *isa; // initialized to &_NSConcreteStackBlock or &_NSConcreteGlobalBlock
11 | int flags;
12 | int reserved;
13 | void (*invoke)(void *, ...);
14 | struct Block_descriptor_1 {
15 | unsigned long int reserved; // NULL
16 | unsigned long int size; // sizeof(struct Block_literal_1)
17 | // optional helper functions
18 | void (*copy_helper)(void *dst, void *src); // IFF (1<<25)
19 | void (*dispose_helper)(void *src); // IFF (1<<25)
20 | // required ABI.2010.3.16
21 | const char *signature; // IFF (1<<30)
22 | } *descriptor;
23 | // imported variables
24 | };
25 |
26 | enum {
27 | SPT_BLOCK_HAS_COPY_DISPOSE = (1 << 25),
28 | SPT_BLOCK_HAS_CTOR = (1 << 26), // helpers have C++ code
29 | SPT_BLOCK_IS_GLOBAL = (1 << 28),
30 | SPT_BLOCK_HAS_STRET = (1 << 29), // IFF BLOCK_HAS_SIGNATURE
31 | SPT_BLOCK_HAS_SIGNATURE = (1 << 30),
32 | };
33 |
34 | const char *SPTGetBlockSignature(id blockObject) {
35 | struct SPTBlockLiteral *block = (__bridge struct SPTBlockLiteral *)blockObject;
36 |
37 | int flags = block->flags;
38 |
39 | if (flags & SPT_BLOCK_HAS_SIGNATURE) {
40 | void *signaturePtr = block->descriptor;
41 | signaturePtr += sizeof(unsigned long int); // skip reserved
42 | signaturePtr += sizeof(unsigned long int); // skip size
43 |
44 | if (flags & SPT_BLOCK_HAS_COPY_DISPOSE) {
45 | signaturePtr += sizeof(void(*)(void *dst, void *src)); // skip copy_helper
46 | signaturePtr += sizeof(void(*)(void *src)); // skip dispose_helper
47 | }
48 |
49 | return *(const char **)signaturePtr;
50 | }
51 |
52 | return NULL;
53 | }
54 |
55 | BOOL SPTIsSpecClass(Class aClass) {
56 | Class superclass = class_getSuperclass(aClass);
57 | while (superclass != Nil) {
58 | if (superclass == [SPTXCTestCase class]) {
59 | return YES;
60 | } else {
61 | superclass = class_getSuperclass(superclass);
62 | }
63 | }
64 | return NO;
65 | }
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/XCTestCase+Specta.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface XCTestCase (Specta)
4 | @end
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/XCTestCase+Specta.m:
--------------------------------------------------------------------------------
1 | #import "XCTestCase+Specta.h"
2 | #import "SPTXCTestCase.h"
3 | #import "SPTExample.h"
4 | #import
5 |
6 | @interface XCTestCase (xct_allSubclasses)
7 |
8 | - (NSArray *)xct_allSubclasses;
9 |
10 | @end
11 |
12 | @implementation XCTestCase (Specta)
13 |
14 | + (void)load {
15 | Method xct_allSubclasses = class_getClassMethod(self, @selector(xct_allSubclasses));
16 | Method xct_allSubclasses_swizzle = class_getClassMethod(self, @selector(xct_allSubclasses_swizzle));
17 | method_exchangeImplementations(xct_allSubclasses, xct_allSubclasses_swizzle);
18 | }
19 |
20 | + (NSArray *)xct_allSubclasses_swizzle {
21 | NSMutableArray *subclasses = [[self xct_allSubclasses_swizzle] mutableCopy]; // call original
22 | [subclasses removeObject:[SPTXCTestCase class]];
23 | return subclasses;
24 | }
25 |
26 | @end
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/XCTestLog+Specta.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface XCTestLog (Specta)
4 |
5 | - (void)spt_pauseObservationInBlock:(void (^)(void))block;
6 |
7 | @end
8 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/XCTestLog+Specta.m:
--------------------------------------------------------------------------------
1 | #import "XCTestLog+Specta.h"
2 | #import "SPTReporter.h"
3 | #import
4 |
5 | static void spt_swizzleInstanceMethod(Class class, SEL originalSelector, SEL swizzledSelector) {
6 | Method originalMethod = class_getInstanceMethod(class, originalSelector);
7 | Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);
8 |
9 | method_exchangeImplementations(originalMethod, swizzledMethod);
10 | }
11 |
12 | @implementation XCTestLog (Specta)
13 |
14 | + (void)load {
15 | spt_swizzleInstanceMethod(self, @selector(startObserving), @selector(XCTestLog_startObserving));
16 | spt_swizzleInstanceMethod(self, @selector(stopObserving), @selector(XCTestLog_stopObserving));
17 | }
18 |
19 | - (BOOL)spt_shouldProxyToSPTReporter {
20 | // Instances of XCTestLog (but not subclasses) simply forward to -[SPTReporter sharedReporter]
21 | return [self isMemberOfClass:[XCTestLog class]];
22 | }
23 |
24 | - (void)spt_pauseObservationInBlock:(void (^)(void))block {
25 | [self XCTestLog_stopObserving];
26 | block();
27 | [self XCTestLog_startObserving];
28 | }
29 |
30 | #pragma mark - XCTestObserver
31 |
32 | - (void)XCTestLog_startObserving {
33 | if ([self spt_shouldProxyToSPTReporter]) {
34 | [[SPTReporter sharedReporter] startObserving];
35 | } else {
36 | [self XCTestLog_startObserving];
37 | }
38 | }
39 |
40 | - (void)XCTestLog_stopObserving {
41 | if ([self spt_shouldProxyToSPTReporter]) {
42 | [[SPTReporter sharedReporter] stopObserving];
43 | } else {
44 | [self XCTestLog_stopObserving];
45 | usleep(100000);
46 | }
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/XCTestRun+Specta.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface XCTestRun (Specta)
4 |
5 | - (NSUInteger)spt_pendingTestCaseCount;
6 | - (NSUInteger)spt_skippedTestCaseCount;
7 |
8 | @end
9 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/src/XCTestRun+Specta.m:
--------------------------------------------------------------------------------
1 | #import "XCTestRun+Specta.h"
2 | #import "SPTXCTestCase.h"
3 |
4 | @implementation XCTestRun (Specta)
5 |
6 | #pragma mark - Pending Test Cases
7 |
8 | - (NSUInteger)spt_pendingTestCaseCount {
9 | NSUInteger pendingTestCaseCount = 0;
10 |
11 | if ([self isKindOfClass:[XCTestSuiteRun class]]) {
12 | for (XCTestRun * testRun in [(XCTestSuiteRun *)self testRuns]) {
13 | pendingTestCaseCount += [testRun spt_pendingTestCaseCount];
14 | }
15 | } else if ([[self test] isKindOfClass:[SPTXCTestCase class]]) {
16 | SPTXCTestCase * testCase = (SPTXCTestCase *)[self test];
17 | if (testCase != nil && [testCase spt_isPending]) {
18 | pendingTestCaseCount++;
19 | }
20 | }
21 |
22 | return pendingTestCaseCount;
23 | }
24 |
25 | #pragma mark - Skipped Test Cases
26 |
27 | - (NSUInteger)spt_skippedTestCaseCount {
28 | NSUInteger skippedTestCaseCount = 0;
29 |
30 | if ([self isKindOfClass:[XCTestSuiteRun class]]) {
31 | for (XCTestRun * testRun in [(XCTestSuiteRun *)self testRuns]) {
32 | skippedTestCaseCount += [testRun spt_skippedTestCaseCount];
33 | }
34 | } else if ([[self test] isKindOfClass:[SPTXCTestCase class]]) {
35 | SPTXCTestCase * testCase = (SPTXCTestCase *)[self test];
36 | if (testCase.spt_skipped) {
37 | skippedTestCaseCount++;
38 | }
39 | }
40 |
41 | return skippedTestCaseCount;
42 | }
43 |
44 | @end
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/AFNetworking/AFNetworking-Private.xcconfig:
--------------------------------------------------------------------------------
1 | #include "AFNetworking.xcconfig"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBTNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/PromiseKit"
4 | OTHER_LDFLAGS = ${AFNETWORKING_OTHER_LDFLAGS}
5 | PODS_ROOT = ${SRCROOT}
6 | SKIP_INSTALL = YES
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_AFNetworking : NSObject
3 | @end
4 | @implementation PodsDummy_AFNetworking
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig:
--------------------------------------------------------------------------------
1 | AFNETWORKING_OTHER_LDFLAGS = -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration"
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/MBTNetworking/MBTNetworking-Private.xcconfig:
--------------------------------------------------------------------------------
1 | #include "MBTNetworking.xcconfig"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/MBTNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBTNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/PromiseKit"
4 | PODS_ROOT = ${SRCROOT}
5 | SKIP_INSTALL = YES
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/MBTNetworking/MBTNetworking-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_MBTNetworking : NSObject
3 | @end
4 | @implementation PodsDummy_MBTNetworking
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/MBTNetworking/MBTNetworking-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/MBTNetworking/MBTNetworking.xcconfig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/m4tbat/MBTNetworking/e31b2cbb5de8490e61b6aedb7cbc4dbe6848ab32/Example/Pods/Target Support Files/MBTNetworking/MBTNetworking.xcconfig
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Mantle/Mantle-Private.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Mantle.xcconfig"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Mantle" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBTNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/PromiseKit"
4 | OTHER_LDFLAGS = ${MANTLE_OTHER_LDFLAGS}
5 | PODS_ROOT = ${SRCROOT}
6 | SKIP_INSTALL = YES
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Mantle/Mantle-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Mantle : NSObject
3 | @end
4 | @implementation PodsDummy_Mantle
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Mantle/Mantle-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Mantle/Mantle.xcconfig:
--------------------------------------------------------------------------------
1 | MANTLE_OTHER_LDFLAGS = -framework "Foundation"
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBTNetworking/Pods-MBTNetworking-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_MBTNetworking : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_MBTNetworking
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBTNetworking/Pods-MBTNetworking.debug.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBTNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/PromiseKit"
3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/MBTNetworking" -isystem "${PODS_ROOT}/Headers/Public/Mantle" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit"
4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"MBTNetworking" -l"Mantle" -l"PromiseKit" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration"
5 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-MBTNetworking/Pods-MBTNetworking.release.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBTNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/PromiseKit"
3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/MBTNetworking" -isystem "${PODS_ROOT}/Headers/Public/Mantle" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit"
4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"MBTNetworking" -l"Mantle" -l"PromiseKit" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration"
5 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-Tests/Pods-Tests-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_Tests : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_Tests
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-Tests/Pods-Tests.debug.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBTNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/PromiseKit"
3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/MBTNetworking" -isystem "${PODS_ROOT}/Headers/Public/Mantle" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit"
4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"MBTNetworking" -l"Mantle" -l"PromiseKit" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration"
5 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBTNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/PromiseKit"
3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/MBTNetworking" -isystem "${PODS_ROOT}/Headers/Public/Mantle" -isystem "${PODS_ROOT}/Headers/Public/PromiseKit"
4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"MBTNetworking" -l"Mantle" -l"PromiseKit" -framework "CoreGraphics" -framework "Foundation" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration"
5 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/PromiseKit/PromiseKit-Private.xcconfig:
--------------------------------------------------------------------------------
1 | #include "PromiseKit.xcconfig"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PromiseKit" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/MBTNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/PromiseKit"
4 | OTHER_LDFLAGS = ${PROMISEKIT_OTHER_LDFLAGS}
5 | PODS_ROOT = ${SRCROOT}
6 | SKIP_INSTALL = YES
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/PromiseKit/PromiseKit-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_PromiseKit : NSObject
3 | @end
4 | @implementation PodsDummy_PromiseKit
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/PromiseKit/PromiseKit-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/PromiseKit/PromiseKit.xcconfig:
--------------------------------------------------------------------------------
1 | PROMISEKIT_OTHER_LDFLAGS = -framework "Foundation"
--------------------------------------------------------------------------------
/Example/Tests/Tests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Example/Tests/Tests-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every test case source file.
5 | //
6 |
7 | #ifdef __OBJC__
8 |
9 |
10 |
11 | #endif
12 |
--------------------------------------------------------------------------------
/Example/Tests/Tests.m:
--------------------------------------------------------------------------------
1 | //
2 | // MBTNetworkingTests.m
3 | // MBTNetworkingTests
4 | //
5 | // Created by Matteo Battaglio on 03/08/2015.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | ${TEST_EXAMPLE}
10 |
--------------------------------------------------------------------------------
/Example/Tests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015 Matteo Battaglio
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/MBTNetworking.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = "MBTNetworking"
3 | s.version = "0.4.1"
4 | s.summary = "A simple networking library for iOS based on AFNetworking 2, Mantle and PromiseKit."
5 | s.description = <<-DESC
6 | A simple networking library for iOS based on AFNetworking 2, Mantle and PromiseKit.
7 | The aim of MBTNetworking is to streamline the implementation of
8 | requests to REST APIs and the mapping of the response objects to
9 | model objects.
10 | DESC
11 | s.homepage = "https://github.com/madbat/MBTNetworking"
12 | s.license = 'MIT'
13 | s.author = { "Matteo Battaglio" => "m4dbat@gmail.com" }
14 | s.source = { :git => "https://github.com/madbat/MBTNetworking.git", :tag => s.version.to_s }
15 | s.social_media_url = 'https://twitter.com/m4dbat'
16 |
17 | s.platform = :ios, '7.0'
18 | s.requires_arc = true
19 |
20 | s.source_files = 'Pod/Classes/**/*'
21 | s.resource_bundles = {
22 | 'MBTNetworking' => ['Pod/Assets/*.png']
23 | }
24 |
25 | s.dependency 'AFNetworking', '~> 2.5'
26 | s.dependency 'Mantle', '~> 2.0'
27 | s.dependency 'PromiseKit/Promise', '~> 1.5'
28 | end
29 |
--------------------------------------------------------------------------------
/Pod/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/m4tbat/MBTNetworking/e31b2cbb5de8490e61b6aedb7cbc4dbe6848ab32/Pod/Assets/.gitkeep
--------------------------------------------------------------------------------
/Pod/Classes/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/m4tbat/MBTNetworking/e31b2cbb5de8490e61b6aedb7cbc4dbe6848ab32/Pod/Classes/.gitkeep
--------------------------------------------------------------------------------
/Pod/Classes/MBTModel.h:
--------------------------------------------------------------------------------
1 | //
2 | // MBTModel.h
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 06/08/14.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import "Mantle.h"
10 |
11 | #define selStr(sel) NSStringFromSelector(@selector(sel))
12 |
13 | @interface MBTModel : MTLModel
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Pod/Classes/MBTModel.m:
--------------------------------------------------------------------------------
1 | //
2 | // MBTModel.m
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 06/08/14.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import "MBTModel.h"
10 |
11 | @implementation MBTModel
12 |
13 | + (NSDictionary *)JSONKeyPathsByPropertyKey {
14 | return @{};
15 | }
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Pod/Classes/MBTNetworkManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // MBTNetworkManager.h
3 | // MBTNetworking
4 | //
5 | // Created by Matteo Battaglio on 02/08/14.
6 | // Copyright (c) 2014 Matteo Battaglio. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AFNetworking+PromiseKit.h"
11 | #import "MBTHTTPRequest.h"
12 |
13 | @interface MBTNetworkManager : NSObject
14 |
15 | @property (nonatomic, strong) AFHTTPRequestSerializer *requestSerializer;
16 | @property (nonatomic, strong) AFHTTPResponseSerializer *responseSerializer;
17 |
18 | - (instancetype)initWithBaseURL:(NSURL *)baseURL;
19 |
20 | - (PMKPromise *)performRequest:(MBTHTTPRequest *)request;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # MBTNetworking
2 |
3 | [](http://cocoadocs.org/docsets/MBTNetworking)
4 | [](http://cocoadocs.org/docsets/MBTNetworking)
5 | [](http://cocoadocs.org/docsets/MBTNetworking)
6 |
7 | ## Usage
8 |
9 | Here's an excerpt from the super-minimal example project which demonstrates instantiating the manager pointing to http://httpbin.org, performing two sequential requests to get some data, and consuming the parsed response objects:
10 |
11 | ```Objective-C
12 | MBTNetworkManager *manager = [[MBTNetworkManager alloc] initWithBaseURL:[NSURL URLWithString:@"http://httpbin.org"]];
13 |
14 | [manager performRequest:[MBTSampleRequests get]].then(^(MBTHTTPBinGetModel *getModel, NSURLSessionTask *task) {
15 | NSLog(@"Origin: %@", getModel.origin);
16 | NSLog(@"User-Agent: %@", getModel.headers.userAgent);
17 |
18 | return [manager performRequest:[MBTSampleRequests headers]];
19 | }).then(^(MBTHTTPBinHeadersModel *headersModel, NSURLSessionTask *task) {
20 | NSLog(@"Headers: %@", headersModel);
21 | }).catch(^(NSError *error) {
22 | NSLog(@"Error: %@", error);
23 | });
24 | ```
25 |
26 | To run the example project, clone the repo, and run `pod install` from the Example directory first.
27 |
28 | ## Requirements
29 |
30 | MBTNetworking requires iOS 7.0+
31 |
32 | ## Installation
33 |
34 | MBTNetworking is available through [CocoaPods](http://cocoapods.org). To install
35 | it, simply add the following line to your Podfile:
36 |
37 | pod "MBTNetworking"
38 |
39 | ## Author
40 |
41 | Matteo Battaglio, http://twitter.com/@m4dbat
42 |
43 | ## License
44 |
45 | MBTNetworking is available under the MIT license. See the LICENSE file for more info.
46 |
47 |
--------------------------------------------------------------------------------