Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

Version 1.0.1 #65

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5c29b38
Add protocols for recording data source and syncing
interstateone Nov 1, 2014
85f3a96
Extract table view data source, add recordings repo protocol
interstateone Nov 1, 2014
ac5626e
Insert recordings from the filesystem at their sorted index
interstateone Oct 29, 2014
8e6da8e
Add facade controller for recordings
interstateone Nov 1, 2014
c412857
Consolidate constants
interstateone Nov 1, 2014
b932e5c
Add a simple test for JEFDropboxRepository
interstateone Nov 1, 2014
3c6565b
Keep recordings controller in sync with repo with KVO to maintain cha…
interstateone Nov 1, 2014
39e739a
Move filesystem code into repository
interstateone Nov 1, 2014
d405af1
Implement isDoingInitialSync in recording controller and repo
interstateone Nov 6, 2014
0badec0
Remove notification observer
interstateone Nov 13, 2014
63663c9
Fix incorrect argument name in header
interstateone Nov 13, 2014
9c587cd
Replace self in block with weakSelf
interstateone Nov 13, 2014
1151bbb
pod install OCMock
interstateone Nov 13, 2014
a74ace7
Replace test swizzling with OCMock
interstateone Nov 13, 2014
9c565d9
Add comment on why a property is an NSObject instead of id for KVO
interstateone Nov 14, 2014
9b05d9a
Remove notification and filesystem observation on dealloc
interstateone Nov 14, 2014
6f2eb21
Don't remove filesystem observer unnecessarily, remove KVO observer
interstateone Nov 14, 2014
83de960
Merge pull request #27 from RobotsAndPencils/RefactorRecordingManagement
interstateone Nov 14, 2014
7c3b290
Improve GIF quality by running them through gifsicle twice
interstateone Nov 6, 2014
712da03
Merge pull request #28 from RobotsAndPencils/ImproveGifQuality
interstateone Nov 14, 2014
c9b66e4
Use timestamps for filenames instead of UUIDs
interstateone Nov 14, 2014
8d808d6
Merge pull request #29 from RobotsAndPencils/UseDatetimeFilenames
interstateone Nov 14, 2014
6276b0c
Add import to appease the compiler warning about protocols
interstateone Sep 17, 2015
f2cf268
Ignore paths that aren't GIFs or are trivially invalid
interstateone Sep 17, 2015
32200af
Pass in the filesystem as an argument
interstateone Sep 17, 2015
aaaa675
Check for nil before adding Dropbox public URL to array of share items
interstateone Sep 17, 2015
b905d3b
Merge pull request #56 from RobotsAndPencils/30-AddFilesystemFilter
interstateone Sep 21, 2015
4167ddb
Merge pull request #57 from RobotsAndPencils/43-CheckForNilShareItem
interstateone Sep 21, 2015
54c4035
Setup DropBox filesystem at app launch, not popover appearance
interstateone Sep 23, 2015
08999ee
Handle nil framesURL after recording with an alert
interstateone Sep 23, 2015
b3fbc8d
Better handle failed recordings because things aren't set up
interstateone Sep 23, 2015
18fa299
Merge pull request #59 from RobotsAndPencils/46-HandleNilURLAfterReco…
interstateone Sep 25, 2015
eb0028e
Merge pull request #58 from RobotsAndPencils/33-SetupFilesystemAtLaunch
interstateone Sep 25, 2015
6f2bf9c
Use clicked row instead of selected when handling double click
interstateone Sep 25, 2015
8e3922e
Merge pull request #61 from RobotsAndPencils/48-FixDoubleClickIndex
interstateone Sep 25, 2015
4ac875b
Fix regression that broke recording drag-and-drop
interstateone Sep 25, 2015
0dc91e8
pod update pop
interstateone Sep 25, 2015
78b42b8
pod update RoboKit
interstateone Sep 25, 2015
4c1952e
Update Jeff project to recommended settings
interstateone Oct 3, 2015
f53bf50
Ignore clang warning in start-at-login controller
interstateone Oct 3, 2015
a4ef48c
Appease nullability annotations
interstateone Oct 3, 2015
9ad5e03
Remove NSRectEdge enum as backing value for INPopover enum
interstateone Oct 3, 2015
57ad8ad
Explicitly set popover header to titlebar vibrancy material
interstateone Oct 3, 2015
dde88e6
Update HockeyApp to 3.2.0 (latest)
interstateone Oct 3, 2015
6e6cf73
Merge pull request #63 from RobotsAndPencils/Xcode7ElCapitanSDK
interstateone Oct 3, 2015
1c492cd
Allow user to cancel uploads before they finish
interstateone Sep 25, 2015
5aa86ea
Change signing for different build configs
interstateone Oct 3, 2015
82fce97
Default to debug config for command line builds
interstateone Oct 3, 2015
2e06fc0
Collect code coverage info from tests
interstateone Oct 3, 2015
5698519
Merge pull request #60 from RobotsAndPencils/51-CancellableUploads
interstateone Oct 3, 2015
e571c36
Bump version to 1.0.1
interstateone Oct 3, 2015
18560d2
Enable agvtool for automatic versioning
interstateone Oct 3, 2015
a764045
Setup fastlane beta lane
interstateone Oct 3, 2015
b0489e0
Move Hockey identifier into project config, add beta identifier
interstateone Oct 10, 2015
6c920e2
Setup fastlane with Slack, HockeyApp beta app
interstateone Oct 10, 2015
64ca3be
Bump build number to 14
interstateone Oct 10, 2015
defdbb8
Create annotated tags from fastlane
interstateone Oct 10, 2015
76b27c2
Merge branch 'master' into 1.0.1
interstateone Oct 10, 2015
dffc6e5
Don't remove recording upload progress observer when not observing
interstateone Oct 26, 2015
72e674c
Merge pull request #68 from RobotsAndPencils/67-FixRecordingDeleteCrash
interstateone Oct 26, 2015
fc67452
Don't upload to HockeyApp automatically, use curl
interstateone Oct 26, 2015
23c53fa
Bump build number to 15
interstateone Oct 27, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ DerivedData
*.swp

