motion-yapper 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +3 -1
- data/lib/yapper.rb +3 -3
- data/lib/yapper/db.rb +61 -4
- data/lib/yapper/document/persistence.rb +4 -0
- data/lib/yapper/document/selection.rb +13 -0
- data/lib/yapper/version.rb +1 -1
- data/motion-yapper.gemspec +1 -1
- data/spec/integration/search_spec.rb +111 -0
- data/vendor/Podfile.lock +11 -7
- data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.bridgesupport +16 -2
- data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.h +10 -7
- data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.m +20 -2
- metadata +19 -297
- data/vendor/Pods/.build/libPods-CocoaLumberjack.a +0 -0
- data/vendor/Pods/.build/libPods-NSData+MD5Digest.a +0 -0
- data/vendor/Pods/.build/libPods-YapDatabase.a +0 -0
- data/vendor/Pods/.build/libPods.a +0 -0
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDASLLogger.h +0 -41
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDAbstractDatabaseLogger.h +0 -102
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDContextFilterLogFormatter.h +0 -63
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDDispatchQueueLogFormatter.h +0 -128
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDFileLogger.h +0 -369
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog+LOGV.h +0 -99
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog.h +0 -634
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDMultiFormatter.h +0 -30
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDTTYLogger.h +0 -181
- data/vendor/Pods/BuildHeaders/NSData+MD5Digest/NSData+MD5Digest.h +0 -18
- data/vendor/Pods/BuildHeaders/YapDatabase/NSDictionary+YapDatabase.h +0 -8
- data/vendor/Pods/BuildHeaders/YapDatabase/YapCache.h +0 -91
- data/vendor/Pods/BuildHeaders/YapDatabase/YapCollectionKey.h +0 -23
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabase.h +0 -547
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnection.h +0 -449
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnectionState.h +0 -29
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseDefaults.h +0 -37
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtension.h +0 -15
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionConnection.h +0 -11
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionPrivate.h +0 -444
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionTransaction.h +0 -11
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredView.h +0 -81
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewConnection.h +0 -12
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewPrivate.h +0 -17
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTransaction.h +0 -39
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTypes.h +0 -32
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearch.h +0 -89
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchConnection.h +0 -32
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchPrivate.h +0 -77
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchSnippetOptions.h +0 -79
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchTransaction.h +0 -68
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseLogging.h +0 -158
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseManager.h +0 -17
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabasePrivate.h +0 -446
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseQuery.h +0 -42
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationship.h +0 -35
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipConnection.h +0 -29
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdge.h +0 -163
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdgePrivate.h +0 -79
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipNode.h +0 -99
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipOptions.h +0 -59
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipPrivate.h +0 -125
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipTransaction.h +0 -384
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndex.h +0 -149
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexConnection.h +0 -33
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexPrivate.h +0 -83
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexSetup.h +0 -33
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexSetupPrivate.h +0 -18
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexTransaction.h +0 -58
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseStatement.h +0 -13
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseString.h +0 -121
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseTransaction.h +0 -651
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseView.h +0 -127
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewChange.h +0 -272
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewChangePrivate.h +0 -94
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewConnection.h +0 -116
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewMappings.h +0 -842
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewMappingsPrivate.h +0 -72
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewOptions.h +0 -63
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPage.h +0 -36
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPageMetadata.h +0 -27
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPrivate.h +0 -170
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewRangeOptions.h +0 -330
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewRangeOptionsPrivate.h +0 -17
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTransaction.h +0 -498
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTypes.h +0 -99
- data/vendor/Pods/BuildHeaders/YapDatabase/YapMemoryTable.h +0 -74
- data/vendor/Pods/BuildHeaders/YapDatabase/YapNull.h +0 -17
- data/vendor/Pods/BuildHeaders/YapDatabase/YapSet.h +0 -41
- data/vendor/Pods/BuildHeaders/YapDatabase/YapTouch.h +0 -15
- data/vendor/Pods/CocoaLumberjack/LICENSE.txt +0 -18
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.h +0 -41
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.m +0 -100
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.h +0 -102
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.m +0 -727
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.h +0 -369
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.m +0 -1539
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog+LOGV.h +0 -99
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.h +0 -634
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.m +0 -1208
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.h +0 -181
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.m +0 -1520
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDContextFilterLogFormatter.h +0 -63
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDContextFilterLogFormatter.m +0 -191
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDDispatchQueueLogFormatter.h +0 -128
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDDispatchQueueLogFormatter.m +0 -253
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.h +0 -30
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.m +0 -127
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/README.txt +0 -7
- data/vendor/Pods/CocoaLumberjack/README.markdown +0 -74
- data/vendor/Pods/Headers/CocoaLumberjack/DDASLLogger.h +0 -41
- data/vendor/Pods/Headers/CocoaLumberjack/DDAbstractDatabaseLogger.h +0 -102
- data/vendor/Pods/Headers/CocoaLumberjack/DDContextFilterLogFormatter.h +0 -63
- data/vendor/Pods/Headers/CocoaLumberjack/DDDispatchQueueLogFormatter.h +0 -128
- data/vendor/Pods/Headers/CocoaLumberjack/DDFileLogger.h +0 -369
- data/vendor/Pods/Headers/CocoaLumberjack/DDLog+LOGV.h +0 -99
- data/vendor/Pods/Headers/CocoaLumberjack/DDLog.h +0 -634
- data/vendor/Pods/Headers/CocoaLumberjack/DDMultiFormatter.h +0 -30
- data/vendor/Pods/Headers/CocoaLumberjack/DDTTYLogger.h +0 -181
- data/vendor/Pods/Headers/NSData+MD5Digest/NSData+MD5Digest.h +0 -18
- data/vendor/Pods/Headers/YapDatabase/YapCollectionKey.h +0 -23
- data/vendor/Pods/Headers/YapDatabase/YapDatabase.h +0 -547
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseConnection.h +0 -449
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtension.h +0 -15
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtensionConnection.h +0 -11
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtensionTransaction.h +0 -11
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredView.h +0 -81
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewConnection.h +0 -12
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTransaction.h +0 -39
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTypes.h +0 -32
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearch.h +0 -89
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchConnection.h +0 -32
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchSnippetOptions.h +0 -79
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchTransaction.h +0 -68
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseQuery.h +0 -42
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationship.h +0 -35
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipConnection.h +0 -29
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipEdge.h +0 -163
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipNode.h +0 -99
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipOptions.h +0 -59
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipTransaction.h +0 -384
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndex.h +0 -149
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexConnection.h +0 -33
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexSetup.h +0 -33
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexTransaction.h +0 -58
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseTransaction.h +0 -651
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseView.h +0 -127
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewChange.h +0 -272
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewConnection.h +0 -116
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewMappings.h +0 -842
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewOptions.h +0 -63
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewRangeOptions.h +0 -330
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTransaction.h +0 -498
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTypes.h +0 -99
- data/vendor/Pods/Headers/YapDatabase/YapSet.h +0 -41
- data/vendor/Pods/Headers/____Pods-CocoaLumberjack-prefix.h +0 -7
- data/vendor/Pods/Headers/____Pods-NSData+MD5Digest-prefix.h +0 -5
- data/vendor/Pods/Headers/____Pods-YapDatabase-prefix.h +0 -5
- data/vendor/Pods/Headers/____Pods-environment.h +0 -38
- data/vendor/Pods/Manifest.lock +0 -22
- data/vendor/Pods/NSData+MD5Digest/NSData+MD5Digest/NSData+MD5Digest.h +0 -18
- data/vendor/Pods/NSData+MD5Digest/NSData+MD5Digest/NSData+MD5Digest.m +0 -39
- data/vendor/Pods/NSData+MD5Digest/README.md +0 -11
- data/vendor/Pods/Pods-CocoaLumberjack-Private.xcconfig +0 -5
- data/vendor/Pods/Pods-CocoaLumberjack-dummy.m +0 -5
- data/vendor/Pods/Pods-CocoaLumberjack-prefix.pch +0 -7
- data/vendor/Pods/Pods-CocoaLumberjack.xcconfig +0 -0
- data/vendor/Pods/Pods-NSData+MD5Digest-Private.xcconfig +0 -5
- data/vendor/Pods/Pods-NSData+MD5Digest-dummy.m +0 -5
- data/vendor/Pods/Pods-NSData+MD5Digest-prefix.pch +0 -5
- data/vendor/Pods/Pods-NSData+MD5Digest.xcconfig +0 -0
- data/vendor/Pods/Pods-YapDatabase-Private.xcconfig +0 -5
- data/vendor/Pods/Pods-YapDatabase-dummy.m +0 -5
- data/vendor/Pods/Pods-YapDatabase-prefix.pch +0 -5
- data/vendor/Pods/Pods-YapDatabase.xcconfig +0 -1
- data/vendor/Pods/Pods-acknowledgements.markdown +0 -59
- data/vendor/Pods/Pods-acknowledgements.plist +0 -97
- data/vendor/Pods/Pods-dummy.m +0 -5
- data/vendor/Pods/Pods-environment.h +0 -38
- data/vendor/Pods/Pods-resources.sh +0 -68
- data/vendor/Pods/Pods.xcconfig +0 -5
- data/vendor/Pods/Pods.xcodeproj/project.pbxproj +0 -4807
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-CocoaLumberjack.xcscheme +0 -59
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-NSData+MD5Digest.xcscheme +0 -59
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-YapDatabase.xcscheme +0 -59
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods.xcscheme +0 -59
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/xcschememanagement.plist +0 -31
- data/vendor/Pods/YapDatabase/LICENSE.txt +0 -18
- data/vendor/Pods/YapDatabase/README.md +0 -32
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/Internal/YapDatabaseFilteredViewPrivate.h +0 -17
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.h +0 -81
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.m +0 -159
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewConnection.h +0 -12
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewConnection.m +0 -41
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.h +0 -39
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.m +0 -1235
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTypes.h +0 -32
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/Internal/YapDatabaseFullTextSearchPrivate.h +0 -77
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearch.h +0 -89
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearch.m +0 -146
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchConnection.h +0 -32
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchConnection.m +0 -298
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchSnippetOptions.h +0 -79
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchSnippetOptions.m +0 -95
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchTransaction.h +0 -68
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchTransaction.m +0 -1403
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/Internal/YapDatabaseExtensionPrivate.h +0 -444
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtension.h +0 -15
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtension.m +0 -83
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionConnection.h +0 -11
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionConnection.m +0 -46
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.h +0 -11
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.m +0 -204
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipEdgePrivate.h +0 -79
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipPrivate.h +0 -125
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.h +0 -35
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.m +0 -129
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.h +0 -29
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.m +0 -802
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.h +0 -163
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.m +0 -408
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipNode.h +0 -99
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.h +0 -59
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.m +0 -29
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.h +0 -384
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.m +0 -5254
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexPrivate.h +0 -83
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexSetupPrivate.h +0 -18
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.h +0 -149
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.m +0 -161
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexConnection.h +0 -33
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexConnection.m +0 -331
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexSetup.h +0 -33
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexSetup.m +0 -245
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexTransaction.h +0 -58
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexTransaction.m +0 -1269
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewChangePrivate.h +0 -94
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewMappingsPrivate.h +0 -72
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPage.h +0 -36
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPage.mm +0 -296
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPageMetadata.h +0 -27
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPageMetadata.m +0 -28
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPrivate.h +0 -170
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewRangeOptionsPrivate.h +0 -17
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.h +0 -272
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.m +0 -2500
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.h +0 -842
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.m +0 -1714
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewRangeOptions.h +0 -330
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewRangeOptions.m +0 -141
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.h +0 -127
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.m +0 -194
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.h +0 -116
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.m +0 -888
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewOptions.h +0 -63
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewOptions.m +0 -27
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.h +0 -498
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.m +0 -4986
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTypes.h +0 -99
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.h +0 -8
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.m +0 -19
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.h +0 -91
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.m +0 -465
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseConnectionState.h +0 -29
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseConnectionState.m +0 -48
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.h +0 -37
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.m +0 -83
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseLogging.h +0 -158
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseLogging.m +0 -73
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseManager.h +0 -17
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseManager.m +0 -56
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabasePrivate.h +0 -446
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseStatement.h +0 -13
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseStatement.m +0 -26
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseString.h +0 -121
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapMemoryTable.h +0 -74
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapMemoryTable.m +0 -603
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.h +0 -17
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.m +0 -35
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapTouch.h +0 -15
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapTouch.m +0 -31
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.h +0 -23
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.m +0 -199
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapDatabaseQuery.h +0 -42
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapDatabaseQuery.m +0 -96
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapSet.h +0 -41
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapSet.m +0 -82
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.h +0 -547
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.m +0 -2013
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.h +0 -449
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.m +0 -4046
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.h +0 -651
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.m +0 -5602
- data/vendor/Pods/build-iPhoneSimulator/Pods.bridgesupport +0 -3172
- data/vendor/Pods/build-iPhoneSimulator/libPods.a +0 -0
@@ -1,102 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
|
3
|
-
#import "DDLog.h"
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Welcome to Cocoa Lumberjack!
|
7
|
-
*
|
8
|
-
* The project page has a wealth of documentation if you have any questions.
|
9
|
-
* https://github.com/CocoaLumberjack/CocoaLumberjack
|
10
|
-
*
|
11
|
-
* If you're new to the project you may wish to read the "Getting Started" wiki.
|
12
|
-
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/GettingStarted
|
13
|
-
*
|
14
|
-
*
|
15
|
-
* This class provides an abstract implementation of a database logger.
|
16
|
-
*
|
17
|
-
* That is, it provides the base implementation for a database logger to build atop of.
|
18
|
-
* All that is needed for a concrete database logger is to extend this class
|
19
|
-
* and override the methods in the implementation file that are prefixed with "db_".
|
20
|
-
**/
|
21
|
-
|
22
|
-
@interface DDAbstractDatabaseLogger : DDAbstractLogger {
|
23
|
-
@protected
|
24
|
-
NSUInteger saveThreshold;
|
25
|
-
NSTimeInterval saveInterval;
|
26
|
-
NSTimeInterval maxAge;
|
27
|
-
NSTimeInterval deleteInterval;
|
28
|
-
BOOL deleteOnEverySave;
|
29
|
-
|
30
|
-
BOOL saveTimerSuspended;
|
31
|
-
NSUInteger unsavedCount;
|
32
|
-
dispatch_time_t unsavedTime;
|
33
|
-
dispatch_source_t saveTimer;
|
34
|
-
dispatch_time_t lastDeleteTime;
|
35
|
-
dispatch_source_t deleteTimer;
|
36
|
-
}
|
37
|
-
|
38
|
-
/**
|
39
|
-
* Specifies how often to save the data to disk.
|
40
|
-
* Since saving is an expensive operation (disk io) it is not done after every log statement.
|
41
|
-
* These properties allow you to configure how/when the logger saves to disk.
|
42
|
-
*
|
43
|
-
* A save is done when either (whichever happens first):
|
44
|
-
*
|
45
|
-
* - The number of unsaved log entries reaches saveThreshold
|
46
|
-
* - The amount of time since the oldest unsaved log entry was created reaches saveInterval
|
47
|
-
*
|
48
|
-
* You can optionally disable the saveThreshold by setting it to zero.
|
49
|
-
* If you disable the saveThreshold you are entirely dependent on the saveInterval.
|
50
|
-
*
|
51
|
-
* You can optionally disable the saveInterval by setting it to zero (or a negative value).
|
52
|
-
* If you disable the saveInterval you are entirely dependent on the saveThreshold.
|
53
|
-
*
|
54
|
-
* It's not wise to disable both saveThreshold and saveInterval.
|
55
|
-
*
|
56
|
-
* The default saveThreshold is 500.
|
57
|
-
* The default saveInterval is 60 seconds.
|
58
|
-
**/
|
59
|
-
@property (assign, readwrite) NSUInteger saveThreshold;
|
60
|
-
@property (assign, readwrite) NSTimeInterval saveInterval;
|
61
|
-
|
62
|
-
/**
|
63
|
-
* It is likely you don't want the log entries to persist forever.
|
64
|
-
* Doing so would allow the database to grow infinitely large over time.
|
65
|
-
*
|
66
|
-
* The maxAge property provides a way to specify how old a log statement can get
|
67
|
-
* before it should get deleted from the database.
|
68
|
-
*
|
69
|
-
* The deleteInterval specifies how often to sweep for old log entries.
|
70
|
-
* Since deleting is an expensive operation (disk io) is is done on a fixed interval.
|
71
|
-
*
|
72
|
-
* An alternative to the deleteInterval is the deleteOnEverySave option.
|
73
|
-
* This specifies that old log entries should be deleted during every save operation.
|
74
|
-
*
|
75
|
-
* You can optionally disable the maxAge by setting it to zero (or a negative value).
|
76
|
-
* If you disable the maxAge then old log statements are not deleted.
|
77
|
-
*
|
78
|
-
* You can optionally disable the deleteInterval by setting it to zero (or a negative value).
|
79
|
-
*
|
80
|
-
* If you disable both deleteInterval and deleteOnEverySave then old log statements are not deleted.
|
81
|
-
*
|
82
|
-
* It's not wise to enable both deleteInterval and deleteOnEverySave.
|
83
|
-
*
|
84
|
-
* The default maxAge is 7 days.
|
85
|
-
* The default deleteInterval is 5 minutes.
|
86
|
-
* The default deleteOnEverySave is NO.
|
87
|
-
**/
|
88
|
-
@property (assign, readwrite) NSTimeInterval maxAge;
|
89
|
-
@property (assign, readwrite) NSTimeInterval deleteInterval;
|
90
|
-
@property (assign, readwrite) BOOL deleteOnEverySave;
|
91
|
-
|
92
|
-
/**
|
93
|
-
* Forces a save of any pending log entries (flushes log entries to disk).
|
94
|
-
**/
|
95
|
-
- (void)savePendingLogEntries;
|
96
|
-
|
97
|
-
/**
|
98
|
-
* Removes any log entries that are older than maxAge.
|
99
|
-
**/
|
100
|
-
- (void)deleteOldLogEntries;
|
101
|
-
|
102
|
-
@end
|
@@ -1,63 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
#import "DDLog.h"
|
3
|
-
|
4
|
-
/**
|
5
|
-
* Welcome to Cocoa Lumberjack!
|
6
|
-
*
|
7
|
-
* The project page has a wealth of documentation if you have any questions.
|
8
|
-
* https://github.com/CocoaLumberjack/CocoaLumberjack
|
9
|
-
*
|
10
|
-
* If you're new to the project you may wish to read the "Getting Started" page.
|
11
|
-
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/GettingStarted
|
12
|
-
*
|
13
|
-
*
|
14
|
-
* This class provides a log formatter that filters log statements from a logging context not on the whitelist.
|
15
|
-
*
|
16
|
-
* A log formatter can be added to any logger to format and/or filter its output.
|
17
|
-
* You can learn more about log formatters here:
|
18
|
-
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomFormatters
|
19
|
-
*
|
20
|
-
* You can learn more about logging context's here:
|
21
|
-
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomContext
|
22
|
-
*
|
23
|
-
* But here's a quick overview / refresher:
|
24
|
-
*
|
25
|
-
* Every log statement has a logging context.
|
26
|
-
* These come from the underlying logging macros defined in DDLog.h.
|
27
|
-
* The default logging context is zero.
|
28
|
-
* You can define multiple logging context's for use in your application.
|
29
|
-
* For example, logically separate parts of your app each have a different logging context.
|
30
|
-
* Also 3rd party frameworks that make use of Lumberjack generally use their own dedicated logging context.
|
31
|
-
**/
|
32
|
-
@interface DDContextWhitelistFilterLogFormatter : NSObject <DDLogFormatter>
|
33
|
-
|
34
|
-
- (id)init;
|
35
|
-
|
36
|
-
- (void)addToWhitelist:(int)loggingContext;
|
37
|
-
- (void)removeFromWhitelist:(int)loggingContext;
|
38
|
-
|
39
|
-
- (NSArray *)whitelist;
|
40
|
-
|
41
|
-
- (BOOL)isOnWhitelist:(int)loggingContext;
|
42
|
-
|
43
|
-
@end
|
44
|
-
|
45
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
46
|
-
#pragma mark -
|
47
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
48
|
-
|
49
|
-
/**
|
50
|
-
* This class provides a log formatter that filters log statements from a logging context on the blacklist.
|
51
|
-
**/
|
52
|
-
@interface DDContextBlacklistFilterLogFormatter : NSObject <DDLogFormatter>
|
53
|
-
|
54
|
-
- (id)init;
|
55
|
-
|
56
|
-
- (void)addToBlacklist:(int)loggingContext;
|
57
|
-
- (void)removeFromBlacklist:(int)loggingContext;
|
58
|
-
|
59
|
-
- (NSArray *)blacklist;
|
60
|
-
|
61
|
-
- (BOOL)isOnBlacklist:(int)loggingContext;
|
62
|
-
|
63
|
-
@end
|
@@ -1,128 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
#import <libkern/OSAtomic.h>
|
3
|
-
#import "DDLog.h"
|
4
|
-
|
5
|
-
|
6
|
-
/**
|
7
|
-
* Welcome to Cocoa Lumberjack!
|
8
|
-
*
|
9
|
-
* The project page has a wealth of documentation if you have any questions.
|
10
|
-
* https://github.com/CocoaLumberjack/CocoaLumberjack
|
11
|
-
*
|
12
|
-
* If you're new to the project you may wish to read the "Getting Started" page.
|
13
|
-
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/GettingStarted
|
14
|
-
*
|
15
|
-
*
|
16
|
-
* This class provides a log formatter that prints the dispatch_queue label instead of the mach_thread_id.
|
17
|
-
*
|
18
|
-
* A log formatter can be added to any logger to format and/or filter its output.
|
19
|
-
* You can learn more about log formatters here:
|
20
|
-
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomFormatters
|
21
|
-
*
|
22
|
-
* A typical NSLog (or DDTTYLogger) prints detailed info as [<process_id>:<thread_id>].
|
23
|
-
* For example:
|
24
|
-
*
|
25
|
-
* 2011-10-17 20:21:45.435 AppName[19928:5207] Your log message here
|
26
|
-
*
|
27
|
-
* Where:
|
28
|
-
* - 19928 = process id
|
29
|
-
* - 5207 = thread id (mach_thread_id printed in hex)
|
30
|
-
*
|
31
|
-
* When using grand central dispatch (GCD), this information is less useful.
|
32
|
-
* This is because a single serial dispatch queue may be run on any thread from an internally managed thread pool.
|
33
|
-
* For example:
|
34
|
-
*
|
35
|
-
* 2011-10-17 20:32:31.111 AppName[19954:4d07] Message from my_serial_dispatch_queue
|
36
|
-
* 2011-10-17 20:32:31.112 AppName[19954:5207] Message from my_serial_dispatch_queue
|
37
|
-
* 2011-10-17 20:32:31.113 AppName[19954:2c55] Message from my_serial_dispatch_queue
|
38
|
-
*
|
39
|
-
* This formatter allows you to replace the standard [box:info] with the dispatch_queue name.
|
40
|
-
* For example:
|
41
|
-
*
|
42
|
-
* 2011-10-17 20:32:31.111 AppName[img-scaling] Message from my_serial_dispatch_queue
|
43
|
-
* 2011-10-17 20:32:31.112 AppName[img-scaling] Message from my_serial_dispatch_queue
|
44
|
-
* 2011-10-17 20:32:31.113 AppName[img-scaling] Message from my_serial_dispatch_queue
|
45
|
-
*
|
46
|
-
* If the dispatch_queue doesn't have a set name, then it falls back to the thread name.
|
47
|
-
* If the current thread doesn't have a set name, then it falls back to the mach_thread_id in hex (like normal).
|
48
|
-
*
|
49
|
-
* Note: If manually creating your own background threads (via NSThread/alloc/init or NSThread/detachNeThread),
|
50
|
-
* you can use [[NSThread currentThread] setName:(NSString *)].
|
51
|
-
**/
|
52
|
-
@interface DDDispatchQueueLogFormatter : NSObject <DDLogFormatter> {
|
53
|
-
@protected
|
54
|
-
|
55
|
-
NSString *dateFormatString;
|
56
|
-
}
|
57
|
-
|
58
|
-
/**
|
59
|
-
* Standard init method.
|
60
|
-
* Configure using properties as desired.
|
61
|
-
**/
|
62
|
-
- (id)init;
|
63
|
-
|
64
|
-
/**
|
65
|
-
* The minQueueLength restricts the minimum size of the [detail box].
|
66
|
-
* If the minQueueLength is set to 0, there is no restriction.
|
67
|
-
*
|
68
|
-
* For example, say a dispatch_queue has a label of "diskIO":
|
69
|
-
*
|
70
|
-
* If the minQueueLength is 0: [diskIO]
|
71
|
-
* If the minQueueLength is 4: [diskIO]
|
72
|
-
* If the minQueueLength is 5: [diskIO]
|
73
|
-
* If the minQueueLength is 6: [diskIO]
|
74
|
-
* If the minQueueLength is 7: [diskIO ]
|
75
|
-
* If the minQueueLength is 8: [diskIO ]
|
76
|
-
*
|
77
|
-
* The default minQueueLength is 0 (no minimum, so [detail box] won't be padded).
|
78
|
-
*
|
79
|
-
* If you want every [detail box] to have the exact same width,
|
80
|
-
* set both minQueueLength and maxQueueLength to the same value.
|
81
|
-
**/
|
82
|
-
@property (assign) NSUInteger minQueueLength;
|
83
|
-
|
84
|
-
/**
|
85
|
-
* The maxQueueLength restricts the number of characters that will be inside the [detail box].
|
86
|
-
* If the maxQueueLength is 0, there is no restriction.
|
87
|
-
*
|
88
|
-
* For example, say a dispatch_queue has a label of "diskIO":
|
89
|
-
*
|
90
|
-
* If the maxQueueLength is 0: [diskIO]
|
91
|
-
* If the maxQueueLength is 4: [disk]
|
92
|
-
* If the maxQueueLength is 5: [diskI]
|
93
|
-
* If the maxQueueLength is 6: [diskIO]
|
94
|
-
* If the maxQueueLength is 7: [diskIO]
|
95
|
-
* If the maxQueueLength is 8: [diskIO]
|
96
|
-
*
|
97
|
-
* The default maxQueueLength is 0 (no maximum, so [detail box] won't be truncated).
|
98
|
-
*
|
99
|
-
* If you want every [detail box] to have the exact same width,
|
100
|
-
* set both minQueueLength and maxQueueLength to the same value.
|
101
|
-
**/
|
102
|
-
@property (assign) NSUInteger maxQueueLength;
|
103
|
-
|
104
|
-
/**
|
105
|
-
* Sometimes queue labels have long names like "com.apple.main-queue",
|
106
|
-
* but you'd prefer something shorter like simply "main".
|
107
|
-
*
|
108
|
-
* This method allows you to set such preferred replacements.
|
109
|
-
* The above example is set by default.
|
110
|
-
*
|
111
|
-
* To remove/undo a previous replacement, invoke this method with nil for the 'shortLabel' parameter.
|
112
|
-
**/
|
113
|
-
- (NSString *)replacementStringForQueueLabel:(NSString *)longLabel;
|
114
|
-
- (void)setReplacementString:(NSString *)shortLabel forQueueLabel:(NSString *)longLabel;
|
115
|
-
|
116
|
-
@end
|
117
|
-
|
118
|
-
/**
|
119
|
-
* Method declarations that make it easier to extend/modify DDDispatchQueueLogFormatter
|
120
|
-
**/
|
121
|
-
@interface DDDispatchQueueLogFormatter (OverridableMethods)
|
122
|
-
|
123
|
-
- (NSString *)stringFromDate:(NSDate *)date;
|
124
|
-
- (NSString *)queueThreadLabelForLogMessage:(DDLogMessage *)logMessage;
|
125
|
-
- (NSString *)formatLogMessage:(DDLogMessage *)logMessage;
|
126
|
-
|
127
|
-
@end
|
128
|
-
|
@@ -1,369 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
#import "DDLog.h"
|
3
|
-
|
4
|
-
@class DDLogFileInfo;
|
5
|
-
|
6
|
-
/**
|
7
|
-
* Welcome to Cocoa Lumberjack!
|
8
|
-
*
|
9
|
-
* The project page has a wealth of documentation if you have any questions.
|
10
|
-
* https://github.com/CocoaLumberjack/CocoaLumberjack
|
11
|
-
*
|
12
|
-
* If you're new to the project you may wish to read the "Getting Started" wiki.
|
13
|
-
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/GettingStarted
|
14
|
-
*
|
15
|
-
*
|
16
|
-
* This class provides a logger to write log statements to a file.
|
17
|
-
**/
|
18
|
-
|
19
|
-
|
20
|
-
// Default configuration and safety/sanity values.
|
21
|
-
//
|
22
|
-
// maximumFileSize -> DEFAULT_LOG_MAX_FILE_SIZE
|
23
|
-
// rollingFrequency -> DEFAULT_LOG_ROLLING_FREQUENCY
|
24
|
-
// maximumNumberOfLogFiles -> DEFAULT_LOG_MAX_NUM_LOG_FILES
|
25
|
-
//
|
26
|
-
// You should carefully consider the proper configuration values for your application.
|
27
|
-
|
28
|
-
#define DEFAULT_LOG_MAX_FILE_SIZE (1024 * 1024) // 1 MB
|
29
|
-
#define DEFAULT_LOG_ROLLING_FREQUENCY (60 * 60 * 24) // 24 Hours
|
30
|
-
#define DEFAULT_LOG_MAX_NUM_LOG_FILES (5) // 5 Files
|
31
|
-
|
32
|
-
|
33
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
34
|
-
#pragma mark -
|
35
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
36
|
-
|
37
|
-
// The LogFileManager protocol is designed to allow you to control all aspects of your log files.
|
38
|
-
//
|
39
|
-
// The primary purpose of this is to allow you to do something with the log files after they have been rolled.
|
40
|
-
// Perhaps you want to compress them to save disk space.
|
41
|
-
// Perhaps you want to upload them to an FTP server.
|
42
|
-
// Perhaps you want to run some analytics on the file.
|
43
|
-
//
|
44
|
-
// A default LogFileManager is, of course, provided.
|
45
|
-
// The default LogFileManager simply deletes old log files according to the maximumNumberOfLogFiles property.
|
46
|
-
//
|
47
|
-
// This protocol provides various methods to fetch the list of log files.
|
48
|
-
//
|
49
|
-
// There are two variants: sorted and unsorted.
|
50
|
-
// If sorting is not necessary, the unsorted variant is obviously faster.
|
51
|
-
// The sorted variant will return an array sorted by when the log files were created,
|
52
|
-
// with the most recently created log file at index 0, and the oldest log file at the end of the array.
|
53
|
-
//
|
54
|
-
// You can fetch only the log file paths (full path including name), log file names (name only),
|
55
|
-
// or an array of DDLogFileInfo objects.
|
56
|
-
// The DDLogFileInfo class is documented below, and provides a handy wrapper that
|
57
|
-
// gives you easy access to various file attributes such as the creation date or the file size.
|
58
|
-
|
59
|
-
@protocol DDLogFileManager <NSObject>
|
60
|
-
@required
|
61
|
-
|
62
|
-
// Public properties
|
63
|
-
|
64
|
-
/**
|
65
|
-
* The maximum number of archived log files to keep on disk.
|
66
|
-
* For example, if this property is set to 3,
|
67
|
-
* then the LogFileManager will only keep 3 archived log files (plus the current active log file) on disk.
|
68
|
-
* Once the active log file is rolled/archived, then the oldest of the existing 3 rolled/archived log files is deleted.
|
69
|
-
*
|
70
|
-
* You may optionally disable deleting old/rolled/archived log files by setting this property to zero.
|
71
|
-
**/
|
72
|
-
@property (readwrite, assign) NSUInteger maximumNumberOfLogFiles;
|
73
|
-
|
74
|
-
// Public methods
|
75
|
-
|
76
|
-
- (NSString *)logsDirectory;
|
77
|
-
|
78
|
-
- (NSArray *)unsortedLogFilePaths;
|
79
|
-
- (NSArray *)unsortedLogFileNames;
|
80
|
-
- (NSArray *)unsortedLogFileInfos;
|
81
|
-
|
82
|
-
- (NSArray *)sortedLogFilePaths;
|
83
|
-
- (NSArray *)sortedLogFileNames;
|
84
|
-
- (NSArray *)sortedLogFileInfos;
|
85
|
-
|
86
|
-
// Private methods (only to be used by DDFileLogger)
|
87
|
-
|
88
|
-
- (NSString *)createNewLogFile;
|
89
|
-
|
90
|
-
@optional
|
91
|
-
|
92
|
-
// Notifications from DDFileLogger
|
93
|
-
|
94
|
-
- (void)didArchiveLogFile:(NSString *)logFilePath;
|
95
|
-
- (void)didRollAndArchiveLogFile:(NSString *)logFilePath;
|
96
|
-
|
97
|
-
@end
|
98
|
-
|
99
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
100
|
-
#pragma mark -
|
101
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
102
|
-
|
103
|
-
/**
|
104
|
-
* Default log file manager.
|
105
|
-
*
|
106
|
-
* All log files are placed inside the logsDirectory.
|
107
|
-
* If a specific logsDirectory isn't specified, the default directory is used.
|
108
|
-
* On Mac, this is in ~/Library/Logs/<Application Name>.
|
109
|
-
* On iPhone, this is in ~/Library/Caches/Logs.
|
110
|
-
*
|
111
|
-
* Log files are named "<bundle identifier> <date> <time>.log"
|
112
|
-
* Example: com.organization.myapp 2013-12-03 17-14.log
|
113
|
-
*
|
114
|
-
* Archived log files are automatically deleted according to the maximumNumberOfLogFiles property.
|
115
|
-
**/
|
116
|
-
@interface DDLogFileManagerDefault : NSObject <DDLogFileManager>
|
117
|
-
{
|
118
|
-
NSUInteger maximumNumberOfLogFiles;
|
119
|
-
NSString *_logsDirectory;
|
120
|
-
}
|
121
|
-
|
122
|
-
- (id)init;
|
123
|
-
- (instancetype)initWithLogsDirectory:(NSString *)logsDirectory;
|
124
|
-
|
125
|
-
/*
|
126
|
-
* Methods to override.
|
127
|
-
*
|
128
|
-
* Log files are named "<bundle identifier> <date> <time>.log"
|
129
|
-
* Example: com.organization.myapp 2013-12-03 17-14.log
|
130
|
-
*
|
131
|
-
* If you wish to change default filename, you can override following two methods.
|
132
|
-
* - newLogFileName method would be called on new logfile creation.
|
133
|
-
* - isLogFile: method would be called to filter logfiles from all other files in logsDirectory.
|
134
|
-
* You have to parse given filename and return YES if it is logFile.
|
135
|
-
*
|
136
|
-
* **NOTE**
|
137
|
-
* newLogFileName returns filename. If appropriate file already exists, number would be added
|
138
|
-
* to filename before extension. You have to handle this case in isLogFile: method.
|
139
|
-
*
|
140
|
-
* Example:
|
141
|
-
* - newLogFileName returns "com.organization.myapp 2013-12-03.log",
|
142
|
-
* file "com.organization.myapp 2013-12-03.log" would be created.
|
143
|
-
* - after some time "com.organization.myapp 2013-12-03.log" is archived
|
144
|
-
* - newLogFileName again returns "com.organization.myapp 2013-12-03.log",
|
145
|
-
* file "com.organization.myapp 2013-12-03 2.log" would be created.
|
146
|
-
* - after some time "com.organization.myapp 2013-12-03 1.log" is archived
|
147
|
-
* - newLogFileName again returns "com.organization.myapp 2013-12-03.log",
|
148
|
-
* file "com.organization.myapp 2013-12-03 3.log" would be created.
|
149
|
-
**/
|
150
|
-
- (NSString *)newLogFileName;
|
151
|
-
- (BOOL)isLogFile:(NSString *)fileName;
|
152
|
-
|
153
|
-
/* Inherited from DDLogFileManager protocol:
|
154
|
-
|
155
|
-
@property (readwrite, assign) NSUInteger maximumNumberOfLogFiles;
|
156
|
-
|
157
|
-
- (NSString *)logsDirectory;
|
158
|
-
|
159
|
-
- (NSArray *)unsortedLogFilePaths;
|
160
|
-
- (NSArray *)unsortedLogFileNames;
|
161
|
-
- (NSArray *)unsortedLogFileInfos;
|
162
|
-
|
163
|
-
- (NSArray *)sortedLogFilePaths;
|
164
|
-
- (NSArray *)sortedLogFileNames;
|
165
|
-
- (NSArray *)sortedLogFileInfos;
|
166
|
-
|
167
|
-
*/
|
168
|
-
|
169
|
-
@end
|
170
|
-
|
171
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
172
|
-
#pragma mark -
|
173
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
174
|
-
|
175
|
-
/**
|
176
|
-
* Most users will want file log messages to be prepended with the date and time.
|
177
|
-
* Rather than forcing the majority of users to write their own formatter,
|
178
|
-
* we will supply a logical default formatter.
|
179
|
-
* Users can easily replace this formatter with their own by invoking the setLogFormatter method.
|
180
|
-
* It can also be removed by calling setLogFormatter, and passing a nil parameter.
|
181
|
-
*
|
182
|
-
* In addition to the convenience of having a logical default formatter,
|
183
|
-
* it will also provide a template that makes it easy for developers to copy and change.
|
184
|
-
**/
|
185
|
-
@interface DDLogFileFormatterDefault : NSObject <DDLogFormatter>
|
186
|
-
{
|
187
|
-
NSDateFormatter *dateFormatter;
|
188
|
-
}
|
189
|
-
|
190
|
-
- (id)init;
|
191
|
-
- (instancetype)initWithDateFormatter:(NSDateFormatter *)dateFormatter;
|
192
|
-
|
193
|
-
@end
|
194
|
-
|
195
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
196
|
-
#pragma mark -
|
197
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
198
|
-
|
199
|
-
@interface DDFileLogger : DDAbstractLogger <DDLogger>
|
200
|
-
{
|
201
|
-
__strong id <DDLogFileManager> logFileManager;
|
202
|
-
|
203
|
-
DDLogFileInfo *currentLogFileInfo;
|
204
|
-
NSFileHandle *currentLogFileHandle;
|
205
|
-
|
206
|
-
dispatch_source_t currentLogFileVnode;
|
207
|
-
dispatch_source_t rollingTimer;
|
208
|
-
|
209
|
-
unsigned long long maximumFileSize;
|
210
|
-
NSTimeInterval rollingFrequency;
|
211
|
-
}
|
212
|
-
|
213
|
-
- (id)init;
|
214
|
-
- (instancetype)initWithLogFileManager:(id <DDLogFileManager>)logFileManager;
|
215
|
-
|
216
|
-
/**
|
217
|
-
* Log File Rolling:
|
218
|
-
*
|
219
|
-
* maximumFileSize:
|
220
|
-
* The approximate maximum size to allow log files to grow.
|
221
|
-
* If a log file is larger than this value after a log statement is appended,
|
222
|
-
* then the log file is rolled.
|
223
|
-
*
|
224
|
-
* rollingFrequency
|
225
|
-
* How often to roll the log file.
|
226
|
-
* The frequency is given as an NSTimeInterval, which is a double that specifies the interval in seconds.
|
227
|
-
* Once the log file gets to be this old, it is rolled.
|
228
|
-
*
|
229
|
-
* Both the maximumFileSize and the rollingFrequency are used to manage rolling.
|
230
|
-
* Whichever occurs first will cause the log file to be rolled.
|
231
|
-
*
|
232
|
-
* For example:
|
233
|
-
* The rollingFrequency is 24 hours,
|
234
|
-
* but the log file surpasses the maximumFileSize after only 20 hours.
|
235
|
-
* The log file will be rolled at that 20 hour mark.
|
236
|
-
* A new log file will be created, and the 24 hour timer will be restarted.
|
237
|
-
*
|
238
|
-
* You may optionally disable rolling due to filesize by setting maximumFileSize to zero.
|
239
|
-
* If you do so, rolling is based solely on rollingFrequency.
|
240
|
-
*
|
241
|
-
* You may optionally disable rolling due to time by setting rollingFrequency to zero (or any non-positive number).
|
242
|
-
* If you do so, rolling is based solely on maximumFileSize.
|
243
|
-
*
|
244
|
-
* If you disable both maximumFileSize and rollingFrequency, then the log file won't ever be rolled.
|
245
|
-
* This is strongly discouraged.
|
246
|
-
**/
|
247
|
-
@property (readwrite, assign) unsigned long long maximumFileSize;
|
248
|
-
@property (readwrite, assign) NSTimeInterval rollingFrequency;
|
249
|
-
|
250
|
-
/**
|
251
|
-
* The DDLogFileManager instance can be used to retrieve the list of log files,
|
252
|
-
* and configure the maximum number of archived log files to keep.
|
253
|
-
*
|
254
|
-
* @see DDLogFileManager.maximumNumberOfLogFiles
|
255
|
-
**/
|
256
|
-
@property (strong, nonatomic, readonly) id <DDLogFileManager> logFileManager;
|
257
|
-
|
258
|
-
|
259
|
-
// You can optionally force the current log file to be rolled with this method.
|
260
|
-
// CompletionBlock will be called on main queue.
|
261
|
-
|
262
|
-
- (void)rollLogFileWithCompletionBlock:(void (^)())completionBlock;
|
263
|
-
|
264
|
-
// Method is deprecated. Use rollLogFileWithCompletionBlock: method instead.
|
265
|
-
|
266
|
-
- (void)rollLogFile __attribute((deprecated));
|
267
|
-
|
268
|
-
// Inherited from DDAbstractLogger
|
269
|
-
|
270
|
-
// - (id <DDLogFormatter>)logFormatter;
|
271
|
-
// - (void)setLogFormatter:(id <DDLogFormatter>)formatter;
|
272
|
-
|
273
|
-
@end
|
274
|
-
|
275
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
276
|
-
#pragma mark -
|
277
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
278
|
-
|
279
|
-
/**
|
280
|
-
* DDLogFileInfo is a simple class that provides access to various file attributes.
|
281
|
-
* It provides good performance as it only fetches the information if requested,
|
282
|
-
* and it caches the information to prevent duplicate fetches.
|
283
|
-
*
|
284
|
-
* It was designed to provide quick snapshots of the current state of log files,
|
285
|
-
* and to help sort log files in an array.
|
286
|
-
*
|
287
|
-
* This class does not monitor the files, or update it's cached attribute values if the file changes on disk.
|
288
|
-
* This is not what the class was designed for.
|
289
|
-
*
|
290
|
-
* If you absolutely must get updated values,
|
291
|
-
* you can invoke the reset method which will clear the cache.
|
292
|
-
**/
|
293
|
-
@interface DDLogFileInfo : NSObject
|
294
|
-
{
|
295
|
-
__strong NSString *filePath;
|
296
|
-
__strong NSString *fileName;
|
297
|
-
|
298
|
-
__strong NSDictionary *fileAttributes;
|
299
|
-
|
300
|
-
__strong NSDate *creationDate;
|
301
|
-
__strong NSDate *modificationDate;
|
302
|
-
|
303
|
-
unsigned long long fileSize;
|
304
|
-
}
|
305
|
-
|
306
|
-
@property (strong, nonatomic, readonly) NSString *filePath;
|
307
|
-
@property (strong, nonatomic, readonly) NSString *fileName;
|
308
|
-
|
309
|
-
@property (strong, nonatomic, readonly) NSDictionary *fileAttributes;
|
310
|
-
|
311
|
-
@property (strong, nonatomic, readonly) NSDate *creationDate;
|
312
|
-
@property (strong, nonatomic, readonly) NSDate *modificationDate;
|
313
|
-
|
314
|
-
@property (nonatomic, readonly) unsigned long long fileSize;
|
315
|
-
|
316
|
-
@property (nonatomic, readonly) NSTimeInterval age;
|
317
|
-
|
318
|
-
@property (nonatomic, readwrite) BOOL isArchived;
|
319
|
-
|
320
|
-
+ (instancetype)logFileWithPath:(NSString *)filePath;
|
321
|
-
|
322
|
-
- (instancetype)initWithFilePath:(NSString *)filePath;
|
323
|
-
|
324
|
-
- (void)reset;
|
325
|
-
- (void)renameFile:(NSString *)newFileName;
|
326
|
-
|
327
|
-
#if TARGET_IPHONE_SIMULATOR
|
328
|
-
|
329
|
-
// So here's the situation.
|
330
|
-
// Extended attributes are perfect for what we're trying to do here (marking files as archived).
|
331
|
-
// This is exactly what extended attributes were designed for.
|
332
|
-
//
|
333
|
-
// But Apple screws us over on the simulator.
|
334
|
-
// Everytime you build-and-go, they copy the application into a new folder on the hard drive,
|
335
|
-
// and as part of the process they strip extended attributes from our log files.
|
336
|
-
// Normally, a copy of a file preserves extended attributes.
|
337
|
-
// So obviously Apple has gone to great lengths to piss us off.
|
338
|
-
//
|
339
|
-
// Thus we use a slightly different tactic for marking log files as archived in the simulator.
|
340
|
-
// That way it "just works" and there's no confusion when testing.
|
341
|
-
//
|
342
|
-
// The difference in method names is indicative of the difference in functionality.
|
343
|
-
// On the simulator we add an attribute by appending a filename extension.
|
344
|
-
//
|
345
|
-
// For example:
|
346
|
-
// "mylog.txt" -> "mylog.archived.txt"
|
347
|
-
// "mylog" -> "mylog.archived"
|
348
|
-
|
349
|
-
- (BOOL)hasExtensionAttributeWithName:(NSString *)attrName;
|
350
|
-
|
351
|
-
- (void)addExtensionAttributeWithName:(NSString *)attrName;
|
352
|
-
- (void)removeExtensionAttributeWithName:(NSString *)attrName;
|
353
|
-
|
354
|
-
#else
|
355
|
-
|
356
|
-
// Normal use of extended attributes used everywhere else,
|
357
|
-
// such as on Macs and on iPhone devices.
|
358
|
-
|
359
|
-
- (BOOL)hasExtendedAttributeWithName:(NSString *)attrName;
|
360
|
-
|
361
|
-
- (void)addExtendedAttributeWithName:(NSString *)attrName;
|
362
|
-
- (void)removeExtendedAttributeWithName:(NSString *)attrName;
|
363
|
-
|
364
|
-
#endif
|
365
|
-
|
366
|
-
- (NSComparisonResult)reverseCompareByCreationDate:(DDLogFileInfo *)another;
|
367
|
-
- (NSComparisonResult)reverseCompareByModificationDate:(DDLogFileInfo *)another;
|
368
|
-
|
369
|
-
@end
|