use +marshmallows for category names

This commit is contained in:
Sami Samhuri 2011-12-10 16:17:21 -08:00
parent e48868e253
commit 148221bcf9
10 changed files with 59 additions and 44 deletions

View file

@ -8,16 +8,17 @@
/* Begin PBXBuildFile section */
7B13A56E1415CE360033DCC2 /* libMarshmallows.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BE32D0614132EE4008F2DEA /* libMarshmallows.a */; };
7B2C8D7614159642004E1123 /* UIAlertView+simple.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B2C8D7414159642004E1123 /* UIAlertView+simple.h */; };
7B2C8D7714159642004E1123 /* UIAlertView+simple.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B2C8D7514159642004E1123 /* UIAlertView+simple.m */; };
7B13A5711415FD2D0033DCC2 /* MMHTTPRequestTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B13A5701415FD2D0033DCC2 /* MMHTTPRequestTest.m */; };
7B2C8D7614159642004E1123 /* UIAlertView+marshmallows.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B2C8D7414159642004E1123 /* UIAlertView+marshmallows.h */; };
7B2C8D7714159642004E1123 /* UIAlertView+marshmallows.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B2C8D7514159642004E1123 /* UIAlertView+marshmallows.m */; };
7B2C8D811415C450004E1123 /* UIAlertViewDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B2C8D7F1415C450004E1123 /* UIAlertViewDelegate.h */; };
7B2C8D821415C450004E1123 /* UIAlertViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B2C8D801415C450004E1123 /* UIAlertViewDelegate.m */; };
7BD100A2141341EB00A9921B /* MMHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BD100A0141341EB00A9921B /* MMHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; };
7BD100A3141341EB00A9921B /* MMHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BD100A1141341EB00A9921B /* MMHTTPClient.m */; };
7BD100A614134FBE00A9921B /* MMHTTPRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BD100A414134FBE00A9921B /* MMHTTPRequest.h */; settings = {ATTRIBUTES = (Public, ); }; };
7BD100A714134FBE00A9921B /* MMHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BD100A514134FBE00A9921B /* MMHTTPRequest.m */; };
7BD100AA141353B700A9921B /* NSDate+relative.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BD100A8141353B700A9921B /* NSDate+relative.h */; };
7BD100AB141353B700A9921B /* NSDate+relative.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BD100A9141353B700A9921B /* NSDate+relative.m */; };
7BD100AA141353B700A9921B /* NSDate+marshmallows.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BD100A8141353B700A9921B /* NSDate+marshmallows.h */; };
7BD100AB141353B700A9921B /* NSDate+marshmallows.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BD100A9141353B700A9921B /* NSDate+marshmallows.m */; };
7BD100AC141364A900A9921B /* Marshmallows.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BE32D0E14132EE4008F2DEA /* Marshmallows.h */; settings = {ATTRIBUTES = (Public, ); }; };
7BD100D714136F7500A9921B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BD100B61413675100A9921B /* UIKit.framework */; };
7BD100D814136F7500A9921B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BE32D0914132EE4008F2DEA /* Foundation.framework */; };
@ -27,8 +28,8 @@
7BD100F814136FD200A9921B /* GHUnitIOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BD100F714136FD200A9921B /* GHUnitIOS.framework */; };
7BD100FB141370B800A9921B /* NSDateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BD100FA141370B800A9921B /* NSDateTest.m */; };
7BE32D0A14132EE4008F2DEA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7BE32D0914132EE4008F2DEA /* Foundation.framework */; };
7BE32D6A14133618008F2DEA /* NSString+sanity.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BE32D6814133618008F2DEA /* NSString+sanity.h */; };
7BE32D6B14133618008F2DEA /* NSString+sanity.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BE32D6914133618008F2DEA /* NSString+sanity.m */; };
7BE32D6A14133618008F2DEA /* NSString+marshmallows.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BE32D6814133618008F2DEA /* NSString+marshmallows.h */; };
7BE32D6B14133618008F2DEA /* NSString+marshmallows.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BE32D6914133618008F2DEA /* NSString+marshmallows.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -42,16 +43,17 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
7B2C8D7414159642004E1123 /* UIAlertView+simple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIAlertView+simple.h"; sourceTree = "<group>"; };
7B2C8D7514159642004E1123 /* UIAlertView+simple.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIAlertView+simple.m"; sourceTree = "<group>"; };
7B13A5701415FD2D0033DCC2 /* MMHTTPRequestTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMHTTPRequestTest.m; sourceTree = "<group>"; };
7B2C8D7414159642004E1123 /* UIAlertView+marshmallows.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIAlertView+marshmallows.h"; sourceTree = "<group>"; };
7B2C8D7514159642004E1123 /* UIAlertView+marshmallows.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIAlertView+marshmallows.m"; sourceTree = "<group>"; };
7B2C8D7F1415C450004E1123 /* UIAlertViewDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIAlertViewDelegate.h; sourceTree = "<group>"; };
7B2C8D801415C450004E1123 /* UIAlertViewDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIAlertViewDelegate.m; sourceTree = "<group>"; };
7BD100A0141341EB00A9921B /* MMHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMHTTPClient.h; sourceTree = "<group>"; };
7BD100A1141341EB00A9921B /* MMHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMHTTPClient.m; sourceTree = "<group>"; };
7BD100A414134FBE00A9921B /* MMHTTPRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMHTTPRequest.h; sourceTree = "<group>"; };
7BD100A514134FBE00A9921B /* MMHTTPRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MMHTTPRequest.m; sourceTree = "<group>"; };
7BD100A8141353B700A9921B /* NSDate+relative.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+relative.h"; sourceTree = "<group>"; };
7BD100A9141353B700A9921B /* NSDate+relative.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+relative.m"; sourceTree = "<group>"; };
7BD100A8141353B700A9921B /* NSDate+marshmallows.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+marshmallows.h"; sourceTree = "<group>"; };
7BD100A9141353B700A9921B /* NSDate+marshmallows.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDate+marshmallows.m"; sourceTree = "<group>"; };
7BD100B61413675100A9921B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
7BD100B91413675100A9921B /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = Library/Frameworks/CoreGraphics.framework; sourceTree = DEVELOPER_DIR; };
7BD100D514136F7500A9921B /* MarshmallowsTesting.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MarshmallowsTesting.app; sourceTree = BUILT_PRODUCTS_DIR; };
@ -65,8 +67,8 @@
7BE32D0914132EE4008F2DEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
7BE32D0D14132EE4008F2DEA /* Marshmallows-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Marshmallows-Prefix.pch"; sourceTree = "<group>"; };
7BE32D0E14132EE4008F2DEA /* Marshmallows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Marshmallows.h; sourceTree = "<group>"; };
7BE32D6814133618008F2DEA /* NSString+sanity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+sanity.h"; sourceTree = "<group>"; };
7BE32D6914133618008F2DEA /* NSString+sanity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+sanity.m"; sourceTree = "<group>"; };
7BE32D6814133618008F2DEA /* NSString+marshmallows.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+marshmallows.h"; sourceTree = "<group>"; };
7BE32D6914133618008F2DEA /* NSString+marshmallows.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+marshmallows.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -97,6 +99,7 @@
isa = PBXGroup;
children = (
7BD100FA141370B800A9921B /* NSDateTest.m */,
7B13A5701415FD2D0033DCC2 /* MMHTTPRequestTest.m */,
7BD100DB14136F7500A9921B /* Supporting Files */,
);
path = MarshmallowsTesting;
@ -151,12 +154,12 @@
7BD100A1141341EB00A9921B /* MMHTTPClient.m */,
7BD100A414134FBE00A9921B /* MMHTTPRequest.h */,
7BD100A514134FBE00A9921B /* MMHTTPRequest.m */,
7BD100A8141353B700A9921B /* NSDate+relative.h */,
7BD100A9141353B700A9921B /* NSDate+relative.m */,
7BE32D6814133618008F2DEA /* NSString+sanity.h */,
7BE32D6914133618008F2DEA /* NSString+sanity.m */,
7B2C8D7414159642004E1123 /* UIAlertView+simple.h */,
7B2C8D7514159642004E1123 /* UIAlertView+simple.m */,
7BD100A8141353B700A9921B /* NSDate+marshmallows.h */,
7BD100A9141353B700A9921B /* NSDate+marshmallows.m */,
7BE32D6814133618008F2DEA /* NSString+marshmallows.h */,
7BE32D6914133618008F2DEA /* NSString+marshmallows.m */,
7B2C8D7414159642004E1123 /* UIAlertView+marshmallows.h */,
7B2C8D7514159642004E1123 /* UIAlertView+marshmallows.m */,
7B2C8D7F1415C450004E1123 /* UIAlertViewDelegate.h */,
7B2C8D801415C450004E1123 /* UIAlertViewDelegate.m */,
7BE32D0C14132EE4008F2DEA /* Supporting Files */,
@ -182,9 +185,9 @@
7BD100AC141364A900A9921B /* Marshmallows.h in Headers */,
7BD100A2141341EB00A9921B /* MMHTTPClient.h in Headers */,
7BD100A614134FBE00A9921B /* MMHTTPRequest.h in Headers */,
7BE32D6A14133618008F2DEA /* NSString+sanity.h in Headers */,
7BD100AA141353B700A9921B /* NSDate+relative.h in Headers */,
7B2C8D7614159642004E1123 /* UIAlertView+simple.h in Headers */,
7BE32D6A14133618008F2DEA /* NSString+marshmallows.h in Headers */,
7BD100AA141353B700A9921B /* NSDate+marshmallows.h in Headers */,
7B2C8D7614159642004E1123 /* UIAlertView+marshmallows.h in Headers */,
7B2C8D811415C450004E1123 /* UIAlertViewDelegate.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -271,6 +274,7 @@
files = (
7BD100E114136F7500A9921B /* main.m in Sources */,
7BD100FB141370B800A9921B /* NSDateTest.m in Sources */,
7B13A5711415FD2D0033DCC2 /* MMHTTPRequestTest.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -278,11 +282,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
7BE32D6B14133618008F2DEA /* NSString+sanity.m in Sources */,
7BE32D6B14133618008F2DEA /* NSString+marshmallows.m in Sources */,
7BD100A3141341EB00A9921B /* MMHTTPClient.m in Sources */,
7BD100A714134FBE00A9921B /* MMHTTPRequest.m in Sources */,
7BD100AB141353B700A9921B /* NSDate+relative.m in Sources */,
7B2C8D7714159642004E1123 /* UIAlertView+simple.m in Sources */,
7BD100AB141353B700A9921B /* NSDate+marshmallows.m in Sources */,
7B2C8D7714159642004E1123 /* UIAlertView+marshmallows.m in Sources */,
7B2C8D821415C450004E1123 /* UIAlertViewDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;

View file

@ -8,6 +8,6 @@
#import <Foundation/Foundation.h>
#import "NSDate+relative.h"
#import "NSString+sanity.h"
#import "UIAlertView+simple.h"
#import "NSDate+marshmallows.h"
#import "NSString+marshmallows.h"
#import "UIAlertView+marshmallows.h"

View file

@ -1,5 +1,5 @@
//
// NSDate+relative.h
// NSDate+marshmallows.h
// UberClassifieds
//
// Created by Sami Samhuri on 11-06-18.
@ -9,8 +9,9 @@
#import <Foundation/Foundation.h>
@interface NSDate (NSDate_relative)
@interface NSDate (NSDate_marshmallows)
+ (NSDate *) dateWithYear: (NSInteger)year month: (NSInteger)month day: (NSInteger)day;
- (NSString *) relativeToNow;
@end

View file

@ -1,12 +1,12 @@
//
// NSDate+relative.m
// NSDate+marshmallows.m
// UberClassifieds
//
// Created by Sami Samhuri on 11-06-18.
// Copyright 2011 Betastreet Media. All rights reserved.
//
#import "NSDate+relative.h"
#import "NSDate+marshmallows.h"
#define MINUTE 60.0
#define HOUR (60.0 * MINUTE)
@ -15,7 +15,17 @@
#define MONTH (30.0 * DAY)
#define YEAR (365.25 * DAY)
@implementation NSDate (NSDate_relative)
@implementation NSDate (NSDate_marshmallows)
+ (NSDate *) dateWithYear: (NSInteger)year month: (NSInteger)month day: (NSInteger)day
{
NSCalendar *calendar = [NSCalendar currentCalendar];
NSDateComponents *components = [[[NSDateComponents alloc] init] autorelease];
[components setYear: year];
[components setMonth: month];
[components setDay: day];
return [calendar dateFromComponents: components];
}
- (NSString *) relativeToNow
{

View file

@ -1,5 +1,5 @@
//
// NSString+sanity.h
// NSString+marshmallows.h
// Marshmallows
//
// Created by Sami Samhuri on 11-09-03.
@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
@interface NSString (NSString_sanity)
@interface NSString (NSString_marshmallows)
- (NSString *) firstMatch: (NSString *)pattern;
- (NSString *) stringByReplacing: (NSString *)pattern with: (NSString *)replacement;

View file

@ -1,12 +1,12 @@
//
// NSString+sanity.m
// NSString+marshmallows.m
// Marshmallows
//
// Created by Sami Samhuri on 11-09-03.
// Copyright 2011 Guru Logic. All rights reserved.
//
#import "NSString+sanity.h"
#import "NSString+marshmallows.h"
// Encode a string to embed in an URL.
NSString* URLEncode(NSString *string) {
@ -19,7 +19,7 @@ NSString* URLEncode(NSString *string) {
}
@implementation NSString (NSString_sanity)
@implementation NSString (NSString_marshmallows)
- (NSString *) stringByTrimmingWhitespace
{

View file

@ -1,5 +1,5 @@
//
// UIAlertView+simple.h
// UIAlertView+marshmallows.h
// DatingX
//
// Created by Sami Samhuri on 11-08-24.
@ -10,7 +10,7 @@
typedef void (^UIAlertViewCallback)(BOOL ok);
@interface UIAlertView (UIAlertView_simple)
@interface UIAlertView (UIAlertView_marshmallows)
+ (void) showAlertWithTitle: (NSString *)title message: (NSString *)message;

View file

@ -1,15 +1,15 @@
//
// UIAlertView+simple.m
// UIAlertView+marshmallows.m
// DatingX
//
// Created by Sami Samhuri on 11-08-24.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import "UIAlertView+simple.h"
#import "UIAlertView+marshmallows.h"
#import "UIAlertViewDelegate.h"
@implementation UIAlertView (UIAlertView_simple)
@implementation UIAlertView (UIAlertView_marshmallows)
+ (void) showAlertWithTitle: (NSString *)title message: (NSString *)message
{

View file

@ -7,7 +7,7 @@
//
#import <Foundation/Foundation.h>
#import "UIAlertView+simple.h"
#import "UIAlertView+marshmallows.h"
@interface UIAlertViewDelegate : NSObject <UIAlertViewDelegate>
{

View file

@ -7,7 +7,7 @@
//
#import <GHUnitIOS/GHUnit.h>
#import "NSDate+relative.h"
#import "NSDate+marshmallows.h"
#define MINUTE 60.0
#define HOUR (60.0 * MINUTE)