Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Squashed commits

 - Drop in Pantomime, start laying out SMTP
 - Link CoreData objects
 - Fix headers
 - Remove Pantomime
 - Remove unused coredata object
  • Loading branch information...
commit 024a2bad617fd86665fb4252b34da41d9d3b7799 1 parent cf51b9d
Zach Margolis zachmargolis authored
0  .gitmodules
View
No changes.
2  Zapp.xcodeproj/project.pbxproj
View
@@ -380,6 +380,7 @@
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Zapp/Zapp-Prefix.pch";
+ HEADER_SEARCH_PATHS = "$(SRCROOT)/Frameworks/Pantomime/**";
INFOPLIST_FILE = "Zapp/Zapp-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
@@ -397,6 +398,7 @@
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Zapp/Zapp-Prefix.pch";
+ HEADER_SEARCH_PATHS = "$(SRCROOT)/Frameworks/Pantomime/**";
INFOPLIST_FILE = "Zapp/Zapp-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
2  Zapp/Repositories.xcdatamodeld/Repositories.xcdatamodel/contents
View
@@ -24,6 +24,6 @@
</entity>
<elements>
<element name="Build" positionX="412" positionY="189" width="128" height="165"/>
- <element name="Repository" positionX="160" positionY="192" width="128" height="195"/>
+ <element name="Repository" positionX="187" positionY="-54" width="128" height="195"/>
</elements>
</model>
1  Zapp/ZappBuild.h
View
@@ -13,6 +13,7 @@
@class ZappRepository;
+
@interface ZappBuild : NSManagedObject
@property (nonatomic, strong) NSString *branch;
2  Zapp/ZappMessageController.h
View
@@ -10,8 +10,6 @@
@interface ZappMessageController : NSObject
-+ (ZappMessageController *)sharedInstance;
-
- (void)sendMessageForLatestBuildInRepository:(ZappRepository *)repository;
- (void)sendMessageForBuild:(ZappBuild *)build;
48 Zapp/ZappMessageController.m
View
@@ -13,26 +13,16 @@
@interface ZappMessageController ()
-- (BOOL)sendEmailWithSubject:(NSString *)subject headers:(NSDictionary *)headers body:(NSString *)body error:(out NSError **)error;
+@property (nonatomic, retain) ZappMailConfiguration *mailConfiguration;
+
+- (void)sendEmailWithSubject:(NSString *)subject headers:(NSDictionary *)headers body:(NSString *)body;
@end
@implementation ZappMessageController
-#pragma mark Initialization
-
-+ (id)sharedInstance;
-{
- static ZappMessageController *sharedInstance;
-
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- sharedInstance = [[ZappMessageController alloc] init];
- });
-
- return nil;
-}
+@synthesize mailConfiguration;
#pragma mark Public Methods
@@ -43,14 +33,9 @@ - (void)sendMessageForLatestBuildInRepository:(ZappRepository *)repository;
- (void)sendMessageForBuild:(ZappBuild *)build;
{
- // get the long since the last build
- // current sha + author
-
- NSString *oldRevision = nil;
-
-
- // since last build
+ // get the log since the last build
// last red red-green or last green-red
+ NSString *oldRevision = nil;
NSString *delta = oldRevision ? [NSString stringWithFormat:@"%@..%@", oldRevision, build.latestRevision] : @"HEAD^..HEAD";
NSString *format = [NSString stringWithFormat:@"--format=\"%@%%h %%s (%%an)\"", build.repository.remoteURL.absoluteString];
@@ -69,29 +54,14 @@ - (void)sendMessageForBuild:(ZappBuild *)build;
NSString *message = [[NSArray arrayWithObjects:beginString, latestBuildString, latestBuildStatusString, @"", gitLogOutput, endString, nil] componentsJoinedByString:@"\n"];
- [self sendEmailWithSubject:subject headers:nil body:message error:nil];
-/*
- ===== BEGIN TRANSMISSION =====
-
- Latest build:
- a895jf9 SUCCESS
-
- Intermediate commits:
- aaf8d5f Author: Some commit message (8 hours ago)
- 88486a3 Author + Author: Another commit message. (8 days ago)
- 19a938f Author: The same one as before (8 days ago)
- 21ab6e4 Author: A new commit message (8 days ago)
-
- ====== END TRANSMISSION ======
-*/
+ [self sendEmailWithSubject:subject headers:nil body:message];
}];
}
-
+
#pragma mark Private Methods
-- (BOOL)sendEmailWithSubject:(NSString *)subject headers:(NSDictionary *)headers body:(NSString *)body error:(out NSError **)error;
+- (void)sendEmailWithSubject:(NSString *)subject headers:(NSDictionary *)headers body:(NSString *)body;
{
- return YES;
}
@end
1  Zapp/ZappRepository.h
View
@@ -17,6 +17,7 @@ extern NSString *const GitFetchSubcommand;
@class ZappBuild;
+@class ZappMailConfiguration;
@interface ZappRepository : NSManagedObject
Please sign in to comment.
Something went wrong with that request. Please try again.