.idea

fastlane/report.xml
153 changes: 124 additions & 29 deletions Jeff.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

18 changes: 12 additions & 6 deletions Jeff.xcodeproj/xcshareddata/xcschemes/Jeff.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0600"
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -23,10 +23,11 @@
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
codeCoverageEnabled = "YES">
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -48,17 +49,21 @@
ReferencedContainer = "container:Jeff.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CA455B2718B83EB900F9A541"
Expand All @@ -71,12 +76,13 @@
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CA455B2718B83EB900F9A541"
Expand Down
20 changes: 20 additions & 0 deletions Jeff/Categories/NSError+Jeff.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// NSError+Jeff.h
// Jeff
//
// Created by Brandon Evans on 2015-09-23.
// Copyright (c) 2015 Brandon Evans. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Dropbox/DBError.h>

@interface NSError (Jeff)

@end

@interface DBError (Jeff)

+ (instancetype)fileCreationError;

@end
21 changes: 21 additions & 0 deletions Jeff/Categories/NSError+Jeff.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// NSError+Jeff.m
// Jeff
//
// Created by Brandon Evans on 2015-09-23.
// Copyright (c) 2015 Brandon Evans. All rights reserved.
//

#import "NSError+Jeff.h"

@implementation NSError (Jeff)

@end

@implementation DBError (Jeff)

+ (instancetype)fileCreationError {
return [[DBError alloc] initWithDomain:@"com.robotsandpencils.Jeff" code:1000 userInfo:@{ NSLocalizedDescriptionKey: NSLocalizedString(@"DBErrorFileCreation", nil) }];
}

@end
15 changes: 15 additions & 0 deletions Jeff/Categories/NSMutableArray+JEFSortedInsert.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// NSMutableArray+JEFSortedInsert.h
// Jeff
//
// Created by Brandon Evans on 2014-10-29.
// Copyright (c) 2014 Brandon Evans. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSMutableArray (JEFSortedInsert)

- (void)jef_insertObject:(id)anObject sortedUsingDescriptors:(NSArray *)descriptors;

@end
60 changes: 60 additions & 0 deletions Jeff/Categories/NSMutableArray+JEFSortedInsert.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
//
// NSMutableArray+JEFSortedInsert.m
// Jeff
//
// Created by Brandon Evans on 2014-10-29.
// Copyright (c) 2014 Brandon Evans. All rights reserved.
//

#import "NSMutableArray+JEFSortedInsert.h"

@implementation NSMutableArray (JEFSortedInsert)

static IMP jef_compareObjectToObjectImp = NULL;
static IMP jef_ascendingImp = NULL;

+ (void)initialize {
jef_compareObjectToObjectImp = [NSSortDescriptor instanceMethodForSelector:@selector(compareObject:toObject:)];
jef_ascendingImp = [NSSortDescriptor instanceMethodForSelector:@selector(ascending)];
}

static NSComparisonResult cw_DescriptorCompare(id a, id b, void* descriptors) {
NSComparisonResult result = NSOrderedSame;
for (NSSortDescriptor* sortDescriptor in (__bridge NSArray*)descriptors) {
result = (NSComparisonResult)jef_compareObjectToObjectImp(sortDescriptor, @selector(compareObject:toObject:), a, b);
if (result != NSOrderedSame) {
if (!jef_ascendingImp(sortDescriptor, @selector(ascending))) {
result = 0 - result;
}
break;
}
}
return result;
}

