Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

v3.0.0

  • Loading branch information...
commit eb5cff83e225098fb2fae33041d7d0072191c42b 1 parent ad48484
@groue authored
View
25 Guides/runtime/booleans.md
@@ -102,30 +102,7 @@ A consequence is that all properties declared as `char` will be considered as bo
@end
```
-We thought that built-in support for `BOOL` properties was worth this annoyance, since it should be pretty rare that you would use a value of such a type in a template.
-
-However, should this behavior annoy you, we provide a mechanism for having GRMustache consider `char` and `BOOL` properties as what they really are: numbers.
-
-Use the `GRMustacheTemplateOptionStrictBoolean` option when loading and rendering templates:
-
-```objc
-Person *alice = [Person new];
-alice.pretty = NO;
-
-// All the following renderings return @"whistle", because alice's pretty property is now considered as a number.
-
-// On-the-fly rendering:
-[GRMustacheTemplate renderObject:alice fromString:templateString options:GRMustacheTemplateOptionStrictBoolean];
-
-// With a GRMustacheTemplate:
-GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString options:GRMustacheTemplateOptionStrictBoolean error:NULL];
-[template renderObject:alice];
-
-// With a GRMustacheTemplate loaded from a GRMustacheTemplateRepository:
-GRMustacheTemplateRepository *templateRepository = [GRMustacheTemplateRepository templateRepositoryWith... options:GRMustacheTemplateOptionStrictBoolean];
-GRMustacheTemplate *template = [templateRepository templateFromString:templateString error:NULL];
-[template renderObject:alice];
-```
+We thought that built-in support for `BOOL` properties was worth this annoyance, since it should be pretty rare that you would use a value of such a type in a template.
### The case for C99 bool
View
42 RELEASE_NOTES.md
@@ -3,6 +3,48 @@ GRMustache Release Notes
You can compare the performances of GRMustache versions at https://github.com/groue/GRMustacheBenchmark.
+## v3.0.0
+
+**There is no option**
+
+Removed APIs:
+
+```objc
+enum {
+ GRMustacheTemplateOptionNone,
+ GRMustacheTemplateOptionStrictBoolean
+};
+
+typedef NSUInteger GRMustacheTemplateOptions;
+
+@interface GRMustacheTemplate: NSObject {
++ (id)templateFromString:(NSString *)templateString options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
++ (id)templateFromContentsOfFile:(NSString *)path options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
++ (id)templateFromContentsOfURL:(NSURL *)url options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
++ (id)templateFromResource:(NSString *)name bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
++ (id)templateFromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
++ (NSString *)renderObject:(id)object fromString:(NSString *)templateString options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
++ (NSString *)renderObject:(id)object fromContentsOfFile:(NSString *)path options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
++ (NSString *)renderObject:(id)object fromContentsOfURL:(NSURL *)url options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
++ (NSString *)renderObject:(id)object fromResource:(NSString *)name bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
++ (NSString *)renderObject:(id)object fromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
+@end
+
+@protocol GRMustacheTemplateRepositoryDataSource <NSObject>
++ (id)templateRepositoryWithBaseURL:(NSURL *)URL options:(GRMustacheTemplateOptions)options;
++ (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext options:(GRMustacheTemplateOptions)options;
++ (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options;
++ (id)templateRepositoryWithDirectory:(NSString *)path options:(GRMustacheTemplateOptions)options;
++ (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext options:(GRMustacheTemplateOptions)options;
++ (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options;
++ (id)templateRepositoryWithBundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options;
++ (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext options:(GRMustacheTemplateOptions)options;
++ (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options;
++ (id)templateRepositoryWithPartialsDictionary:(NSDictionary *)partialsDictionary options:(GRMustacheTemplateOptions)options;
++ (id)templateRepositoryWithOptions:(GRMustacheTemplateOptions)options;
+@end
+```
+
## v2.0.0
**Performance improvements and API simplification**
View
37 include/GRMustache.h
@@ -23,14 +23,6 @@
#import <Foundation/Foundation.h>
#import "GRMustacheAvailabilityMacros.h"
-enum {
- GRMustacheTemplateOptionNone = 0,
- GRMustacheTemplateOptionStrictBoolean = 0x01,
-};
-
-typedef NSUInteger GRMustacheTemplateOptions;
-
-
/**
A C struct that hold GRMustache version information
@@ -60,7 +52,7 @@ typedef struct {
@return The version of GRMustache as a GRMustacheVersion struct.
@since v1.0
*/
-+ (GRMustacheVersion)version AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (GRMustacheVersion)version AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
//////////////////////////////////////////////////////////////////////////////////////////
/// @name Preventing NSUndefinedKeyException when using GRMustache in Development configuration
@@ -83,32 +75,7 @@ typedef struct {
@since v1.7
*/
-+ (void)preventNSUndefinedKeyExceptionAttack AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-
-
-//////////////////////////////////////////////////////////////////////////////////////////
-/// @name Global template options
-//////////////////////////////////////////////////////////////////////////////////////////
-
-/**
- Returns the default template options. The default value is GRMustacheTemplateOptionNone.
-
- @return The default template options. The default value is GRMustacheTemplateOptionNone.
- @see setDefaultTemplateOptions:
- @since v1.8
- */
-+ (GRMustacheTemplateOptions)defaultTemplateOptions AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-
-/**
- Sets the default template options.
-
- Those options will be used by all GRMustacheTemplate rendering and parsing methods, such as [GRMustacheTemplate templateFromString:error:] and [GRMustacheTemplate renderObject:fromString:error:].
-
- @param templateOptions A mask of options indicating the default behavior of templates.
- @see defaultTemplateOptions
- @since v1.8
- */
-+ (void)setDefaultTemplateOptions:(GRMustacheTemplateOptions)templateOptions AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (void)preventNSUndefinedKeyExceptionAttack AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
@end
View
30 include/GRMustacheAvailabilityMacros.h
@@ -28,7 +28,7 @@
/*
* Set up standard GRMustache versions
*/
-#define GRMUSTACHE_VERSION_2_0 2000
+#define GRMUSTACHE_VERSION_3_0 3000
@@ -36,10 +36,10 @@
/*
- * If max GRMustacheVersion not specified, assume 2.0
+ * If max GRMustacheVersion not specified, assume 3.0
*/
#ifndef GRMUSTACHE_VERSION_MAX_ALLOWED
-#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_2_0
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_3_0
#endif
/*
@@ -55,8 +55,8 @@
#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_MIN_REQUIRED
#error GRMUSTACHE_VERSION_MAX_ALLOWED must be >= GRMUSTACHE_VERSION_MIN_REQUIRED
#endif
-#if GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_2_0
-#error GRMUSTACHE_VERSION_MIN_REQUIRED must be >= GRMUSTACHE_VERSION_2_0
+#if GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_3_0
+#error GRMUSTACHE_VERSION_MIN_REQUIRED must be >= GRMUSTACHE_VERSION_3_0
#endif
@@ -65,26 +65,26 @@
/*
- * AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER
+ * AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER
*
- * Used on declarations introduced in GRMustache 2.0
+ * Used on declarations introduced in GRMustache 3.0
*/
-#define AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER
+#define AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER
/*
- * AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER_BUT_DEPRECATED
+ * AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER_BUT_DEPRECATED
*
- * Used on declarations introduced in GRMustache 2.0,
- * and deprecated in GRMustache 2.0
+ * Used on declarations introduced in GRMustache 3.0,
+ * and deprecated in GRMustache 3.0
*/
-#define AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
+#define AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
/*
- * DEPRECATED_IN_GRMUSTACHE_VERSION_2_0_AND_LATER
+ * DEPRECATED_IN_GRMUSTACHE_VERSION_3_0_AND_LATER
*
- * Used on types deprecated in GRMustache 2.0
+ * Used on types deprecated in GRMustache 3.0
*/
-#define DEPRECATED_IN_GRMUSTACHE_VERSION_2_0_AND_LATER DEPRECATED_ATTRIBUTE
+#define DEPRECATED_IN_GRMUSTACHE_VERSION_3_0_AND_LATER DEPRECATED_ATTRIBUTE
View
4 include/GRMustacheError.h
@@ -29,7 +29,7 @@
@since v1.0
*/
-extern NSString* const GRMustacheErrorDomain AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+extern NSString* const GRMustacheErrorDomain AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
/**
The codes of a GRMustache-generated NSError
@@ -50,6 +50,6 @@ typedef enum {
@since v1.0
*/
GRMustacheErrorCodeTemplateNotFound,
-} GRMustacheErrorCode AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+} GRMustacheErrorCode AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
View
4 include/GRMustacheHelper.h
@@ -31,7 +31,7 @@
@protocol GRMustacheHelper<NSObject>
@required
-- (NSString *)renderSection:(GRMustacheSection *)section AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+- (NSString *)renderSection:(GRMustacheSection *)section AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
@end
@@ -41,7 +41,7 @@
#if NS_BLOCKS_AVAILABLE
@interface GRMustacheHelper: NSObject<GRMustacheHelper>
-+ (id)helperWithBlock:(NSString *(^)(GRMustacheSection* section))block AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (id)helperWithBlock:(NSString *(^)(GRMustacheSection* section))block AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
@end
#endif /* if NS_BLOCKS_AVAILABLE */
View
4 include/GRMustacheInvocation.h
@@ -28,6 +28,6 @@
id _returnValue;
id _token;
}
-@property (nonatomic, readonly) NSString *key AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-@property (nonatomic, retain) id returnValue AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+@property (nonatomic, readonly) NSString *key AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
+@property (nonatomic, retain) id returnValue AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
@end
View
6 include/GRMustacheSection.h
@@ -47,7 +47,7 @@
@since v2.0
*/
-@property (nonatomic, readonly) id renderingContext AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+@property (nonatomic, readonly) id renderingContext AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
@@ -61,7 +61,7 @@
@since v2.0
*/
-@property (nonatomic, readonly) NSString *innerTemplateString AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+@property (nonatomic, readonly) NSString *innerTemplateString AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
//////////////////////////////////////////////////////////////////////////////////////////
@@ -75,6 +75,6 @@
@since v2.0
*/
-- (NSString *)render AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+- (NSString *)render AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
@end
View
53 include/GRMustacheTemplate.h
@@ -33,11 +33,10 @@
@interface GRMustacheTemplate: NSObject {
@private
NSArray *_elems;
- GRMustacheTemplateOptions _options;
id<GRMustacheTemplateDelegate> _delegate;
}
-@property (nonatomic, assign) id<GRMustacheTemplateDelegate> delegate AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+@property (nonatomic, assign) id<GRMustacheTemplateDelegate> delegate AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
//////////////////////////////////////////////////////////////////////////////////////////
@@ -52,25 +51,10 @@
@return A GRMustacheTemplate instance
@param templateString The template string
@param outError If there is an error loading or parsing template and partials, upon return contains an NSError object that describes the problem.
- @see templateFromString:options:error:
@see [GRMustache defaultTemplateOptions]
@since v1.11
*/
-+ (id)templateFromString:(NSString *)templateString error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-
-/**
- Parses a template string, and returns a compiled template.
-
- The behavior of the returned template is determined by the _options_ parameter, not by [GRMustache defaultTemplateOptions].
-
- @return A GRMustacheTemplate instance
- @param templateString The template string
- @param options A mask of options indicating the behavior of the template.
- @param outError If there is an error loading or parsing template and partials, upon return contains an NSError object that describes the problem.
- @see templateFromString:error:
- @since v1.11
- */
-+ (id)templateFromString:(NSString *)templateString options:(GRMustacheTemplateOptions)options error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (id)templateFromString:(NSString *)templateString error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
/**
Renders a context object from a template string.
@@ -82,8 +66,7 @@
@since v1.0
*/
-+ (NSString *)renderObject:(id)object fromString:(NSString *)templateString error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (NSString *)renderObject:(id)object fromString:(NSString *)templateString options:(GRMustacheTemplateOptions)options error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (NSString *)renderObject:(id)object fromString:(NSString *)templateString error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
//////////////////////////////////////////////////////////////////////////////////////////
@@ -101,8 +84,7 @@
@since v1.11
*/
-+ (id)templateFromContentsOfFile:(NSString *)path error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateFromContentsOfFile:(NSString *)path options:(GRMustacheTemplateOptions)options error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (id)templateFromContentsOfFile:(NSString *)path error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
#if !TARGET_OS_IPHONE || __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000
@@ -117,8 +99,7 @@
@since v1.11
*/
-+ (id)templateFromContentsOfURL:(NSURL *)url error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateFromContentsOfURL:(NSURL *)url options:(GRMustacheTemplateOptions)options error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (id)templateFromContentsOfURL:(NSURL *)url error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
#endif /* if !TARGET_OS_IPHONE || __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000 */
@@ -134,8 +115,7 @@
@since v1.4
*/
-+ (NSString *)renderObject:(id)object fromContentsOfFile:(NSString *)path error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (NSString *)renderObject:(id)object fromContentsOfFile:(NSString *)path options:(GRMustacheTemplateOptions)options error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (NSString *)renderObject:(id)object fromContentsOfFile:(NSString *)path error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
#if !TARGET_OS_IPHONE || __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000
@@ -152,8 +132,7 @@
@since v1.0
*/
-+ (NSString *)renderObject:(id)object fromContentsOfURL:(NSURL *)url error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (NSString *)renderObject:(id)object fromContentsOfURL:(NSURL *)url options:(GRMustacheTemplateOptions)options error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (NSString *)renderObject:(id)object fromContentsOfURL:(NSURL *)url error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
#endif /* if !TARGET_OS_IPHONE || __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000 */
@@ -176,8 +155,7 @@
@since v1.11
*/
-+ (id)templateFromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateFromResource:(NSString *)name bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (id)templateFromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
/**
Parses a bundle resource template, and returns a compiled template.
@@ -194,8 +172,7 @@
@since v1.11
*/
-+ (id)templateFromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateFromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (id)templateFromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
/**
@@ -213,8 +190,7 @@
@since v1.0
*/
-+ (NSString *)renderObject:(id)object fromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (NSString *)renderObject:(id)object fromResource:(NSString *)name bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (NSString *)renderObject:(id)object fromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
/**
Renders a context object from a bundle resource template.
@@ -232,8 +208,7 @@
@since v1.0
*/
-+ (NSString *)renderObject:(id)object fromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (NSString *)renderObject:(id)object fromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (NSString *)renderObject:(id)object fromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
//////////////////////////////////////////////////////////////////////////////////////////
@@ -248,7 +223,7 @@
@since v1.0
*/
-- (NSString *)renderObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+- (NSString *)renderObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
/**
Renders a template with context objects.
@@ -258,7 +233,7 @@
@since v1.5
*/
-- (NSString *)renderObjects:(id)object, ... __attribute__ ((sentinel)) AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+- (NSString *)renderObjects:(id)object, ... __attribute__ ((sentinel)) AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
/**
Renders a template without any context object for interpreting Mustache tags.
@@ -267,6 +242,6 @@
@since v1.0
*/
-- (NSString *)render AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+- (NSString *)render AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
@end
View
8 include/GRMustacheTemplateDelegate.h
@@ -28,8 +28,8 @@
@protocol GRMustacheTemplateDelegate<NSObject>
@optional
-- (void)templateWillRender:(GRMustacheTemplate *)template AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-- (void)templateDidRender:(GRMustacheTemplate *)template AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-- (void)template:(GRMustacheTemplate *)template willRenderReturnValueOfInvocation:(GRMustacheInvocation *)invocation AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-- (void)template:(GRMustacheTemplate *)template didRenderReturnValueOfInvocation:(GRMustacheInvocation *)invocation AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+- (void)templateWillRender:(GRMustacheTemplate *)template AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
+- (void)templateDidRender:(GRMustacheTemplate *)template AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
+- (void)template:(GRMustacheTemplate *)template willRenderReturnValueOfInvocation:(GRMustacheInvocation *)invocation AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
+- (void)template:(GRMustacheTemplate *)template didRenderReturnValueOfInvocation:(GRMustacheInvocation *)invocation AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
@end
View
46 include/GRMustacheTemplateRepository.h
@@ -29,49 +29,37 @@
@protocol GRMustacheTemplateRepositoryDataSource <NSObject>
@required
-- (id)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateIDForName:(NSString *)name relativeToTemplateID:(id)templateID AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-- (NSString *)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateStringForTemplateID:(id)templateID error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+- (id)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateIDForName:(NSString *)name relativeToTemplateID:(id)templateID AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
+- (NSString *)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateStringForTemplateID:(id)templateID error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
@end
@interface GRMustacheTemplateRepository : NSObject {
@private
id<GRMustacheTemplateRepositoryDataSource> _dataSource;
- GRMustacheTemplateOptions _options;
NSMutableDictionary *_templateForTemplateID;
id _currentlyParsedTemplateID;
}
-@property (nonatomic, assign) id<GRMustacheTemplateRepositoryDataSource> dataSource AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+@property (nonatomic, assign) id<GRMustacheTemplateRepositoryDataSource> dataSource AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
#if !TARGET_OS_IPHONE || __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000
-+ (id)templateRepositoryWithBaseURL:(NSURL *)URL AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithBaseURL:(NSURL *)URL options:(GRMustacheTemplateOptions)options AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext options:(GRMustacheTemplateOptions)options AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (id)templateRepositoryWithBaseURL:(NSURL *)URL AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
++ (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
++ (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
++ (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
#endif /* if !TARGET_OS_IPHONE || __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000 */
-+ (id)templateRepositoryWithDirectory:(NSString *)path AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithDirectory:(NSString *)path options:(GRMustacheTemplateOptions)options AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext options:(GRMustacheTemplateOptions)options AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (id)templateRepositoryWithDirectory:(NSString *)path AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
++ (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
++ (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
-+ (id)templateRepositoryWithBundle:(NSBundle *)bundle AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithBundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext options:(GRMustacheTemplateOptions)options AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (id)templateRepositoryWithBundle:(NSBundle *)bundle AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
++ (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
++ (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
-+ (id)templateRepositoryWithPartialsDictionary:(NSDictionary *)partialsDictionary AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithPartialsDictionary:(NSDictionary *)partialsDictionary options:(GRMustacheTemplateOptions)options AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (id)templateRepositoryWithPartialsDictionary:(NSDictionary *)partialsDictionary AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
-+ (id)templateRepository AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-+ (id)templateRepositoryWithOptions:(GRMustacheTemplateOptions)options AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
++ (id)templateRepository AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
-- (GRMustacheTemplate *)templateForName:(NSString *)name error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
-- (GRMustacheTemplate *)templateFromString:(NSString *)templateString error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_2_0_AND_LATER;
+- (GRMustacheTemplate *)templateForName:(NSString *)name error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
+- (GRMustacheTemplate *)templateFromString:(NSString *)templateString error:(NSError **)outError AVAILABLE_GRMUSTACHE_VERSION_3_0_AND_LATER;
@end
View
2  include/GRMustacheVersion.h
@@ -26,7 +26,7 @@
@since v1.0
*/
-#define GRMUSTACHE_MAJOR_VERSION 2
+#define GRMUSTACHE_MAJOR_VERSION 3
/**
The minor component of GRMustache version
View
BIN  lib/libGRMustache2-MacOS.a
Binary file not shown
View
BIN  lib/libGRMustache2-iOS.a
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.