Permalink
Browse files

Added download and gollum/wiki event types

  • Loading branch information...
1 parent 6383a2d commit 7d334c91550679c306d7b77e397fe992586002a7 @dbloete dbloete committed Sep 13, 2010
@@ -85,6 +85,12 @@ - (id)eventItem {
NSString *owner = [comps2 objectAtIndex:0];
NSString *name = [comps2 objectAtIndex:1];
self.eventItem = [GHRepository repositoryWithOwner:owner andName:name];
+ } else if ([eventType isEqualToString:@"download"]) {
+ NSArray *comps1 = [title componentsSeparatedByString:@" to "];
+ NSArray *comps2 = [[comps1 objectAtIndex:1] componentsSeparatedByString:@"/"];
+ NSString *owner = [comps2 objectAtIndex:0];
+ NSString *name = [comps2 objectAtIndex:1];
+ self.eventItem = [GHRepository repositoryWithOwner:owner andName:name];
} else if ([eventType isEqualToString:@"commit"]) {
NSString *path = [linkURL path];
NSArray *comps = [path componentsSeparatedByString:@"/"];
@@ -52,8 +52,10 @@ - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName names
currentEntry.eventType = @"member";
} else if ([event hasPrefix:@"Gist"]) {
currentEntry.eventType = @"gist";
- } else if ([event hasPrefix:@"Wiki"]) {
+ } else if ([event hasPrefix:@"Wiki"] || [event hasPrefix:@"Gollum"]) {
currentEntry.eventType = @"wiki";
+ } else if ([event hasPrefix:@"Download"]) {
+ currentEntry.eventType = @"download";
} else {
currentEntry.eventType = nil;
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -18,6 +18,7 @@
6F0BEB58111090D300E95E5A /* GHBranch.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0BEB57111090D300E95E5A /* GHBranch.m */; };
6F0BEB7F111098A000E95E5A /* BranchCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F0BEB7E111098A000E95E5A /* BranchCell.m */; };
6F14B64A0FA5F37500F74B4C /* GHResource.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F14B6490FA5F37500F74B4C /* GHResource.m */; };
+ 6F15FAA4123E3EE600E56F92 /* download.png in Resources */ = {isa = PBXBuildFile; fileRef = 6F15FAA3123E3EE600E56F92 /* download.png */; };
6F1BCBE20FAC586800D66E02 /* upvote.png in Resources */ = {isa = PBXBuildFile; fileRef = 6F1BCBE00FAC586800D66E02 /* upvote.png */; };
6F1BCBE60FAC588800D66E02 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6F1BCBE50FAC588800D66E02 /* Default.png */; };
6F1BCC310FAC5C2C00D66E02 /* IssueDetailsHeadBackground.png in Resources */ = {isa = PBXBuildFile; fileRef = 6F1BCC300FAC5C2C00D66E02 /* IssueDetailsHeadBackground.png */; };
@@ -203,6 +204,7 @@
6F0BEB7E111098A000E95E5A /* BranchCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BranchCell.m; sourceTree = "<group>"; };
6F14B6480FA5F37500F74B4C /* GHResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GHResource.h; sourceTree = "<group>"; };
6F14B6490FA5F37500F74B4C /* GHResource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GHResource.m; sourceTree = "<group>"; };
+ 6F15FAA3123E3EE600E56F92 /* download.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = download.png; path = Images/Icons/download.png; sourceTree = "<group>"; };
6F1BCBE00FAC586800D66E02 /* upvote.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = upvote.png; path = Images/Icons/upvote.png; sourceTree = "<group>"; };
6F1BCBE50FAC588800D66E02 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Images/Default.png; sourceTree = "<group>"; };
6F1BCC300FAC5C2C00D66E02 /* IssueDetailsHeadBackground.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = IssueDetailsHeadBackground.png; path = Images/IssueDetailsHeadBackground.png; sourceTree = "<group>"; };
@@ -660,6 +662,7 @@
6F1DC5BB0F7E7F3400FCD26D /* Icons */ = {
isa = PBXGroup;
children = (
+ 6F15FAA3123E3EE600E56F92 /* download.png */,
6F8E7DF3123C0E8B007E93E6 /* pull_request.png */,
6F2C76E81114EDEF002665DA /* file_added.png */,
6F2C76E91114EDEF002665DA /* file_modified.png */,
@@ -1057,6 +1060,7 @@
6FB75831120818D80025A18B /* Icon@2x.png in Resources */,
6FB7583312081E1B0025A18B /* IconOctocat@2x.png in Resources */,
6F8E7DF4123C0E8B007E93E6 /* pull_request.png in Resources */,
+ 6F15FAA4123E3EE600E56F92 /* download.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

0 comments on commit 7d334c9

Please sign in to comment.