This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Minimal reproduction: hatchet-sdk's worker log capture retains every log | |
| record for the lifetime of the worker process. | |
| Run: pip install hatchet-sdk && python hatchet_leak_repro.py | |
| No Hatchet engine, token, or network access required. No user-defined logging | |
| handler is involved: the only handler in play is the one `hatchet_sdk` installs | |
| on its own inside `capture_logs`. | |
| What this measures |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sal_: because I am so beyond stumped on this one | |
| [10:53am] Sal_: So for the past 2 years we have had RestKit "vendored" into our project | |
| [10:54am] Sal_: last week we added it as a pod via the .10.3 podspec | |
| [10:54am] Sal_: and all the sudden running the Unit Test target results in an assertion failure in NSManagedObject+ActiveRecord.m | |
| [10:55am] blakewatters: what's the assertion | |
| [10:55am] Sal_: so the assertion is | |
| [10:55am] Sal_: '[RKManagedObjectStore defaultObjectStore] cannot be nil' | |
| [10:55am] Sal_: but here is where it get's weird... | |
| [10:56am] Sal_: i can confirm with vigorous breakpoints and logs that right up until i run a fetch request, the defaultObjecStore is definitely NOT nil | |
| [10:56am] blakewatters: you may have wound up with 2 copies of RK being linked in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 2013-05-17 14:30:09.619 Generate Seed Database[25343:c07] I restkit.core_data:RKManagedObjectImporter.m:163 Persistent store reset requested before importing. Deleting existing managed object instances... | |
| 2013-05-17 14:30:09.667 Generate Seed Database[25343:c07] I restkit.core_data:RKInMemoryManagedObjectCache.m:94 Caching instances of Entity 'Airline' by attributes 'airlineID' | |
| 2013-05-17 14:30:10.042 Generate Seed Database[25343:c07] I restkit.core_data:RKManagedObjectImporter.m:226 Imported 1639 objects from file at path '/Users/blake/Library/Application Support/iPhone Simulator/6.1/Applications/33E428B1-0B8D-4E64-BD3C-2BD7A3D50F69/Generate Seed Database.app/SeedJsonFiles/airlines.json' | |
| 2013-05-17 14:30:10.152 Generate Seed Database[25343:c07] I restkit.core_data:RKInMemoryManagedObjectCache.m:94 Caching instances of Entity 'Airport' by attributes 'airportID' | |
| 2013-05-17 14:30:12.322 Generate Seed Database[25343:c07] I restkit.core_data:RKManagedObjectImporter.m:226 Imported 4039 objects from file at path '/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RKManagedObjectStore *managedObjectStore = [RKObjectManager sharedManager].managedObjectStore; | |
| managedObjectStore = [[RKInMemoryManagedObjectCache alloc] initWithManagedObjectContext:managedObjectStore.persistentStoreManagedObjectContext]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JSON loaded from '/posts/:postID/tags' looks like: | |
| // [{ "name": "development" }, { "name": "restkit" }] | |
| RKManagedObjectStore *managedObjectStore = [RKManagedObjectStore defaultStore]; | |
| RKEntityMapping *tagMapping = [RKEntityMapping mappingForEntityForName:@"Tag" inManagedObjectStore:managedObjectStore]; | |
| [tagMapping addAttributeMappingsFromDictionary:@{ @"@metadata.routing.parameters.postID": @"postID", @"name": @"name" }]; | |
| [tagMapping addConnectionForRelationship:@"posts" connectedBy:@{ @"postID": @"postID" }]; | |
| RKObjectManager *objectManager = [RKObjectManager sharedManager]; | |
| RKResponseDescriptor *responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:tagMapping pathPattern:@"/posts/:postID/tags" keyPath:nil statusCodes:[NSIndexSet indexSetWithIndex:200]]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "amenity": { | |
| "id": 6295, | |
| "name": "WiFi", | |
| "airport_id": 75, | |
| "terminal_id": 5420, | |
| "ad_count": 0, | |
| "photo_count": 0, | |
| "rating_count": 5, | |
| "is_food": false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Scheme | |
| LastUpgradeVersion = "0450" | |
| version = "1.3"> | |
| <BuildAction | |
| parallelizeBuildables = "YES" | |
| buildImplicitDependencies = "YES"> | |
| <BuildActionEntries> | |
| <BuildActionEntry | |
| buildForTesting = "NO" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface LoginForm : NSObject | |
| @property (nonatomic, copy) NSString *username; | |
| @property (nonatomic, copy) NSString *password; | |
| @property (nonatomic, readonly) BOOL isValid; | |
| @end | |
| @implementation LoginForm | |
| // Tell key-value observation that any time one of the keyPaths in the returned set changes, it affects the value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Pod::Spec.new do |s| | |
| s.name = 'RestKit' | |
| s.version = '0.20.0' | |
| s.summary = 'RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X.' | |
| s.homepage = 'http://www.restkit.org' | |
| s.author = { 'Blake Watters' => 'blakewatters@gmail.com' } | |
| s.source = { :git => 'https://github.com/RestKit/RestKit.git', :branch => 'feature/reboot-networking-layer' } | |
| s.license = 'Apache License, Version 2.0' | |
| # Platform setup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add to serializer | |
| if ([mapping isKindOfClass:[RKEntityMapping class]]) { | |
| NSAttributeDescription *attribute = [(RKEntityMapping *)mapping attributesByName:self.sourceKeyPath]; | |
| if ([attribute attributeType] == NSBooleanAttributeType) { | |
| transformedValue = [value boolValue] ? @"true" : @"false"; | |
| } | |
| } |
NewerOlder