Skip to content

HTTPS clone URL

Subversion checkout URL

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