Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 755 lines (492 sloc) 30.102 kB
0219c22 @groue v1.0.0
authored
1 GRMustache Release Notes
2 ========================
3
af03738 @groue Typo
authored
4 You can compare the performances of GRMustache versions at https://github.com/groue/GRMustacheBenchmark.
9b3ce86 @groue Link to benchmarks
authored
5
a3a88b4 @groue v4.3.0
authored
6
7924382 @groue v5.0.0
authored
7 ## v5.0.0
8
9 **[Performance improvements](https://github.com/groue/GRMustacheBenchmark), and fix for flaws in the GRMustacheDelegate API.**
10
11 Besides the removal of already deprecated methods, the changes introduced in this version are very unlikely to introduce incompatibilities in your code:
12
13 - Dropped support for iOS3.
14 - Before v5.0.0, [template delegates](Guides/delegate.md) could know that the value `Arthur` was provided by the key `name` when the tag `{{name}}` is rendered. Delegates are now only provided with the value.
15 - Before v5.0.0, a tag containing a filter expression like `{{uppercase(name)}}` would have a template delegate invoked with the raw `Arthur` value, not the filter result: `ARTHUR`. In v5.0.0, delegate callbacks are given always given the value GRMustache is about to render.
16
17 Removed APIs:
18
19 ```objc
20 @interface GRMustacheInvocation : NSObject
21 // Removed without deprecation warning
22 @property (nonatomic, readonly) NSString *key;
23 @end
24
25 @interface GRMustacheSection: NSObject
26 // Deprecated in v4.3.0
27 @property (nonatomic, retain, readonly) id renderingContext;
28 @end
29
30 @interface GRMustacheTemplate: NSObject
31 // Deprecated in v4.3.0
32 - (NSString *)renderObjects:(id)object, ...;
33 @end
34
35 // Removed without deprecation warning
36 GRMustacheInterpretationFilterArgument // was part of the GRMustacheInterpretation enum.
37
38 @protocol GRMustacheTemplateDelegate<NSObject>
39 // Deprecated in v4.1.0
40 - (void)template:(GRMustacheTemplate *)template willRenderReturnValueOfInvocation:(GRMustacheInvocation *)invocation;
41 - (void)template:(GRMustacheTemplate *)template didRenderReturnValueOfInvocation:(GRMustacheInvocation *)invocation;
42 @end
43 ```
44
45
2dd7d26 @groue v4.3.4
authored
46 ## v4.3.4
47
48 Restored compatibility with iOS3 and OSX6 (thanks [@Bertrand](https://github.com/Bertrand)).
49
50
1978e57 @groue v4.3.3
authored
51 ## v4.3.3
52
53 Fix a memory leak.
54
55
c3a28fb @groue v4.3.2
authored
56 ## v4.3.2
57
58 Bugfix: Avoid the default `valueForKey:` implementation of Fundation collection classes like NSArray, NSSet and NSOrderedSet, which would return another collection. Fixes [issue #21](https://github.com/groue/GRMustache/issues/21).
59
60
c4e98e6 @groue v4.3.1
authored
61 ## v4.3.1
62
63 Bugfix: this release restores the delegate callbacks while rendering alternate template strings in [helpers](Guides/helpers.md).
64
65
66 ## v4.3.0
a3a88b4 @groue v4.3.0
authored
67
c4e98e6 @groue v4.3.1
authored
68 ### Filters
a3a88b4 @groue v4.3.0
authored
69
c4e98e6 @groue v4.3.1
authored
70 [Filters](Guides/filters.md) allow you to process values before they are rendered, and supersede "section delegates" as the preferred way to filter values. The [number formatting](Guides/sample_code/number_formatting.md) and [array indexes.md](Guides/sample_code/indexes.md) sample codes have been updated accordingly.
a3a88b4 @groue v4.3.0
authored
71
72 **New APIs**:
73
3c86134 @groue Typo
authored
74 ```objc
a3a88b4 @groue v4.3.0
authored
75 @interface GRMustacheSection: NSObject
76 - (NSString *)renderTemplateString:(NSString *)string error:(NSError **)outError;
77 @end
78
79 @interface GRMustacheTemplate: NSObject
80 + (NSString *)renderObject:(id)object withFilters:(id)filters fromString:(NSString *)templateString error:(NSError **)outError;
81 + (NSString *)renderObject:(id)object withFilters:(id)filters fromContentsOfFile:(NSString *)path error:(NSError **)outError;
82 + (NSString *)renderObject:(id)object withFilters:(id)filters fromContentsOfURL:(NSURL *)url error:(NSError **)outError;
83 + (NSString *)renderObject:(id)object withFilters:(id)filters fromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)outError;
84 + (NSString *)renderObject:(id)object withFilters:(id)filters fromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle error:(NSError **)outError;
85 - (NSString *)renderObject:(id)object withFilters:(id)filters;
86 - (NSString *)renderObjectsInArray:(NSArray *)objects;
87 - (NSString *)renderObjectsInArray:(NSArray *)objects withFilters:(id)filters;
88 @end
89 ```
90
91 **Deprecated APIs**:
92
3c86134 @groue Typo
authored
93 ```objc
a3a88b4 @groue v4.3.0
authored
94 @interface GRMustacheSection: NSObject
95 // Use renderTemplateString:error: instead.
96 @property (nonatomic, retain, readonly) id renderingContext;
97 @end
98
99 @interface GRMustacheTemplate: NSObject
100 // Use renderObjectsInArray: instead.
101 - (NSString *)renderObjects:(id)object, ...;
102 @end
103 ```
104
6e51540 @groue 4.2.0
authored
105 ## v4.2.0
106
c4e98e6 @groue v4.3.1
authored
107 ### Section delegates
6e51540 @groue 4.2.0
authored
108
109 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.
110
111 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.
112
cd7ec36 @groue Fix internal documentation link
authored
113 Section delegates are used in the [number formatting sample code](Guides/sample_code/number_formatting.md), where the NSNumberFormatter class is given the opportunity to render formatted numbers.
6e51540 @groue 4.2.0
authored
114
b775400 @groue v4.1.1 release notes
authored
115 ## v4.1.1
116
c4e98e6 @groue v4.3.1
authored
117 ### Total inline documentation
b775400 @groue v4.1.1 release notes
authored
118
119 Headers contain documentation for every exposed API.
120
121 An online reference, automatically generated from inline documentation by appledoc can be read at http://groue.github.com/GRMustache/Reference/.
122
459f57b @groue v4.1.0
authored
123 ## v4.1.0
124
125 ### GRMustacheDelegate protocol
126
127 A template's delegate is now able to know how a value will be interpreted by GRMustache.
128
129 New APIs:
130
131 ```objc
132 typedef enum {
133 GRMustacheInterpretationSection,
134 GRMustacheInterpretationVariable,
135 } GRMustacheInterpretation;
136
137 @protocol GRMustacheTemplateDelegate<NSObject>
138 - (void)template:(GRMustacheTemplate *)template willInterpretReturnValueOfInvocation:(GRMustacheInvocation *)invocation as:(GRMustacheInterpretation)interpretation;
139 - (void)template:(GRMustacheTemplate *)template didInterpretReturnValueOfInvocation:(GRMustacheInvocation *)invocation as:(GRMustacheInterpretation)interpretation;
140 @end
141 ```
142
143 Deprecated APIs:
144
145 ```objc
146 @protocol GRMustacheTemplateDelegate<NSObject>
147 - (void)template:(GRMustacheTemplate *)template willRenderReturnValueOfInvocation:(GRMustacheInvocation *)invocation;
148 - (void)template:(GRMustacheTemplate *)template didRenderReturnValueOfInvocation:(GRMustacheInvocation *)invocation;
149 @end
150 ```
151
fdcf398 @groue RELEASE_NOTES provides links to documentation of classes changed in v…
authored
152 GRMustacheDelegate is documented in [Guides/delegate.md](Guides/delegate.md).
459f57b @groue v4.1.0
authored
153
154 ### GRMustacheTemplateRepositoryDataSource protocol
155
156 The return type of `-[GRMustacheTemplateRepositoryDataSource templateRepository:templateIDForName:relativeToTemplateID:]` as changed from `id` to `id<NSCopying>`.
157
fdcf398 @groue RELEASE_NOTES provides links to documentation of classes changed in v…
authored
158 GRMustacheTemplateRepositoryDataSource is documented in [Guides/template_repositories.md](Guides/template_repositories.md).
159
459f57b @groue v4.1.0
authored
160 ### Errors
161
162 GRMustache used to output badly formatted errors. They are now easier to read.
163
6337526 @groue v4.0.0
authored
164 ## v4.0.0
165
c4e98e6 @groue v4.3.1
authored
166 ### Zero numbers are false
6337526 @groue v4.0.0
authored
167
168 GRMustache now considers all `NSNumber` instances whose `boolValue` is `NO` as false, when considering whether a section should render or not.
169
170 Previously, GRMustache used to consider only `[NSNumber numberWithBool:NO]` as false.
171
579209c @groue RELEASE_NOTES.md wording
authored
172 This change lets you extend the mustache language with proxy objects (objects that implement language extensions, and forward other keys to some other object) in GRMustache rendering.
6337526 @groue v4.0.0
authored
173
813e689 @groue Fix RELEASE_NOTES.md link
authored
174 See [Guides/sample_code/indexes.md](Guides/sample_code/indexes.md) for a discussion on proxy objects.
6337526 @groue v4.0.0
authored
175
c4e98e6 @groue v4.3.1
authored
176 ### Total NSUndefinedException swallowing
6337526 @groue v4.0.0
authored
177
178 Whenever GRMustache performs some key lookup and `valueForKey:` raises a NSUndefinedException, GRMustache swallows it and keep on looking for the key up the context stack.
179
180 Previously, GRMustache used to swallow only exceptions that explicitely came from the inquired object, and for the inquired key.
181
579209c @groue RELEASE_NOTES.md wording
authored
182 This change lets you extend the mustache language with proxy objects (objects that implement language extensions, and forward other keys to some other object) in GRMustache rendering.
6337526 @groue v4.0.0
authored
183
813e689 @groue Fix RELEASE_NOTES.md link
authored
184 See [Guides/sample_code/indexes.md](Guides/sample_code/indexes.md) for a discussion on proxy objects.
6337526 @groue v4.0.0
authored
185
c4e98e6 @groue v4.3.1
authored
186 ### Support for `.name` keys
6337526 @groue v4.0.0
authored
187
65e9823 @groue Document the "context stack" expression
authored
188 Keys prefixed by a dot prevent GRMustache to look up the [context stack](Guides/runtime/context_stack.md).
6337526 @groue v4.0.0
authored
189
190 Beware this feature is not in the mustache specification. If your goal is to design templates that remain compatible with [other Mustache implementations](https://github.com/defunkt/mustache/wiki/Other-Mustache-implementations), don't use this syntax.
191
579209c @groue RELEASE_NOTES.md wording
authored
192 See [issue #19](https://github.com/groue/GRMustache/issues/19) and https://github.com/mustache/spec/issues/10.
6337526 @groue v4.0.0
authored
193
6c31018 @groue v3.0.1
authored
194 ## v3.0.1
195
196 Restored intended architectures: armv6+armv7+i386 for libGRMustache3-iOS, i386+x86_64 for libGRMustache3-MacOS.
197
eb5cff8 @groue v3.0.0
authored
198 ## v3.0.0
199
c4e98e6 @groue v4.3.1
authored
200 ### There is no option
eb5cff8 @groue v3.0.0
authored
201
202 Removed APIs:
203
204 ```objc
205 enum {
206 GRMustacheTemplateOptionNone,
207 GRMustacheTemplateOptionStrictBoolean
208 };
209
210 typedef NSUInteger GRMustacheTemplateOptions;
211
212 @interface GRMustacheTemplate: NSObject {
213 + (id)templateFromString:(NSString *)templateString options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
214 + (id)templateFromContentsOfFile:(NSString *)path options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
215 + (id)templateFromContentsOfURL:(NSURL *)url options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
216 + (id)templateFromResource:(NSString *)name bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
217 + (id)templateFromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
218 + (NSString *)renderObject:(id)object fromString:(NSString *)templateString options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
219 + (NSString *)renderObject:(id)object fromContentsOfFile:(NSString *)path options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
220 + (NSString *)renderObject:(id)object fromContentsOfURL:(NSURL *)url options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
221 + (NSString *)renderObject:(id)object fromResource:(NSString *)name bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
222 + (NSString *)renderObject:(id)object fromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
223 @end
224
225 @protocol GRMustacheTemplateRepositoryDataSource <NSObject>
226 + (id)templateRepositoryWithBaseURL:(NSURL *)URL options:(GRMustacheTemplateOptions)options;
227 + (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext options:(GRMustacheTemplateOptions)options;
228 + (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options;
229 + (id)templateRepositoryWithDirectory:(NSString *)path options:(GRMustacheTemplateOptions)options;
230 + (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext options:(GRMustacheTemplateOptions)options;
231 + (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options;
232 + (id)templateRepositoryWithBundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options;
233 + (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext options:(GRMustacheTemplateOptions)options;
234 + (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options;
235 + (id)templateRepositoryWithPartialsDictionary:(NSDictionary *)partialsDictionary options:(GRMustacheTemplateOptions)options;
236 + (id)templateRepositoryWithOptions:(GRMustacheTemplateOptions)options;
237 @end
238 ```
239
ed879f3 @groue v2.0.0
authored
240 ## v2.0.0
241
c4e98e6 @groue v4.3.1
authored
242 ### API simplification
ed879f3 @groue v2.0.0
authored
243
c4e98e6 @groue v4.3.1
authored
244 **New APIs**
1f91c52 @groue v2.0.0 RELEASE_NOTES
authored
245
246 ```objc
247 enum {
3e006cc @groue wording
authored
248 // New option for processing `BOOL` and `char` properties as numbers
1f91c52 @groue v2.0.0 RELEASE_NOTES
authored
249 GRMustacheTemplateOptionStrictBoolean = 1
250 }
251
252 @protocol GRMustacheHelper<NSObject>
253 @required
254 // New required method
255 - (NSString *)renderSection:(GRMustacheSection *)section;
256 @end
257
258 // New GRMustacheHelper class
259 @interface GRMustacheHelper: NSObject<GRMustacheHelper>
260 + (id)helperWithBlock:(NSString *(^)(GRMustacheSection* section))block;
261 @end
262
263 // New GRMustacheSection properties and methods
264 @interface GRMustacheSection: NSObject
265 @property (nonatomic, readonly) NSString *innerTemplateString;
266 @property (nonatomic, readonly) id renderingContext;
267 - (NSString *)render;
268 @end
269 ```
270
c4e98e6 @groue v4.3.1
authored
271 **Removed APIs and behaviors**
1f91c52 @groue v2.0.0 RELEASE_NOTES
authored
272
273 ```objc
274 enum {
275 // GRMustache is now compliant by default to the Mustache specification:
276 GRMustacheTemplateOptionMustacheSpecCompatibility = 1
277 }
278
279 // NSErrors with GRMustacheErrorDomain now store the line number in localizedDescription.
280 extern NSString* const GRMustacheErrorLine;
281
282 @interface GRMustache: NSObject
283 // This global state has been replaced by the GRMustacheTemplateOptionStrictBoolean option:
284 + (BOOL)strictBooleanMode:
285 + (void)setStrictBooleanMode:(BOOL)strictBooleanMode;
286 @end
287
288 @protocol GRMustacheHelper<NSObject>
289 @required
290 // Replaced by renderSection: method
291 - (NSString *)renderSection:(GRMustacheSection *)section withContext:(id)context;
292 @end
293
294 // Replaced by the GRMustacheHelper class:
295 @interface GRMustacheBlockHelper: NSObject<GRMustacheHelper> {
296 + (id)helperWithBlock:(NSString *(^)(GRMustacheSection* section, id context))block;
297 @end
298
299 @interface GRMustacheSection: NSObject
300 // Replaced by the innerTemplateString property
301 @property (nonatomic, readonly) NSString *templateString;
302 // See the new render method
303 - (NSString *)renderObject:(id)object;
304 - (NSString *)renderObjects:(id)object, ...;
305 @end
306 ```
307
8506da0 @groue Link to http://handlebarsjs.com/
authored
308 GRMustache1 used to parse and interpret [Handlebars](http://handlebarsjs.com/) tags such as `{{../foo/bar}}`. GRMustache2 does no longer parse those tags.
1f91c52 @groue v2.0.0 RELEASE_NOTES
authored
309
310 GRMustache1 used to parse and interpret `this` identifier is tags such as `{{this.foo}}`. GRMustache2 does no longer parse the `this` identifier.
311
5672e6d @groue wording
authored
312 GRMustache1 used to look for implementations of the `localizeSection:inContext:` selector when rendering a `{{#localize}}...{{/localize}}` section. GRMustache2 relies on the GRMustacheHelper protocol only when rendering Mustache lambda sections.
1f91c52 @groue v2.0.0 RELEASE_NOTES
authored
313
314
7298c29 @groue v1.13.1
authored
315 ## v1.13.1
316
317 The deprecated class GRMustacheTemplateLoader was broken by 1.13.0. Deprecated does not mean unavailable: it is restored.
318
5e5ea55 @groue v1.13.0
authored
319 ## v1.13.0
320
321 Deprecated class (use [GRMustacheTemplateRepository templateRepositoryWithPartialsDictionary:], or the new GRMustacheTemplateRepositoryDataSource protocol instead):
322
323 - `GRMustacheTemplateLoader`
324
325 New class:
326
327 - `GRMustacheTemplateRepository`
328
329 ```objc
330 @interface GRMustacheTemplateRepository : NSObject
331 @property (nonatomic, assign) id<GRMustacheTemplateRepositoryDataSource> dataSource;
332
333 + (id)templateRepository;
334 + (id)templateRepositoryWithOptions:(GRMustacheTemplateOptions)options;
335
336 + (id)templateRepositoryWithBaseURL:(NSURL *)URL;
337 + (id)templateRepositoryWithBaseURL:(NSURL *)URL options:(GRMustacheTemplateOptions)options;
338 + (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext;
339 + (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext options:(GRMustacheTemplateOptions)options;
340 + (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext;
341 + (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding;
342 + (id)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options;
343
344 + (id)templateRepositoryWithDirectory:(NSString *)path;
345 + (id)templateRepositoryWithDirectory:(NSString *)path options:(GRMustacheTemplateOptions)options;
346 + (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext;
347 + (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext options:(GRMustacheTemplateOptions)options;
348 + (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding;
349 + (id)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options;
350
351 + (id)templateRepositoryWithBundle:(NSBundle *)bundle;
352 + (id)templateRepositoryWithBundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options;
353 + (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext;
354 + (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext options:(GRMustacheTemplateOptions)options;
355 + (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding;
356 + (id)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options;
357
358 + (id)templateRepositoryWithPartialsDictionary:(NSDictionary *)partialsDictionary;
359 + (id)templateRepositoryWithPartialsDictionary:(NSDictionary *)partialsDictionary options:(GRMustacheTemplateOptions)options;
360
361 - (GRMustacheTemplate *)templateForName:(NSString *)name error:(NSError **)outError;
362 - (GRMustacheTemplate *)templateFromString:(NSString *)templateString error:(NSError **)outError;
363 ```
364
365 New protocol:
366
367 - `GRMustacheTemplateRepositoryDataSource`
368
369 ```objc
370 @protocol GRMustacheTemplateRepositoryDataSource <NSObject>
371 @required
372 - (id)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateIDForName:(NSString *)name relativeToTemplateID:(id)templateID;
373 - (NSString *)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateStringForTemplateID:(id)templateID error:(NSError **)outError;
374 @end
375 ```
376
6e1642d @groue v1.12.2
authored
377 ## v1.12.2
378
887bcdb @groue RELEASE_NOTES: remove undue notifications of performance improvements
authored
379 Restore parsing performances of v1.12.0
6e1642d @groue v1.12.2
authored
380
71638db @groue v1.12.1
authored
381 ## v1.12.1
382
383 Easier template debugging with `[GRMustacheInvocation description]`
384
299d3b1 @groue v1.12.0
authored
385 ## v1.12
386
387 - **GRMustacheTemplateDelegate protocol**
388
389 Deprecated classes:
390
391 - `GRMustacheNumberFormatterHelper`
392 - `GRMustacheDateFormatterHelper`
393
d3b5626 @groue v1.11.2
authored
394 ## v1.11.2
395
2cfb609 @groue wording
authored
396 BOOL property custom getters can be used to control boolean sections.
d3b5626 @groue v1.11.2
authored
397
5d95cad @groue v1.11.1
authored
398 ## v1.11.1
399
400 Avoid deprecation warning in GRMustache headers.
401
92c07e2 @groue v1.11.0
authored
402 ## v1.11
403
404 **API cleanup**
405
406 New GRMustacheTemplateLoader methods:
407
5e5ea55 @groue v1.13.0
authored
408 ```objc
409 - (GRMustacheTemplate *)templateWithName:(NSString *)name error:(NSError **)outError;
410 - (GRMustacheTemplate *)templateFromString:(NSString *)templateString error:(NSError **)outError;
411 ```
92c07e2 @groue v1.11.0
authored
412
413 New GRMustacheTemplate methods:
414
5e5ea55 @groue v1.13.0
authored
415 ```objc
416 + (id)templateFromString:(NSString *)templateString error:(NSError **)outError;
417 + (id)templateFromString:(NSString *)templateString options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
418 + (id)templateFromContentsOfFile:(NSString *)path error:(NSError **)outError;
419 + (id)templateFromContentsOfFile:(NSString *)path options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
420 + (id)templateFromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)outError;
421 + (id)templateFromResource:(NSString *)name bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
422 + (id)templateFromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle error:(NSError **)outError;
423 + (id)templateFromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
424 + (id)templateFromContentsOfURL:(NSURL *)url error:(NSError **)outError;
425 + (id)templateFromContentsOfURL:(NSURL *)url options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
426 ```
92c07e2 @groue v1.11.0
authored
427
428 Deprecated GRMustacheTemplateLoader methods (use `templateWithName:error:` and `templateFromString:error:` instead):
429
5e5ea55 @groue v1.13.0
authored
430 ```objc
431 - (GRMustacheTemplate *)parseTemplateNamed:(NSString *)name error:(NSError **)outError;
432 - (GRMustacheTemplate *)parseString:(NSString *)templateString error:(NSError **)outError;
433 ```
92c07e2 @groue v1.11.0
authored
434
435 Deprecated GRMustacheTemplate methods (replace `parse` with `templateFrom`):
436
5e5ea55 @groue v1.13.0
authored
437 ```objc
438 + (id)parseString:(NSString *)templateString error:(NSError **)outError;
439 + (id)parseString:(NSString *)templateString options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
440 + (id)parseContentsOfFile:(NSString *)path error:(NSError **)outError;
441 + (id)parseContentsOfFile:(NSString *)path options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
442 + (id)parseResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)outError;
443 + (id)parseResource:(NSString *)name bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
444 + (id)parseResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle error:(NSError **)outError;
445 + (id)parseResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
446 + (id)parseContentsOfURL:(NSURL *)url error:(NSError **)outError;
447 + (id)parseContentsOfURL:(NSURL *)url options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
448 ```
92c07e2 @groue v1.11.0
authored
449
d5730e5 @groue v1.10.3
authored
450 ## v1.10.3
451
452 Upgrade GRMustache, and get deprecation warnings when you use deprecated APIs. Your code will keep on running fine, though.
453
75eae3b @groue v1.10.2
authored
454 ## v1.10.2
455
7924382 @groue v5.0.0
authored
456 **[Performance improvements](https://github.com/groue/GRMustacheBenchmark)**
75eae3b @groue v1.10.2
authored
457
745be05 @groue v1.10.1
authored
458 ## v1.10.1
459
7924382 @groue v5.0.0
authored
460 **[Performance improvements](https://github.com/groue/GRMustacheBenchmark)**
745be05 @groue v1.10.1
authored
461
31100d3 @groue v1.10.0
authored
462 ## v1.10
463
887bcdb @groue RELEASE_NOTES: remove undue notifications of performance improvements
authored
464 **Improved Handlebars.js support**
31100d3 @groue v1.10.0
authored
465
745be05 @groue v1.10.1
authored
466 Now `{{foo/bar}}` and `{{foo.bar}}` syntaxes are both supported.
31100d3 @groue v1.10.0
authored
467
8020800 @groue v1.9.0
authored
468 ## v1.9
469
3293103 @groue Introduce GRMustacheNumberFormatterHelper
authored
470 - **Better lambda encapsulation with classes conforming to the GRMustacheHelper protocol.**
471 - **Format all numbers in a section with GRMustacheNumberFormatterHelper**
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
472 - **Format all dates in a section with GRMustacheDateFormatterHelper**
8020800 @groue v1.9.0
authored
473
474 New protocol:
475
3293103 @groue Introduce GRMustacheNumberFormatterHelper
authored
476 - `GRMustacheHelper`
477
5e5ea55 @groue v1.13.0
authored
478 ```objc
479 @protocol GRMustacheHelper<NSObject>
480 @required
481 - (NSString *)renderSection:(GRMustacheSection *)section withContext:(id)context AVAILABLE_GRMUSTACHE_VERSION_1_9_AND_LATER;
482 @end
483 ```
484
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
485 New classes:
3293103 @groue Introduce GRMustacheNumberFormatterHelper
authored
486
487 - `GRMustacheNumberFormatterHelper`
f52da9d @groue README+RELEASE_NOTES for GRMustacheNumberFormatterHelper and GRMustac…
authored
488 - `GRMustacheDateFormatterHelper`
8020800 @groue v1.9.0
authored
489
5e5ea55 @groue v1.13.0
authored
490 ```objc
491 @interface GRMustacheNumberFormatterHelper : NSObject<GRMustacheHelper>
492 @property (nonatomic, readonly, retain) NSNumberFormatter *numberFormatter;
493 + (id)helperWithNumberFormatter:(NSNumberFormatter *)numberFormatter;
494 @end
495
496 @interface GRMustacheDateFormatterHelper : NSObject<GRMustacheHelper>
497 @property (nonatomic, readonly, retain) NSDateFormatter *dateFormatter;
498 + (id)helperWithDateFormatter:(NSDateFormatter *)dateFormatter;
499 @end
500 ```
501
8704042 @groue v1.8.6
authored
502 ## v1.8.6
503
504 Fixed bug in [GRMustacheTemplate renderObjects:...]
505
d209bef @groue v1.8.5
authored
506 ## v1.8.5
507
508 Added missing symbols from lib/libGRMustache1-ios3.a
509
edf6200 @groue v1.8.4
authored
510 ## v1.8.4
511
d209bef @groue v1.8.5
authored
512 Added missing symbols from lib/libGRMustache1-ios3.a and lib/libGRMustache1-ios4.a
edf6200 @groue v1.8.4
authored
513
6a23fe6 @groue v1.8.3
authored
514 ## v1.8.3
515
516 Availability fixes.
517
8abbac9 @groue v1.8.2
authored
518 ## v1.8.2
519
520 Better testing of public API thanks to availability macros.
521
b643aa1 @groue v1.8.1
authored
522 ## v1.8.1
523
524 Bug fixes
525
18dc85c @groue v1.8.0
authored
526 ## v1.8
527
8abbac9 @groue v1.8.2
authored
528 **GRMustache now supports the [Mustache specification v1.1.2](https://github.com/mustache/spec).**
529
530 New type and enum:
531
5e5ea55 @groue v1.13.0
authored
532 ```objc
533 enum {
534 GRMustacheTemplateOptionNone = 0,
535 GRMustacheTemplateOptionMustacheSpecCompatibility = 0x01,
536 };
8abbac9 @groue v1.8.2
authored
537
5e5ea55 @groue v1.13.0
authored
538 typedef NSUInteger GRMustacheTemplateOptions;
539 ```
8abbac9 @groue v1.8.2
authored
540
541 New GRMustache methods:
542
5e5ea55 @groue v1.13.0
authored
543 ```objc
544 + (GRMustacheTemplateOptions)defaultTemplateOptions;
545 + (void)setDefaultTemplateOptions:(GRMustacheTemplateOptions)templateOptions;
546 ```
8abbac9 @groue v1.8.2
authored
547
548 New GRMustacheTemplate methods:
549
5e5ea55 @groue v1.13.0
authored
550 ```objc
551 + (id)parseString:(NSString *)templateString options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
552 + (id)parseContentsOfURL:(NSURL *)url options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
553 + (id)parseContentsOfFile:(NSString *)path options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
554 + (id)parseResource:(NSString *)name bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
555 + (id)parseResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
556 + (NSString *)renderObject:(id)object fromString:(NSString *)templateString options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
557 + (NSString *)renderObject:(id)object fromContentsOfURL:(NSURL *)url options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
558 + (NSString *)renderObject:(id)object fromContentsOfFile:(NSString *)path options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
559 + (NSString *)renderObject:(id)object fromResource:(NSString *)name bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
560 + (NSString *)renderObject:(id)object fromResource:(NSString *)name withExtension:(NSString *)ext bundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options error:(NSError **)outError;
561 ```
8abbac9 @groue v1.8.2
authored
562
563 New GRMustacheTemplateLoader methods:
564
5e5ea55 @groue v1.13.0
authored
565 ```objc
566 + (id)templateLoaderWithBaseURL:(NSURL *)url options:(GRMustacheTemplateOptions)options;
567 + (id)templateLoaderWithBaseURL:(NSURL *)url extension:(NSString *)ext options:(GRMustacheTemplateOptions)options;
568 + (id)templateLoaderWithBaseURL:(NSURL *)url extension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options;
569 + (id)templateLoaderWithDirectory:(NSString *)path options:(GRMustacheTemplateOptions)options;
570 + (id)templateLoaderWithDirectory:(NSString *)path extension:(NSString *)ext options:(GRMustacheTemplateOptions)options;
571 + (id)templateLoaderWithDirectory:(NSString *)path extension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options;
572 + (id)templateLoaderWithBundle:(NSBundle *)bundle options:(GRMustacheTemplateOptions)options;
573 + (id)templateLoaderWithBundle:(NSBundle *)bundle extension:(NSString *)ext options:(GRMustacheTemplateOptions)options;
574 + (id)templateLoaderWithBundle:(NSBundle *)bundle extension:(NSString *)ext encoding:(NSStringEncoding)encoding options:(GRMustacheTemplateOptions)options;
575 ```
8abbac9 @groue v1.8.2
authored
576
18dc85c @groue v1.8.0
authored
577
d08841f @groue v1.7.4
authored
578 ## v1.7.4
579
580 Bug fix: avoid crashing when one provides uninitialized NSError* to GRMustache.
581
8059b38 @groue v1.7.3
authored
582 ## v1.7.3
583
584 One no longer needs to add `-all_load` to the "Other Linker Flags" target option tu use GRMustache static libraries.
585
6d6e020 @groue v1.7.2
authored
586 ## v1.7.2
587
588 - Fixed [issue #6](https://github.com/groue/GRMustache/issues/6)
589 - `[GRMustache preventNSUndefinedKeyExceptionAttack]` no longer prevents the rendering of `nil`.
590
cd4de9d @groue v1.7.1
authored
591 ## v1.7.1
592
593 Added missing header file
594
e5d100a @groue v1.7.0
authored
595 ## v1.7.0
596
597 **GRMustache now ships as a static library.**
598
599 See the [Embedding](https://github.com/groue/GRMustache/wiki/Embedding) wiki page in order to see how to embed GRMustache in your project.
600
601 Besides, the NSUndefinedKeyException silencing is no longer activated by the DEBUG macro. You now have to explicitely call the `[GRMustache preventNSUndefinedKeyExceptionAttack]` method. For more details, see the [Avoid the NSUndefinedKeyException attack](https://github.com/groue/GRMustache/wiki/Avoid-the-NSUndefinedKeyException-attack) wiki page.
602
4373916 @groue v1.6.2
authored
603 ## v1.6.2
604
605 **LLVM3 compatibility**
606
f19ba84 @groue v1.6.1
authored
607 ## v1.6.1
608
609 The NSUndefinedKeyException silencing activated by the DEBUG macro applies to NSManagedObject instances (see the [Avoid the NSUndefinedKeyException attack](https://github.com/groue/GRMustache/wiki/Avoid-the-NSUndefinedKeyException-attack) wiki page).
610
6b1dbf7 @groue v1.6.0
authored
611 ## v1.6.0
612
613 **Reduced memory footprint**
614
8abbac9 @groue v1.8.2
authored
615 New GRMustacheTemplateLoader methods:
6b1dbf7 @groue v1.6.0
authored
616
5e5ea55 @groue v1.13.0
authored
617 ```objc
618 + (id)templateLoaderWithDirectory:(NSString *)path;
619 + (id)templateLoaderWithDirectory:(NSString *)path extension:(NSString *)ext;
620 + (id)templateLoaderWithDirectory:(NSString *)path extension:(NSString *)ext encoding:(NSStringEncoding)encoding;
621 ```
6b1dbf7 @groue v1.6.0
authored
622
8abbac9 @groue v1.8.2
authored
623 Deprecated GRMustacheTemplateLoader methods (replace `BasePath` with `Directory`):
6b1dbf7 @groue v1.6.0
authored
624
5e5ea55 @groue v1.13.0
authored
625 ```objc
626 + (id)templateLoaderWithBasePath:(NSString *)path;
627 + (id)templateLoaderWithBasePath:(NSString *)path extension:(NSString *)ext;
628 + (id)templateLoaderWithBasePath:(NSString *)path extension:(NSString *)ext encoding:(NSStringEncoding)encoding;
629 ```
6b1dbf7 @groue v1.6.0
authored
630
631 Bug fixes around the NSUndefinedKeyException handling when the `DEBUG` macro is set (thanks to [Mike Ash](http://www.mikeash.com/)).
632
499face @groue v1.5.2
authored
633 ## v1.5.2
634
f19ba84 @groue v1.6.1
authored
635 The `DEBUG` macro makes GRMustache raise much less NSUndefinedKeyException (see the [Avoid the NSUndefinedKeyException attack](https://github.com/groue/GRMustache/wiki/Avoid-the-NSUndefinedKeyException-attack) wiki page).
499face @groue v1.5.2
authored
636
e0a103f @groue v1.5.1
authored
637 ## v1.5.1
638
4031037 @groue RELEASE_NOTES wording
authored
639 Bug fixes
e0a103f @groue v1.5.1
authored
640
3de3613 @groue v1.5.0
authored
641 ## v1.5.0
0915e91 @groue v1.4.1
authored
642
4031037 @groue RELEASE_NOTES wording
authored
643 **API simplification**
644
c5761e8 @groue RELEASE_NOTES wording
authored
645 New GRMustacheTemplate method:
646
647 - `- (NSString *)renderObjects:(id)object, ...;`
648
649 New GRMustacheSection method:
650
651 - `- (NSString *)renderObjects:(id)object, ...;`
652
653 New class:
654
655 - `GRMustacheBlockHelper`
656
657 Deprecated class (use `id` instead when refering to a context, and use `renderObjects:` methods instead of instanciating one):
658
659 - `GRMustacheContext`
660
661 Deprecated function (use GRMustacheBlockHelper instead):
662
663 - `id GRMustacheLambdaBlockMake(NSString *(^block)(GRMustacheSection*, GRMustacheContext*));`
0915e91 @groue v1.4.1
authored
664
a1f2cf1 @groue v1.4.0
authored
665 ## v1.4.0
666
4031037 @groue RELEASE_NOTES wording
authored
667 **iOS 3.0 support**
c5761e8 @groue RELEASE_NOTES wording
authored
668
669 New `GRMustacheTemplate` methods:
670
671 - `+ (NSString *)renderObject:(id)object fromContentsOfFile:(NSString *)path error:(NSError **)outError;`
672 - `+ (id)parseContentsOfFile:(NSString *)path error:(NSError **)outError;`
673
8abbac9 @groue v1.8.2
authored
674 New `GRMustacheTemplateLoader` methods:
c5761e8 @groue RELEASE_NOTES wording
authored
675
676 - `+ (id)templateLoaderWithBasePath:(NSString *)path;`
677 - `+ (id)templateLoaderWithBasePath:(NSString *)path extension:(NSString *)ext;`
678 - `+ (id)templateLoaderWithBasePath:(NSString *)path extension:(NSString *)ext encoding:(NSStringEncoding)encoding;`
a1f2cf1 @groue v1.4.0
authored
679
de489d5 @groue v1.3.3
authored
680 ## v1.3.3
681
4031037 @groue RELEASE_NOTES wording
authored
682 Bug fixes
de489d5 @groue v1.3.3
authored
683
be39647 @groue v1.3.2
authored
684 ## v1.3.2
685
4031037 @groue RELEASE_NOTES wording
authored
686 Bug fixes
be39647 @groue v1.3.2
authored
687
7f1e927 @groue v1.3.1
authored
688 ## v1.3.1
689
4031037 @groue RELEASE_NOTES wording
authored
690 Bug fixes
7f1e927 @groue v1.3.1
authored
691
b03eb3c @groue v1.3.0
authored
692 ## v1.3.0
693
4031037 @groue RELEASE_NOTES wording
authored
694 **Block-less API for helpers.**
b03eb3c @groue v1.3.0
authored
695
c5761e8 @groue RELEASE_NOTES wording
authored
696 New classes:
697
698 - `GRMustacheContext`
699 - `GRMustacheSection`
b03eb3c @groue v1.3.0
authored
700
c5761e8 @groue RELEASE_NOTES wording
authored
701 New functions:
a368aaf @groue v1.2.1
authored
702
c5761e8 @groue RELEASE_NOTES wording
authored
703 - `id GRMustacheLambdaBlockMake(NSString *(^block)(GRMustacheSection*, GRMustacheContext*));`
704
705 Deprecated functions (use GRMustacheLambdaBlockMake instead):
706
707 - `GRMustacheLambda GRMustacheLambdaMake(NSString *(^block)(NSString *(^)(id object), id, NSString *));`
a368aaf @groue v1.2.1
authored
708
c88c5c6 @groue v1.2.0
authored
709 ## v1.2.0
710
4031037 @groue RELEASE_NOTES wording
authored
711 **iOS 4.0 support**
c5761e8 @groue RELEASE_NOTES wording
authored
712
713 Deprecated class (use `[NSNumber numberWithBool:YES]` instead of `[GRYes yes]`):
714
715 - `GRYes`
716
717 Deprecated class (use `[NSNumber numberWithBool:NO]` instead of `[GRNo no]`):
718
719 - `GRNo`
c88c5c6 @groue v1.2.0
authored
720
16c756d @groue v1.1.6
authored
721 ## v1.1.6
722
c5761e8 @groue RELEASE_NOTES wording
authored
723 GRMustacheTemplateLoader subclasses can now rely on an immutable `extension` property.
16c756d @groue v1.1.6
authored
724
0805e50 @groue v1.1.5
authored
725 ## v1.1.5
726
4031037 @groue RELEASE_NOTES wording
authored
727 Bug fixes
0805e50 @groue v1.1.5
authored
728
8e257be @groue v1.1.4
authored
729 ## v1.1.4
730
4031037 @groue RELEASE_NOTES wording
authored
731 Bug fixes
8e257be @groue v1.1.4
authored
732
3f89a0b @groue v1.1.3
authored
733 ## v1.1.3
734
4031037 @groue RELEASE_NOTES wording
authored
735 **Rendering performance improvement**
3f89a0b @groue v1.1.3
authored
736
8dbe23f @groue v1.1.2
authored
737 ## v1.1.2
738
887bcdb @groue RELEASE_NOTES: remove undue notifications of performance improvements
authored
739 **Parsing performance improvement**
8dbe23f @groue v1.1.2
authored
740
161c96c @groue v1.1.1
authored
741 ## v1.1.1
742
4031037 @groue RELEASE_NOTES wording
authored
743 Bug fixes
161c96c @groue v1.1.1
authored
744
6ede60b @groue v1.1.0
authored
745 ## v1.1.0
0219c22 @groue v1.0.0
authored
746
c5761e8 @groue RELEASE_NOTES wording
authored
747 New methods:
748
749 - `[GRYes yes]` responds to `boolValue`
750 - `[GRNo no]` responds to `boolValue`
6ede60b @groue v1.1.0
authored
751
752 ## v1.0.0
753
4031037 @groue RELEASE_NOTES wording
authored
754 **First versioned release**
Something went wrong with that request. Please try again.