Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed Nov 12, 2010
1 parent 087a78c commit 0219c22
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Classes/GRMustache.h
Expand Up @@ -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"
43 changes: 43 additions & 0 deletions Classes/GRMustacheVersion.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
34 changes: 34 additions & 0 deletions Classes/GRMustacheVersion.m
@@ -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
6 changes: 6 additions & 0 deletions GRMustache.xcodeproj/project.pbxproj
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -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>"; };
Expand Down Expand Up @@ -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>";
Expand Down Expand Up @@ -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;
};
Expand Down
17 changes: 17 additions & 0 deletions README.md
Expand Up @@ -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
--------------

Expand Down
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
@@ -0,0 +1,6 @@
GRMustache Release Notes
========================

- **v1.0.0**

First versioned release

0 comments on commit 0219c22

Please sign in to comment.