Permalink
Browse files

Prepare v5.0.0

  • Loading branch information...
1 parent 5e89c9a commit 1e845ee4deaff2f4265f0cf02329df4e125e4b00 @groue committed Sep 12, 2012
Showing with 103 additions and 337 deletions.
  1. +2 −2 src/bin/buildGRMustacheAvailabilityMacros
  2. +2 −2 src/classes/GRMustache.h
  3. +15 −213 src/classes/GRMustacheAvailabilityMacros.h
  4. +2 −2 src/classes/GRMustacheError.h
  5. +3 −7 src/classes/GRMustacheFilter.h
  6. +0 −12 src/classes/GRMustacheFilter.m
  7. +2 −6 src/classes/GRMustacheHelper.h
  8. +0 −12 src/classes/GRMustacheHelper.m
  9. +1 −6 src/classes/GRMustacheInvocation.h
  10. +3 −3 src/classes/GRMustacheSection.h
  11. +21 −21 src/classes/GRMustacheTemplate.h
  12. +12 −11 src/classes/GRMustacheTemplateDelegate.h
  13. +16 −16 src/classes/GRMustacheTemplateRepository.h
  14. +3 −3 src/classes/GRMustacheVersion.h
  15. +1 −1 src/tests/Public/v4.0/GRBooleanTest.m
  16. +1 −1 src/tests/Public/v4.0/GRMustacheHelperTest.m
  17. +1 −1 src/tests/Public/v4.0/GRMustacheParsingErrorsTest.m
  18. +1 −1 src/tests/Public/v4.0/GRMustacheSuitesTest.m
  19. +1 −1 src/tests/Public/v4.0/GRMustacheTemplateDelegateTest.m
  20. +1 −1 src/tests/Public/v4.0/GRMustacheTemplateFromMethodsTest.m
  21. +1 −1 src/tests/Public/v4.0/GRMustacheTemplateRenderMethodsTest.m
  22. +1 −1 src/tests/Public/v4.0/GRMustacheTemplateRepositoryDataSourceTest.m
  23. +1 −1 src/tests/Public/v4.0/GRMustacheTemplateRepositoryWithBaseURLTest.m
  24. +1 −1 src/tests/Public/v4.0/GRMustacheTemplateRepositoryWithBundleTest.m
  25. +1 −1 src/tests/Public/v4.0/GRMustacheTemplateRepositoryWithDirectoryTest.m
  26. +1 −1 src/tests/Public/v4.0/GRMustacheTemplateRepositoryWithPartialsDictionaryTest.m
  27. +1 −1 src/tests/Public/v4.0/GRSpecificationSuitesTest.m
  28. +1 −1 src/tests/Public/v4.1/GRMustacheTemplateDelegate_v4_1_Test.m
  29. +1 −1 src/tests/Public/v4.2/GRMustacheParsingErrors_v4_2_Test.m
  30. +1 −1 src/tests/Public/v4.2/GRMustacheTemplateDelegate_v4_2_Test.m
  31. +1 −1 src/tests/Public/v4.3/GRMustacheFilterLibraryTest.m
  32. +1 −1 src/tests/Public/v4.3/GRMustacheFilterTest.m
  33. +1 −1 src/tests/Public/v4.3/GRMustacheHelper_v4_3_Test.m
  34. +1 −1 src/tests/Public/v4.3/GRMustacheParsingErrors_v4_3_Test.m
  35. +1 −1 src/tests/Public/v4.3/GRMustacheTemplateDelegate_v4_3_Test.m
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
-MAJOR_VERSION = 4
-MAX_MINOR_VERSION = 3
+MAJOR_VERSION = 5
+MAX_MINOR_VERSION = 0
puts <<-LICENSE
// The MIT License
@@ -52,7 +52,7 @@ typedef struct {
*
* @since v1.0
*/
-+ (GRMustacheVersion)version AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER;
++ (GRMustacheVersion)version AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER;
////////////////////////////////////////////////////////////////////////////////
/// @name Preventing NSUndefinedKeyException when using GRMustache in Development configuration
@@ -86,7 +86,7 @@ typedef struct {
*
* @since v1.7
*/
-+ (void)preventNSUndefinedKeyExceptionAttack AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER;
++ (void)preventNSUndefinedKeyExceptionAttack AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER;
@end
@@ -28,21 +28,18 @@
/*
* Set up standard GRMustache versions
*/
-#define GRMUSTACHE_VERSION_4_0 4000
-#define GRMUSTACHE_VERSION_4_1 4010
-#define GRMUSTACHE_VERSION_4_2 4020
-#define GRMUSTACHE_VERSION_4_3 4030
+#define GRMUSTACHE_VERSION_5_0 5000
/*
- * If max GRMustacheVersion not specified, assume 4.3
+ * If max GRMustacheVersion not specified, assume 5.0
*/
#ifndef GRMUSTACHE_VERSION_MAX_ALLOWED
-#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_4_3
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_5_0
#endif
/*
@@ -58,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_4_0
-#error GRMUSTACHE_VERSION_MIN_REQUIRED must be >= GRMUSTACHE_VERSION_4_0
+#if GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_5_0
+#error GRMUSTACHE_VERSION_MIN_REQUIRED must be >= GRMUSTACHE_VERSION_5_0
#endif
@@ -68,221 +65,26 @@
/*
- * AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER
+ * AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER
*
- * Used on declarations introduced in GRMustache 4.0
+ * Used on declarations introduced in GRMustache 5.0
*/
-#define AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER
+#define AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER
/*
- * AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED
+ * AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED
*
- * Used on declarations introduced in GRMustache 4.0,
- * and deprecated in GRMustache 4.0
+ * Used on declarations introduced in GRMustache 5.0,
+ * and deprecated in GRMustache 5.0
*/
-#define AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
+#define AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
/*
- * DEPRECATED_IN_GRMUSTACHE_VERSION_4_0_AND_LATER
+ * DEPRECATED_IN_GRMUSTACHE_VERSION_5_0_AND_LATER
*
- * Used on types deprecated in GRMustache 4.0
+ * Used on types deprecated in GRMustache 5.0
*/
-#define DEPRECATED_IN_GRMUSTACHE_VERSION_4_0_AND_LATER DEPRECATED_ATTRIBUTE
-
-
-
-
-
-
-/*
- * AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER
- *
- * Used on declarations introduced in GRMustache 4.1
- */
-#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_4_1
-#define AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER UNAVAILABLE_ATTRIBUTE
-#elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_4_1
-#define AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER WEAK_IMPORT_ATTRIBUTE
-#else
-#define AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER
-#endif
-
-/*
- * AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER_BUT_DEPRECATED
- *
- * Used on declarations introduced in GRMustache 4.1,
- * and deprecated in GRMustache 4.1
- */
-#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_1
-#define AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
-#else
-#define AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER
-#endif
-
-/*
- * AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_1
- *
- * Used on declarations introduced in GRMustache 4.0,
- * but later deprecated in GRMustache 4.1
- */
-#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_1
-#define AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_1 DEPRECATED_ATTRIBUTE
-#else
-#define AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_1 AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER
-#endif
-
-/*
- * DEPRECATED_IN_GRMUSTACHE_VERSION_4_1_AND_LATER
- *
- * Used on types deprecated in GRMustache 4.1
- */
-#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_1
-#define DEPRECATED_IN_GRMUSTACHE_VERSION_4_1_AND_LATER DEPRECATED_ATTRIBUTE
-#else
-#define DEPRECATED_IN_GRMUSTACHE_VERSION_4_1_AND_LATER
-#endif
-
-
-
-
-
-
-/*
- * 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
-
-
-
-
-
-
-/*
- * AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER
- *
- * Used on declarations introduced in GRMustache 4.3
- */
-#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_4_3
-#define AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER UNAVAILABLE_ATTRIBUTE
-#elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_4_3
-#define AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER WEAK_IMPORT_ATTRIBUTE
-#else
-#define AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER
-#endif
-
-/*
- * AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER_BUT_DEPRECATED
- *
- * Used on declarations introduced in GRMustache 4.3,
- * and deprecated in GRMustache 4.3
- */
-#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_3
-#define AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE
-#else
-#define AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER
-#endif
-
-/*
- * AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3
- *
- * Used on declarations introduced in GRMustache 4.0,
- * but later deprecated in GRMustache 4.3
- */
-#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_3
-#define AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3 DEPRECATED_ATTRIBUTE
-#else
-#define AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3 AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER
-#endif
-
-/*
- * AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3
- *
- * Used on declarations introduced in GRMustache 4.1,
- * but later deprecated in GRMustache 4.3
- */
-#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_3
-#define AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3 DEPRECATED_ATTRIBUTE
-#else
-#define AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3 AVAILABLE_GRMUSTACHE_VERSION_4_1_AND_LATER
-#endif
-
-/*
- * AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3
- *
- * Used on declarations introduced in GRMustache 4.2,
- * but later deprecated in GRMustache 4.3
- */
-#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_3
-#define AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3 DEPRECATED_ATTRIBUTE
-#else
-#define AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_4_3 AVAILABLE_GRMUSTACHE_VERSION_4_2_AND_LATER
-#endif
-
-/*
- * DEPRECATED_IN_GRMUSTACHE_VERSION_4_3_AND_LATER
- *
- * Used on types deprecated in GRMustache 4.3
- */
-#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_4_3
-#define DEPRECATED_IN_GRMUSTACHE_VERSION_4_3_AND_LATER DEPRECATED_ATTRIBUTE
-#else
-#define DEPRECATED_IN_GRMUSTACHE_VERSION_4_3_AND_LATER
-#endif
+#define DEPRECATED_IN_GRMUSTACHE_VERSION_5_0_AND_LATER DEPRECATED_ATTRIBUTE
@@ -29,7 +29,7 @@
*
* @since v1.0
*/
-extern NSString* const GRMustacheErrorDomain AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER;
+extern NSString* const GRMustacheErrorDomain AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER;
/**
* The codes of a GRMustache-generated NSError
@@ -50,6 +50,6 @@ typedef enum {
* @since v1.0
*/
GRMustacheErrorCodeTemplateNotFound,
-} GRMustacheErrorCode AVAILABLE_GRMUSTACHE_VERSION_4_0_AND_LATER;
+} GRMustacheErrorCode AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER;
@@ -35,7 +35,7 @@
*
* @since v4.3
*/
-extern NSString * const GRMustacheFilterException AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER;
+extern NSString * const GRMustacheFilterException AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER;
/**
@@ -67,7 +67,7 @@ extern NSString * const GRMustacheFilterException AVAILABLE_GRMUSTACHE_VERSION_4
*
* @since v4.3
*/
-- (id)transformedValue:(id)object AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER;
+- (id)transformedValue:(id)object AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER;
@end
@@ -92,8 +92,6 @@ extern NSString * const GRMustacheFilterException AVAILABLE_GRMUSTACHE_VERSION_4
/// @name Creating Filters
////////////////////////////////////////////////////////////////////////////////
-#if NS_BLOCKS_AVAILABLE
-
/**
* Returns a GRMustacheFilter object that executes the provided block when
* tranforming a value.
@@ -104,8 +102,6 @@ extern NSString * const GRMustacheFilterException AVAILABLE_GRMUSTACHE_VERSION_4
*
* @since v4.3
*/
-+ (id)filterWithBlock:(id(^)(id value))block AVAILABLE_GRMUSTACHE_VERSION_4_3_AND_LATER;
-
-#endif /* if NS_BLOCKS_AVAILABLE */
++ (id)filterWithBlock:(id(^)(id value))block AVAILABLE_GRMUSTACHE_VERSION_5_0_AND_LATER;
@end
@@ -27,8 +27,6 @@
// =============================================================================
#pragma mark - Private concrete class GRMustacheBlockFilter
-#if NS_BLOCKS_AVAILABLE
-
/**
* Private subclass of GRMustacheFilter that filter values by calling a block.
*/
@@ -39,23 +37,17 @@ @interface GRMustacheBlockFilter: GRMustacheFilter {
- (id)initWithBlock:(id(^)(id value))block;
@end
-#endif /* if NS_BLOCKS_AVAILABLE */
-
// =============================================================================
#pragma mark - GRMustacheFilter
@implementation GRMustacheFilter
-#if NS_BLOCKS_AVAILABLE
-
+ (id)filterWithBlock:(id(^)(id value))block
{
return [[[GRMustacheBlockFilter alloc] initWithBlock:block] autorelease];
}
-#endif /* if NS_BLOCKS_AVAILABLE */
-
- (id)transformedValue:(id)object
{
return object;
@@ -67,8 +59,6 @@ - (id)transformedValue:(id)object
// =============================================================================
#pragma mark - Private concrete class GRMustacheBlockFilter
-#if NS_BLOCKS_AVAILABLE
-
@implementation GRMustacheBlockFilter
- (id)initWithBlock:(id(^)(id value))block
@@ -99,5 +89,3 @@ - (id)transformedValue:(id)object
}
@end
-
-#endif /* if NS_BLOCKS_AVAILABLE */
Oops, something went wrong.

0 comments on commit 1e845ee

Please sign in to comment.