Browse files

4.2.0

  • Loading branch information...
1 parent dc3c200 commit 6e51540caec39fbaa0091ae781daa1876a2a515a @groue committed Jul 27, 2012
View
2 README.md
@@ -3,7 +3,7 @@ GRMustache
GRMustache is a production-ready implementation of [Mustache](http://mustache.github.com/) templates for MacOS Cocoa and iOS.
-**July 1st, 2012: GRMustache 4.1.1 is out.** [Release notes](GRMustache/blob/master/RELEASE_NOTES.md)
+**July 27th, 2012: GRMustache 4.2.0 is out.** [Release notes](GRMustache/blob/master/RELEASE_NOTES.md)
Breaking news on Twitter: http://twitter.com/GRMustache
View
10 RELEASE_NOTES.md
@@ -3,6 +3,16 @@ GRMustache Release Notes
You can compare the performances of GRMustache versions at https://github.com/groue/GRMustacheBenchmark.
+## v4.2.0
+
+**Section delegates**
+
+When an object that is attached to a Mustache section conforms to the [GRMustacheDelegate protocol](Guides/delegate.md), it can observe and alter the rendering of the inner content of the section, just like the template's delegate.
+
+This provides you with a better way to encapsulate behaviors that, with previous versions of GRMustache, would bloat the one and only delegate of a template.
+
+Section delegates are used in the [number formatting sample code](sample_code/number_formatting.md), where the NSNumberFormatter class is given the opportunity to render formatted numbers.
+
## v4.1.1
**Total inline documentation**
View
70 include/GRMustacheAvailabilityMacros.h
@@ -30,17 +30,18 @@
*/
#define GRMUSTACHE_VERSION_4_0 4000
#define GRMUSTACHE_VERSION_4_1 4010
+#define GRMUSTACHE_VERSION_4_2 4020
/*
- * If max GRMustacheVersion not specified, assume 4.1
+ * If max GRMustacheVersion not specified, assume 4.2
*/
#ifndef GRMUSTACHE_VERSION_MAX_ALLOWED
-#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_4_1
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_4_2
#endif
/*
@@ -145,3 +146,68 @@
+/*
+ * AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER
+ *
+ * Used on declarations introduced in GRMustache 4.2
+ */
+#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_4_2
+#define AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER UNAVAILABLE_ATTRIBUTE
+#elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_4_2
+#define AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER WEAK_IMPORT_ATTRIBUTE
+#else
+#define AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER_BUT_DEPRECATED
+ *
+ * Used on declarations introduced in GRMustache 4.2,
+ * and deprecated in GRMustache 4.2
+ */
+#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_2
+#define AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
+#else
+#define AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_2
+ *
+ * Used on declarations introduced in GRMustache 4.0,
+ * but later deprecated in GRMustache 4.2
+ */
+#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_2
+#define AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_2 DEPRECATED_ATTRIBUTE
+#else
+#define AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_2 AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER
+#endif
+
+/*
+ * AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_2
+ *
+ * Used on declarations introduced in GRMustache 4.1,
+ * but later deprecated in GRMustache 4.2
+ */
+#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_2
+#define AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_2 DEPRECATED_ATTRIBUTE
+#else
+#define AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_2 AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER
+#endif
+
+/*
+ * DEPRECATED_IN_GRMUSTACHE_VERSION_4_2_AND_LATER
+ *
+ * Used on types deprecated in GRMustache 4.2
+ */
+#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_2
+#define DEPRECATED_IN_GRMUSTACHE_VERSION_4_2_AND_LATER DEPRECATED_ATTRIBUTE
+#else
+#define DEPRECATED_IN_GRMUSTACHE_VERSION_4_2_AND_LATER
+#endif
+
+
+
+
+
+
View
11 include/GRMustacheSection.h
@@ -42,13 +42,10 @@
*/
@interface GRMustacheSection: NSObject {
@private
- GRMustacheInvocation *_invocation;
- GRMustacheTemplate *_rootTemplate;
- NSString *_templateString;
- NSRange _innerRange;
- BOOL _inverted;
- NSArray *_elems;
+ id _sectionElement;
id _renderingContext;
+ id _rootTemplate;
+ id _delegates;
}
@@ -61,7 +58,7 @@
*
* @since v2.0
*/
-@property (nonatomic, readonly) id renderingContext AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER;
+@property (nonatomic, retain, readonly) id renderingContext AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER;
View
4 include/GRMustacheVersion.h
@@ -33,12 +33,12 @@
*
* @since v1.0
*/
-#define GRMUSTACHE_MINOR_VERSION 1
+#define GRMUSTACHE_MINOR_VERSION 2
/**
* The patch-level component of GRMustache version
*
* @since v1.0
*/
-#define GRMUSTACHE_PATCH_VERSION 1
+#define GRMUSTACHE_PATCH_VERSION 0
View
BIN lib/libGRMustache4-MacOS.a
Binary file not shown.
View
BIN lib/libGRMustache4-iOS.a
Binary file not shown.
View
4 src/classes/GRMustacheVersion.h
@@ -33,12 +33,12 @@
*
* @since v1.0
*/
-#define GRMUSTACHE_MINOR_VERSION 1
+#define GRMUSTACHE_MINOR_VERSION 2
/**
* The patch-level component of GRMustache version
*
* @since v1.0
*/
-#define GRMUSTACHE_PATCH_VERSION 1
+#define GRMUSTACHE_PATCH_VERSION 0

0 comments on commit 6e51540

Please sign in to comment.