Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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