Permalink
Browse files

v1.0.0

  • Loading branch information...
1 parent 087a78c commit 0219c223242c87d7e1d5891058db57c41f7a453a @groue committed Nov 12, 2010
Showing with 113 additions and 5 deletions.
  1. +7 −5 Classes/GRMustache.h
  2. +43 −0 Classes/GRMustacheVersion.h
  3. +34 −0 Classes/GRMustacheVersion.m
  4. +6 −0 GRMustache.xcodeproj/project.pbxproj
  5. +17 −0 README.md
  6. +6 −0 RELEASE_NOTES.md
View
@@ -21,13 +21,15 @@
// THE SOFTWARE.
#import <Foundation/Foundation.h>
-#import "GRBoolean.h"
-#import "GRMustacheError.h"
-#import "GRMustacheLambda.h"
-#import "GRMustacheTemplateLoader.h"
-#import "GRMustacheTemplate.h"
@interface GRMustache: NSObject
+ (BOOL)strictBooleanMode;
+ (void)setStrictBooleanMode:(BOOL)aBool;
@end
+
+#import "GRMustacheVersion.h"
+#import "GRBoolean.h"
+#import "GRMustacheError.h"
+#import "GRMustacheLambda.h"
+#import "GRMustacheTemplateLoader.h"
+#import "GRMustacheTemplate.h"
@@ -0,0 +1,43 @@
+// The MIT License
+//
+// Copyright (c) 2010 Gwendal Roué
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "GRMustache.h"
+
+
+// Compile-time Checks
+
+#define GRMUSTACHE_MAJOR_VERSION 1
+#define GRMUSTACHE_MINOR_VERSION 0
+#define GRMUSTACHE_PATCH_VERSION 0
+
+
+// Run-time Checks
+
+typedef struct {
+ int major;
+ int minor;
+ int patch;
+} GRMustacheVersion;
+
+@interface GRMustache(Version)
++ (GRMustacheVersion)version;
+@end
@@ -0,0 +1,34 @@
+// The MIT License
+//
+// Copyright (c) 2010 Gwendal Roué
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "GRMustacheVersion.h"
+
+
+@implementation GRMustache(Version)
+
++ (GRMustacheVersion)version {
+ return (GRMustacheVersion){ major:GRMUSTACHE_MAJOR_VERSION,
+ minor:GRMUSTACHE_MINOR_VERSION,
+ patch:GRMUSTACHE_PATCH_VERSION };
+}
+
+@end
@@ -35,6 +35,7 @@
56115C4312812BD800F01AD0 /* GRMustacheContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56115C4212812BD800F01AD0 /* GRMustacheContextTest.m */; };
56115CF31281DD3300F01AD0 /* GRBoolean.m in Sources */ = {isa = PBXBuildFile; fileRef = 56115CF21281DD3300F01AD0 /* GRBoolean.m */; };
56115CFD1281E2FF00F01AD0 /* GRBooleanTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56115CFC1281E2FF00F01AD0 /* GRBooleanTest.m */; };
+ 56A2A198128D28F300B33845 /* GRMustacheVersion.m in Sources */ = {isa = PBXBuildFile; fileRef = 56A2A197128D28F300B33845 /* GRMustacheVersion.m */; };
56C99CA912872AFA00A25402 /* core in Resources */ = {isa = PBXBuildFile; fileRef = 56C99C9D12872AFA00A25402 /* core */; };
56C99DD11288840800A25402 /* GRMustacheLambdaSectionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C99DD01288840800A25402 /* GRMustacheLambdaSectionTest.m */; };
56C99DF812888B2A00A25402 /* dot_key in Resources */ = {isa = PBXBuildFile; fileRef = 56C99DF312888B2A00A25402 /* dot_key */; };
@@ -105,6 +106,8 @@
56115CF21281DD3300F01AD0 /* GRBoolean.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRBoolean.m; sourceTree = "<group>"; };
56115CFB1281E2FF00F01AD0 /* GRBooleanTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRBooleanTest.h; sourceTree = "<group>"; };
56115CFC1281E2FF00F01AD0 /* GRBooleanTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRBooleanTest.m; sourceTree = "<group>"; };
+ 56A2A196128D28F300B33845 /* GRMustacheVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheVersion.h; sourceTree = "<group>"; };
+ 56A2A197128D28F300B33845 /* GRMustacheVersion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheVersion.m; sourceTree = "<group>"; };
56C99C9D12872AFA00A25402 /* core */ = {isa = PBXFileReference; lastKnownFileType = folder; name = core; path = "Mustache-Spec/specs/core"; sourceTree = SOURCE_ROOT; };
56C99DCF1288840800A25402 /* GRMustacheLambdaSectionTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheLambdaSectionTest.h; sourceTree = "<group>"; };
56C99DD01288840800A25402 /* GRMustacheLambdaSectionTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheLambdaSectionTest.m; sourceTree = "<group>"; };
@@ -227,6 +230,8 @@
56D87FED1285A77100F5CF76 /* GRMustacheURLTemplateLoader_private.h */,
5611542F127EC68000F01AD0 /* GRMustacheVariableElement.m */,
56115430127EC68000F01AD0 /* GRMustacheVariableElement_private.h */,
+ 56A2A196128D28F300B33845 /* GRMustacheVersion.h */,
+ 56A2A197128D28F300B33845 /* GRMustacheVersion.m */,
);
path = Classes;
sourceTree = "<group>";
@@ -417,6 +422,7 @@
56D87FF01285A77100F5CF76 /* GRMustacheURLTemplateLoader.m in Sources */,
56D881691285C74800F5CF76 /* GRMustacheTemplateLoaderSubclassTest.m in Sources */,
56C99DD11288840800A25402 /* GRMustacheLambdaSectionTest.m in Sources */,
+ 56A2A198128D28F300B33845 /* GRMustacheVersion.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
@@ -37,6 +37,23 @@ You may also run the `make` command from the Terminal.
GRMustache is tested against the [core](https://github.com/groue/Mustache-Spec/tree/master/specs/core/), [file_system](https://github.com/groue/Mustache-Spec/tree/master/specs/file_system/), [dot_key](https://github.com/groue/Mustache-Spec/tree/master/specs/dot_key/), and [extended_path](https://github.com/groue/Mustache-Spec/tree/master/specs/extended_path/) modules of the [Mustache-Spec](https://github.com/groue/Mustache-Spec) project. More tests come from the [Ruby](http://github.com/defunkt/mustache) implementation.
+Versioning
+----------
+
+GRMustache versioning policy complies to the one defined by [Apache APR](http://apr.apache.org/versioning.html).
+
+Quoting this page :
+
+> Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.
+
+You may check GRMustache version using the following macros:
+
+- `GRMUSTACHE_MAJOR_VERSION`
+- `GRMUSTACHE_MINOR_VERSION`
+- `GRMUSTACHE_PATCH_VERSION`
+
+You may also use the `[GRMustache version]` method (see `GRMustacheVersion.h`).
+
Simple example
--------------
View
@@ -0,0 +1,6 @@
+GRMustache Release Notes
+========================
+
+- **v1.0.0**
+
+ First versioned release

0 comments on commit 0219c22

Please sign in to comment.