- (NSUInteger)indexForInsertingObject:(id)anObject sortedUsingfunction:(NSInteger (*)(id, id, void *))compare context:(void*)context {
NSUInteger index = 0;
NSUInteger topIndex = [self count];
IMP objectAtIndexImp = [self methodForSelector:@selector(objectAtIndex:)];
while (index < topIndex) {
NSUInteger midIndex = (index + topIndex) / 2;
id testObject = objectAtIndexImp(self, @selector(objectAtIndex:), midIndex);
if (compare(anObject, testObject, context) < 0) {
index = midIndex + 1;
} else {
topIndex = midIndex;
}
}
return index;
}

- (NSUInteger)indexForInsertingObject:(id)anObject sortedUsingDescriptors:(NSArray*)descriptors {
return [self indexForInsertingObject:anObject sortedUsingfunction:&cw_DescriptorCompare context:(void *)descriptors];
}

- (void)jef_insertObject:(id)anObject sortedUsingDescriptors:(NSArray *)descriptors {
NSUInteger index = [self indexForInsertingObject:anObject sortedUsingDescriptors:descriptors];
[self insertObject:anObject atIndex:index];
}

@end
11 changes: 11 additions & 0 deletions Jeff/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@
extern NSString *const JEFRecordScreenShortcutKey;
extern NSString *const JEFRecordSelectionShortcutKey;

#pragma mark - Notifications

extern NSString *const JEFRecordingWasSharedNotification;
extern NSString *const JEFSyncingServiceAccountStateChanged;
extern NSString *const JEFOpenPopoverNotification;
extern NSString *const JEFClosePopoverNotification;
extern NSString *const JEFStartRecordingNotification;
extern NSString *const JEFStopRecordingNotification;
extern NSString *const JEFSetStatusViewNotRecordingNotification;
extern NSString *const JEFSetStatusViewRecordingNotification;

static inline CGFloat constrain(CGFloat value, CGFloat min, CGFloat max) {
return fmin(fmax(value, min), max);
}
11 changes: 10 additions & 1 deletion Jeff/Constants.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@
//

NSString *const JEFRecordScreenShortcutKey = @"RecordScreenShortcut";
NSString *const JEFRecordSelectionShortcutKey = @"RecordSelectionShortcut";
NSString *const JEFRecordSelectionShortcutKey = @"RecordSelectionShortcut";

NSString *const JEFRecordingWasSharedNotification = @"JEFRecordingWasSharedNotification";
NSString *const JEFSyncingServiceAccountStateChanged = @"JEFSyncingServiceAccountStateChanged";
NSString *const JEFOpenPopoverNotification = @"JEFOpenPopoverNotification";
NSString *const JEFClosePopoverNotification = @"JEFClosePopoverNotification";
NSString *const JEFStartRecordingNotification = @"JEFStartRecordingNotification";
NSString *const JEFStopRecordingNotification = @"JEFStopRecordingNotification";
NSString *const JEFSetStatusViewNotRecordingNotification = @"JEFSetStatusViewNotRecordingNotification";
NSString *const JEFSetStatusViewRecordingNotification = @"JEFSetStatusViewRecordingNotification";
28 changes: 28 additions & 0 deletions Jeff/Controllers/JEFRecordingsController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// JEFRecordingsController.h
// Jeff
//
// Created by Brandon Evans on 2014-11-01.
// Copyright (c) 2014 Brandon Evans. All rights reserved.
//

#import "JEFRecordingsProvider.h"

@class JEFRecording;
@protocol JEFSyncingService;
@protocol JEFRecordingsRepository;

@interface JEFRecordingsController : NSObject <JEFRecordingsProvider>

@property (nonatomic, strong, readonly) NSArray *recordings;
@property (nonatomic, assign, readonly) BOOL isDoingInitialSync;

- (instancetype)initWithSyncingService:(id<JEFSyncingService>)syncingService recordingsRepo:(id<JEFRecordingsRepository>)recordingsRepo;

- (void)uploadNewGIFAtURL:(NSURL *)gifURL posterFrameURL:(NSURL *)posterFrameURL completion:(void (^)(JEFRecording *))completion;
- (void)removeRecording:(JEFRecording *)recording;

- (void)copyURLStringToPasteboard:(JEFRecording *)recording completion:(void (^)())completion;
- (void)fetchPublicURLForRecording:(JEFRecording *)recording completion:(void (^)(NSURL *url))completion;

@end
Loading