diff --git a/.gitignore b/.gitignore index 938e5b83..c2ba4145 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,78 @@ -DoxygenDocs.docset -# xcode -build/* +## https://github.com/github/gitignore/blob/master/Global/OSX.gitignore + +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +## https://github.com/github/gitignore/blob/master/Global/Windows.gitignore + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +## https://github.com/github/gitignore/blob/master/Global/TextMate.gitignore + +*.tmproj +*.tmproject +tmtags + +## https://github.com/github/gitignore/blob/master/Global/Vim.gitignore + +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ +Session.vim +.netrwhist +*~ + +## https://github.com/github/gitignore/blob/master/Objective-C.gitignore + +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +# Build generated +build/ +DerivedData + +# Various settings *.pbxuser !default.pbxuser *.mode1v3 @@ -9,20 +81,19 @@ build/* !default.mode2v3 *.perspectivev3 !default.perspectivev3 -*.xcworkspace -!default.xcworkspace xcuserdata + +# Other +*.xccheckout *.moved-aside +*.xcuserstate +*.xcscmblueprint -# OS X -.DS_Store -.AppleDouble -.LSOverride -Icon +# Obj-C/Swift specific +*.hmap +*.ipa -# Thumbnails -._* -# Files that might appear on external disk -.Spotlight-V100 -.Trashes \ No newline at end of file +DemoApps/GRMustacheDemoOSX/Carthage +DemoApps/GRMustacheDemoOSX/Cartfile.resolved +GRMustacheTests/Carthage \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 5063bde4..8b8ad531 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ -[submodule "src/tests/vendor/mustache/spec"] - path = src/tests/vendor/mustache/spec +[submodule "GRMustacheTests/vendor/groue/GRMustacheSpec"] + path = GRMustacheTests/vendor/groue/GRMustacheSpec + url = https://github.com/groue/GRMustacheSpec.git +[submodule "GRMustacheTests/vendor/mustache/spec"] + path = GRMustacheTests/vendor/mustache/spec url = https://github.com/mustache/spec.git diff --git a/Articles/TheNatureOfLogicLessTemplates.md b/Articles/TheNatureOfLogicLessTemplates.md deleted file mode 100644 index 21bfd7bb..00000000 --- a/Articles/TheNatureOfLogicLessTemplates.md +++ /dev/null @@ -1,77 +0,0 @@ -# The nature of logicless templates - -[@pvande](https://github.com/pvande) [wonders](https://github.com/mustache/spec/wiki/%5BDiscussion%5D-Logic-Free-vs.-Non-Evaled) what is the difference between the "Logic Free" templates such as [Mustache](http://mustache.github.io) and the "Non-Evaled" templates like [Liquid](http://liquidmarkup.org). - -He enumerates different properties of both kinds of templates, and feels perplexed when wondering what are the fundamental properties he should be the guardian of, as the maintainer of the [Mustache Specification](http://github.com/mustache/spec). - -My opinion on the subject is that he has been misled by an artificial distinction created by names such as "Logic-Free" and "Non-Evaled", which are actual synonyms for "codeless". - -## "Get the code out of the view!" - -We have seen MVC emerging as a powerful pattern to code desktop, mobile and web applications. It became quickly clear that template engines were the weak link in this nice building. Most of them used to allow the coder to embed raw code right into his views. and raw code means any code, including code that should not lie in a view component. And while embedding code has more and more been considered as a quick and dirty practice, nothing would prevent the coder to do so, because the template engines were explicitely allowing it. - -For some people, allowing bad practices is the same as advocating it. The need for strict and clean template engine that totally forbid the coder to embed code in his view was now imperious. - -So came Mustache, Liquid, and others. All have this single common property: *they explicitely disallow embedding raw code*. Plus, add that those template engines are fundamentally language-agnostic (Mustache has achieved a [tremendous success](https://github.com/defunkt/mustache/wiki/Other-Mustache-implementations) here), and you know why those new template language have such a momentum these days. - -## Logic and evaluation? They're right under the carpet - -So, names. "Logic-Free". "Non-Evaled". - -Is the logic totally banned? Of course not: template engines still provide a syntax for controlling the rendering of templates. But the control is a consequence of the values that are computed, and provided by the template user. The actual controlling code is in *userland*. - -Is the evaluation totally banned? Of course not: template engines provide syntax for rendering values. But not all values can be rendered: only values that are available to the template, chosen by the template user. Those values come, again, from *userland*. - -There we are now: in codeless languages, the code (there is always code) has been sent out to userland. - - -## There is no other important property - -@pvande [enumerates](https://github.com/mustache/spec/wiki/%5BDiscussion%5D-Logic-Free-vs.-Non-Evaled) a few other properties for Liquid and Mustache. Let's see if they wouldn't be plain consequence of the fundamental "codeless" motto: - -- promotes "safe" templating (Liquid + Mustache) - -The idea is that a template can't crash the runtime it is rendered in. Since the library user can not run arbitrary code right from the template, this property looks like it is a direct consequence from the codelessness. - -Actually, a template engine that would define its own Turing-complete language and provide a robust virtual machine could be very safe as well. Think PHP, for instance. Unfortunately, this is very difficult, and the "safe templating" argument of codeless languages could be rewritten as "easily-implemented safety". Anyway, as long as code from userland is executed, I don't know which kind of safety we're discussing here: eventually "safe templating" means "safety is not my problem". The Liquid team is rather honest here, claiming safety from *template editors*, and not claiming anything about the code written by *developpers* that gets executed by the templates. - -- disallows execution of any code accessible from the data (Liquid) - -Yet Liquid allows execution of filters. Filters whose code lies in userland. Check. - -- permits execution of code accessible from the data stack (Mustache) - -Yes, Mustache "lambda sections" contain code. In userland. Check. - -- keeps executable code in a separate context (Liquid) - -Check. - -- allows basic literal types in templates as values (Liquid) -- encourages "procedural" templates and internal template state (e.g. via assign variables) (Liquid) -- discourages internal template state (Mustache) -has (should have?) no explicit order-dependency -- "declarative" templates (Mustache) - -It looks like the Liquid designers, generally, needed some expressivity. Yet these points are irrelevant to the "Non-Evaled" claim of Liquid and "Logic-Less" claim of Mustache: I can't see any relationship between those interesting properties and these nice expressions. - -So as the dedicated reader has noticed, "Logic Less" and "Non Evaled" are really just plain synonyms for "GTFCO", as Get The Filthy Code Out. - - -## The last @pvande's questions - -> Open questions: -> -> - Since Mustache has basic conditionals, what is the logic we're trying to avoid in templates? -> - Database access? -> - Data construction? -> - Data manipulation? -> - Arbitrary data manipulation? -> - Predefined data manipulation? -> - Do filters fit in that worldview? -> - Do parameterized filters fit in that worldview? -> - Do data literals fit in that worldview? -> - Are there other significant differences between Logic-Free and Non-Evaling templates? - -Keep relaxed. You're not trying to avoid anything. All the job has already been done when the code has been removed from the template. - -Now it's time to empower your users, and to give them the tools and the expressivity they need. diff --git a/Articles/WhyMustacheFilters.md b/Articles/WhyMustacheFilters.md deleted file mode 100644 index 001cb806..00000000 --- a/Articles/WhyMustacheFilters.md +++ /dev/null @@ -1,205 +0,0 @@ -# Mustache support for "Filters" - -Here are a few arguments for the introduction of "filters" in Mustache, and a description of what they should be, as a contribution to the [open discussion](http://github.com/mustache/spec/issues/41) on the mustache/spec repository. - -GRMustache provides an implementation of [filters](../Guides/filters.md) that fully cover all the points described here. - -1. Why filters are good for Mustache -2. Why Mustache tags should contain expressions, not statements -3. Parsing GRMustache expressions -4. The details - -## 1. Why filters are good for Mustache - -### History of user-provided code: lambdas - -Mustache users today have a single way to have their own code executed while rendering a template: "Mustache lambdas". - -Lambdas operate at the *template canvas* level: they can alter raw portions of a template, insert and process raw text, add and remove mustache tags, and their output is then processed by the Mustache engine which renders it. - -One can for instance write a lambda that turns `{{#link}}{{name}}{{/link}}` into `{{name}}`, which is later rendered as `blah`. - -However, lambdas do not have access to the *view model* level. They can not, for instance, render the uppercase version of a value. - -> Precisely: should a lambda evaluate the inner rendering of a section, turn it into uppercase, and provide the result to the Mustache engine, there is the possibility that the view model data would contain mustache tags that would be then processed by the Mustache engine. An application user could "attack" the rendering engine by setting his name to `{{pwned}}`, for instance. - -### The consequences of a drastic interpretation of "logiclessness" - -The inability for library user's to provide code that operates on the view model level has until now be considered positive and "pure", because of the "logiclessness" of Mustache. Yes, there is no logic code in the template itself, no "if", no "while", no operators, etc. Actually, there is no code at all in a Mustache template. - -However, the interpretation of "logiclessness" becomes uselessly drastic, and painful to the library user when the view model is made 100% responsible for the rendering of value tags and the control of section tags. The problem arises at the the *view model preparation phase*, when the library user has to prepare all the values that will be interpreted by the Mustache engine. The preparation phase becomes a chore when the user has to process many values in the same way. - -For instance, a model may hold a dozen named numerical values, that should be rendered in a formatted way. It thus has to be turned into a view model holding a dozen named formatted values, with the necessity of duplicated code. I, as a Mustache implementor, have received many feature requests on this topic. There is more evidence that this is a recurrent issue with Mustache at: [mustache/spec/issues/41](https://github.com/mustache/spec/issues/41) and [bobthecow/mustache.php/pull/102](https://github.com/bobthecow/mustache.php/pull/102). - -Another common chore is preparing the input in order to test if a collection is empty or not. See [mustache/spec/issues/23](https://github.com/mustache/spec/pull/23), and [defunkt/mustache/issues/4](https://github.com/defunkt/mustache/issues/4). - -Another chore is processing model arrays so that the view model contains arrays whose items know about their index in the array. Again, if many model arrays should be processed this way, we again have a duplicated code problem. Evidence can be found at [janl/mustache.js/pull/205](https://github.com/janl/mustache.js/pull/205), [groue/GRMustache/issues/14](https://github.com/groue/GRMustache/issues/14), [groue/GRMustache/issues/18](https://github.com/groue/GRMustache/issues/18), and the language extension implemented by [samskivert/jmustache](https://github.com/samskivert/jmustache) and [christophercotton/GRMustache](https://github.com/christophercotton/GRMustache). - -Some would say: "use your language features, and dynamically add the needed properties to your objects". This argument is invalid for many reasons, and primarily because Mustache is a language-agnostic template language, and some host languages do not sport any dynamic features. - -Some readers might be interested by a [more general rebuttal of the drastic interpretation of Mustache "logiclessness"](TheNatureOfLogicLessTemplates.md). - -### Filters empower the library user, and Mustache itself - -This is why Mustache should provide a way to let the library user provide code that processes the view model values before they enter the rendering engine, and express directly in the template how the view model values should be processed. - -These code chunks would be called *filters*, because they are functions that take a mustache-interpretable value as an input, and return an other mustache-interpretable value. In the template itself, tags would contain *filtered expressions* that would tell the rendering engine which filters should be applied to the raw view model values. - -Since the role of filters is to relieve view models from providing "final" values, filters do not conceptually belong to them. They instead belong the template: for instance, a template would provide a filter for rendering uppercase values. Now all the view models are relieved from the burden of computing those. Another template would provide a filter for rendering array indexes. View models would then provide raw arrays, and the template would be able to render item indexes. (For real examples, check [number formatting](../Guides/sample_code/number_formatting.md) and [indexes](../Guides/sample_code/indexes.md) sample code). - -Since filters belong to the templates, Mustache can provide a *standard library* of filters, that would be pre-baked into all Mustache templates. - -Since filters are not tied to the view model, they are *reusable*. - - -## 2. Why Mustache tags should contain expressions, not statements - -### Composition - -There are major differences between *expressions* and *statements*. Statements chain, one after the other, independently, and can not provide any value. Statements *perform* and return nothing. Expressions are a different kind of beast: by essence, they provide *values*, and can be *composed* from other expressions. - -Obviously, Mustache needs values: variable tags need a value that they can render, section tags need a value that they can test, loop, or make enter the context stack. Since only expressions provide with values, they are what Mustache need. - -Mustache already has two kinds of expressions: keys and key paths. `name` is a key. `person.name` is a key path. Both expressions evaluate in a different manner. The key expression looks in the context stack for an object that would provide the "name" key. The key path expression looks in the context stack for an object that would provide the "person" key, and then extract the "name" key right from this person. The latter behavior is called a "scoped lookup". - -Let filters enter, and turn them into expressions: - -Library users should be able to build filter expressions with other expressions. One should be able to filter `person.name` with the filter `uppercase`. - -Composition goes further: library users should be able to perform a "scoped" lookup out of a filtered expression. - -The latter point is important: there is no good reason to prevent the library user to perform a scoped lookup out of a filtered expression. - -### A syntax that fulfills those properties - -GRMustache implements filters with a good old function call syntax: `f(x)`. - -Just like `x`, `f(x)` is an expression that has a value. The GRMustache expression syntax let the user write `f(*)` and `*(x)` anywhere he can write `*`: - -- One can render `{{ f(x) }}` instead of `{{ x }}`. -- One can render `{{ f(x.y) }}` instead of `{{ x.y }}`. -- One can render `{{ f(g(x)) }}` instead of `{{ g(x) }}`. -- One can render `{{ f(x)(y) }}` instead of `{{ f(x) }}` (`f` is a meta-filter: a filter that returns a filter). - -This fits pretty well with the "scoped" Mustache expression: the regular Mustache syntax lets the user write `*.y` anywhere he can write `*`: - -- One can render `{{ x.y }}` instead of `{{ x }}`. -- One can render `{{ f(x).y }}` instead of `{{ f(x) }}`. -- One can render `{{ f.g(x) }}` instead of `{{ f(x) }}`. - -A contrieved user could write `{{a.b(c.d(e.f).g.h).i.j(k.l)}}`. Whether this is sane or not is not the business of a library that embraces userland code. - -Last point: white space is irrelevant. `f(x)` is the same as `f ( x )`. - -You'll find below a grammar and a state machine that implement the parsing of those expressions. - -### A syntax that does not fullfill those properties - -The only other syntax that I'm aware of is the one of bobthecow's [mustache.php](https://github.com/bobthecow/mustache.php/pull/102), which is not yet merged in the released branch of his library. - - {{ created_at | date.iso8601 }} - -Pipes have great ascendants (unix shell, Liquid filters), and this syntax sports a genuine relevance for its purpose. Pipable unix commands such as sort, uniq, etc. have a great deal in common with template filters. - -However, it fails on the composition part, since pipes build *statements*, not expressions. - -For example, how would pipes handle cases like `f(x).y` without the introduction of parenthesis in a fashion that is not common to pipes? - - {{ (x | f).y }} vs. {{ f(x).y }} - {{ (x | f).y | g }} vs. {{ g(f(x).y) }} - -More, how would pipes handle meta-filters like `f(x)(y)` ? - - {{ y | (x | f) }} vs. {{ f(x)(y) }} - -The `f(x)` notation has here an advantage, which is its pervasiveness if many widely adopted languages that also use the dot as a property accessor. - - -### Filters can't load from the "implicit iterator" - -We've said above that filters should not come from the view model provided by the user, but instead be tied to a template. This allows a template to provide filters as services, including a standard library of filters. - -As a consequence, the `.(x)` syntax is forbidden. In Mustache, `.` aka the "implicit iterator", represents the currently rendered object from the view model. It thus can not provide any filter. Identically, the `.a(x)` syntax is invalid as well (it would mean "perform a scoped lookup for `a` in the view model, and apply the result as a filter"). - - -## 3. Parsing GRMustache expressions - -Here is a state machine that describes GRMustache expressions. It reads one character -after the other, until it reaches the *VALID*, *EMPTY*, or *INVALID* state: - - # ID stands for "identifier character" - # WS stands for "white space character" - # EOF stands for "end of input" - # All non explicited transitions end up in the INVALID state. - -> parenthesisLevel=0, INITIAL - INITIAL -> WS -> INITIAL - INITIAL -> ID -> scopable=YES, IDENTIFIER - INITIAL -> '.' -> scopable=NO, LEADING_DOT - INITIAL && parenthesisLevel==0 -> EOF -> EMPTY - LEADING_DOT -> WS -> IDENTIFIER_DONE - LEADING_DOT -> ID -> IDENTIFIER - LEADING_DOT && parenthesisLevel>0 -> ')' -> --parenthesisLevel, FILTER_DONE - LEADING_DOT && parenthesisLevel==0 -> EOF -> VALID - IDENTIFIER -> WS -> IDENTIFIER_DONE - IDENTIFIER -> ID -> IDENTIFIER - IDENTIFIER -> '.' -> WAITING_FOR_IDENTIFIER - IDENTIFIER && scopable -> '(' -> ++parenthesisLevel, INITIAL - IDENTIFIER && parenthesisLevel>0 -> ')' -> --parenthesisLevel, FILTER_DONE - IDENTIFIER && parenthesisLevel==0 -> EOF -> VALID - WAITING_FOR_IDENTIFIER -> ID -> IDENTIFIER - IDENTIFIER_DONE -> WS -> IDENTIFIER_DONE - IDENTIFIER_DONE && scopable -> '(' -> ++parenthesisLevel, INITIAL - IDENTIFIER_DONE && parenthesisLevel==0 -> EOF -> VALID - FILTER_DONE -> WS -> FILTER_DONE - FILTER_DONE -> '.' -> WAITING_FOR_IDENTIFIER - FILTER_DONE -> '(' -> ++parenthesisLevel, INITIAL - FILTER_DONE && parenthesisLevel>0 -> ')' -> --parenthesisLevel, FILTER_DONE - FILTER_DONE && parenthesisLevel==0 -> EOF -> VALID - - -## 4. The details - -### Filtered variables, filtered sections - -Expressions as a way for the library user to build values that would be rendered by Mustache. Now those values are actually rendered by variable tags, or section tags. - -The only argument so far I've read against filtered sections is: "I see no compelling use case that need this feature". - -This argument fails for two reasons. First it only shows the lack of imagination of the one expressing it. Second, it artificially limits the empowerment of the library user, who deserves more respect. If Mustache allows the library user to inject code, there is no point nannying him and preventing him from injecting his code where he thinks it is relevant. This only makes Mustache painful to use, without any benefit for anybody. - -Here is a nice section filter, for the unimaginative ones: - -```js -with_index = function(array) { - for (i=0; i + + + + diff --git a/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/AppDelegate.h b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/AppDelegate.h new file mode 100644 index 00000000..9be8356f --- /dev/null +++ b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/AppDelegate.h @@ -0,0 +1,5 @@ +#import + +@interface AppDelegate : NSObject +@end + diff --git a/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/AppDelegate.m b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/AppDelegate.m new file mode 100644 index 00000000..9432fc57 --- /dev/null +++ b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/AppDelegate.m @@ -0,0 +1,4 @@ +#import "AppDelegate.h" + +@implementation AppDelegate +@end diff --git a/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Assets.xcassets/AppIcon.appiconset/Contents.json b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..2db2b1c7 --- /dev/null +++ b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Base.lproj/Main.storyboard b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Base.lproj/Main.storyboard new file mode 100644 index 00000000..bc7d55cf --- /dev/null +++ b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Base.lproj/Main.storyboard @@ -0,0 +1,919 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Info.plist b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Info.plist new file mode 100644 index 00000000..7254a8d1 --- /dev/null +++ b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2015 Gwendal Roué. All rights reserved. + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + + diff --git a/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Model.h b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Model.h new file mode 100644 index 00000000..d1105942 --- /dev/null +++ b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Model.h @@ -0,0 +1,6 @@ +#import + +@interface Model : NSObject +@property (nonatomic, copy) NSString *templateString; +@property (nonatomic, copy) NSString *JSONString; +@end diff --git a/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Model.m b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Model.m new file mode 100644 index 00000000..59b770db --- /dev/null +++ b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/Model.m @@ -0,0 +1,23 @@ +// +// Model.m +// GRMustacheDemoOSX +// +// Created by Gwendal Roué on 17/10/2015. +// Copyright © 2015 Gwendal Roué. All rights reserved. +// + +#import "Model.h" + +@implementation Model + +- (instancetype)init +{ + self = [super init]; + if (self) { + self.templateString = @"Hello {{ name }}!"; + self.JSONString = @"{\n \"name\": \"Arthur\"\n}"; + } + return self; +} + +@end diff --git a/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/ViewController.h b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/ViewController.h new file mode 100644 index 00000000..91281ddc --- /dev/null +++ b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/ViewController.h @@ -0,0 +1,7 @@ +#import + +@interface ViewController : NSViewController + + +@end + diff --git a/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/ViewController.m b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/ViewController.m new file mode 100644 index 00000000..9687698f --- /dev/null +++ b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/ViewController.m @@ -0,0 +1,83 @@ +// +// ViewController.m +// GRMustacheDemoOSX +// +// Created by Gwendal Roué on 17/10/2015. +// Copyright © 2015 Gwendal Roué. All rights reserved. +// + +@import GRMustache; +#import "ViewController.h" +#import "Model.h" + +@interface ViewController() +@property (nonatomic) IBOutlet NSTextView *templateTextView; +@property (nonatomic) IBOutlet NSTextView *JSONTextView; +@property (nonatomic) IBOutlet NSTextView *renderingTextView; +@property (nonatomic) IBOutlet Model *model; +@end + +@implementation ViewController + ++ (NSFont *)font +{ + static NSFont *font; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + font = [NSFont fontWithName:@"Menlo" size:12]; + }); + return font; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + for(NSTextView *textView in @[self.templateTextView, self.JSONTextView]) { + textView.automaticQuoteSubstitutionEnabled = YES; + textView.textStorage.font = [ViewController font]; + } +} + +- (IBAction)render:(id)sender +{ + NSError *error; + NSNumberFormatter *percentFormatter = nil; + NSData *JSONData = nil; + id JSONObject = nil; + NSString *rendering = nil; + + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:self.model.templateString error:&error]; + if (!template) { goto error; } + + percentFormatter = [[NSNumberFormatter alloc] init]; + percentFormatter.numberStyle = NSNumberFormatterPercentStyle; + [template extendBaseContextWithProtectedObject: + @{ @"percent": percentFormatter, + @"each": [GRMustache standardEach], + @"zip": [GRMustache standardZip], + @"localize": [[GRMustacheLocalizer alloc] init], + @"HTMLEscape": [GRMustache standardHTMLEscape], + @"URLEscape": [GRMustache standardURLEscape], + @"javascriptEscape": [GRMustache standardJavascriptEscape], + }]; + + JSONData = [self.model.JSONString dataUsingEncoding:NSUTF8StringEncoding]; + JSONObject = [NSJSONSerialization JSONObjectWithData:JSONData options:0 error:&error]; + if (!JSONObject) { goto error; } + + rendering = [template renderObject:JSONObject error:&error]; + if (!rendering) { goto error; } + [self presentRenderingString:rendering]; + return; + +error: + [self presentRenderingString:[NSString stringWithFormat:@"%@: %@", error.domain, error.localizedDescription]]; +} + +- (void)presentRenderingString:(NSString *)string +{ + self.renderingTextView.string = string; + self.renderingTextView.textStorage.font = [ViewController font]; +} + +@end diff --git a/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/main.m b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/main.m new file mode 100644 index 00000000..3c9ee98c --- /dev/null +++ b/DemoApps/GRMustacheDemoOSX/GRMustacheDemoOSX/main.m @@ -0,0 +1,13 @@ +// +// main.m +// GRMustacheDemoOSX +// +// Created by Gwendal Roué on 17/10/2015. +// Copyright © 2015 Gwendal Roué. All rights reserved. +// + +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS.xcodeproj/project.pbxproj b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS.xcodeproj/project.pbxproj new file mode 100644 index 00000000..06504c80 --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS.xcodeproj/project.pbxproj @@ -0,0 +1,449 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 566373AA1BD118AB00E1B35D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 566373A91BD118AB00E1B35D /* main.m */; }; + 566373AD1BD118AB00E1B35D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 566373AC1BD118AB00E1B35D /* AppDelegate.m */; }; + 566373B01BD118AB00E1B35D /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 566373AF1BD118AB00E1B35D /* ViewController.m */; }; + 566373B31BD118AB00E1B35D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 566373B11BD118AB00E1B35D /* Main.storyboard */; }; + 566373B51BD118AB00E1B35D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 566373B41BD118AB00E1B35D /* Assets.xcassets */; }; + 566373B81BD118AB00E1B35D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 566373B61BD118AB00E1B35D /* LaunchScreen.storyboard */; }; + 56A8FB461BD11AA40098CE03 /* layout.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56A8FB451BD11AA40098CE03 /* layout.mustache */; settings = {ASSET_TAGS = (); }; }; + 56A8FB4D1BD11AAD0098CE03 /* template.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56A8FB4C1BD11AAD0098CE03 /* template.mustache */; settings = {ASSET_TAGS = (); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 566373C81BD118DC00E1B35D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 566373BF1BD118DC00E1B35D /* GRMustache.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 56214B6F1BA1A34A0070C6CF; + remoteInfo = GRMustacheOSX; + }; + 566373CA1BD118DC00E1B35D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 566373BF1BD118DC00E1B35D /* GRMustache.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 56214B8A1BA1A4D50070C6CF; + remoteInfo = GRMustacheOSXTests; + }; + 566373CC1BD118DC00E1B35D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 566373BF1BD118DC00E1B35D /* GRMustache.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 56AC8C981BA1F637009E4319; + remoteInfo = GRMustacheOSXPrivateTests; + }; + 566373CE1BD118DC00E1B35D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 566373BF1BD118DC00E1B35D /* GRMustache.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 6586A05D1B9E2D720067C98E; + remoteInfo = GRMustacheiOS; + }; + 566373D01BD118DC00E1B35D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 566373BF1BD118DC00E1B35D /* GRMustache.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 56214B7B1BA1A4C50070C6CF; + remoteInfo = GRMustacheiOSTests; + }; + 566373D21BD118DC00E1B35D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 566373BF1BD118DC00E1B35D /* GRMustache.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 56DAC7681BB69F6D0010FE01; + remoteInfo = GRMustacheiOSPrivateTests; + }; + 566373D51BD119DF00E1B35D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 566373BF1BD118DC00E1B35D /* GRMustache.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 6586A05C1B9E2D720067C98E; + remoteInfo = GRMustacheiOS; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 566373A51BD118AB00E1B35D /* GRMustacheDemoiOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GRMustacheDemoiOS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 566373A91BD118AB00E1B35D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 566373AB1BD118AB00E1B35D /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 566373AC1BD118AB00E1B35D /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 566373AE1BD118AB00E1B35D /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 566373AF1BD118AB00E1B35D /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 566373B21BD118AB00E1B35D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 566373B41BD118AB00E1B35D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 566373B71BD118AB00E1B35D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 566373B91BD118AB00E1B35D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 566373BF1BD118DC00E1B35D /* GRMustache.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = GRMustache.xcodeproj; path = ../../../GRMustache.xcodeproj; sourceTree = ""; }; + 56A8FB451BD11AA40098CE03 /* layout.mustache */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = layout.mustache; sourceTree = ""; }; + 56A8FB4C1BD11AAD0098CE03 /* template.mustache */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = template.mustache; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 566373A21BD118AB00E1B35D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 5663739C1BD118AB00E1B35D = { + isa = PBXGroup; + children = ( + 566373A71BD118AB00E1B35D /* GRMustacheDemoiOS */, + 566373A61BD118AB00E1B35D /* Products */, + ); + sourceTree = ""; + }; + 566373A61BD118AB00E1B35D /* Products */ = { + isa = PBXGroup; + children = ( + 566373A51BD118AB00E1B35D /* GRMustacheDemoiOS.app */, + ); + name = Products; + sourceTree = ""; + }; + 566373A71BD118AB00E1B35D /* GRMustacheDemoiOS */ = { + isa = PBXGroup; + children = ( + 566373BF1BD118DC00E1B35D /* GRMustache.xcodeproj */, + 566373AB1BD118AB00E1B35D /* AppDelegate.h */, + 566373AC1BD118AB00E1B35D /* AppDelegate.m */, + 566373AE1BD118AB00E1B35D /* ViewController.h */, + 566373AF1BD118AB00E1B35D /* ViewController.m */, + 566373D41BD118E600E1B35D /* Resources */, + 566373A81BD118AB00E1B35D /* Supporting Files */, + ); + path = GRMustacheDemoiOS; + sourceTree = ""; + }; + 566373A81BD118AB00E1B35D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 566373B91BD118AB00E1B35D /* Info.plist */, + 566373A91BD118AB00E1B35D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 566373C01BD118DC00E1B35D /* Products */ = { + isa = PBXGroup; + children = ( + 566373C91BD118DC00E1B35D /* GRMustache.framework */, + 566373CB1BD118DC00E1B35D /* GRMustacheOSXTests.xctest */, + 566373CD1BD118DC00E1B35D /* GRMustacheOSXPrivateTests.xctest */, + 566373CF1BD118DC00E1B35D /* GRMustache.framework */, + 566373D11BD118DC00E1B35D /* GRMustacheiOSTests.xctest */, + 566373D31BD118DC00E1B35D /* GRMustacheiOSPrivateTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 566373D41BD118E600E1B35D /* Resources */ = { + isa = PBXGroup; + children = ( + 566373B11BD118AB00E1B35D /* Main.storyboard */, + 566373B41BD118AB00E1B35D /* Assets.xcassets */, + 566373B61BD118AB00E1B35D /* LaunchScreen.storyboard */, + 56A8FB451BD11AA40098CE03 /* layout.mustache */, + 56A8FB4C1BD11AAD0098CE03 /* template.mustache */, + ); + name = Resources; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 566373A41BD118AB00E1B35D /* GRMustacheDemoiOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 566373BC1BD118AB00E1B35D /* Build configuration list for PBXNativeTarget "GRMustacheDemoiOS" */; + buildPhases = ( + 566373A11BD118AB00E1B35D /* Sources */, + 566373A21BD118AB00E1B35D /* Frameworks */, + 566373A31BD118AB00E1B35D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 566373D61BD119DF00E1B35D /* PBXTargetDependency */, + ); + name = GRMustacheDemoiOS; + productName = GRMustacheDemoiOS; + productReference = 566373A51BD118AB00E1B35D /* GRMustacheDemoiOS.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 5663739D1BD118AB00E1B35D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0700; + ORGANIZATIONNAME = "Gwendal Roué"; + TargetAttributes = { + 566373A41BD118AB00E1B35D = { + CreatedOnToolsVersion = 7.0; + }; + }; + }; + buildConfigurationList = 566373A01BD118AB00E1B35D /* Build configuration list for PBXProject "GRMustacheDemoiOS" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 5663739C1BD118AB00E1B35D; + productRefGroup = 566373A61BD118AB00E1B35D /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 566373C01BD118DC00E1B35D /* Products */; + ProjectRef = 566373BF1BD118DC00E1B35D /* GRMustache.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 566373A41BD118AB00E1B35D /* GRMustacheDemoiOS */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 566373C91BD118DC00E1B35D /* GRMustache.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GRMustache.framework; + remoteRef = 566373C81BD118DC00E1B35D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 566373CB1BD118DC00E1B35D /* GRMustacheOSXTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GRMustacheOSXTests.xctest; + remoteRef = 566373CA1BD118DC00E1B35D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 566373CD1BD118DC00E1B35D /* GRMustacheOSXPrivateTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GRMustacheOSXPrivateTests.xctest; + remoteRef = 566373CC1BD118DC00E1B35D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 566373CF1BD118DC00E1B35D /* GRMustache.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = GRMustache.framework; + remoteRef = 566373CE1BD118DC00E1B35D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 566373D11BD118DC00E1B35D /* GRMustacheiOSTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GRMustacheiOSTests.xctest; + remoteRef = 566373D01BD118DC00E1B35D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 566373D31BD118DC00E1B35D /* GRMustacheiOSPrivateTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = GRMustacheiOSPrivateTests.xctest; + remoteRef = 566373D21BD118DC00E1B35D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 566373A31BD118AB00E1B35D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 566373B81BD118AB00E1B35D /* LaunchScreen.storyboard in Resources */, + 56A8FB461BD11AA40098CE03 /* layout.mustache in Resources */, + 56A8FB4D1BD11AAD0098CE03 /* template.mustache in Resources */, + 566373B51BD118AB00E1B35D /* Assets.xcassets in Resources */, + 566373B31BD118AB00E1B35D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 566373A11BD118AB00E1B35D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 566373B01BD118AB00E1B35D /* ViewController.m in Sources */, + 566373AD1BD118AB00E1B35D /* AppDelegate.m in Sources */, + 566373AA1BD118AB00E1B35D /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 566373D61BD119DF00E1B35D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = GRMustacheiOS; + targetProxy = 566373D51BD119DF00E1B35D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 566373B11BD118AB00E1B35D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 566373B21BD118AB00E1B35D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 566373B61BD118AB00E1B35D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 566373B71BD118AB00E1B35D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 566373BA1BD118AB00E1B35D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 566373BB1BD118AB00E1B35D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 566373BD1BD118AB00E1B35D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = GRMustacheDemoiOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustacheDemoiOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 566373BE1BD118AB00E1B35D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = GRMustacheDemoiOS/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustacheDemoiOS; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 566373A01BD118AB00E1B35D /* Build configuration list for PBXProject "GRMustacheDemoiOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 566373BA1BD118AB00E1B35D /* Debug */, + 566373BB1BD118AB00E1B35D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 566373BC1BD118AB00E1B35D /* Build configuration list for PBXNativeTarget "GRMustacheDemoiOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 566373BD1BD118AB00E1B35D /* Debug */, + 566373BE1BD118AB00E1B35D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 5663739D1BD118AB00E1B35D /* Project object */; +} diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..1b5961ff --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/AppDelegate.h b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/AppDelegate.h new file mode 100644 index 00000000..8ec7241c --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/AppDelegate.h @@ -0,0 +1,6 @@ +#import + +@interface AppDelegate : UIResponder +@property (strong, nonatomic) UIWindow *window; +@end + diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/AppDelegate.m b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/AppDelegate.m new file mode 100644 index 00000000..987cf0ad --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/AppDelegate.m @@ -0,0 +1,7 @@ +#import "AppDelegate.h" + +@interface AppDelegate () +@end + +@implementation AppDelegate +@end diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..118c98f7 --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/Base.lproj/LaunchScreen.storyboard b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..5acf25dc --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/Base.lproj/Main.storyboard b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/Base.lproj/Main.storyboard new file mode 100644 index 00000000..d399db69 --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/Base.lproj/Main.storyboard @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/Info.plist b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/Info.plist new file mode 100644 index 00000000..6905cc67 --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/ViewController.h b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/ViewController.h new file mode 100644 index 00000000..143825c2 --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/ViewController.h @@ -0,0 +1,5 @@ +#import + +@interface ViewController : UIViewController +@end + diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/ViewController.m b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/ViewController.m new file mode 100644 index 00000000..24dcb2a2 --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/ViewController.m @@ -0,0 +1,19 @@ +@import GRMustache; +#import "ViewController.h" + +@interface ViewController () +@property (nonatomic, weak) IBOutlet UIWebView *webView; +@end + +@implementation ViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + GRMustacheTemplate *template = [GRMustacheTemplate templateFromResource:@"template" bundle:nil error:NULL]; + NSString *HTML = [template renderObject:@{ @"title": @"Welcome", @"paragraph": @"GRMustache is a flexible and production-ready Mustache templates for MacOS Cocoa and iOS." } error:NULL]; + [self.webView loadHTMLString:HTML baseURL:nil]; +} + +@end diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/layout.mustache b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/layout.mustache new file mode 100644 index 00000000..ad79a41a --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/layout.mustache @@ -0,0 +1,6 @@ + + + +{{$content}}Default content{{/content}} + + diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/main.m b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/main.m new file mode 100644 index 00000000..18510f71 --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/main.m @@ -0,0 +1,16 @@ +// +// main.m +// GRMustacheDemoiOS +// +// Created by Gwendal Roué on 16/10/2015. +// Copyright © 2015 Gwendal Roué. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/template.mustache b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/template.mustache new file mode 100644 index 00000000..9b0a970a --- /dev/null +++ b/DemoApps/GRMustacheDemoiOS/GRMustacheDemoiOS/template.mustache @@ -0,0 +1,6 @@ +{{{{title}} +

{{paragraph}}

+{{/content}} +{{/layout}} diff --git a/Guides/NSFormatter.md b/Documentation/Guides/NSFormatter.md similarity index 100% rename from Guides/NSFormatter.md rename to Documentation/Guides/NSFormatter.md diff --git a/Guides/README.md b/Documentation/Guides/README.md similarity index 100% rename from Guides/README.md rename to Documentation/Guides/README.md diff --git a/Guides/compatibility.md b/Documentation/Guides/compatibility.md similarity index 100% rename from Guides/compatibility.md rename to Documentation/Guides/compatibility.md diff --git a/Guides/configuration.md b/Documentation/Guides/configuration.md similarity index 100% rename from Guides/configuration.md rename to Documentation/Guides/configuration.md diff --git a/Guides/delegate.md b/Documentation/Guides/delegate.md similarity index 100% rename from Guides/delegate.md rename to Documentation/Guides/delegate.md diff --git a/Guides/faq.md b/Documentation/Guides/faq.md similarity index 100% rename from Guides/faq.md rename to Documentation/Guides/faq.md diff --git a/Guides/filters.md b/Documentation/Guides/filters.md similarity index 100% rename from Guides/filters.md rename to Documentation/Guides/filters.md diff --git a/Guides/forking.md b/Documentation/Guides/forking.md similarity index 100% rename from Guides/forking.md rename to Documentation/Guides/forking.md diff --git a/Guides/html_vs_text.md b/Documentation/Guides/html_vs_text.md similarity index 100% rename from Guides/html_vs_text.md rename to Documentation/Guides/html_vs_text.md diff --git a/Guides/installation.md b/Documentation/Guides/installation.md similarity index 100% rename from Guides/installation.md rename to Documentation/Guides/installation.md diff --git a/Guides/introduction.md b/Documentation/Guides/introduction.md similarity index 100% rename from Guides/introduction.md rename to Documentation/Guides/introduction.md diff --git a/Guides/partials.md b/Documentation/Guides/partials.md similarity index 100% rename from Guides/partials.md rename to Documentation/Guides/partials.md diff --git a/Guides/rendering_objects.md b/Documentation/Guides/rendering_objects.md similarity index 100% rename from Guides/rendering_objects.md rename to Documentation/Guides/rendering_objects.md diff --git a/Guides/runtime.md b/Documentation/Guides/runtime.md similarity index 100% rename from Guides/runtime.md rename to Documentation/Guides/runtime.md diff --git a/Guides/security.md b/Documentation/Guides/security.md similarity index 100% rename from Guides/security.md rename to Documentation/Guides/security.md diff --git a/Guides/standard_library.md b/Documentation/Guides/standard_library.md similarity index 100% rename from Guides/standard_library.md rename to Documentation/Guides/standard_library.md diff --git a/Guides/template_inheritance.md b/Documentation/Guides/template_inheritance.md similarity index 100% rename from Guides/template_inheritance.md rename to Documentation/Guides/template_inheritance.md diff --git a/Guides/template_repositories.md b/Documentation/Guides/template_repositories.md similarity index 100% rename from Guides/template_repositories.md rename to Documentation/Guides/template_repositories.md diff --git a/Guides/templates.md b/Documentation/Guides/templates.md similarity index 100% rename from Guides/templates.md rename to Documentation/Guides/templates.md diff --git a/Guides/troubleshooting.md b/Documentation/Guides/troubleshooting.md similarity index 100% rename from Guides/troubleshooting.md rename to Documentation/Guides/troubleshooting.md diff --git a/Guides/upgrading.md b/Documentation/Guides/upgrading.md similarity index 100% rename from Guides/upgrading.md rename to Documentation/Guides/upgrading.md diff --git a/Guides/view_model.md b/Documentation/Guides/view_model.md similarity index 100% rename from Guides/view_model.md rename to Documentation/Guides/view_model.md diff --git a/Reference/html/Categories/NSFormatter+GRMustache.html b/Documentation/Reference/html/Categories/NSFormatter+GRMustache.html similarity index 100% rename from Reference/html/Categories/NSFormatter+GRMustache.html rename to Documentation/Reference/html/Categories/NSFormatter+GRMustache.html diff --git a/Reference/html/Categories/NSValueTransformer+GRMustache.html b/Documentation/Reference/html/Categories/NSValueTransformer+GRMustache.html similarity index 100% rename from Reference/html/Categories/NSValueTransformer+GRMustache.html rename to Documentation/Reference/html/Categories/NSValueTransformer+GRMustache.html diff --git a/Reference/html/Classes/GRMustache.html b/Documentation/Reference/html/Classes/GRMustache.html similarity index 100% rename from Reference/html/Classes/GRMustache.html rename to Documentation/Reference/html/Classes/GRMustache.html diff --git a/Reference/html/Classes/GRMustacheConfiguration.html b/Documentation/Reference/html/Classes/GRMustacheConfiguration.html similarity index 100% rename from Reference/html/Classes/GRMustacheConfiguration.html rename to Documentation/Reference/html/Classes/GRMustacheConfiguration.html diff --git a/Reference/html/Classes/GRMustacheContext.html b/Documentation/Reference/html/Classes/GRMustacheContext.html similarity index 100% rename from Reference/html/Classes/GRMustacheContext.html rename to Documentation/Reference/html/Classes/GRMustacheContext.html diff --git a/Reference/html/Classes/GRMustacheFilter.html b/Documentation/Reference/html/Classes/GRMustacheFilter.html similarity index 100% rename from Reference/html/Classes/GRMustacheFilter.html rename to Documentation/Reference/html/Classes/GRMustacheFilter.html diff --git a/Reference/html/Classes/GRMustacheLocalizer.html b/Documentation/Reference/html/Classes/GRMustacheLocalizer.html similarity index 100% rename from Reference/html/Classes/GRMustacheLocalizer.html rename to Documentation/Reference/html/Classes/GRMustacheLocalizer.html diff --git a/Reference/html/Classes/GRMustacheRendering.html b/Documentation/Reference/html/Classes/GRMustacheRendering.html similarity index 100% rename from Reference/html/Classes/GRMustacheRendering.html rename to Documentation/Reference/html/Classes/GRMustacheRendering.html diff --git a/Reference/html/Classes/GRMustacheTag.html b/Documentation/Reference/html/Classes/GRMustacheTag.html similarity index 100% rename from Reference/html/Classes/GRMustacheTag.html rename to Documentation/Reference/html/Classes/GRMustacheTag.html diff --git a/Reference/html/Classes/GRMustacheTemplate.html b/Documentation/Reference/html/Classes/GRMustacheTemplate.html similarity index 100% rename from Reference/html/Classes/GRMustacheTemplate.html rename to Documentation/Reference/html/Classes/GRMustacheTemplate.html diff --git a/Reference/html/Classes/GRMustacheTemplateRepository.html b/Documentation/Reference/html/Classes/GRMustacheTemplateRepository.html similarity index 100% rename from Reference/html/Classes/GRMustacheTemplateRepository.html rename to Documentation/Reference/html/Classes/GRMustacheTemplateRepository.html diff --git a/Reference/html/Constants/GRMustacheContentType.html b/Documentation/Reference/html/Constants/GRMustacheContentType.html similarity index 100% rename from Reference/html/Constants/GRMustacheContentType.html rename to Documentation/Reference/html/Constants/GRMustacheContentType.html diff --git a/Reference/html/Constants/GRMustacheErrorCode.html b/Documentation/Reference/html/Constants/GRMustacheErrorCode.html similarity index 100% rename from Reference/html/Constants/GRMustacheErrorCode.html rename to Documentation/Reference/html/Constants/GRMustacheErrorCode.html diff --git a/Reference/html/Constants/GRMustacheTagType.html b/Documentation/Reference/html/Constants/GRMustacheTagType.html similarity index 100% rename from Reference/html/Constants/GRMustacheTagType.html rename to Documentation/Reference/html/Constants/GRMustacheTagType.html diff --git a/Reference/html/Protocols/GRMustacheFilter.html b/Documentation/Reference/html/Protocols/GRMustacheFilter.html similarity index 100% rename from Reference/html/Protocols/GRMustacheFilter.html rename to Documentation/Reference/html/Protocols/GRMustacheFilter.html diff --git a/Reference/html/Protocols/GRMustacheRendering.html b/Documentation/Reference/html/Protocols/GRMustacheRendering.html similarity index 100% rename from Reference/html/Protocols/GRMustacheRendering.html rename to Documentation/Reference/html/Protocols/GRMustacheRendering.html diff --git a/Reference/html/Protocols/GRMustacheSafeKeyAccess.html b/Documentation/Reference/html/Protocols/GRMustacheSafeKeyAccess.html similarity index 100% rename from Reference/html/Protocols/GRMustacheSafeKeyAccess.html rename to Documentation/Reference/html/Protocols/GRMustacheSafeKeyAccess.html diff --git a/Reference/html/Protocols/GRMustacheTagDelegate.html b/Documentation/Reference/html/Protocols/GRMustacheTagDelegate.html similarity index 100% rename from Reference/html/Protocols/GRMustacheTagDelegate.html rename to Documentation/Reference/html/Protocols/GRMustacheTagDelegate.html diff --git a/Reference/html/Protocols/GRMustacheTemplateRepositoryDataSource.html b/Documentation/Reference/html/Protocols/GRMustacheTemplateRepositoryDataSource.html similarity index 100% rename from Reference/html/Protocols/GRMustacheTemplateRepositoryDataSource.html rename to Documentation/Reference/html/Protocols/GRMustacheTemplateRepositoryDataSource.html diff --git a/Reference/html/css/styles.css b/Documentation/Reference/html/css/styles.css similarity index 100% rename from Reference/html/css/styles.css rename to Documentation/Reference/html/css/styles.css diff --git a/Reference/html/css/stylesPrint.css b/Documentation/Reference/html/css/stylesPrint.css similarity index 100% rename from Reference/html/css/stylesPrint.css rename to Documentation/Reference/html/css/stylesPrint.css diff --git a/Reference/html/hierarchy.html b/Documentation/Reference/html/hierarchy.html similarity index 100% rename from Reference/html/hierarchy.html rename to Documentation/Reference/html/hierarchy.html diff --git a/Reference/html/img/button_bar_background.png b/Documentation/Reference/html/img/button_bar_background.png similarity index 100% rename from Reference/html/img/button_bar_background.png rename to Documentation/Reference/html/img/button_bar_background.png diff --git a/Reference/html/img/disclosure.png b/Documentation/Reference/html/img/disclosure.png similarity index 100% rename from Reference/html/img/disclosure.png rename to Documentation/Reference/html/img/disclosure.png diff --git a/Reference/html/img/disclosure_open.png b/Documentation/Reference/html/img/disclosure_open.png similarity index 100% rename from Reference/html/img/disclosure_open.png rename to Documentation/Reference/html/img/disclosure_open.png diff --git a/Reference/html/img/library_background.png b/Documentation/Reference/html/img/library_background.png similarity index 100% rename from Reference/html/img/library_background.png rename to Documentation/Reference/html/img/library_background.png diff --git a/Reference/html/img/title_background.png b/Documentation/Reference/html/img/title_background.png similarity index 100% rename from Reference/html/img/title_background.png rename to Documentation/Reference/html/img/title_background.png diff --git a/Reference/html/index.html b/Documentation/Reference/html/index.html similarity index 100% rename from Reference/html/index.html rename to Documentation/Reference/html/index.html diff --git a/GRMustache.podspec b/GRMustache.podspec index f5393957..d3afbc49 100644 --- a/GRMustache.podspec +++ b/GRMustache.podspec @@ -8,9 +8,8 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/groue/GRMustache.git', :tag => 'v7.3.2' } s.source_files = 'src/classes/**/*.{h,m}' s.private_header_files = 'src/classes/**/*_private.h' - s.ios.deployment_target = '4.3' - s.osx.deployment_target = '10.6' + s.ios.deployment_target = '8.0' + s.osx.deployment_target = '10.9' s.requires_arc = false s.framework = 'Foundation' - s.dependency 'JRSwizzle', '~> 1.0' end diff --git a/src/GRMustache.xcodeproj/project.pbxproj b/GRMustache.xcodeproj/project.pbxproj similarity index 54% rename from src/GRMustache.xcodeproj/project.pbxproj rename to GRMustache.xcodeproj/project.pbxproj index c331ebf6..205a002d 100644 --- a/src/GRMustache.xcodeproj/project.pbxproj +++ b/GRMustache.xcodeproj/project.pbxproj @@ -7,486 +7,483 @@ objects = { /* Begin PBXBuildFile section */ - 560CE8911526F672004F935E /* GRBooleanTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 560CE88E1526EEF4004F935E /* GRBooleanTest.m */; }; - 560CE8921526F673004F935E /* GRBooleanTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 560CE88E1526EEF4004F935E /* GRBooleanTest.m */; }; - 5623853A18CF365D0034D982 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5623853918CF365D0034D982 /* XCTest.framework */; }; - 5623853B18CF36660034D982 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5623853918CF365D0034D982 /* XCTest.framework */; }; - 5623B796152731B600DF16A6 /* GRMustacheParsingErrorsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5623B795152731B600DF16A6 /* GRMustacheParsingErrorsTest.m */; }; - 5623B797152731B600DF16A6 /* GRMustacheParsingErrorsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5623B795152731B600DF16A6 /* GRMustacheParsingErrorsTest.m */; }; - 563A5EA7163403C000E7E810 /* GRMustacheFoundationCollectionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563A5EA6163403C000E7E810 /* GRMustacheFoundationCollectionTest.m */; }; - 563A5EA8163403C000E7E810 /* GRMustacheFoundationCollectionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563A5EA6163403C000E7E810 /* GRMustacheFoundationCollectionTest.m */; }; - 563D66E91526497E008628C5 /* GRMustacheSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563D66E81526497E008628C5 /* GRMustacheSuitesTest.m */; }; - 563D66EA1526497E008628C5 /* GRMustacheSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563D66E81526497E008628C5 /* GRMustacheSuitesTest.m */; }; - 563D66EF152649DF008628C5 /* GRMustacheContextPrivateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563D66EC152649DF008628C5 /* GRMustacheContextPrivateTest.m */; }; - 563D66F0152649DF008628C5 /* GRMustacheContextPrivateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563D66EC152649DF008628C5 /* GRMustacheContextPrivateTest.m */; }; - 563D66F1152649DF008628C5 /* GRMustacheExpressionParserTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563D66EE152649DF008628C5 /* GRMustacheExpressionParserTest.m */; }; - 563D66F2152649DF008628C5 /* GRMustacheExpressionParserTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563D66EE152649DF008628C5 /* GRMustacheExpressionParserTest.m */; }; - 563D66F415264B40008628C5 /* GRMustacheSuites in Resources */ = {isa = PBXBuildFile; fileRef = 563D66F315264B40008628C5 /* GRMustacheSuites */; }; - 563D66F515264B40008628C5 /* GRMustacheSuites in Resources */ = {isa = PBXBuildFile; fileRef = 563D66F315264B40008628C5 /* GRMustacheSuites */; }; - 5648F1B718998BC5001F4B83 /* GRMustacheTemplateRepositoryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5648F1B618998BC5001F4B83 /* GRMustacheTemplateRepositoryTest.m */; }; - 5648F1B918998BC5001F4B83 /* GRMustacheTemplateRepositoryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5648F1B618998BC5001F4B83 /* GRMustacheTemplateRepositoryTest.m */; }; - 568140D9163659CC00310B7F /* GRMustacheRenderingObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140D7163659CB00310B7F /* GRMustacheRenderingObjectTest.m */; }; - 568140DA163659CC00310B7F /* GRMustacheRenderingObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140D7163659CB00310B7F /* GRMustacheRenderingObjectTest.m */; }; - 568140DE16365CF500310B7F /* GRMustacheTemplateRepositoryTest in Resources */ = {isa = PBXBuildFile; fileRef = 568140DD16365CF500310B7F /* GRMustacheTemplateRepositoryTest */; }; - 568140DF16365CF500310B7F /* GRMustacheTemplateRepositoryTest in Resources */ = {isa = PBXBuildFile; fileRef = 568140DD16365CF500310B7F /* GRMustacheTemplateRepositoryTest */; }; - 568140E216365D3000310B7F /* GRMustacheTemplateRepositoryWithBaseURLTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140E016365D3000310B7F /* GRMustacheTemplateRepositoryWithBaseURLTest.m */; }; - 568140E316365D3000310B7F /* GRMustacheTemplateRepositoryWithBaseURLTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140E016365D3000310B7F /* GRMustacheTemplateRepositoryWithBaseURLTest.m */; }; - 568140E416365D3000310B7F /* GRMustacheTemplateRepositoryWithDirectoryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140E116365D3000310B7F /* GRMustacheTemplateRepositoryWithDirectoryTest.m */; }; - 568140E516365D3000310B7F /* GRMustacheTemplateRepositoryWithDirectoryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140E116365D3000310B7F /* GRMustacheTemplateRepositoryWithDirectoryTest.m */; }; - 568140E816365D6100310B7F /* GRMustachePositionFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140E616365D6000310B7F /* GRMustachePositionFilterTest.m */; }; - 568140E916365D6100310B7F /* GRMustachePositionFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140E616365D6000310B7F /* GRMustachePositionFilterTest.m */; }; - 5682B46115282B8200ADD123 /* GRMustacheTemplateFromMethodsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B46015282B8200ADD123 /* GRMustacheTemplateFromMethodsTest.m */; }; - 5682B46215282B8200ADD123 /* GRMustacheTemplateFromMethodsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B46015282B8200ADD123 /* GRMustacheTemplateFromMethodsTest.m */; }; - 5682B46515282BCA00ADD123 /* GRMustacheTemplateFromMethodsTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B46415282BC900ADD123 /* GRMustacheTemplateFromMethodsTest.mustache */; }; - 5682B46615282BCA00ADD123 /* GRMustacheTemplateFromMethodsTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B46415282BC900ADD123 /* GRMustacheTemplateFromMethodsTest.mustache */; }; - 5682B4681528324800ADD123 /* GRMustacheTemplateFromMethodsTest.json in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4671528324800ADD123 /* GRMustacheTemplateFromMethodsTest.json */; }; - 5682B4691528324800ADD123 /* GRMustacheTemplateFromMethodsTest.json in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4671528324800ADD123 /* GRMustacheTemplateFromMethodsTest.json */; }; - 5682B46C1528342D00ADD123 /* GRMustacheTemplateRenderMethodsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B46B1528342D00ADD123 /* GRMustacheTemplateRenderMethodsTest.m */; }; - 5682B46D1528342D00ADD123 /* GRMustacheTemplateRenderMethodsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B46B1528342D00ADD123 /* GRMustacheTemplateRenderMethodsTest.m */; }; - 5682B46F1528370E00ADD123 /* GRMustacheTemplateFromMethodsTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B46E1528370E00ADD123 /* GRMustacheTemplateFromMethodsTest */; }; - 5682B4701528370E00ADD123 /* GRMustacheTemplateFromMethodsTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B46E1528370E00ADD123 /* GRMustacheTemplateFromMethodsTest */; }; - 5682B4741528372000ADD123 /* GRMustacheTemplateRenderMethodsTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4711528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest */; }; - 5682B4751528372000ADD123 /* GRMustacheTemplateRenderMethodsTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4711528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest */; }; - 5682B4761528372000ADD123 /* GRMustacheTemplateRenderMethodsTest.json in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4721528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest.json */; }; - 5682B4771528372000ADD123 /* GRMustacheTemplateRenderMethodsTest.json in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4721528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest.json */; }; - 5682B4781528372000ADD123 /* GRMustacheTemplateRenderMethodsTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4731528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest.mustache */; }; - 5682B4791528372000ADD123 /* GRMustacheTemplateRenderMethodsTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4731528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest.mustache */; }; - 5682B48B1528473200ADD123 /* GRMustacheTemplateRepositoryDataSourceTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B4821528472900ADD123 /* GRMustacheTemplateRepositoryDataSourceTest.m */; }; - 5682B48C1528473200ADD123 /* GRMustacheTemplateRepositoryDataSourceTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B4821528472900ADD123 /* GRMustacheTemplateRepositoryDataSourceTest.m */; }; - 5682B48F1528473200ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B4861528472C00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.m */; }; - 5682B4901528473200ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B4861528472C00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.m */; }; - 5682B4931528473200ADD123 /* GRMustacheTemplateRepositoryWithDictionaryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B48A1528472F00ADD123 /* GRMustacheTemplateRepositoryWithDictionaryTest.m */; }; - 5682B4941528473200ADD123 /* GRMustacheTemplateRepositoryWithDictionaryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B48A1528472F00ADD123 /* GRMustacheTemplateRepositoryWithDictionaryTest.m */; }; - 5682B4971528486C00ADD123 /* GRMustacheTemplateRepositoryTest_ISOLatin1 in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4951528486900ADD123 /* GRMustacheTemplateRepositoryTest_ISOLatin1 */; }; - 5682B4981528486C00ADD123 /* GRMustacheTemplateRepositoryTest_ISOLatin1 in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4951528486900ADD123 /* GRMustacheTemplateRepositoryTest_ISOLatin1 */; }; - 5682B4991528486C00ADD123 /* GRMustacheTemplateRepositoryTest_UTF8 in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4961528486A00ADD123 /* GRMustacheTemplateRepositoryTest_UTF8 */; }; - 5682B49A1528486C00ADD123 /* GRMustacheTemplateRepositoryTest_UTF8 in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4961528486A00ADD123 /* GRMustacheTemplateRepositoryTest_UTF8 */; }; - 5682B49E152849FE00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B49C152849FD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.mustache */; }; - 5682B49F152849FE00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B49C152849FD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.mustache */; }; - 5682B4A0152849FE00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B49D152849FD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache */; }; - 5682B4A1152849FE00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B49D152849FD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache */; }; - 5682B4A415284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A215284A9300ADD123 /* GRMustacheTemplateRepositoryWithBundleTest */; }; - 5682B4A515284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A215284A9300ADD123 /* GRMustacheTemplateRepositoryWithBundleTest */; }; - 5682B4A615284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.text in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A315284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.text */; }; - 5682B4A715284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.text in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A315284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.text */; }; - 5682B4A915284AB600ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A815284AB600ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial */; }; - 5682B4AA15284AB600ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A815284AB600ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial */; }; - 5682B4AC15284ABD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.text in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4AB15284ABC00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.text */; }; - 5682B4AD15284ABD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.text in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4AB15284ABC00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.text */; }; - 5682B4B21528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserError.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B01528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserError.mustache */; }; - 5682B4B31528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserError.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B01528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserError.mustache */; }; - 5682B4B41528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B11528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache */; }; - 5682B4B51528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B11528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache */; }; - 5682B4B81528D0FA00ADD123 /* GRMustacheTemplateFromMethodsTest_compilerError.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B61528D0F900ADD123 /* GRMustacheTemplateFromMethodsTest_compilerError.mustache */; }; - 5682B4B91528D0FA00ADD123 /* GRMustacheTemplateFromMethodsTest_compilerError.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B61528D0F900ADD123 /* GRMustacheTemplateFromMethodsTest_compilerError.mustache */; }; - 5682B4BA1528D0FA00ADD123 /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B71528D0F900ADD123 /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache */; }; - 5682B4BB1528D0FA00ADD123 /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B71528D0F900ADD123 /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache */; }; - 5682B4BE1528DF3F00ADD123 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5682B4BD1528DF3D00ADD123 /* Foundation.framework */; }; - 5682B4C01528DF4A00ADD123 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5682B4BF1528DF4900ADD123 /* Foundation.framework */; }; - 5682B4C31528E0B300ADD123 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5682B4BF1528DF4900ADD123 /* Foundation.framework */; }; - 5682B4C51528E0C600ADD123 /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5682B4C41528E0C500ADD123 /* CoreData.framework */; }; - 5688264D199DFCDF00922497 /* GRMustacheTemplateRepositoryWithBundleTestResources in Resources */ = {isa = PBXBuildFile; fileRef = 5688264C199DFCDF00922497 /* GRMustacheTemplateRepositoryWithBundleTestResources */; }; - 5688264E199DFCDF00922497 /* GRMustacheTemplateRepositoryWithBundleTestResources in Resources */ = {isa = PBXBuildFile; fileRef = 5688264C199DFCDF00922497 /* GRMustacheTemplateRepositoryWithBundleTestResources */; }; - 56A7591719C173E6008D119F /* NSJSONSerialization+Comments.m in Sources */ = {isa = PBXBuildFile; fileRef = 56A7591319C173E6008D119F /* NSJSONSerialization+Comments.m */; }; - 56A7591819C173E6008D119F /* NSJSONSerialization+Comments.m in Sources */ = {isa = PBXBuildFile; fileRef = 56A7591319C173E6008D119F /* NSJSONSerialization+Comments.m */; }; - 56A8D48C15279F8A00D9C718 /* GRMustacheTagDelegateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56A8D48B15279F8A00D9C718 /* GRMustacheTagDelegateTest.m */; }; - 56A8D48D15279F8A00D9C718 /* GRMustacheTagDelegateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56A8D48B15279F8A00D9C718 /* GRMustacheTagDelegateTest.m */; }; - 56A8D4931527A23900D9C718 /* GRMustacheTagDelegateTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56A8D4921527A23900D9C718 /* GRMustacheTagDelegateTest.mustache */; }; - 56A8D4941527A23900D9C718 /* GRMustacheTagDelegateTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56A8D4921527A23900D9C718 /* GRMustacheTagDelegateTest.mustache */; }; - 56A8D4961527A3CE00D9C718 /* GRMustacheTagDelegateTest_wrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56A8D4951527A3CE00D9C718 /* GRMustacheTagDelegateTest_wrapper.mustache */; }; - 56A8D4971527A3CE00D9C718 /* GRMustacheTagDelegateTest_wrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56A8D4951527A3CE00D9C718 /* GRMustacheTagDelegateTest_wrapper.mustache */; }; - 56ABDBC318D23CF7009DF17A /* GRMustacheTemplateTemplateRepositoryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56ABDBC218D23CF7009DF17A /* GRMustacheTemplateTemplateRepositoryTest.m */; }; - 56ABDBC418D23CF7009DF17A /* GRMustacheTemplateTemplateRepositoryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56ABDBC218D23CF7009DF17A /* GRMustacheTemplateTemplateRepositoryTest.m */; }; - 56B01A4C19C49AF5000439C7 /* GRMustacheExpressionGenerator_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56B01A4A19C49AF5000439C7 /* GRMustacheExpressionGenerator_private.h */; }; - 56B01A4D19C49AF5000439C7 /* GRMustacheExpressionGenerator_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56B01A4A19C49AF5000439C7 /* GRMustacheExpressionGenerator_private.h */; }; - 56B01A4E19C49AF5000439C7 /* GRMustacheExpressionGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B01A4B19C49AF5000439C7 /* GRMustacheExpressionGenerator.m */; }; - 56B01A4F19C49AF5000439C7 /* GRMustacheExpressionGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B01A4B19C49AF5000439C7 /* GRMustacheExpressionGenerator.m */; }; - 56B4778E18CF8A7C00EFF629 /* GRMustacheKeyedSubscriptingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B4778C18CF8A7600EFF629 /* GRMustacheKeyedSubscriptingTest.m */; }; - 56B4778F18CF8A7C00EFF629 /* GRMustacheKeyedSubscriptingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B4778C18CF8A7600EFF629 /* GRMustacheKeyedSubscriptingTest.m */; }; - 56B4779118CF8AD100EFF629 /* GRMustacheContextProtectedObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B4779018CF8AD100EFF629 /* GRMustacheContextProtectedObjectTest.m */; }; - 56B4779218CF8AD100EFF629 /* GRMustacheContextProtectedObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B4779018CF8AD100EFF629 /* GRMustacheContextProtectedObjectTest.m */; }; - 56B4779718CF8D2A00EFF629 /* GRHoganSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B4779618CF8D2A00EFF629 /* GRHoganSuitesTest.m */; }; - 56B4779818CF8D2A00EFF629 /* GRHoganSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B4779618CF8D2A00EFF629 /* GRHoganSuitesTest.m */; }; - 56B4779A18CF8D3300EFF629 /* GRHoganSuites in Resources */ = {isa = PBXBuildFile; fileRef = 56B4779918CF8D3300EFF629 /* GRHoganSuites */; }; - 56B4779B18CF8D3300EFF629 /* GRHoganSuites in Resources */ = {isa = PBXBuildFile; fileRef = 56B4779918CF8D3300EFF629 /* GRHoganSuites */; }; - 56B477A118CF9F6100EFF629 /* GRMustacheJavaSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B477A018CF9F6100EFF629 /* GRMustacheJavaSuitesTest.m */; }; - 56B477A218CF9F6100EFF629 /* GRMustacheJavaSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B477A018CF9F6100EFF629 /* GRMustacheJavaSuitesTest.m */; }; - 56B477A418CF9F6E00EFF629 /* GRMustacheJavaSuites in Resources */ = {isa = PBXBuildFile; fileRef = 56B477A318CF9F6E00EFF629 /* GRMustacheJavaSuites */; }; - 56B477A518CF9F6E00EFF629 /* GRMustacheJavaSuites in Resources */ = {isa = PBXBuildFile; fileRef = 56B477A318CF9F6E00EFF629 /* GRMustacheJavaSuites */; }; - 56B477A718D0E41A00EFF629 /* specs in Resources */ = {isa = PBXBuildFile; fileRef = 56B477A618D0E41A00EFF629 /* specs */; }; - 56B477A818D0E41A00EFF629 /* specs in Resources */ = {isa = PBXBuildFile; fileRef = 56B477A618D0E41A00EFF629 /* specs */; }; - 56BA242618C7A494006DA5F3 /* GRMustacheErrorHandlingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA242518C7A494006DA5F3 /* GRMustacheErrorHandlingTest.m */; }; - 56BA242818C7A494006DA5F3 /* GRMustacheErrorHandlingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA242518C7A494006DA5F3 /* GRMustacheErrorHandlingTest.m */; }; - 56BA243818C7A550006DA5F3 /* GRMustacheConfigurationBaseContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA243518C7A550006DA5F3 /* GRMustacheConfigurationBaseContextTest.m */; }; - 56BA243A18C7A550006DA5F3 /* GRMustacheConfigurationBaseContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA243518C7A550006DA5F3 /* GRMustacheConfigurationBaseContextTest.m */; }; - 56BA243C18C7A550006DA5F3 /* GRMustacheConfigurationTagDelimitersTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA243618C7A550006DA5F3 /* GRMustacheConfigurationTagDelimitersTest.m */; }; - 56BA243E18C7A550006DA5F3 /* GRMustacheConfigurationTagDelimitersTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA243618C7A550006DA5F3 /* GRMustacheConfigurationTagDelimitersTest.m */; }; - 56BA244018C7A550006DA5F3 /* GRMustacheConfigurationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA243718C7A550006DA5F3 /* GRMustacheConfigurationTest.m */; }; - 56BA244218C7A550006DA5F3 /* GRMustacheConfigurationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA243718C7A550006DA5F3 /* GRMustacheConfigurationTest.m */; }; - 56BA245B18C7A5BE006DA5F3 /* GRMustacheLocalizerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245418C7A5BE006DA5F3 /* GRMustacheLocalizerTest.m */; }; - 56BA245D18C7A5BE006DA5F3 /* GRMustacheLocalizerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245418C7A5BE006DA5F3 /* GRMustacheLocalizerTest.m */; }; - 56BA246718C7A5BE006DA5F3 /* GRMustacheNSFormatterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245818C7A5BE006DA5F3 /* GRMustacheNSFormatterTest.m */; }; - 56BA246918C7A5BE006DA5F3 /* GRMustacheNSFormatterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245818C7A5BE006DA5F3 /* GRMustacheNSFormatterTest.m */; }; - 56BA246B18C7A5BE006DA5F3 /* GRMustacheNSValueTransformerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245918C7A5BE006DA5F3 /* GRMustacheNSValueTransformerTest.m */; }; - 56BA246D18C7A5BE006DA5F3 /* GRMustacheNSValueTransformerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245918C7A5BE006DA5F3 /* GRMustacheNSValueTransformerTest.m */; }; - 56BA246F18C7A5BE006DA5F3 /* GRMustacheStandardLibraryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245A18C7A5BE006DA5F3 /* GRMustacheStandardLibraryTest.m */; }; - 56BA247118C7A5BE006DA5F3 /* GRMustacheStandardLibraryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245A18C7A5BE006DA5F3 /* GRMustacheStandardLibraryTest.m */; }; - 56BA247418C7A5CB006DA5F3 /* GRMustacheLocalizerTestBundle in Resources */ = {isa = PBXBuildFile; fileRef = 56BA247318C7A5CB006DA5F3 /* GRMustacheLocalizerTestBundle */; }; - 56BA247618C7A5CB006DA5F3 /* GRMustacheLocalizerTestBundle in Resources */ = {isa = PBXBuildFile; fileRef = 56BA247318C7A5CB006DA5F3 /* GRMustacheLocalizerTestBundle */; }; - 56BA247B18C7A5F8006DA5F3 /* GRMustacheFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA247918C7A5F8006DA5F3 /* GRMustacheFilterTest.m */; }; - 56BA247D18C7A5F8006DA5F3 /* GRMustacheFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA247918C7A5F8006DA5F3 /* GRMustacheFilterTest.m */; }; - 56BA247F18C7A5F8006DA5F3 /* GRMustacheVariadicFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA247A18C7A5F8006DA5F3 /* GRMustacheVariadicFilterTest.m */; }; - 56BA248118C7A5F8006DA5F3 /* GRMustacheVariadicFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA247A18C7A5F8006DA5F3 /* GRMustacheVariadicFilterTest.m */; }; - 56BA248B18C7A62E006DA5F3 /* GRMustacheContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA248518C7A62E006DA5F3 /* GRMustacheContextTest.m */; }; - 56BA248D18C7A62E006DA5F3 /* GRMustacheContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA248518C7A62E006DA5F3 /* GRMustacheContextTest.m */; }; - 56BA248F18C7A62E006DA5F3 /* GRMustacheContextValueForMustacheKeyTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA248618C7A62E006DA5F3 /* GRMustacheContextValueForMustacheKeyTest.m */; }; - 56BA249118C7A62E006DA5F3 /* GRMustacheContextValueForMustacheKeyTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA248618C7A62E006DA5F3 /* GRMustacheContextValueForMustacheKeyTest.m */; }; - 56BA249418C7A648006DA5F3 /* GRMustacheContextTopMustacheObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA249318C7A648006DA5F3 /* GRMustacheContextTopMustacheObjectTest.m */; }; - 56BA249618C7A648006DA5F3 /* GRMustacheContextTopMustacheObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA249318C7A648006DA5F3 /* GRMustacheContextTopMustacheObjectTest.m */; }; - 56BA249918C7A65E006DA5F3 /* GRMustacheContextHasValueForMustacheExpressionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA249818C7A65E006DA5F3 /* GRMustacheContextHasValueForMustacheExpressionTest.m */; }; - 56BA249B18C7A65E006DA5F3 /* GRMustacheContextHasValueForMustacheExpressionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA249818C7A65E006DA5F3 /* GRMustacheContextHasValueForMustacheExpressionTest.m */; }; - 56BA24A318C7A6B2006DA5F3 /* GRMustacheConfigurationExtendBaseContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA24A218C7A6B2006DA5F3 /* GRMustacheConfigurationExtendBaseContextTest.m */; }; - 56BA24A518C7A6B2006DA5F3 /* GRMustacheConfigurationExtendBaseContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA24A218C7A6B2006DA5F3 /* GRMustacheConfigurationExtendBaseContextTest.m */; }; - 56BA24A818C7A6D4006DA5F3 /* GRMustacheTemplateExtendBaseContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA24A718C7A6D4006DA5F3 /* GRMustacheTemplateExtendBaseContextTest.m */; }; - 56BA24AA18C7A6D4006DA5F3 /* GRMustacheTemplateExtendBaseContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA24A718C7A6D4006DA5F3 /* GRMustacheTemplateExtendBaseContextTest.m */; }; - 56BA24B318C9A2EE006DA5F3 /* GRMustacheContextKeyAccessTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA24B218C9A2EE006DA5F3 /* GRMustacheContextKeyAccessTest.m */; }; - 56BA24B518C9A2EE006DA5F3 /* GRMustacheContextKeyAccessTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA24B218C9A2EE006DA5F3 /* GRMustacheContextKeyAccessTest.m */; }; - 56BF365A19B8EE7A00854524 /* GRMustacheConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF365719B8EE7A00854524 /* GRMustacheConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF365B19B8EE7A00854524 /* GRMustacheConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF365719B8EE7A00854524 /* GRMustacheConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF365C19B8EE7A00854524 /* GRMustacheConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF365819B8EE7A00854524 /* GRMustacheConfiguration.m */; }; - 56BF365D19B8EE7A00854524 /* GRMustacheConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF365819B8EE7A00854524 /* GRMustacheConfiguration.m */; }; - 56BF365E19B8EE7A00854524 /* GRMustacheConfiguration_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF365919B8EE7A00854524 /* GRMustacheConfiguration_private.h */; }; - 56BF365F19B8EE7A00854524 /* GRMustacheConfiguration_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF365919B8EE7A00854524 /* GRMustacheConfiguration_private.h */; }; - 56BF366719B8EE8B00854524 /* GRMustacheExpressionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366119B8EE8B00854524 /* GRMustacheExpressionParser.m */; }; - 56BF366819B8EE8B00854524 /* GRMustacheExpressionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366119B8EE8B00854524 /* GRMustacheExpressionParser.m */; }; - 56BF366919B8EE8B00854524 /* GRMustacheExpressionParser_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF366219B8EE8B00854524 /* GRMustacheExpressionParser_private.h */; }; - 56BF366A19B8EE8B00854524 /* GRMustacheExpressionParser_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF366219B8EE8B00854524 /* GRMustacheExpressionParser_private.h */; }; - 56BF366B19B8EE8B00854524 /* GRMustacheTemplateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366319B8EE8B00854524 /* GRMustacheTemplateParser.m */; }; - 56BF366C19B8EE8B00854524 /* GRMustacheTemplateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366319B8EE8B00854524 /* GRMustacheTemplateParser.m */; }; - 56BF366D19B8EE8B00854524 /* GRMustacheTemplateParser_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF366419B8EE8B00854524 /* GRMustacheTemplateParser_private.h */; }; - 56BF366E19B8EE8B00854524 /* GRMustacheTemplateParser_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF366419B8EE8B00854524 /* GRMustacheTemplateParser_private.h */; }; - 56BF366F19B8EE8B00854524 /* GRMustacheToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366519B8EE8B00854524 /* GRMustacheToken.m */; }; - 56BF367019B8EE8B00854524 /* GRMustacheToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366519B8EE8B00854524 /* GRMustacheToken.m */; }; - 56BF367119B8EE8B00854524 /* GRMustacheToken_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF366619B8EE8B00854524 /* GRMustacheToken_private.h */; }; - 56BF367219B8EE8B00854524 /* GRMustacheToken_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF366619B8EE8B00854524 /* GRMustacheToken_private.h */; }; - 56BF369619B8EE9D00854524 /* GRMustacheExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367519B8EE9D00854524 /* GRMustacheExpression.m */; }; - 56BF369719B8EE9D00854524 /* GRMustacheExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367519B8EE9D00854524 /* GRMustacheExpression.m */; }; - 56BF369819B8EE9D00854524 /* GRMustacheExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367619B8EE9D00854524 /* GRMustacheExpression_private.h */; }; - 56BF369919B8EE9D00854524 /* GRMustacheExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367619B8EE9D00854524 /* GRMustacheExpression_private.h */; }; - 56BF369A19B8EE9D00854524 /* GRMustacheExpressionVisitor_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367719B8EE9D00854524 /* GRMustacheExpressionVisitor_private.h */; }; - 56BF369B19B8EE9D00854524 /* GRMustacheExpressionVisitor_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367719B8EE9D00854524 /* GRMustacheExpressionVisitor_private.h */; }; - 56BF369C19B8EE9D00854524 /* GRMustacheFilteredExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367819B8EE9D00854524 /* GRMustacheFilteredExpression.m */; }; - 56BF369D19B8EE9D00854524 /* GRMustacheFilteredExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367819B8EE9D00854524 /* GRMustacheFilteredExpression.m */; }; - 56BF369E19B8EE9D00854524 /* GRMustacheFilteredExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367919B8EE9D00854524 /* GRMustacheFilteredExpression_private.h */; }; - 56BF369F19B8EE9D00854524 /* GRMustacheFilteredExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367919B8EE9D00854524 /* GRMustacheFilteredExpression_private.h */; }; - 56BF36A019B8EE9D00854524 /* GRMustacheIdentifierExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367A19B8EE9D00854524 /* GRMustacheIdentifierExpression.m */; }; - 56BF36A119B8EE9D00854524 /* GRMustacheIdentifierExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367A19B8EE9D00854524 /* GRMustacheIdentifierExpression.m */; }; - 56BF36A219B8EE9D00854524 /* GRMustacheIdentifierExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367B19B8EE9D00854524 /* GRMustacheIdentifierExpression_private.h */; }; - 56BF36A319B8EE9D00854524 /* GRMustacheIdentifierExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367B19B8EE9D00854524 /* GRMustacheIdentifierExpression_private.h */; }; - 56BF36A419B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367C19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m */; }; - 56BF36A519B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367C19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m */; }; - 56BF36A619B8EE9D00854524 /* GRMustacheImplicitIteratorExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367D19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression_private.h */; }; - 56BF36A719B8EE9D00854524 /* GRMustacheImplicitIteratorExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367D19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression_private.h */; }; - 56BF36A819B8EE9D00854524 /* GRMustacheScopedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367E19B8EE9D00854524 /* GRMustacheScopedExpression.m */; }; - 56BF36A919B8EE9D00854524 /* GRMustacheScopedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367E19B8EE9D00854524 /* GRMustacheScopedExpression.m */; }; - 56BF36AA19B8EE9D00854524 /* GRMustacheScopedExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367F19B8EE9D00854524 /* GRMustacheScopedExpression_private.h */; }; - 56BF36AB19B8EE9D00854524 /* GRMustacheScopedExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367F19B8EE9D00854524 /* GRMustacheScopedExpression_private.h */; }; - 56BF36AC19B8EE9D00854524 /* GRMustacheCompiler.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368019B8EE9D00854524 /* GRMustacheCompiler.m */; }; - 56BF36AD19B8EE9D00854524 /* GRMustacheCompiler.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368019B8EE9D00854524 /* GRMustacheCompiler.m */; }; - 56BF36AE19B8EE9D00854524 /* GRMustacheCompiler_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368119B8EE9D00854524 /* GRMustacheCompiler_private.h */; }; - 56BF36AF19B8EE9D00854524 /* GRMustacheCompiler_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368119B8EE9D00854524 /* GRMustacheCompiler_private.h */; }; - 56BF36B019B8EE9D00854524 /* GRMustacheInheritedPartialNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368319B8EE9D00854524 /* GRMustacheInheritedPartialNode.m */; }; - 56BF36B119B8EE9D00854524 /* GRMustacheInheritedPartialNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368319B8EE9D00854524 /* GRMustacheInheritedPartialNode.m */; }; - 56BF36B219B8EE9D00854524 /* GRMustacheInheritedPartialNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368419B8EE9D00854524 /* GRMustacheInheritedPartialNode_private.h */; }; - 56BF36B319B8EE9D00854524 /* GRMustacheInheritedPartialNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368419B8EE9D00854524 /* GRMustacheInheritedPartialNode_private.h */; }; - 56BF36B419B8EE9D00854524 /* GRMustacheInheritableSectionNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368519B8EE9D00854524 /* GRMustacheInheritableSectionNode.m */; }; - 56BF36B519B8EE9D00854524 /* GRMustacheInheritableSectionNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368519B8EE9D00854524 /* GRMustacheInheritableSectionNode.m */; }; - 56BF36B619B8EE9D00854524 /* GRMustacheInheritableSectionNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368619B8EE9D00854524 /* GRMustacheInheritableSectionNode_private.h */; }; - 56BF36B719B8EE9D00854524 /* GRMustacheInheritableSectionNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368619B8EE9D00854524 /* GRMustacheInheritableSectionNode_private.h */; }; - 56BF36B819B8EE9D00854524 /* GRMustachePartialNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368719B8EE9D00854524 /* GRMustachePartialNode.m */; }; - 56BF36B919B8EE9D00854524 /* GRMustachePartialNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368719B8EE9D00854524 /* GRMustachePartialNode.m */; }; - 56BF36BA19B8EE9D00854524 /* GRMustachePartialNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368819B8EE9D00854524 /* GRMustachePartialNode_private.h */; }; - 56BF36BB19B8EE9D00854524 /* GRMustachePartialNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368819B8EE9D00854524 /* GRMustachePartialNode_private.h */; }; - 56BF36BC19B8EE9D00854524 /* GRMustacheSectionTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368919B8EE9D00854524 /* GRMustacheSectionTag.m */; }; - 56BF36BD19B8EE9D00854524 /* GRMustacheSectionTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368919B8EE9D00854524 /* GRMustacheSectionTag.m */; }; - 56BF36BE19B8EE9D00854524 /* GRMustacheSectionTag_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368A19B8EE9D00854524 /* GRMustacheSectionTag_private.h */; }; - 56BF36BF19B8EE9D00854524 /* GRMustacheSectionTag_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368A19B8EE9D00854524 /* GRMustacheSectionTag_private.h */; }; - 56BF36C019B8EE9D00854524 /* GRMustacheTag.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368B19B8EE9D00854524 /* GRMustacheTag.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF36C119B8EE9D00854524 /* GRMustacheTag.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368B19B8EE9D00854524 /* GRMustacheTag.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF36C219B8EE9D00854524 /* GRMustacheTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368C19B8EE9D00854524 /* GRMustacheTag.m */; }; - 56BF36C319B8EE9D00854524 /* GRMustacheTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368C19B8EE9D00854524 /* GRMustacheTag.m */; }; - 56BF36C419B8EE9E00854524 /* GRMustacheTag_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368D19B8EE9D00854524 /* GRMustacheTag_private.h */; }; - 56BF36C519B8EE9E00854524 /* GRMustacheTag_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368D19B8EE9D00854524 /* GRMustacheTag_private.h */; }; - 56BF36C619B8EE9E00854524 /* GRMustacheTemplateAST.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368E19B8EE9D00854524 /* GRMustacheTemplateAST.m */; }; - 56BF36C719B8EE9E00854524 /* GRMustacheTemplateAST.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368E19B8EE9D00854524 /* GRMustacheTemplateAST.m */; }; - 56BF36C819B8EE9E00854524 /* GRMustacheTemplateAST_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368F19B8EE9D00854524 /* GRMustacheTemplateAST_private.h */; }; - 56BF36C919B8EE9E00854524 /* GRMustacheTemplateAST_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368F19B8EE9D00854524 /* GRMustacheTemplateAST_private.h */; }; - 56BF36CA19B8EE9E00854524 /* GRMustacheTemplateASTNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369019B8EE9D00854524 /* GRMustacheTemplateASTNode_private.h */; }; - 56BF36CB19B8EE9E00854524 /* GRMustacheTemplateASTNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369019B8EE9D00854524 /* GRMustacheTemplateASTNode_private.h */; }; - 56BF36CC19B8EE9E00854524 /* GRMustacheTemplateASTVisitor_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369119B8EE9D00854524 /* GRMustacheTemplateASTVisitor_private.h */; }; - 56BF36CD19B8EE9E00854524 /* GRMustacheTemplateASTVisitor_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369119B8EE9D00854524 /* GRMustacheTemplateASTVisitor_private.h */; }; - 56BF36CE19B8EE9E00854524 /* GRMustacheTextNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369219B8EE9D00854524 /* GRMustacheTextNode.m */; }; - 56BF36CF19B8EE9E00854524 /* GRMustacheTextNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369219B8EE9D00854524 /* GRMustacheTextNode.m */; }; - 56BF36D019B8EE9E00854524 /* GRMustacheTextNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369319B8EE9D00854524 /* GRMustacheTextNode_private.h */; }; - 56BF36D119B8EE9E00854524 /* GRMustacheTextNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369319B8EE9D00854524 /* GRMustacheTextNode_private.h */; }; - 56BF36D219B8EE9E00854524 /* GRMustacheVariableTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369419B8EE9D00854524 /* GRMustacheVariableTag.m */; }; - 56BF36D319B8EE9E00854524 /* GRMustacheVariableTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369419B8EE9D00854524 /* GRMustacheVariableTag.m */; }; - 56BF36D419B8EE9E00854524 /* GRMustacheVariableTag_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369519B8EE9D00854524 /* GRMustacheVariableTag_private.h */; }; - 56BF36D519B8EE9E00854524 /* GRMustacheVariableTag_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369519B8EE9D00854524 /* GRMustacheVariableTag_private.h */; }; - 56BF36E819B8EEAE00854524 /* GRMustacheContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36D719B8EEAD00854524 /* GRMustacheContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF36E919B8EEAE00854524 /* GRMustacheContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36D719B8EEAD00854524 /* GRMustacheContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF36EA19B8EEAE00854524 /* GRMustacheContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36D819B8EEAD00854524 /* GRMustacheContext.m */; }; - 56BF36EB19B8EEAE00854524 /* GRMustacheContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36D819B8EEAD00854524 /* GRMustacheContext.m */; }; - 56BF36EC19B8EEAE00854524 /* GRMustacheContext_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36D919B8EEAD00854524 /* GRMustacheContext_private.h */; }; - 56BF36ED19B8EEAE00854524 /* GRMustacheContext_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36D919B8EEAD00854524 /* GRMustacheContext_private.h */; }; - 56BF36EE19B8EEAE00854524 /* GRMustacheExpressionInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DA19B8EEAD00854524 /* GRMustacheExpressionInvocation.m */; }; - 56BF36EF19B8EEAE00854524 /* GRMustacheExpressionInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DA19B8EEAD00854524 /* GRMustacheExpressionInvocation.m */; }; - 56BF36F019B8EEAE00854524 /* GRMustacheExpressionInvocation_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36DB19B8EEAD00854524 /* GRMustacheExpressionInvocation_private.h */; }; - 56BF36F119B8EEAE00854524 /* GRMustacheExpressionInvocation_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36DB19B8EEAD00854524 /* GRMustacheExpressionInvocation_private.h */; }; - 56BF36F219B8EEAE00854524 /* GRMustacheFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36DC19B8EEAD00854524 /* GRMustacheFilter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF36F319B8EEAE00854524 /* GRMustacheFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36DC19B8EEAD00854524 /* GRMustacheFilter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF36F419B8EEAE00854524 /* GRMustacheFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DD19B8EEAD00854524 /* GRMustacheFilter.m */; }; - 56BF36F519B8EEAE00854524 /* GRMustacheFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DD19B8EEAD00854524 /* GRMustacheFilter.m */; }; - 56BF36F619B8EEAE00854524 /* GRMustacheFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36DE19B8EEAD00854524 /* GRMustacheFilter_private.h */; }; - 56BF36F719B8EEAE00854524 /* GRMustacheFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36DE19B8EEAD00854524 /* GRMustacheFilter_private.h */; }; - 56BF36F819B8EEAE00854524 /* GRMustacheKeyAccess.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DF19B8EEAE00854524 /* GRMustacheKeyAccess.m */; }; - 56BF36F919B8EEAE00854524 /* GRMustacheKeyAccess.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DF19B8EEAE00854524 /* GRMustacheKeyAccess.m */; }; - 56BF36FA19B8EEAE00854524 /* GRMustacheKeyAccess_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E019B8EEAE00854524 /* GRMustacheKeyAccess_private.h */; }; - 56BF36FB19B8EEAE00854524 /* GRMustacheKeyAccess_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E019B8EEAE00854524 /* GRMustacheKeyAccess_private.h */; }; - 56BF36FC19B8EEAE00854524 /* GRMustacheRendering.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E119B8EEAE00854524 /* GRMustacheRendering.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF36FD19B8EEAE00854524 /* GRMustacheRendering.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E119B8EEAE00854524 /* GRMustacheRendering.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF36FE19B8EEAE00854524 /* GRMustacheRendering.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E219B8EEAE00854524 /* GRMustacheRendering.m */; }; - 56BF36FF19B8EEAE00854524 /* GRMustacheRendering.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E219B8EEAE00854524 /* GRMustacheRendering.m */; }; - 56BF370019B8EEAE00854524 /* GRMustacheRendering_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E319B8EEAE00854524 /* GRMustacheRendering_private.h */; }; - 56BF370119B8EEAE00854524 /* GRMustacheRendering_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E319B8EEAE00854524 /* GRMustacheRendering_private.h */; }; - 56BF370219B8EEAE00854524 /* GRMustacheRenderingEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E419B8EEAE00854524 /* GRMustacheRenderingEngine.m */; }; - 56BF370319B8EEAE00854524 /* GRMustacheRenderingEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E419B8EEAE00854524 /* GRMustacheRenderingEngine.m */; }; - 56BF370419B8EEAE00854524 /* GRMustacheRenderingEngine_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E519B8EEAE00854524 /* GRMustacheRenderingEngine_private.h */; }; - 56BF370519B8EEAE00854524 /* GRMustacheRenderingEngine_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E519B8EEAE00854524 /* GRMustacheRenderingEngine_private.h */; }; - 56BF370619B8EEAE00854524 /* GRMustacheSafeKeyAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E619B8EEAE00854524 /* GRMustacheSafeKeyAccess.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF370719B8EEAE00854524 /* GRMustacheSafeKeyAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E619B8EEAE00854524 /* GRMustacheSafeKeyAccess.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF370819B8EEAE00854524 /* GRMustacheTagDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E719B8EEAE00854524 /* GRMustacheTagDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF370919B8EEAE00854524 /* GRMustacheTagDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E719B8EEAE00854524 /* GRMustacheTagDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF371119B8EEB900854524 /* GRMustacheTemplate.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF370B19B8EEB900854524 /* GRMustacheTemplate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF371219B8EEB900854524 /* GRMustacheTemplate.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF370B19B8EEB900854524 /* GRMustacheTemplate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF371319B8EEB900854524 /* GRMustacheTemplate.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370C19B8EEB900854524 /* GRMustacheTemplate.m */; }; - 56BF371419B8EEB900854524 /* GRMustacheTemplate.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370C19B8EEB900854524 /* GRMustacheTemplate.m */; }; - 56BF371519B8EEB900854524 /* GRMustacheTemplate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF370D19B8EEB900854524 /* GRMustacheTemplate_private.h */; }; - 56BF371619B8EEB900854524 /* GRMustacheTemplate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF370D19B8EEB900854524 /* GRMustacheTemplate_private.h */; }; - 56BF371719B8EEB900854524 /* GRMustacheTemplateRepository.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF370E19B8EEB900854524 /* GRMustacheTemplateRepository.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF371819B8EEB900854524 /* GRMustacheTemplateRepository.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF370E19B8EEB900854524 /* GRMustacheTemplateRepository.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF371919B8EEB900854524 /* GRMustacheTemplateRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370F19B8EEB900854524 /* GRMustacheTemplateRepository.m */; }; - 56BF371A19B8EEB900854524 /* GRMustacheTemplateRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370F19B8EEB900854524 /* GRMustacheTemplateRepository.m */; }; - 56BF371B19B8EEB900854524 /* GRMustacheTemplateRepository_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF371019B8EEB900854524 /* GRMustacheTemplateRepository_private.h */; }; - 56BF371C19B8EEB900854524 /* GRMustacheTemplateRepository_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF371019B8EEB900854524 /* GRMustacheTemplateRepository_private.h */; }; - 56BF373119B8EEC700854524 /* GRMustacheTemplateGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF371E19B8EEC700854524 /* GRMustacheTemplateGenerator.m */; }; - 56BF373219B8EEC700854524 /* GRMustacheTemplateGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF371E19B8EEC700854524 /* GRMustacheTemplateGenerator.m */; }; - 56BF373319B8EEC700854524 /* GRMustacheTemplateGenerator_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF371F19B8EEC700854524 /* GRMustacheTemplateGenerator_private.h */; }; - 56BF373419B8EEC700854524 /* GRMustacheTemplateGenerator_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF371F19B8EEC700854524 /* GRMustacheTemplateGenerator_private.h */; }; - 56BF373519B8EEC700854524 /* NSFormatter+GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372019B8EEC700854524 /* NSFormatter+GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF373619B8EEC700854524 /* NSFormatter+GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372019B8EEC700854524 /* NSFormatter+GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF373719B8EEC700854524 /* NSFormatter+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372119B8EEC700854524 /* NSFormatter+GRMustache.m */; }; - 56BF373819B8EEC700854524 /* NSFormatter+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372119B8EEC700854524 /* NSFormatter+GRMustache.m */; }; - 56BF373919B8EEC700854524 /* NSValueTransformer+GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372219B8EEC700854524 /* NSValueTransformer+GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF373A19B8EEC700854524 /* NSValueTransformer+GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372219B8EEC700854524 /* NSValueTransformer+GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF373B19B8EEC700854524 /* NSValueTransformer+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372319B8EEC700854524 /* NSValueTransformer+GRMustache.m */; }; - 56BF373C19B8EEC700854524 /* NSValueTransformer+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372319B8EEC700854524 /* NSValueTransformer+GRMustache.m */; }; - 56BF373D19B8EEC700854524 /* GRMustacheEachFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372519B8EEC700854524 /* GRMustacheEachFilter.m */; }; - 56BF373E19B8EEC700854524 /* GRMustacheEachFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372519B8EEC700854524 /* GRMustacheEachFilter.m */; }; - 56BF373F19B8EEC700854524 /* GRMustacheEachFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372619B8EEC700854524 /* GRMustacheEachFilter_private.h */; }; - 56BF374019B8EEC700854524 /* GRMustacheEachFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372619B8EEC700854524 /* GRMustacheEachFilter_private.h */; }; - 56BF374119B8EEC700854524 /* GRMustacheHTMLLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372719B8EEC700854524 /* GRMustacheHTMLLibrary.m */; }; - 56BF374219B8EEC700854524 /* GRMustacheHTMLLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372719B8EEC700854524 /* GRMustacheHTMLLibrary.m */; }; - 56BF374319B8EEC700854524 /* GRMustacheHTMLLibrary_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372819B8EEC700854524 /* GRMustacheHTMLLibrary_private.h */; }; - 56BF374419B8EEC700854524 /* GRMustacheHTMLLibrary_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372819B8EEC700854524 /* GRMustacheHTMLLibrary_private.h */; }; - 56BF374519B8EEC700854524 /* GRMustacheJavascriptLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372919B8EEC700854524 /* GRMustacheJavascriptLibrary.m */; }; - 56BF374619B8EEC700854524 /* GRMustacheJavascriptLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372919B8EEC700854524 /* GRMustacheJavascriptLibrary.m */; }; - 56BF374719B8EEC700854524 /* GRMustacheJavascriptLibrary_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372A19B8EEC700854524 /* GRMustacheJavascriptLibrary_private.h */; }; - 56BF374819B8EEC700854524 /* GRMustacheJavascriptLibrary_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372A19B8EEC700854524 /* GRMustacheJavascriptLibrary_private.h */; }; - 56BF374919B8EEC700854524 /* GRMustacheLocalizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372B19B8EEC700854524 /* GRMustacheLocalizer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF374A19B8EEC700854524 /* GRMustacheLocalizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372B19B8EEC700854524 /* GRMustacheLocalizer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF374B19B8EEC700854524 /* GRMustacheLocalizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372C19B8EEC700854524 /* GRMustacheLocalizer.m */; }; - 56BF374C19B8EEC700854524 /* GRMustacheLocalizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372C19B8EEC700854524 /* GRMustacheLocalizer.m */; }; - 56BF374D19B8EEC700854524 /* GRMustacheStandardLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372D19B8EEC700854524 /* GRMustacheStandardLibrary.m */; }; - 56BF374E19B8EEC700854524 /* GRMustacheStandardLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372D19B8EEC700854524 /* GRMustacheStandardLibrary.m */; }; - 56BF374F19B8EEC700854524 /* GRMustacheStandardLibrary_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372E19B8EEC700854524 /* GRMustacheStandardLibrary_private.h */; }; - 56BF375019B8EEC700854524 /* GRMustacheStandardLibrary_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372E19B8EEC700854524 /* GRMustacheStandardLibrary_private.h */; }; - 56BF375119B8EEC700854524 /* GRMustacheURLLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372F19B8EEC700854524 /* GRMustacheURLLibrary.m */; }; - 56BF375219B8EEC700854524 /* GRMustacheURLLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372F19B8EEC700854524 /* GRMustacheURLLibrary.m */; }; - 56BF375319B8EEC700854524 /* GRMustacheURLLibrary_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF373019B8EEC700854524 /* GRMustacheURLLibrary_private.h */; }; - 56BF375419B8EEC700854524 /* GRMustacheURLLibrary_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF373019B8EEC700854524 /* GRMustacheURLLibrary_private.h */; }; - 56BF375E19B8EF2800854524 /* GRMustacheAvailabilityMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375619B8EF2800854524 /* GRMustacheAvailabilityMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF375F19B8EF2800854524 /* GRMustacheAvailabilityMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375619B8EF2800854524 /* GRMustacheAvailabilityMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF376019B8EF2800854524 /* GRMustacheAvailabilityMacros_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375719B8EF2800854524 /* GRMustacheAvailabilityMacros_private.h */; }; - 56BF376119B8EF2800854524 /* GRMustacheAvailabilityMacros_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375719B8EF2800854524 /* GRMustacheAvailabilityMacros_private.h */; }; - 56BF376219B8EF2800854524 /* GRMustacheBuffer_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375819B8EF2800854524 /* GRMustacheBuffer_private.h */; }; - 56BF376319B8EF2800854524 /* GRMustacheBuffer_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375819B8EF2800854524 /* GRMustacheBuffer_private.h */; }; - 56BF376419B8EF2800854524 /* GRMustacheContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375919B8EF2800854524 /* GRMustacheContentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF376519B8EF2800854524 /* GRMustacheContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375919B8EF2800854524 /* GRMustacheContentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF376619B8EF2800854524 /* GRMustacheError.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375A19B8EF2800854524 /* GRMustacheError.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF376719B8EF2800854524 /* GRMustacheError.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375A19B8EF2800854524 /* GRMustacheError.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56BF376819B8EF2800854524 /* GRMustacheError.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375B19B8EF2800854524 /* GRMustacheError.m */; }; - 56BF376919B8EF2800854524 /* GRMustacheError.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375B19B8EF2800854524 /* GRMustacheError.m */; }; - 56BF376A19B8EF2800854524 /* GRMustacheTranslateCharacters.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375C19B8EF2800854524 /* GRMustacheTranslateCharacters.m */; }; - 56BF376B19B8EF2800854524 /* GRMustacheTranslateCharacters.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375C19B8EF2800854524 /* GRMustacheTranslateCharacters.m */; }; - 56BF376C19B8EF2800854524 /* GRMustacheTranslateCharacters_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375D19B8EF2800854524 /* GRMustacheTranslateCharacters_private.h */; }; - 56BF376D19B8EF2800854524 /* GRMustacheTranslateCharacters_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375D19B8EF2800854524 /* GRMustacheTranslateCharacters_private.h */; }; - 56C1FDE819A66DBE00006AB4 /* GRMustacheSuites_7_2_Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C1FDE719A66DBE00006AB4 /* GRMustacheSuites_7_2_Test.m */; }; - 56C1FDE919A66DBE00006AB4 /* GRMustacheSuites_7_2_Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C1FDE719A66DBE00006AB4 /* GRMustacheSuites_7_2_Test.m */; }; - 56C1FDEB19A66DC500006AB4 /* GRMustacheSuites_7_2 in Resources */ = {isa = PBXBuildFile; fileRef = 56C1FDEA19A66DC500006AB4 /* GRMustacheSuites_7_2 */; }; - 56C1FDEC19A66DC500006AB4 /* GRMustacheSuites_7_2 in Resources */ = {isa = PBXBuildFile; fileRef = 56C1FDEA19A66DC500006AB4 /* GRMustacheSuites_7_2 */; }; - 56C1FDF419A6721100006AB4 /* GRMustacheRenderingObject_7_2_Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C1FDF119A6721100006AB4 /* GRMustacheRenderingObject_7_2_Test.m */; }; - 56C1FDF519A6721100006AB4 /* GRMustacheRenderingObject_7_2_Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C1FDF119A6721100006AB4 /* GRMustacheRenderingObject_7_2_Test.m */; }; - 56C1FDFD19A720B900006AB4 /* GRMustacheEachFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C1FDFC19A720B900006AB4 /* GRMustacheEachFilterTest.m */; }; - 56C1FDFE19A720B900006AB4 /* GRMustacheEachFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C1FDFC19A720B900006AB4 /* GRMustacheEachFilterTest.m */; }; - 56C8892A190A349B0084FC5A /* GRMustacheTemplateGeneratorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C88929190A349B0084FC5A /* GRMustacheTemplateGeneratorTest.m */; }; - 56C8892B190A349B0084FC5A /* GRMustacheTemplateGeneratorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C88929190A349B0084FC5A /* GRMustacheTemplateGeneratorTest.m */; }; - 56DEC257152631040031E8DC /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 56DEC1F4152630710031E8DC /* Cocoa.framework */; }; - 56DEC25A152631040031E8DC /* libGRMustache7-MacOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 56DEC248152631040031E8DC /* libGRMustache7-MacOS.a */; }; - 56DEC27D1526311C0031E8DC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 56DEC1CB15262FF70031E8DC /* UIKit.framework */; }; - 56DEC2811526311C0031E8DC /* libGRMustache7-iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 56DEC26E1526311B0031E8DC /* libGRMustache7-iOS.a */; }; - 56DEC2BC152631300031E8DC /* GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DEC292152631300031E8DC /* GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56DEC2BD152631300031E8DC /* GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DEC292152631300031E8DC /* GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56DEC2BE152631300031E8DC /* GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC293152631300031E8DC /* GRMustache.m */; }; - 56DEC2BF152631300031E8DC /* GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC293152631300031E8DC /* GRMustache.m */; }; - 56DEC2C0152631300031E8DC /* GRMustache_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DEC294152631300031E8DC /* GRMustache_private.h */; settings = {ATTRIBUTES = (); }; }; - 56DEC2C1152631300031E8DC /* GRMustache_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DEC294152631300031E8DC /* GRMustache_private.h */; settings = {ATTRIBUTES = (); }; }; - 56DEC30E152631300031E8DC /* GRMustacheVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DEC2BB152631300031E8DC /* GRMustacheVersion.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56DEC30F152631300031E8DC /* GRMustacheVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DEC2BB152631300031E8DC /* GRMustacheVersion.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 56DEC3B5152638E20031E8DC /* GRMustachePrivateAPITest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3B0152638E20031E8DC /* GRMustachePrivateAPITest.m */; }; - 56DEC3B6152638E20031E8DC /* GRMustachePrivateAPITest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3B0152638E20031E8DC /* GRMustachePrivateAPITest.m */; }; - 56DEC3B7152638E20031E8DC /* GRMustachePublicAPITest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3B2152638E20031E8DC /* GRMustachePublicAPITest.m */; }; - 56DEC3B8152638E20031E8DC /* GRMustachePublicAPITest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3B2152638E20031E8DC /* GRMustachePublicAPITest.m */; }; - 56DEC3B9152638E20031E8DC /* GRMustacheTestBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3B4152638E20031E8DC /* GRMustacheTestBase.m */; }; - 56DEC3BA152638E20031E8DC /* GRMustacheTestBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3B4152638E20031E8DC /* GRMustacheTestBase.m */; }; - 56DEC3C0152639560031E8DC /* GRSpecificationSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3BF152639560031E8DC /* GRSpecificationSuitesTest.m */; }; - 56DEC3C1152639560031E8DC /* GRSpecificationSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3BF152639560031E8DC /* GRSpecificationSuitesTest.m */; }; - 6586A0651B9E2DAD0067C98E /* GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DEC292152631300031E8DC /* GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A0661B9E2DB30067C98E /* GRMustache_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DEC294152631300031E8DC /* GRMustache_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0671B9E2DB90067C98E /* GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC293152631300031E8DC /* GRMustache.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 6586A0681B9E2DBC0067C98E /* GRMustacheVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DEC2BB152631300031E8DC /* GRMustacheVersion.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 560959BF1BD3C7A40000511D /* GRMustacheLambdaTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 560959BE1BD3C7A40000511D /* GRMustacheLambdaTest.m */; settings = {ASSET_TAGS = (); }; }; + 560959C01BD3C7A40000511D /* GRMustacheLambdaTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 560959BE1BD3C7A40000511D /* GRMustacheLambdaTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214B801BA1A4C50070C6CF /* GRMustache.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6586A05D1B9E2D720067C98E /* GRMustache.framework */; settings = {ASSET_TAGS = (); }; }; + 56214B8F1BA1A4D50070C6CF /* GRMustache.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 56214B6F1BA1A34A0070C6CF /* GRMustache.framework */; settings = {ASSET_TAGS = (); }; }; + 56214BA01BA1A5350070C6CF /* GRMustachePublicAPITest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3B2152638E20031E8DC /* GRMustachePublicAPITest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BA11BA1A5350070C6CF /* GRMustachePublicAPITest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3B2152638E20031E8DC /* GRMustachePublicAPITest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BA21BA1A5440070C6CF /* Tests in Resources */ = {isa = PBXBuildFile; fileRef = 563D66F315264B40008628C5 /* Tests */; settings = {ASSET_TAGS = (); }; }; + 56214BA31BA1A5450070C6CF /* Tests in Resources */ = {isa = PBXBuildFile; fileRef = 563D66F315264B40008628C5 /* Tests */; settings = {ASSET_TAGS = (); }; }; + 56214BA41BA1A5480070C6CF /* GRMustacheSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563D66E81526497E008628C5 /* GRMustacheSuitesTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BA51BA1A5480070C6CF /* GRMustacheSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563D66E81526497E008628C5 /* GRMustacheSuitesTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BA71BA1A54C0070C6CF /* GRMustacheJavaSuites in Resources */ = {isa = PBXBuildFile; fileRef = 56B477A318CF9F6E00EFF629 /* GRMustacheJavaSuites */; settings = {ASSET_TAGS = (); }; }; + 56214BA81BA1A54C0070C6CF /* GRHoganSuites in Resources */ = {isa = PBXBuildFile; fileRef = 56B4779918CF8D3300EFF629 /* GRHoganSuites */; settings = {ASSET_TAGS = (); }; }; + 56214BAA1BA1A54C0070C6CF /* GRMustacheJavaSuites in Resources */ = {isa = PBXBuildFile; fileRef = 56B477A318CF9F6E00EFF629 /* GRMustacheJavaSuites */; settings = {ASSET_TAGS = (); }; }; + 56214BAB1BA1A54C0070C6CF /* GRHoganSuites in Resources */ = {isa = PBXBuildFile; fileRef = 56B4779918CF8D3300EFF629 /* GRHoganSuites */; settings = {ASSET_TAGS = (); }; }; + 56214BAC1BA1A5550070C6CF /* GRSpecificationSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3BF152639560031E8DC /* GRSpecificationSuitesTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BAD1BA1A5550070C6CF /* GRMustacheJavaSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B477A018CF9F6100EFF629 /* GRMustacheJavaSuitesTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BAE1BA1A5550070C6CF /* GRHoganSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B4779618CF8D2A00EFF629 /* GRHoganSuitesTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BAF1BA1A5550070C6CF /* GRBooleanTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 560CE88E1526EEF4004F935E /* GRBooleanTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BB01BA1A5550070C6CF /* GRMustacheErrorHandlingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA242518C7A494006DA5F3 /* GRMustacheErrorHandlingTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BB11BA1A5550070C6CF /* GRMustacheFoundationCollectionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563A5EA6163403C000E7E810 /* GRMustacheFoundationCollectionTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BB21BA1A5550070C6CF /* GRMustacheParsingErrorsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5623B795152731B600DF16A6 /* GRMustacheParsingErrorsTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BB31BA1A5550070C6CF /* GRMustachePositionFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140E616365D6000310B7F /* GRMustachePositionFilterTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BB41BA1A5550070C6CF /* GRMustacheRenderingObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140D7163659CB00310B7F /* GRMustacheRenderingObjectTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BB51BA1A5560070C6CF /* GRSpecificationSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3BF152639560031E8DC /* GRSpecificationSuitesTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BB61BA1A5560070C6CF /* GRMustacheJavaSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B477A018CF9F6100EFF629 /* GRMustacheJavaSuitesTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BB71BA1A5560070C6CF /* GRHoganSuitesTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B4779618CF8D2A00EFF629 /* GRHoganSuitesTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BB81BA1A5560070C6CF /* GRBooleanTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 560CE88E1526EEF4004F935E /* GRBooleanTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BB91BA1A5560070C6CF /* GRMustacheErrorHandlingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA242518C7A494006DA5F3 /* GRMustacheErrorHandlingTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BBA1BA1A5560070C6CF /* GRMustacheFoundationCollectionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563A5EA6163403C000E7E810 /* GRMustacheFoundationCollectionTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BBB1BA1A5560070C6CF /* GRMustacheParsingErrorsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5623B795152731B600DF16A6 /* GRMustacheParsingErrorsTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BBC1BA1A5560070C6CF /* GRMustachePositionFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140E616365D6000310B7F /* GRMustachePositionFilterTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BBD1BA1A5560070C6CF /* GRMustacheRenderingObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140D7163659CB00310B7F /* GRMustacheRenderingObjectTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BBE1BA1A5690070C6CF /* GRMustacheConfigurationBaseContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA243518C7A550006DA5F3 /* GRMustacheConfigurationBaseContextTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BBF1BA1A5690070C6CF /* GRMustacheConfigurationExtendBaseContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA24A218C7A6B2006DA5F3 /* GRMustacheConfigurationExtendBaseContextTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BC01BA1A5690070C6CF /* GRMustacheConfigurationTagDelimitersTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA243618C7A550006DA5F3 /* GRMustacheConfigurationTagDelimitersTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BC11BA1A5690070C6CF /* GRMustacheConfigurationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA243718C7A550006DA5F3 /* GRMustacheConfigurationTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BC21BA1A5690070C6CF /* GRMustacheConfigurationBaseContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA243518C7A550006DA5F3 /* GRMustacheConfigurationBaseContextTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BC31BA1A5690070C6CF /* GRMustacheConfigurationExtendBaseContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA24A218C7A6B2006DA5F3 /* GRMustacheConfigurationExtendBaseContextTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BC41BA1A5690070C6CF /* GRMustacheConfigurationTagDelimitersTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA243618C7A550006DA5F3 /* GRMustacheConfigurationTagDelimitersTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BC51BA1A5690070C6CF /* GRMustacheConfigurationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA243718C7A550006DA5F3 /* GRMustacheConfigurationTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BC71BA1A56D0070C6CF /* GRMustacheContextHasValueForMustacheExpressionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA249818C7A65E006DA5F3 /* GRMustacheContextHasValueForMustacheExpressionTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BC81BA1A56D0070C6CF /* GRMustacheContextProtectedObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B4779018CF8AD100EFF629 /* GRMustacheContextProtectedObjectTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BC91BA1A56D0070C6CF /* GRMustacheContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA248518C7A62E006DA5F3 /* GRMustacheContextTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BCA1BA1A56D0070C6CF /* GRMustacheContextTopMustacheObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA249318C7A648006DA5F3 /* GRMustacheContextTopMustacheObjectTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BCB1BA1A56D0070C6CF /* GRMustacheContextValueForMustacheKeyTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA248618C7A62E006DA5F3 /* GRMustacheContextValueForMustacheKeyTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BCC1BA1A56D0070C6CF /* GRMustacheContextKeyAccessTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA24B218C9A2EE006DA5F3 /* GRMustacheContextKeyAccessTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BCE1BA1A56D0070C6CF /* GRMustacheContextHasValueForMustacheExpressionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA249818C7A65E006DA5F3 /* GRMustacheContextHasValueForMustacheExpressionTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BCF1BA1A56D0070C6CF /* GRMustacheContextProtectedObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B4779018CF8AD100EFF629 /* GRMustacheContextProtectedObjectTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BD01BA1A56D0070C6CF /* GRMustacheContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA248518C7A62E006DA5F3 /* GRMustacheContextTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BD11BA1A56D0070C6CF /* GRMustacheContextTopMustacheObjectTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA249318C7A648006DA5F3 /* GRMustacheContextTopMustacheObjectTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BD21BA1A56D0070C6CF /* GRMustacheContextValueForMustacheKeyTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA248618C7A62E006DA5F3 /* GRMustacheContextValueForMustacheKeyTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BD31BA1A56D0070C6CF /* GRMustacheContextKeyAccessTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA24B218C9A2EE006DA5F3 /* GRMustacheContextKeyAccessTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BD41BA1A5710070C6CF /* GRMustacheFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA247918C7A5F8006DA5F3 /* GRMustacheFilterTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BD51BA1A5710070C6CF /* GRMustacheVariadicFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA247A18C7A5F8006DA5F3 /* GRMustacheVariadicFilterTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BD61BA1A5710070C6CF /* GRMustacheFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA247918C7A5F8006DA5F3 /* GRMustacheFilterTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BD71BA1A5710070C6CF /* GRMustacheVariadicFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA247A18C7A5F8006DA5F3 /* GRMustacheVariadicFilterTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BD81BA1A5760070C6CF /* GRMustacheLocalizerTestBundle in Resources */ = {isa = PBXBuildFile; fileRef = 56BA247318C7A5CB006DA5F3 /* GRMustacheLocalizerTestBundle */; settings = {ASSET_TAGS = (); }; }; + 56214BD91BA1A5760070C6CF /* GRMustacheLocalizerTestBundle in Resources */ = {isa = PBXBuildFile; fileRef = 56BA247318C7A5CB006DA5F3 /* GRMustacheLocalizerTestBundle */; settings = {ASSET_TAGS = (); }; }; + 56214BDA1BA1A57C0070C6CF /* GRMustacheLocalizerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245418C7A5BE006DA5F3 /* GRMustacheLocalizerTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BDB1BA1A57C0070C6CF /* GRMustacheNSFormatterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245818C7A5BE006DA5F3 /* GRMustacheNSFormatterTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BDC1BA1A57C0070C6CF /* GRMustacheNSValueTransformerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245918C7A5BE006DA5F3 /* GRMustacheNSValueTransformerTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BDD1BA1A57C0070C6CF /* GRMustacheStandardLibraryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245A18C7A5BE006DA5F3 /* GRMustacheStandardLibraryTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BDE1BA1A57C0070C6CF /* GRMustacheLocalizerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245418C7A5BE006DA5F3 /* GRMustacheLocalizerTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BDF1BA1A57C0070C6CF /* GRMustacheNSFormatterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245818C7A5BE006DA5F3 /* GRMustacheNSFormatterTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BE01BA1A57C0070C6CF /* GRMustacheNSValueTransformerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245918C7A5BE006DA5F3 /* GRMustacheNSValueTransformerTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BE11BA1A57C0070C6CF /* GRMustacheStandardLibraryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA245A18C7A5BE006DA5F3 /* GRMustacheStandardLibraryTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BE21BA1A5800070C6CF /* GRMustacheTagDelegateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56A8D48B15279F8A00D9C718 /* GRMustacheTagDelegateTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BE31BA1A5800070C6CF /* GRMustacheTagDelegateTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56A8D4921527A23900D9C718 /* GRMustacheTagDelegateTest.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BE41BA1A5800070C6CF /* GRMustacheTagDelegateTest_wrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56A8D4951527A3CE00D9C718 /* GRMustacheTagDelegateTest_wrapper.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BE51BA1A5800070C6CF /* GRMustacheTagDelegateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56A8D48B15279F8A00D9C718 /* GRMustacheTagDelegateTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BE61BA1A5800070C6CF /* GRMustacheTagDelegateTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56A8D4921527A23900D9C718 /* GRMustacheTagDelegateTest.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BE71BA1A5800070C6CF /* GRMustacheTagDelegateTest_wrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56A8D4951527A3CE00D9C718 /* GRMustacheTagDelegateTest_wrapper.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BE81BA1A5850070C6CF /* GRMustacheTemplateExtendBaseContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA24A718C7A6D4006DA5F3 /* GRMustacheTemplateExtendBaseContextTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BE91BA1A5850070C6CF /* GRMustacheTemplateTemplateRepositoryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56ABDBC218D23CF7009DF17A /* GRMustacheTemplateTemplateRepositoryTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BEA1BA1A5850070C6CF /* GRMustacheTemplateExtendBaseContextTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BA24A718C7A6D4006DA5F3 /* GRMustacheTemplateExtendBaseContextTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BEB1BA1A5850070C6CF /* GRMustacheTemplateTemplateRepositoryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56ABDBC218D23CF7009DF17A /* GRMustacheTemplateTemplateRepositoryTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BEC1BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B46015282B8200ADD123 /* GRMustacheTemplateFromMethodsTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BED1BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B46E1528370E00ADD123 /* GRMustacheTemplateFromMethodsTest */; settings = {ASSET_TAGS = (); }; }; + 56214BEE1BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest.json in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4671528324800ADD123 /* GRMustacheTemplateFromMethodsTest.json */; settings = {ASSET_TAGS = (); }; }; + 56214BEF1BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B46415282BC900ADD123 /* GRMustacheTemplateFromMethodsTest.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BF01BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_compilerError.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B61528D0F900ADD123 /* GRMustacheTemplateFromMethodsTest_compilerError.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BF11BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B71528D0F900ADD123 /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BF21BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_parserError.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B01528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserError.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BF31BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B11528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BF41BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B46015282B8200ADD123 /* GRMustacheTemplateFromMethodsTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BF51BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B46E1528370E00ADD123 /* GRMustacheTemplateFromMethodsTest */; settings = {ASSET_TAGS = (); }; }; + 56214BF61BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest.json in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4671528324800ADD123 /* GRMustacheTemplateFromMethodsTest.json */; settings = {ASSET_TAGS = (); }; }; + 56214BF71BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B46415282BC900ADD123 /* GRMustacheTemplateFromMethodsTest.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BF81BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_compilerError.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B61528D0F900ADD123 /* GRMustacheTemplateFromMethodsTest_compilerError.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BF91BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B71528D0F900ADD123 /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BFA1BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_parserError.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B01528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserError.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BFB1BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B11528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214BFC1BA1A58D0070C6CF /* GRMustacheTemplateRenderMethodsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B46B1528342D00ADD123 /* GRMustacheTemplateRenderMethodsTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214BFD1BA1A58D0070C6CF /* GRMustacheTemplateRenderMethodsTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4711528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest */; settings = {ASSET_TAGS = (); }; }; + 56214BFE1BA1A58D0070C6CF /* GRMustacheTemplateRenderMethodsTest.json in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4721528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest.json */; settings = {ASSET_TAGS = (); }; }; + 56214BFF1BA1A58D0070C6CF /* GRMustacheTemplateRenderMethodsTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4731528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214C001BA1A58E0070C6CF /* GRMustacheTemplateRenderMethodsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B46B1528342D00ADD123 /* GRMustacheTemplateRenderMethodsTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C011BA1A58E0070C6CF /* GRMustacheTemplateRenderMethodsTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4711528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest */; settings = {ASSET_TAGS = (); }; }; + 56214C021BA1A58E0070C6CF /* GRMustacheTemplateRenderMethodsTest.json in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4721528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest.json */; settings = {ASSET_TAGS = (); }; }; + 56214C031BA1A58E0070C6CF /* GRMustacheTemplateRenderMethodsTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4731528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214C041BA1A5920070C6CF /* GRMustacheTemplateRepositoryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5648F1B618998BC5001F4B83 /* GRMustacheTemplateRepositoryTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C051BA1A5920070C6CF /* GRMustacheTemplateRepositoryDataSourceTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B4821528472900ADD123 /* GRMustacheTemplateRepositoryDataSourceTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C061BA1A5920070C6CF /* GRMustacheTemplateRepositoryWithDictionaryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B48A1528472F00ADD123 /* GRMustacheTemplateRepositoryWithDictionaryTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C071BA1A5920070C6CF /* GRMustacheTemplateRepositoryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5648F1B618998BC5001F4B83 /* GRMustacheTemplateRepositoryTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C081BA1A5920070C6CF /* GRMustacheTemplateRepositoryDataSourceTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B4821528472900ADD123 /* GRMustacheTemplateRepositoryDataSourceTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C091BA1A5920070C6CF /* GRMustacheTemplateRepositoryWithDictionaryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B48A1528472F00ADD123 /* GRMustacheTemplateRepositoryWithDictionaryTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C0A1BA1A5970070C6CF /* GRMustacheTemplateRepositoryWithBundleTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B4861528472C00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C0B1BA1A5970070C6CF /* GRMustacheTemplateRepositoryWithBundleTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 5682B4861528472C00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C0C1BA1A59A0070C6CF /* GRMustacheTemplateRepositoryWithBundleTestResources in Resources */ = {isa = PBXBuildFile; fileRef = 5688264C199DFCDF00922497 /* GRMustacheTemplateRepositoryWithBundleTestResources */; settings = {ASSET_TAGS = (); }; }; + 56214C0D1BA1A59A0070C6CF /* GRMustacheTemplateRepositoryWithBundleTestResources in Resources */ = {isa = PBXBuildFile; fileRef = 5688264C199DFCDF00922497 /* GRMustacheTemplateRepositoryWithBundleTestResources */; settings = {ASSET_TAGS = (); }; }; + 56214C0E1BA1A59D0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A215284A9300ADD123 /* GRMustacheTemplateRepositoryWithBundleTest */; settings = {ASSET_TAGS = (); }; }; + 56214C0F1BA1A59D0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B49C152849FD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214C101BA1A59D0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest.text in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A315284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.text */; settings = {ASSET_TAGS = (); }; }; + 56214C111BA1A59D0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest_partial in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A815284AB600ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial */; settings = {ASSET_TAGS = (); }; }; + 56214C121BA1A59D0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B49D152849FD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214C131BA1A59D0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest_partial.text in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4AB15284ABC00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.text */; settings = {ASSET_TAGS = (); }; }; + 56214C141BA1A59E0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A215284A9300ADD123 /* GRMustacheTemplateRepositoryWithBundleTest */; settings = {ASSET_TAGS = (); }; }; + 56214C151BA1A59E0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B49C152849FD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214C161BA1A59E0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest.text in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A315284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.text */; settings = {ASSET_TAGS = (); }; }; + 56214C171BA1A59E0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest_partial in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A815284AB600ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial */; settings = {ASSET_TAGS = (); }; }; + 56214C181BA1A59E0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B49D152849FD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache */; settings = {ASSET_TAGS = (); }; }; + 56214C191BA1A59E0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest_partial.text in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4AB15284ABC00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.text */; settings = {ASSET_TAGS = (); }; }; + 56214C1A1BA1A5A60070C6CF /* GRMustacheTemplateRepositoryWithBaseURLTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140E016365D3000310B7F /* GRMustacheTemplateRepositoryWithBaseURLTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C1B1BA1A5A60070C6CF /* GRMustacheTemplateRepositoryWithDirectoryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140E116365D3000310B7F /* GRMustacheTemplateRepositoryWithDirectoryTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C1C1BA1A5A70070C6CF /* GRMustacheTemplateRepositoryWithBaseURLTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140E016365D3000310B7F /* GRMustacheTemplateRepositoryWithBaseURLTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C1D1BA1A5A70070C6CF /* GRMustacheTemplateRepositoryWithDirectoryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 568140E116365D3000310B7F /* GRMustacheTemplateRepositoryWithDirectoryTest.m */; settings = {ASSET_TAGS = (); }; }; + 56214C1E1BA1A5AB0070C6CF /* GRMustacheTemplateRepositoryTest in Resources */ = {isa = PBXBuildFile; fileRef = 568140DD16365CF500310B7F /* GRMustacheTemplateRepositoryTest */; settings = {ASSET_TAGS = (); }; }; + 56214C1F1BA1A5AB0070C6CF /* GRMustacheTemplateRepositoryTest_ISOLatin1 in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4951528486900ADD123 /* GRMustacheTemplateRepositoryTest_ISOLatin1 */; settings = {ASSET_TAGS = (); }; }; + 56214C201BA1A5AB0070C6CF /* GRMustacheTemplateRepositoryTest_UTF8 in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4961528486A00ADD123 /* GRMustacheTemplateRepositoryTest_UTF8 */; settings = {ASSET_TAGS = (); }; }; + 56214C211BA1A5AB0070C6CF /* GRMustacheTemplateRepositoryTest in Resources */ = {isa = PBXBuildFile; fileRef = 568140DD16365CF500310B7F /* GRMustacheTemplateRepositoryTest */; settings = {ASSET_TAGS = (); }; }; + 56214C221BA1A5AB0070C6CF /* GRMustacheTemplateRepositoryTest_ISOLatin1 in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4951528486900ADD123 /* GRMustacheTemplateRepositoryTest_ISOLatin1 */; settings = {ASSET_TAGS = (); }; }; + 56214C231BA1A5AB0070C6CF /* GRMustacheTemplateRepositoryTest_UTF8 in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4961528486A00ADD123 /* GRMustacheTemplateRepositoryTest_UTF8 */; settings = {ASSET_TAGS = (); }; }; + 56214C301BA1A6AD0070C6CF /* GRMustacheTranslateCharacters_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375D19B8EF2800854524 /* GRMustacheTranslateCharacters_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C331BA1A6B50070C6CF /* GRMustacheError.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375A19B8EF2800854524 /* GRMustacheError.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214C341BA1A6BA0070C6CF /* GRMustacheContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375919B8EF2800854524 /* GRMustacheContentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214C351BA1A6BE0070C6CF /* GRMustacheBuffer_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375819B8EF2800854524 /* GRMustacheBuffer_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C361BA1A6C20070C6CF /* GRMustacheAvailabilityMacros_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375719B8EF2800854524 /* GRMustacheAvailabilityMacros_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C371BA1A6C50070C6CF /* GRMustacheAvailabilityMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375619B8EF2800854524 /* GRMustacheAvailabilityMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214C381BA1A6CD0070C6CF /* GRMustacheURLEscapeFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF373019B8EEC700854524 /* GRMustacheURLEscapeFilter_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C5D1BA1A6F20070C6CF /* GRMustacheConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF365819B8EE7A00854524 /* GRMustacheConfiguration.m */; settings = {ASSET_TAGS = (); }; }; + 56214C5E1BA1A6F20070C6CF /* GRMustacheExpressionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366119B8EE8B00854524 /* GRMustacheExpressionParser.m */; settings = {ASSET_TAGS = (); }; }; + 56214C5F1BA1A6F20070C6CF /* GRMustacheTemplateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366319B8EE8B00854524 /* GRMustacheTemplateParser.m */; settings = {ASSET_TAGS = (); }; }; + 56214C601BA1A6F20070C6CF /* GRMustacheToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366519B8EE8B00854524 /* GRMustacheToken.m */; settings = {ASSET_TAGS = (); }; }; + 56214C611BA1A6F20070C6CF /* GRMustacheCompiler.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368019B8EE9D00854524 /* GRMustacheCompiler.m */; settings = {ASSET_TAGS = (); }; }; + 56214C621BA1A6F20070C6CF /* GRMustacheExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367519B8EE9D00854524 /* GRMustacheExpression.m */; settings = {ASSET_TAGS = (); }; }; + 56214C631BA1A6F20070C6CF /* GRMustacheFilteredExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367819B8EE9D00854524 /* GRMustacheFilteredExpression.m */; settings = {ASSET_TAGS = (); }; }; + 56214C641BA1A6F20070C6CF /* GRMustacheIdentifierExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367A19B8EE9D00854524 /* GRMustacheIdentifierExpression.m */; settings = {ASSET_TAGS = (); }; }; + 56214C651BA1A6F20070C6CF /* GRMustacheImplicitIteratorExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367C19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m */; settings = {ASSET_TAGS = (); }; }; + 56214C661BA1A6F20070C6CF /* GRMustacheScopedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367E19B8EE9D00854524 /* GRMustacheScopedExpression.m */; settings = {ASSET_TAGS = (); }; }; + 56214C671BA1A6F20070C6CF /* GRMustachePartialOverrideNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368319B8EE9D00854524 /* GRMustachePartialOverrideNode.m */; settings = {ASSET_TAGS = (); }; }; + 56214C681BA1A6F20070C6CF /* GRMustacheBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368519B8EE9D00854524 /* GRMustacheBlock.m */; settings = {ASSET_TAGS = (); }; }; + 56214C691BA1A6F20070C6CF /* GRMustachePartialNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368719B8EE9D00854524 /* GRMustachePartialNode.m */; settings = {ASSET_TAGS = (); }; }; + 56214C6A1BA1A6F20070C6CF /* GRMustacheSectionTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368919B8EE9D00854524 /* GRMustacheSectionTag.m */; settings = {ASSET_TAGS = (); }; }; + 56214C6B1BA1A6F20070C6CF /* GRMustacheTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368C19B8EE9D00854524 /* GRMustacheTag.m */; settings = {ASSET_TAGS = (); }; }; + 56214C6C1BA1A6F20070C6CF /* GRMustacheTemplateAST.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368E19B8EE9D00854524 /* GRMustacheTemplateAST.m */; settings = {ASSET_TAGS = (); }; }; + 56214C6D1BA1A6F20070C6CF /* GRMustacheTextNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369219B8EE9D00854524 /* GRMustacheTextNode.m */; settings = {ASSET_TAGS = (); }; }; + 56214C6E1BA1A6F20070C6CF /* GRMustacheVariableTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369419B8EE9D00854524 /* GRMustacheVariableTag.m */; settings = {ASSET_TAGS = (); }; }; + 56214C6F1BA1A6F20070C6CF /* GRMustacheContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36D819B8EEAD00854524 /* GRMustacheContext.m */; settings = {ASSET_TAGS = (); }; }; + 56214C701BA1A6F20070C6CF /* GRMustacheExpressionInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DA19B8EEAD00854524 /* GRMustacheExpressionInvocation.m */; settings = {ASSET_TAGS = (); }; }; + 56214C711BA1A6F20070C6CF /* GRMustacheFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DD19B8EEAD00854524 /* GRMustacheFilter.m */; settings = {ASSET_TAGS = (); }; }; + 56214C721BA1A6F20070C6CF /* GRMustacheKeyAccess.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DF19B8EEAE00854524 /* GRMustacheKeyAccess.m */; settings = {ASSET_TAGS = (); }; }; + 56214C731BA1A6F20070C6CF /* GRMustacheRendering.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E219B8EEAE00854524 /* GRMustacheRendering.m */; settings = {ASSET_TAGS = (); }; }; + 56214C741BA1A6F20070C6CF /* GRMustacheRenderingEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E419B8EEAE00854524 /* GRMustacheRenderingEngine.m */; settings = {ASSET_TAGS = (); }; }; + 56214C751BA1A6F20070C6CF /* GRMustacheTemplate.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370C19B8EEB900854524 /* GRMustacheTemplate.m */; settings = {ASSET_TAGS = (); }; }; + 56214C761BA1A6F20070C6CF /* GRMustacheTemplateRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370F19B8EEB900854524 /* GRMustacheTemplateRepository.m */; settings = {ASSET_TAGS = (); }; }; + 56214C771BA1A6F20070C6CF /* GRMustacheExpressionGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B01A4B19C49AF5000439C7 /* GRMustacheExpressionGenerator.m */; settings = {ASSET_TAGS = (); }; }; + 56214C781BA1A6F20070C6CF /* GRMustacheTemplateGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF371E19B8EEC700854524 /* GRMustacheTemplateGenerator.m */; settings = {ASSET_TAGS = (); }; }; + 56214C791BA1A6F20070C6CF /* NSFormatter+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372119B8EEC700854524 /* NSFormatter+GRMustache.m */; settings = {ASSET_TAGS = (); }; }; + 56214C7A1BA1A6F20070C6CF /* NSValueTransformer+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372319B8EEC700854524 /* NSValueTransformer+GRMustache.m */; settings = {ASSET_TAGS = (); }; }; + 56214C7B1BA1A6F20070C6CF /* GRMustacheEachFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372519B8EEC700854524 /* GRMustacheEachFilter.m */; settings = {ASSET_TAGS = (); }; }; + 56214C7C1BA1A6F20070C6CF /* GRMustacheHTMLEscapeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372719B8EEC700854524 /* GRMustacheHTMLEscapeFilter.m */; settings = {ASSET_TAGS = (); }; }; + 56214C7D1BA1A6F20070C6CF /* GRMustacheJavascriptEscapeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372919B8EEC700854524 /* GRMustacheJavascriptEscapeFilter.m */; settings = {ASSET_TAGS = (); }; }; + 56214C7E1BA1A6F20070C6CF /* GRMustacheLocalizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372C19B8EEC700854524 /* GRMustacheLocalizer.m */; settings = {ASSET_TAGS = (); }; }; + 56214C801BA1A6F20070C6CF /* GRMustacheURLEscapeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372F19B8EEC700854524 /* GRMustacheURLEscapeFilter.m */; settings = {ASSET_TAGS = (); }; }; + 56214C811BA1A6F20070C6CF /* GRMustacheError.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375B19B8EF2800854524 /* GRMustacheError.m */; settings = {ASSET_TAGS = (); }; }; + 56214C821BA1A6F20070C6CF /* GRMustacheTranslateCharacters.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375C19B8EF2800854524 /* GRMustacheTranslateCharacters.m */; settings = {ASSET_TAGS = (); }; }; + 56214C841BA1A70D0070C6CF /* GRMustacheConfiguration_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF365919B8EE7A00854524 /* GRMustacheConfiguration_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C851BA1A70D0070C6CF /* GRMustacheExpressionParser_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF366219B8EE8B00854524 /* GRMustacheExpressionParser_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C861BA1A70D0070C6CF /* GRMustacheTemplateParser_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF366419B8EE8B00854524 /* GRMustacheTemplateParser_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C871BA1A70D0070C6CF /* GRMustacheToken_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF366619B8EE8B00854524 /* GRMustacheToken_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C881BA1A70D0070C6CF /* GRMustacheCompiler_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368119B8EE9D00854524 /* GRMustacheCompiler_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C891BA1A70D0070C6CF /* GRMustacheExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367619B8EE9D00854524 /* GRMustacheExpression_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C8A1BA1A70D0070C6CF /* GRMustacheExpressionVisitor_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367719B8EE9D00854524 /* GRMustacheExpressionVisitor_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C8B1BA1A70D0070C6CF /* GRMustacheFilteredExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367919B8EE9D00854524 /* GRMustacheFilteredExpression_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C8C1BA1A70D0070C6CF /* GRMustacheIdentifierExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367B19B8EE9D00854524 /* GRMustacheIdentifierExpression_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C8D1BA1A70D0070C6CF /* GRMustacheImplicitIteratorExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367D19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C8E1BA1A70D0070C6CF /* GRMustacheScopedExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367F19B8EE9D00854524 /* GRMustacheScopedExpression_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C8F1BA1A70D0070C6CF /* GRMustachePartialOverrideNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368419B8EE9D00854524 /* GRMustachePartialOverrideNode_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C901BA1A70D0070C6CF /* GRMustacheBlock_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368619B8EE9D00854524 /* GRMustacheBlock_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C911BA1A70D0070C6CF /* GRMustachePartialNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368819B8EE9D00854524 /* GRMustachePartialNode_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C921BA1A70D0070C6CF /* GRMustacheSectionTag_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368A19B8EE9D00854524 /* GRMustacheSectionTag_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C931BA1A70D0070C6CF /* GRMustacheTag_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368D19B8EE9D00854524 /* GRMustacheTag_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C941BA1A70D0070C6CF /* GRMustacheTemplateAST_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368F19B8EE9D00854524 /* GRMustacheTemplateAST_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C951BA1A70D0070C6CF /* GRMustacheTemplateASTNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369019B8EE9D00854524 /* GRMustacheTemplateASTNode_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C961BA1A70D0070C6CF /* GRMustacheTemplateASTVisitor_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369119B8EE9D00854524 /* GRMustacheTemplateASTVisitor_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C971BA1A70D0070C6CF /* GRMustacheTextNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369319B8EE9D00854524 /* GRMustacheTextNode_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C981BA1A70D0070C6CF /* GRMustacheVariableTag_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369519B8EE9D00854524 /* GRMustacheVariableTag_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C991BA1A70D0070C6CF /* GRMustacheContext_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36D919B8EEAD00854524 /* GRMustacheContext_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C9A1BA1A70D0070C6CF /* GRMustacheExpressionInvocation_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36DB19B8EEAD00854524 /* GRMustacheExpressionInvocation_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C9B1BA1A70D0070C6CF /* GRMustacheFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36DE19B8EEAD00854524 /* GRMustacheFilter_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C9C1BA1A70D0070C6CF /* GRMustacheKeyAccess_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E019B8EEAE00854524 /* GRMustacheKeyAccess_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C9D1BA1A70D0070C6CF /* GRMustacheRendering_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E319B8EEAE00854524 /* GRMustacheRendering_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C9E1BA1A70D0070C6CF /* GRMustacheRenderingEngine_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E519B8EEAE00854524 /* GRMustacheRenderingEngine_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214C9F1BA1A70D0070C6CF /* GRMustacheTemplate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF370D19B8EEB900854524 /* GRMustacheTemplate_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214CA01BA1A70D0070C6CF /* GRMustacheTemplateRepository_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF371019B8EEB900854524 /* GRMustacheTemplateRepository_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214CA11BA1A70D0070C6CF /* GRMustacheExpressionGenerator_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56B01A4A19C49AF5000439C7 /* GRMustacheExpressionGenerator_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214CA21BA1A70D0070C6CF /* GRMustacheTemplateGenerator_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF371F19B8EEC700854524 /* GRMustacheTemplateGenerator_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214CA31BA1A70D0070C6CF /* GRMustacheEachFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372619B8EEC700854524 /* GRMustacheEachFilter_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214CA41BA1A70D0070C6CF /* GRMustacheHTMLEscapeFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372819B8EEC700854524 /* GRMustacheHTMLEscapeFilter_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214CA51BA1A70D0070C6CF /* GRMustacheJavascriptEscapeFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372A19B8EEC700854524 /* GRMustacheJavascriptEscapeFilter_private.h */; settings = {ASSET_TAGS = (); }; }; + 56214CA71BA1A7240070C6CF /* GRMustacheConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF365719B8EE7A00854524 /* GRMustacheConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214CA81BA1A7300070C6CF /* GRMustacheTag.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368B19B8EE9D00854524 /* GRMustacheTag.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214CA91BA1A7490070C6CF /* GRMustacheContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36D719B8EEAD00854524 /* GRMustacheContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214CAA1BA1A7490070C6CF /* GRMustacheFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36DC19B8EEAD00854524 /* GRMustacheFilter.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214CAB1BA1A7490070C6CF /* GRMustacheRendering.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E119B8EEAE00854524 /* GRMustacheRendering.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214CAD1BA1A7490070C6CF /* GRMustacheTagDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E719B8EEAE00854524 /* GRMustacheTagDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214CAE1BA1A7490070C6CF /* GRMustacheTemplate.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF370B19B8EEB900854524 /* GRMustacheTemplate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214CAF1BA1A7490070C6CF /* GRMustacheTemplateRepository.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF370E19B8EEB900854524 /* GRMustacheTemplateRepository.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214CB01BA1A7490070C6CF /* NSFormatter+GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372019B8EEC700854524 /* NSFormatter+GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214CB11BA1A7490070C6CF /* NSValueTransformer+GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372219B8EEC700854524 /* NSValueTransformer+GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214CB21BA1A7490070C6CF /* GRMustacheLocalizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372B19B8EEC700854524 /* GRMustacheLocalizer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56214CB31BA1A8BE0070C6CF /* NSJSONSerialization+Comments.m in Sources */ = {isa = PBXBuildFile; fileRef = 56A7591319C173E6008D119F /* NSJSONSerialization+Comments.m */; settings = {ASSET_TAGS = (); }; }; + 56214CB41BA1A8BE0070C6CF /* NSJSONSerialization+Comments.m in Sources */ = {isa = PBXBuildFile; fileRef = 56A7591319C173E6008D119F /* NSJSONSerialization+Comments.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CA01BA1F67D009E4319 /* GRMustachePrivateAPITest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3B0152638E20031E8DC /* GRMustachePrivateAPITest.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CA11BA1F67D009E4319 /* GRMustacheContextPrivateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563D66EC152649DF008628C5 /* GRMustacheContextPrivateTest.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CA21BA1F67D009E4319 /* GRMustacheExpressionParserTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563D66EE152649DF008628C5 /* GRMustacheExpressionParserTest.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CA31BA1F67D009E4319 /* GRMustacheTemplateGeneratorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C88929190A349B0084FC5A /* GRMustacheTemplateGeneratorTest.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CA41BA1F69B009E4319 /* GRMustacheConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF365819B8EE7A00854524 /* GRMustacheConfiguration.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CA51BA1F69B009E4319 /* GRMustacheExpressionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366119B8EE8B00854524 /* GRMustacheExpressionParser.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CA61BA1F69B009E4319 /* GRMustacheTemplateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366319B8EE8B00854524 /* GRMustacheTemplateParser.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CA71BA1F69B009E4319 /* GRMustacheToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366519B8EE8B00854524 /* GRMustacheToken.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CA81BA1F69B009E4319 /* GRMustacheCompiler.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368019B8EE9D00854524 /* GRMustacheCompiler.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CA91BA1F69B009E4319 /* GRMustacheExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367519B8EE9D00854524 /* GRMustacheExpression.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CAA1BA1F69B009E4319 /* GRMustacheFilteredExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367819B8EE9D00854524 /* GRMustacheFilteredExpression.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CAB1BA1F69B009E4319 /* GRMustacheIdentifierExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367A19B8EE9D00854524 /* GRMustacheIdentifierExpression.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CAC1BA1F69B009E4319 /* GRMustacheImplicitIteratorExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367C19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CAD1BA1F69B009E4319 /* GRMustacheScopedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367E19B8EE9D00854524 /* GRMustacheScopedExpression.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CAE1BA1F69B009E4319 /* GRMustachePartialOverrideNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368319B8EE9D00854524 /* GRMustachePartialOverrideNode.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CAF1BA1F69B009E4319 /* GRMustacheBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368519B8EE9D00854524 /* GRMustacheBlock.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CB01BA1F69B009E4319 /* GRMustachePartialNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368719B8EE9D00854524 /* GRMustachePartialNode.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CB11BA1F69B009E4319 /* GRMustacheSectionTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368919B8EE9D00854524 /* GRMustacheSectionTag.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CB21BA1F69B009E4319 /* GRMustacheTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368C19B8EE9D00854524 /* GRMustacheTag.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CB31BA1F69B009E4319 /* GRMustacheTemplateAST.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368E19B8EE9D00854524 /* GRMustacheTemplateAST.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CB41BA1F69B009E4319 /* GRMustacheTextNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369219B8EE9D00854524 /* GRMustacheTextNode.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CB51BA1F69B009E4319 /* GRMustacheVariableTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369419B8EE9D00854524 /* GRMustacheVariableTag.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CB61BA1F69B009E4319 /* GRMustacheContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36D819B8EEAD00854524 /* GRMustacheContext.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CB71BA1F69B009E4319 /* GRMustacheExpressionInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DA19B8EEAD00854524 /* GRMustacheExpressionInvocation.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CB81BA1F69B009E4319 /* GRMustacheFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DD19B8EEAD00854524 /* GRMustacheFilter.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CB91BA1F69B009E4319 /* GRMustacheKeyAccess.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DF19B8EEAE00854524 /* GRMustacheKeyAccess.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CBA1BA1F69B009E4319 /* GRMustacheRendering.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E219B8EEAE00854524 /* GRMustacheRendering.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CBB1BA1F69B009E4319 /* GRMustacheRenderingEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E419B8EEAE00854524 /* GRMustacheRenderingEngine.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CBC1BA1F69B009E4319 /* GRMustacheTemplate.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370C19B8EEB900854524 /* GRMustacheTemplate.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CBD1BA1F69B009E4319 /* GRMustacheTemplateRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370F19B8EEB900854524 /* GRMustacheTemplateRepository.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CBE1BA1F69B009E4319 /* GRMustacheExpressionGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B01A4B19C49AF5000439C7 /* GRMustacheExpressionGenerator.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CBF1BA1F69B009E4319 /* GRMustacheTemplateGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF371E19B8EEC700854524 /* GRMustacheTemplateGenerator.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CC01BA1F69B009E4319 /* NSFormatter+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372119B8EEC700854524 /* NSFormatter+GRMustache.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CC11BA1F69B009E4319 /* NSValueTransformer+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372319B8EEC700854524 /* NSValueTransformer+GRMustache.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CC21BA1F69B009E4319 /* GRMustacheEachFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372519B8EEC700854524 /* GRMustacheEachFilter.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CC31BA1F69B009E4319 /* GRMustacheHTMLEscapeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372719B8EEC700854524 /* GRMustacheHTMLEscapeFilter.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CC41BA1F69B009E4319 /* GRMustacheJavascriptEscapeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372919B8EEC700854524 /* GRMustacheJavascriptEscapeFilter.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CC51BA1F69B009E4319 /* GRMustacheLocalizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372C19B8EEC700854524 /* GRMustacheLocalizer.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CC71BA1F69B009E4319 /* GRMustacheURLEscapeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372F19B8EEC700854524 /* GRMustacheURLEscapeFilter.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CC81BA1F69B009E4319 /* GRMustacheError.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375B19B8EF2800854524 /* GRMustacheError.m */; settings = {ASSET_TAGS = (); }; }; + 56AC8CC91BA1F69B009E4319 /* GRMustacheTranslateCharacters.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375C19B8EF2800854524 /* GRMustacheTranslateCharacters.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7131BB69DAC0010FE01 /* GRMustacheTestingDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7111BB69DAC0010FE01 /* GRMustacheTestingDelegate.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7141BB69F160010FE01 /* GRMustacheTestingDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7111BB69DAC0010FE01 /* GRMustacheTestingDelegate.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7151BB69F170010FE01 /* GRMustacheTestingDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7111BB69DAC0010FE01 /* GRMustacheTestingDelegate.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7491BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B49C152849FD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.mustache */; settings = {ASSET_TAGS = (); }; }; + 56DAC74A1BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B46E1528370E00ADD123 /* GRMustacheTemplateFromMethodsTest */; settings = {ASSET_TAGS = (); }; }; + 56DAC74B1BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest.json in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4671528324800ADD123 /* GRMustacheTemplateFromMethodsTest.json */; settings = {ASSET_TAGS = (); }; }; + 56DAC74C1BB69F6D0010FE01 /* GRMustacheTemplateRenderMethodsTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4731528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest.mustache */; settings = {ASSET_TAGS = (); }; }; + 56DAC74D1BB69F6D0010FE01 /* GRHoganSuites in Resources */ = {isa = PBXBuildFile; fileRef = 56B4779918CF8D3300EFF629 /* GRHoganSuites */; settings = {ASSET_TAGS = (); }; }; + 56DAC74E1BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTest_partial in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A815284AB600ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial */; settings = {ASSET_TAGS = (); }; }; + 56DAC74F1BB69F6D0010FE01 /* GRMustacheTemplateRepositoryTest_ISOLatin1 in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4951528486900ADD123 /* GRMustacheTemplateRepositoryTest_ISOLatin1 */; settings = {ASSET_TAGS = (); }; }; + 56DAC7501BB69F6D0010FE01 /* GRMustacheTemplateRenderMethodsTest.json in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4721528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest.json */; settings = {ASSET_TAGS = (); }; }; + 56DAC7511BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTest.text in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A315284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.text */; settings = {ASSET_TAGS = (); }; }; + 56DAC7521BB69F6D0010FE01 /* GRMustacheTemplateRenderMethodsTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4711528371F00ADD123 /* GRMustacheTemplateRenderMethodsTest */; settings = {ASSET_TAGS = (); }; }; + 56DAC7551BB69F6D0010FE01 /* GRMustacheTagDelegateTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56A8D4921527A23900D9C718 /* GRMustacheTagDelegateTest.mustache */; settings = {ASSET_TAGS = (); }; }; + 56DAC7561BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTest_partial.text in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4AB15284ABC00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.text */; settings = {ASSET_TAGS = (); }; }; + 56DAC7571BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTest in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4A215284A9300ADD123 /* GRMustacheTemplateRepositoryWithBundleTest */; settings = {ASSET_TAGS = (); }; }; + 56DAC7591BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest_parserError.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B01528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserError.mustache */; settings = {ASSET_TAGS = (); }; }; + 56DAC75A1BB69F6D0010FE01 /* GRMustacheTemplateRepositoryTest in Resources */ = {isa = PBXBuildFile; fileRef = 568140DD16365CF500310B7F /* GRMustacheTemplateRepositoryTest */; settings = {ASSET_TAGS = (); }; }; + 56DAC75B1BB69F6D0010FE01 /* GRMustacheTagDelegateTest_wrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 56A8D4951527A3CE00D9C718 /* GRMustacheTagDelegateTest_wrapper.mustache */; settings = {ASSET_TAGS = (); }; }; + 56DAC75C1BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B46415282BC900ADD123 /* GRMustacheTemplateFromMethodsTest.mustache */; settings = {ASSET_TAGS = (); }; }; + 56DAC75D1BB69F6D0010FE01 /* GRMustacheLocalizerTestBundle in Resources */ = {isa = PBXBuildFile; fileRef = 56BA247318C7A5CB006DA5F3 /* GRMustacheLocalizerTestBundle */; settings = {ASSET_TAGS = (); }; }; + 56DAC75E1BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTestResources in Resources */ = {isa = PBXBuildFile; fileRef = 5688264C199DFCDF00922497 /* GRMustacheTemplateRepositoryWithBundleTestResources */; settings = {ASSET_TAGS = (); }; }; + 56DAC75F1BB69F6D0010FE01 /* GRMustacheJavaSuites in Resources */ = {isa = PBXBuildFile; fileRef = 56B477A318CF9F6E00EFF629 /* GRMustacheJavaSuites */; settings = {ASSET_TAGS = (); }; }; + 56DAC7601BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest_compilerError.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B61528D0F900ADD123 /* GRMustacheTemplateFromMethodsTest_compilerError.mustache */; settings = {ASSET_TAGS = (); }; }; + 56DAC7611BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B71528D0F900ADD123 /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache */; settings = {ASSET_TAGS = (); }; }; + 56DAC7621BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4B11528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache */; settings = {ASSET_TAGS = (); }; }; + 56DAC7631BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache in Resources */ = {isa = PBXBuildFile; fileRef = 5682B49D152849FD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache */; settings = {ASSET_TAGS = (); }; }; + 56DAC7641BB69F6D0010FE01 /* GRMustacheTemplateRepositoryTest_UTF8 in Resources */ = {isa = PBXBuildFile; fileRef = 5682B4961528486A00ADD123 /* GRMustacheTemplateRepositoryTest_UTF8 */; settings = {ASSET_TAGS = (); }; }; + 56DAC76A1BB69FC40010FE01 /* GRMustachePrivateAPITest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DEC3B0152638E20031E8DC /* GRMustachePrivateAPITest.m */; }; + 56DAC76B1BB69FC40010FE01 /* GRMustacheContextPrivateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563D66EC152649DF008628C5 /* GRMustacheContextPrivateTest.m */; }; + 56DAC76C1BB69FC40010FE01 /* GRMustacheExpressionParserTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 563D66EE152649DF008628C5 /* GRMustacheExpressionParserTest.m */; }; + 56DAC76D1BB69FC40010FE01 /* GRMustacheTemplateGeneratorTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C88929190A349B0084FC5A /* GRMustacheTemplateGeneratorTest.m */; }; + 56DAC76E1BB6A0040010FE01 /* GRMustacheConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF365819B8EE7A00854524 /* GRMustacheConfiguration.m */; }; + 56DAC76F1BB6A0040010FE01 /* GRMustacheExpressionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366119B8EE8B00854524 /* GRMustacheExpressionParser.m */; }; + 56DAC7701BB6A0040010FE01 /* GRMustacheTemplateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366319B8EE8B00854524 /* GRMustacheTemplateParser.m */; }; + 56DAC7711BB6A0040010FE01 /* GRMustacheToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366519B8EE8B00854524 /* GRMustacheToken.m */; }; + 56DAC7721BB6A0040010FE01 /* GRMustacheCompiler.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368019B8EE9D00854524 /* GRMustacheCompiler.m */; }; + 56DAC7731BB6A0040010FE01 /* GRMustacheExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367519B8EE9D00854524 /* GRMustacheExpression.m */; }; + 56DAC7741BB6A0040010FE01 /* GRMustacheFilteredExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367819B8EE9D00854524 /* GRMustacheFilteredExpression.m */; }; + 56DAC7751BB6A0040010FE01 /* GRMustacheIdentifierExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367A19B8EE9D00854524 /* GRMustacheIdentifierExpression.m */; }; + 56DAC7761BB6A0040010FE01 /* GRMustacheImplicitIteratorExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367C19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m */; }; + 56DAC7771BB6A0040010FE01 /* GRMustacheScopedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367E19B8EE9D00854524 /* GRMustacheScopedExpression.m */; }; + 56DAC7781BB6A0040010FE01 /* GRMustachePartialOverrideNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368319B8EE9D00854524 /* GRMustachePartialOverrideNode.m */; }; + 56DAC7791BB6A0040010FE01 /* GRMustacheBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368519B8EE9D00854524 /* GRMustacheBlock.m */; }; + 56DAC77A1BB6A0040010FE01 /* GRMustachePartialNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368719B8EE9D00854524 /* GRMustachePartialNode.m */; }; + 56DAC77B1BB6A0040010FE01 /* GRMustacheSectionTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368919B8EE9D00854524 /* GRMustacheSectionTag.m */; }; + 56DAC77C1BB6A0040010FE01 /* GRMustacheTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368C19B8EE9D00854524 /* GRMustacheTag.m */; }; + 56DAC77D1BB6A0040010FE01 /* GRMustacheTemplateAST.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368E19B8EE9D00854524 /* GRMustacheTemplateAST.m */; }; + 56DAC77E1BB6A0040010FE01 /* GRMustacheTextNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369219B8EE9D00854524 /* GRMustacheTextNode.m */; }; + 56DAC77F1BB6A0040010FE01 /* GRMustacheVariableTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369419B8EE9D00854524 /* GRMustacheVariableTag.m */; }; + 56DAC7801BB6A0040010FE01 /* GRMustacheContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36D819B8EEAD00854524 /* GRMustacheContext.m */; }; + 56DAC7811BB6A0040010FE01 /* GRMustacheExpressionInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DA19B8EEAD00854524 /* GRMustacheExpressionInvocation.m */; }; + 56DAC7821BB6A0040010FE01 /* GRMustacheFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DD19B8EEAD00854524 /* GRMustacheFilter.m */; }; + 56DAC7831BB6A0040010FE01 /* GRMustacheKeyAccess.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DF19B8EEAE00854524 /* GRMustacheKeyAccess.m */; }; + 56DAC7841BB6A0040010FE01 /* GRMustacheRendering.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E219B8EEAE00854524 /* GRMustacheRendering.m */; }; + 56DAC7851BB6A0040010FE01 /* GRMustacheRenderingEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E419B8EEAE00854524 /* GRMustacheRenderingEngine.m */; }; + 56DAC7861BB6A0040010FE01 /* GRMustacheTemplate.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370C19B8EEB900854524 /* GRMustacheTemplate.m */; }; + 56DAC7871BB6A0040010FE01 /* GRMustacheTemplateRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370F19B8EEB900854524 /* GRMustacheTemplateRepository.m */; }; + 56DAC7881BB6A0040010FE01 /* GRMustacheExpressionGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B01A4B19C49AF5000439C7 /* GRMustacheExpressionGenerator.m */; }; + 56DAC7891BB6A0040010FE01 /* GRMustacheTemplateGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF371E19B8EEC700854524 /* GRMustacheTemplateGenerator.m */; }; + 56DAC78A1BB6A0040010FE01 /* NSFormatter+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372119B8EEC700854524 /* NSFormatter+GRMustache.m */; }; + 56DAC78B1BB6A0040010FE01 /* NSValueTransformer+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372319B8EEC700854524 /* NSValueTransformer+GRMustache.m */; }; + 56DAC78C1BB6A0040010FE01 /* GRMustacheEachFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372519B8EEC700854524 /* GRMustacheEachFilter.m */; }; + 56DAC78D1BB6A0040010FE01 /* GRMustacheHTMLEscapeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372719B8EEC700854524 /* GRMustacheHTMLEscapeFilter.m */; }; + 56DAC78E1BB6A0040010FE01 /* GRMustacheJavascriptEscapeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372919B8EEC700854524 /* GRMustacheJavascriptEscapeFilter.m */; }; + 56DAC78F1BB6A0040010FE01 /* GRMustacheLocalizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372C19B8EEC700854524 /* GRMustacheLocalizer.m */; }; + 56DAC7911BB6A0040010FE01 /* GRMustacheURLEscapeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372F19B8EEC700854524 /* GRMustacheURLEscapeFilter.m */; }; + 56DAC7921BB6A0040010FE01 /* GRMustacheError.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375B19B8EF2800854524 /* GRMustacheError.m */; }; + 56DAC7931BB6A0040010FE01 /* GRMustacheTranslateCharacters.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375C19B8EF2800854524 /* GRMustacheTranslateCharacters.m */; }; + 56DAC7961BB6A7DC0010FE01 /* GRMustacheEachFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7951BB6A7DC0010FE01 /* GRMustacheEachFilterTest.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7971BB6A7DC0010FE01 /* GRMustacheEachFilterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7951BB6A7DC0010FE01 /* GRMustacheEachFilterTest.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7A41BB6C8DD0010FE01 /* GRMustacheKeyValueCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DAC7A21BB6C8DD0010FE01 /* GRMustacheKeyValueCoding.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56DAC7A51BB6C8DD0010FE01 /* GRMustacheKeyValueCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DAC7A21BB6C8DD0010FE01 /* GRMustacheKeyValueCoding.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56DAC7AC1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DAC7AA1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding_private.h */; settings = {ASSET_TAGS = (); }; }; + 56DAC7AD1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DAC7AA1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding_private.h */; settings = {ASSET_TAGS = (); }; }; + 56DAC7AE1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7AB1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7AF1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7AB1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7B01BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7AB1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7B11BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7AB1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7B51BB6DDAB0010FE01 /* GRMustache_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DAC7B21BB6DDAB0010FE01 /* GRMustache_private.h */; settings = {ASSET_TAGS = (); }; }; + 56DAC7B61BB6DDAB0010FE01 /* GRMustache_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DAC7B21BB6DDAB0010FE01 /* GRMustache_private.h */; settings = {ASSET_TAGS = (); }; }; + 56DAC7B71BB6DDAB0010FE01 /* GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DAC7B31BB6DDAB0010FE01 /* GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56DAC7B81BB6DDAB0010FE01 /* GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56DAC7B31BB6DDAB0010FE01 /* GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 56DAC7B91BB6DDAB0010FE01 /* GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7B41BB6DDAB0010FE01 /* GRMustache.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7BA1BB6DDAB0010FE01 /* GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7B41BB6DDAB0010FE01 /* GRMustache.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7BB1BB6DDAB0010FE01 /* GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7B41BB6DDAB0010FE01 /* GRMustache.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7BC1BB6DDAB0010FE01 /* GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56DAC7B41BB6DDAB0010FE01 /* GRMustache.m */; settings = {ASSET_TAGS = (); }; }; + 56DAC7BE1BB6E85B0010FE01 /* specs in Resources */ = {isa = PBXBuildFile; fileRef = 56DAC7BD1BB6E85B0010FE01 /* specs */; settings = {ASSET_TAGS = (); }; }; + 56DAC7BF1BB6E85B0010FE01 /* specs in Resources */ = {isa = PBXBuildFile; fileRef = 56DAC7BD1BB6E85B0010FE01 /* specs */; settings = {ASSET_TAGS = (); }; }; 6586A0691B9E2E100067C98E /* GRMustacheAvailabilityMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375619B8EF2800854524 /* GRMustacheAvailabilityMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6586A06A1B9E2E100067C98E /* GRMustacheAvailabilityMacros_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375719B8EF2800854524 /* GRMustacheAvailabilityMacros_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A06B1B9E2E100067C98E /* GRMustacheBuffer_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375819B8EF2800854524 /* GRMustacheBuffer_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A06C1B9E2E100067C98E /* GRMustacheContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375919B8EF2800854524 /* GRMustacheContentType.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6586A06D1B9E2E100067C98E /* GRMustacheError.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375A19B8EF2800854524 /* GRMustacheError.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A06E1B9E2E100067C98E /* GRMustacheError.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375B19B8EF2800854524 /* GRMustacheError.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 6586A06F1B9E2E100067C98E /* GRMustacheTranslateCharacters.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375C19B8EF2800854524 /* GRMustacheTranslateCharacters.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A06E1B9E2E100067C98E /* GRMustacheError.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375B19B8EF2800854524 /* GRMustacheError.m */; }; + 6586A06F1B9E2E100067C98E /* GRMustacheTranslateCharacters.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF375C19B8EF2800854524 /* GRMustacheTranslateCharacters.m */; }; 6586A0701B9E2E100067C98E /* GRMustacheTranslateCharacters_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF375D19B8EF2800854524 /* GRMustacheTranslateCharacters_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0711B9E2E310067C98E /* GRMustacheExpressionGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B01A4B19C49AF5000439C7 /* GRMustacheExpressionGenerator.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0711B9E2E310067C98E /* GRMustacheExpressionGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56B01A4B19C49AF5000439C7 /* GRMustacheExpressionGenerator.m */; }; 6586A0721B9E2E310067C98E /* GRMustacheExpressionGenerator_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56B01A4A19C49AF5000439C7 /* GRMustacheExpressionGenerator_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0731B9E2E310067C98E /* GRMustacheTemplateGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF371E19B8EEC700854524 /* GRMustacheTemplateGenerator.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0731B9E2E310067C98E /* GRMustacheTemplateGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF371E19B8EEC700854524 /* GRMustacheTemplateGenerator.m */; }; 6586A0741B9E2E310067C98E /* GRMustacheTemplateGenerator_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF371F19B8EEC700854524 /* GRMustacheTemplateGenerator_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A0751B9E2E310067C98E /* NSFormatter+GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372019B8EEC700854524 /* NSFormatter+GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A0761B9E2E310067C98E /* NSFormatter+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372119B8EEC700854524 /* NSFormatter+GRMustache.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0761B9E2E310067C98E /* NSFormatter+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372119B8EEC700854524 /* NSFormatter+GRMustache.m */; }; 6586A0771B9E2E310067C98E /* NSValueTransformer+GRMustache.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372219B8EEC700854524 /* NSValueTransformer+GRMustache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A0781B9E2E310067C98E /* NSValueTransformer+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372319B8EEC700854524 /* NSValueTransformer+GRMustache.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 6586A0791B9E2E360067C98E /* GRMustacheEachFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372519B8EEC700854524 /* GRMustacheEachFilter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0781B9E2E310067C98E /* NSValueTransformer+GRMustache.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372319B8EEC700854524 /* NSValueTransformer+GRMustache.m */; }; + 6586A0791B9E2E360067C98E /* GRMustacheEachFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372519B8EEC700854524 /* GRMustacheEachFilter.m */; }; 6586A07A1B9E2E360067C98E /* GRMustacheEachFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372619B8EEC700854524 /* GRMustacheEachFilter_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A07B1B9E2E360067C98E /* GRMustacheHTMLLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372719B8EEC700854524 /* GRMustacheHTMLLibrary.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 6586A07C1B9E2E360067C98E /* GRMustacheHTMLLibrary_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372819B8EEC700854524 /* GRMustacheHTMLLibrary_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A07D1B9E2E360067C98E /* GRMustacheJavascriptLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372919B8EEC700854524 /* GRMustacheJavascriptLibrary.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 6586A07E1B9E2E360067C98E /* GRMustacheJavascriptLibrary_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372A19B8EEC700854524 /* GRMustacheJavascriptLibrary_private.h */; settings = {ASSET_TAGS = (); }; }; + 6586A07B1B9E2E360067C98E /* GRMustacheHTMLEscapeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372719B8EEC700854524 /* GRMustacheHTMLEscapeFilter.m */; }; + 6586A07C1B9E2E360067C98E /* GRMustacheHTMLEscapeFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372819B8EEC700854524 /* GRMustacheHTMLEscapeFilter_private.h */; settings = {ASSET_TAGS = (); }; }; + 6586A07D1B9E2E360067C98E /* GRMustacheJavascriptEscapeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372919B8EEC700854524 /* GRMustacheJavascriptEscapeFilter.m */; }; + 6586A07E1B9E2E360067C98E /* GRMustacheJavascriptEscapeFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372A19B8EEC700854524 /* GRMustacheJavascriptEscapeFilter_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A07F1B9E2E360067C98E /* GRMustacheLocalizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372B19B8EEC700854524 /* GRMustacheLocalizer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A0801B9E2E360067C98E /* GRMustacheLocalizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372C19B8EEC700854524 /* GRMustacheLocalizer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 6586A0811B9E2E360067C98E /* GRMustacheStandardLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372D19B8EEC700854524 /* GRMustacheStandardLibrary.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 6586A0821B9E2E360067C98E /* GRMustacheStandardLibrary_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF372E19B8EEC700854524 /* GRMustacheStandardLibrary_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0831B9E2E360067C98E /* GRMustacheURLLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372F19B8EEC700854524 /* GRMustacheURLLibrary.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 6586A0841B9E2E360067C98E /* GRMustacheURLLibrary_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF373019B8EEC700854524 /* GRMustacheURLLibrary_private.h */; settings = {ASSET_TAGS = (); }; }; + 6586A0801B9E2E360067C98E /* GRMustacheLocalizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372C19B8EEC700854524 /* GRMustacheLocalizer.m */; }; + 6586A0831B9E2E360067C98E /* GRMustacheURLEscapeFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF372F19B8EEC700854524 /* GRMustacheURLEscapeFilter.m */; }; + 6586A0841B9E2E360067C98E /* GRMustacheURLEscapeFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF373019B8EEC700854524 /* GRMustacheURLEscapeFilter_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A0851B9E2E4A0067C98E /* GRMustacheTemplate.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF370B19B8EEB900854524 /* GRMustacheTemplate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A0861B9E2E4A0067C98E /* GRMustacheTemplate.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370C19B8EEB900854524 /* GRMustacheTemplate.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0861B9E2E4A0067C98E /* GRMustacheTemplate.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370C19B8EEB900854524 /* GRMustacheTemplate.m */; }; 6586A0871B9E2E4A0067C98E /* GRMustacheTemplate_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF370D19B8EEB900854524 /* GRMustacheTemplate_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A0881B9E2E4A0067C98E /* GRMustacheTemplateRepository.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF370E19B8EEB900854524 /* GRMustacheTemplateRepository.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A0891B9E2E4A0067C98E /* GRMustacheTemplateRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370F19B8EEB900854524 /* GRMustacheTemplateRepository.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0891B9E2E4A0067C98E /* GRMustacheTemplateRepository.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF370F19B8EEB900854524 /* GRMustacheTemplateRepository.m */; }; 6586A08A1B9E2E4A0067C98E /* GRMustacheTemplateRepository_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF371019B8EEB900854524 /* GRMustacheTemplateRepository_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A08B1B9E2E4F0067C98E /* GRMustacheContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36D719B8EEAD00854524 /* GRMustacheContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A08C1B9E2E4F0067C98E /* GRMustacheContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36D819B8EEAD00854524 /* GRMustacheContext.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A08C1B9E2E4F0067C98E /* GRMustacheContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36D819B8EEAD00854524 /* GRMustacheContext.m */; }; 6586A08D1B9E2E4F0067C98E /* GRMustacheContext_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36D919B8EEAD00854524 /* GRMustacheContext_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A08E1B9E2E4F0067C98E /* GRMustacheExpressionInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DA19B8EEAD00854524 /* GRMustacheExpressionInvocation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A08E1B9E2E4F0067C98E /* GRMustacheExpressionInvocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DA19B8EEAD00854524 /* GRMustacheExpressionInvocation.m */; }; 6586A08F1B9E2E4F0067C98E /* GRMustacheExpressionInvocation_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36DB19B8EEAD00854524 /* GRMustacheExpressionInvocation_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A0901B9E2E4F0067C98E /* GRMustacheFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36DC19B8EEAD00854524 /* GRMustacheFilter.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A0911B9E2E4F0067C98E /* GRMustacheFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DD19B8EEAD00854524 /* GRMustacheFilter.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0911B9E2E4F0067C98E /* GRMustacheFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DD19B8EEAD00854524 /* GRMustacheFilter.m */; }; 6586A0921B9E2E4F0067C98E /* GRMustacheFilter_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36DE19B8EEAD00854524 /* GRMustacheFilter_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0931B9E2E4F0067C98E /* GRMustacheKeyAccess.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DF19B8EEAE00854524 /* GRMustacheKeyAccess.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0931B9E2E4F0067C98E /* GRMustacheKeyAccess.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36DF19B8EEAE00854524 /* GRMustacheKeyAccess.m */; }; 6586A0941B9E2E4F0067C98E /* GRMustacheKeyAccess_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E019B8EEAE00854524 /* GRMustacheKeyAccess_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A0951B9E2E4F0067C98E /* GRMustacheRendering.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E119B8EEAE00854524 /* GRMustacheRendering.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A0961B9E2E4F0067C98E /* GRMustacheRendering.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E219B8EEAE00854524 /* GRMustacheRendering.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0961B9E2E4F0067C98E /* GRMustacheRendering.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E219B8EEAE00854524 /* GRMustacheRendering.m */; }; 6586A0971B9E2E4F0067C98E /* GRMustacheRendering_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E319B8EEAE00854524 /* GRMustacheRendering_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0981B9E2E4F0067C98E /* GRMustacheRenderingEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E419B8EEAE00854524 /* GRMustacheRenderingEngine.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0981B9E2E4F0067C98E /* GRMustacheRenderingEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF36E419B8EEAE00854524 /* GRMustacheRenderingEngine.m */; }; 6586A0991B9E2E4F0067C98E /* GRMustacheRenderingEngine_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E519B8EEAE00854524 /* GRMustacheRenderingEngine_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A09A1B9E2E4F0067C98E /* GRMustacheSafeKeyAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E619B8EEAE00854524 /* GRMustacheSafeKeyAccess.h */; settings = {ATTRIBUTES = (Public, ); }; }; 6586A09B1B9E2E4F0067C98E /* GRMustacheTagDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF36E719B8EEAE00854524 /* GRMustacheTagDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A09C1B9E2E550067C98E /* GRMustacheCompiler.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368019B8EE9D00854524 /* GRMustacheCompiler.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A09C1B9E2E550067C98E /* GRMustacheCompiler.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368019B8EE9D00854524 /* GRMustacheCompiler.m */; }; 6586A09D1B9E2E550067C98E /* GRMustacheCompiler_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368119B8EE9D00854524 /* GRMustacheCompiler_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A09E1B9E2E5B0067C98E /* GRMustacheInheritedPartialNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368319B8EE9D00854524 /* GRMustacheInheritedPartialNode.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 6586A09F1B9E2E5B0067C98E /* GRMustacheInheritedPartialNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368419B8EE9D00854524 /* GRMustacheInheritedPartialNode_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0A01B9E2E5B0067C98E /* GRMustacheInheritableSectionNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368519B8EE9D00854524 /* GRMustacheInheritableSectionNode.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 6586A0A11B9E2E5B0067C98E /* GRMustacheInheritableSectionNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368619B8EE9D00854524 /* GRMustacheInheritableSectionNode_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0A21B9E2E5B0067C98E /* GRMustachePartialNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368719B8EE9D00854524 /* GRMustachePartialNode.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A09E1B9E2E5B0067C98E /* GRMustachePartialOverrideNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368319B8EE9D00854524 /* GRMustachePartialOverrideNode.m */; }; + 6586A09F1B9E2E5B0067C98E /* GRMustachePartialOverrideNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368419B8EE9D00854524 /* GRMustachePartialOverrideNode_private.h */; settings = {ASSET_TAGS = (); }; }; + 6586A0A01B9E2E5B0067C98E /* GRMustacheBlock.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368519B8EE9D00854524 /* GRMustacheBlock.m */; }; + 6586A0A11B9E2E5B0067C98E /* GRMustacheBlock_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368619B8EE9D00854524 /* GRMustacheBlock_private.h */; settings = {ASSET_TAGS = (); }; }; + 6586A0A21B9E2E5B0067C98E /* GRMustachePartialNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368719B8EE9D00854524 /* GRMustachePartialNode.m */; }; 6586A0A31B9E2E5B0067C98E /* GRMustachePartialNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368819B8EE9D00854524 /* GRMustachePartialNode_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0A41B9E2E5B0067C98E /* GRMustacheSectionTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368919B8EE9D00854524 /* GRMustacheSectionTag.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0A41B9E2E5B0067C98E /* GRMustacheSectionTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368919B8EE9D00854524 /* GRMustacheSectionTag.m */; }; 6586A0A51B9E2E5B0067C98E /* GRMustacheSectionTag_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368A19B8EE9D00854524 /* GRMustacheSectionTag_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A0A61B9E2E5B0067C98E /* GRMustacheTag.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368B19B8EE9D00854524 /* GRMustacheTag.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A0A71B9E2E5B0067C98E /* GRMustacheTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368C19B8EE9D00854524 /* GRMustacheTag.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0A71B9E2E5B0067C98E /* GRMustacheTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368C19B8EE9D00854524 /* GRMustacheTag.m */; }; 6586A0A81B9E2E5B0067C98E /* GRMustacheTag_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368D19B8EE9D00854524 /* GRMustacheTag_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0A91B9E2E5B0067C98E /* GRMustacheTemplateAST.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368E19B8EE9D00854524 /* GRMustacheTemplateAST.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0A91B9E2E5B0067C98E /* GRMustacheTemplateAST.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF368E19B8EE9D00854524 /* GRMustacheTemplateAST.m */; }; 6586A0AA1B9E2E5B0067C98E /* GRMustacheTemplateAST_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF368F19B8EE9D00854524 /* GRMustacheTemplateAST_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A0AB1B9E2E5B0067C98E /* GRMustacheTemplateASTNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369019B8EE9D00854524 /* GRMustacheTemplateASTNode_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A0AC1B9E2E5B0067C98E /* GRMustacheTemplateASTVisitor_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369119B8EE9D00854524 /* GRMustacheTemplateASTVisitor_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0AD1B9E2E5B0067C98E /* GRMustacheTextNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369219B8EE9D00854524 /* GRMustacheTextNode.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0AD1B9E2E5B0067C98E /* GRMustacheTextNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369219B8EE9D00854524 /* GRMustacheTextNode.m */; }; 6586A0AE1B9E2E5B0067C98E /* GRMustacheTextNode_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369319B8EE9D00854524 /* GRMustacheTextNode_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0AF1B9E2E5B0067C98E /* GRMustacheVariableTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369419B8EE9D00854524 /* GRMustacheVariableTag.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0AF1B9E2E5B0067C98E /* GRMustacheVariableTag.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF369419B8EE9D00854524 /* GRMustacheVariableTag.m */; }; 6586A0B01B9E2E5B0067C98E /* GRMustacheVariableTag_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF369519B8EE9D00854524 /* GRMustacheVariableTag_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0B11B9E2E600067C98E /* GRMustacheExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367519B8EE9D00854524 /* GRMustacheExpression.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0B11B9E2E600067C98E /* GRMustacheExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367519B8EE9D00854524 /* GRMustacheExpression.m */; }; 6586A0B21B9E2E600067C98E /* GRMustacheExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367619B8EE9D00854524 /* GRMustacheExpression_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A0B31B9E2E600067C98E /* GRMustacheExpressionVisitor_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367719B8EE9D00854524 /* GRMustacheExpressionVisitor_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0B41B9E2E600067C98E /* GRMustacheFilteredExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367819B8EE9D00854524 /* GRMustacheFilteredExpression.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0B41B9E2E600067C98E /* GRMustacheFilteredExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367819B8EE9D00854524 /* GRMustacheFilteredExpression.m */; }; 6586A0B51B9E2E600067C98E /* GRMustacheFilteredExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367919B8EE9D00854524 /* GRMustacheFilteredExpression_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0B61B9E2E600067C98E /* GRMustacheIdentifierExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367A19B8EE9D00854524 /* GRMustacheIdentifierExpression.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0B61B9E2E600067C98E /* GRMustacheIdentifierExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367A19B8EE9D00854524 /* GRMustacheIdentifierExpression.m */; }; 6586A0B71B9E2E600067C98E /* GRMustacheIdentifierExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367B19B8EE9D00854524 /* GRMustacheIdentifierExpression_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0B81B9E2E600067C98E /* GRMustacheImplicitIteratorExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367C19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0B81B9E2E600067C98E /* GRMustacheImplicitIteratorExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367C19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m */; }; 6586A0B91B9E2E600067C98E /* GRMustacheImplicitIteratorExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367D19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0BA1B9E2E600067C98E /* GRMustacheScopedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367E19B8EE9D00854524 /* GRMustacheScopedExpression.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0BA1B9E2E600067C98E /* GRMustacheScopedExpression.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF367E19B8EE9D00854524 /* GRMustacheScopedExpression.m */; }; 6586A0BB1B9E2E600067C98E /* GRMustacheScopedExpression_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF367F19B8EE9D00854524 /* GRMustacheScopedExpression_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0BC1B9E2E660067C98E /* GRMustacheExpressionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366119B8EE8B00854524 /* GRMustacheExpressionParser.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0BC1B9E2E660067C98E /* GRMustacheExpressionParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366119B8EE8B00854524 /* GRMustacheExpressionParser.m */; }; 6586A0BD1B9E2E660067C98E /* GRMustacheExpressionParser_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF366219B8EE8B00854524 /* GRMustacheExpressionParser_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0BE1B9E2E660067C98E /* GRMustacheTemplateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366319B8EE8B00854524 /* GRMustacheTemplateParser.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0BE1B9E2E660067C98E /* GRMustacheTemplateParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366319B8EE8B00854524 /* GRMustacheTemplateParser.m */; }; 6586A0BF1B9E2E660067C98E /* GRMustacheTemplateParser_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF366419B8EE8B00854524 /* GRMustacheTemplateParser_private.h */; settings = {ASSET_TAGS = (); }; }; - 6586A0C01B9E2E660067C98E /* GRMustacheToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366519B8EE8B00854524 /* GRMustacheToken.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0C01B9E2E660067C98E /* GRMustacheToken.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF366519B8EE8B00854524 /* GRMustacheToken.m */; }; 6586A0C11B9E2E660067C98E /* GRMustacheToken_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF366619B8EE8B00854524 /* GRMustacheToken_private.h */; settings = {ASSET_TAGS = (); }; }; 6586A0C21B9E2E6A0067C98E /* GRMustacheConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF365719B8EE7A00854524 /* GRMustacheConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6586A0C31B9E2E6A0067C98E /* GRMustacheConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF365819B8EE7A00854524 /* GRMustacheConfiguration.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 6586A0C31B9E2E6A0067C98E /* GRMustacheConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 56BF365819B8EE7A00854524 /* GRMustacheConfiguration.m */; }; 6586A0C41B9E2E6A0067C98E /* GRMustacheConfiguration_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 56BF365919B8EE7A00854524 /* GRMustacheConfiguration_private.h */; settings = {ASSET_TAGS = (); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 56DEC258152631040031E8DC /* PBXContainerItemProxy */ = { + 56214B811BA1A4C50070C6CF /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 56DEC19C15262FC80031E8DC /* Project object */; proxyType = 1; - remoteGlobalIDString = 56DEC247152631040031E8DC; - remoteInfo = "GRMustache7-MacOS"; + remoteGlobalIDString = 6586A05C1B9E2D720067C98E; + remoteInfo = GRMustacheiOS; }; - 56DEC27F1526311C0031E8DC /* PBXContainerItemProxy */ = { + 56214B901BA1A4D50070C6CF /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 56DEC19C15262FC80031E8DC /* Project object */; proxyType = 1; - remoteGlobalIDString = 56DEC26D1526311B0031E8DC; - remoteInfo = "GRMustache7-iOS"; + remoteGlobalIDString = 56214B6E1BA1A34A0070C6CF; + remoteInfo = GRMustacheOSX; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 560959BE1BD3C7A40000511D /* GRMustacheLambdaTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheLambdaTest.m; sourceTree = ""; }; 560CE88E1526EEF4004F935E /* GRBooleanTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRBooleanTest.m; sourceTree = ""; }; + 56214B6F1BA1A34A0070C6CF /* GRMustache.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GRMustache.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 56214B7B1BA1A4C50070C6CF /* GRMustacheiOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GRMustacheiOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 56214B8A1BA1A4D50070C6CF /* GRMustacheOSXTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GRMustacheOSXTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 56214B951BA1A5100070C6CF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5623853918CF365D0034D982 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 5623B795152731B600DF16A6 /* GRMustacheParsingErrorsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheParsingErrorsTest.m; sourceTree = ""; }; 563A5EA6163403C000E7E810 /* GRMustacheFoundationCollectionTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheFoundationCollectionTest.m; sourceTree = ""; }; 563D66E81526497E008628C5 /* GRMustacheSuitesTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheSuitesTest.m; sourceTree = ""; }; 563D66EC152649DF008628C5 /* GRMustacheContextPrivateTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheContextPrivateTest.m; sourceTree = ""; }; 563D66EE152649DF008628C5 /* GRMustacheExpressionParserTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheExpressionParserTest.m; sourceTree = ""; }; - 563D66F315264B40008628C5 /* GRMustacheSuites */ = {isa = PBXFileReference; lastKnownFileType = folder; path = GRMustacheSuites; sourceTree = ""; }; + 563D66F315264B40008628C5 /* Tests */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Tests; path = GRMustacheTests/vendor/groue/GRMustacheSpec/Tests; sourceTree = SOURCE_ROOT; }; 5648F1B618998BC5001F4B83 /* GRMustacheTemplateRepositoryTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheTemplateRepositoryTest.m; sourceTree = ""; }; - 5662BA3E15A05268001FD2CA /* AppledocSettings.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = AppledocSettings.plist; path = ../AppledocSettings.plist; sourceTree = ""; }; + 5662BA3E15A05268001FD2CA /* AppledocSettings.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = AppledocSettings.plist; sourceTree = ""; }; 568140D7163659CB00310B7F /* GRMustacheRenderingObjectTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheRenderingObjectTest.m; sourceTree = ""; }; 568140DD16365CF500310B7F /* GRMustacheTemplateRepositoryTest */ = {isa = PBXFileReference; lastKnownFileType = folder; path = GRMustacheTemplateRepositoryTest; sourceTree = ""; }; 568140E016365D3000310B7F /* GRMustacheTemplateRepositoryWithBaseURLTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheTemplateRepositoryWithBaseURLTest.m; sourceTree = ""; }; @@ -519,7 +516,6 @@ 5682B4BF1528DF4900ADD123 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 5682B4C41528E0C500ADD123 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/CoreData.framework; sourceTree = DEVELOPER_DIR; }; 5688264C199DFCDF00922497 /* GRMustacheTemplateRepositoryWithBundleTestResources */ = {isa = PBXFileReference; lastKnownFileType = folder; path = GRMustacheTemplateRepositoryWithBundleTestResources; sourceTree = ""; }; - 56A731B818123F1900B8570A /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; name = Makefile; path = ../Makefile; sourceTree = ""; }; 56A7591119C173E6008D119F /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 56A7591219C173E6008D119F /* NSJSONSerialization+Comments.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSJSONSerialization+Comments.h"; sourceTree = ""; }; 56A7591319C173E6008D119F /* NSJSONSerialization+Comments.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSJSONSerialization+Comments.m"; sourceTree = ""; }; @@ -528,15 +524,14 @@ 56A8D4921527A23900D9C718 /* GRMustacheTagDelegateTest.mustache */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GRMustacheTagDelegateTest.mustache; sourceTree = ""; }; 56A8D4951527A3CE00D9C718 /* GRMustacheTagDelegateTest_wrapper.mustache */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GRMustacheTagDelegateTest_wrapper.mustache; sourceTree = ""; }; 56ABDBC218D23CF7009DF17A /* GRMustacheTemplateTemplateRepositoryTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheTemplateTemplateRepositoryTest.m; sourceTree = ""; }; + 56AC8C981BA1F637009E4319 /* GRMustacheOSXPrivateTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GRMustacheOSXPrivateTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56B01A4A19C49AF5000439C7 /* GRMustacheExpressionGenerator_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheExpressionGenerator_private.h; sourceTree = ""; }; 56B01A4B19C49AF5000439C7 /* GRMustacheExpressionGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheExpressionGenerator.m; sourceTree = ""; }; - 56B4778C18CF8A7600EFF629 /* GRMustacheKeyedSubscriptingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheKeyedSubscriptingTest.m; sourceTree = ""; }; 56B4779018CF8AD100EFF629 /* GRMustacheContextProtectedObjectTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheContextProtectedObjectTest.m; sourceTree = ""; }; 56B4779618CF8D2A00EFF629 /* GRHoganSuitesTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRHoganSuitesTest.m; sourceTree = ""; }; 56B4779918CF8D3300EFF629 /* GRHoganSuites */ = {isa = PBXFileReference; lastKnownFileType = folder; path = GRHoganSuites; sourceTree = ""; }; 56B477A018CF9F6100EFF629 /* GRMustacheJavaSuitesTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheJavaSuitesTest.m; sourceTree = ""; }; 56B477A318CF9F6E00EFF629 /* GRMustacheJavaSuites */ = {isa = PBXFileReference; lastKnownFileType = folder; path = GRMustacheJavaSuites; sourceTree = ""; }; - 56B477A618D0E41A00EFF629 /* specs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = specs; path = tests/vendor/mustache/spec/specs; sourceTree = SOURCE_ROOT; }; 56BA242518C7A494006DA5F3 /* GRMustacheErrorHandlingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheErrorHandlingTest.m; sourceTree = ""; }; 56BA243518C7A550006DA5F3 /* GRMustacheConfigurationBaseContextTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheConfigurationBaseContextTest.m; sourceTree = ""; }; 56BA243618C7A550006DA5F3 /* GRMustacheConfigurationTagDelimitersTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheConfigurationTagDelimitersTest.m; sourceTree = ""; }; @@ -577,10 +572,10 @@ 56BF367F19B8EE9D00854524 /* GRMustacheScopedExpression_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheScopedExpression_private.h; sourceTree = ""; }; 56BF368019B8EE9D00854524 /* GRMustacheCompiler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheCompiler.m; sourceTree = ""; }; 56BF368119B8EE9D00854524 /* GRMustacheCompiler_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheCompiler_private.h; sourceTree = ""; }; - 56BF368319B8EE9D00854524 /* GRMustacheInheritedPartialNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheInheritedPartialNode.m; sourceTree = ""; }; - 56BF368419B8EE9D00854524 /* GRMustacheInheritedPartialNode_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheInheritedPartialNode_private.h; sourceTree = ""; }; - 56BF368519B8EE9D00854524 /* GRMustacheInheritableSectionNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheInheritableSectionNode.m; sourceTree = ""; }; - 56BF368619B8EE9D00854524 /* GRMustacheInheritableSectionNode_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheInheritableSectionNode_private.h; sourceTree = ""; }; + 56BF368319B8EE9D00854524 /* GRMustachePartialOverrideNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustachePartialOverrideNode.m; sourceTree = ""; }; + 56BF368419B8EE9D00854524 /* GRMustachePartialOverrideNode_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustachePartialOverrideNode_private.h; sourceTree = ""; }; + 56BF368519B8EE9D00854524 /* GRMustacheBlock.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheBlock.m; sourceTree = ""; }; + 56BF368619B8EE9D00854524 /* GRMustacheBlock_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheBlock_private.h; sourceTree = ""; }; 56BF368719B8EE9D00854524 /* GRMustachePartialNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustachePartialNode.m; sourceTree = ""; }; 56BF368819B8EE9D00854524 /* GRMustachePartialNode_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustachePartialNode_private.h; sourceTree = ""; }; 56BF368919B8EE9D00854524 /* GRMustacheSectionTag.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheSectionTag.m; sourceTree = ""; }; @@ -611,7 +606,6 @@ 56BF36E319B8EEAE00854524 /* GRMustacheRendering_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheRendering_private.h; sourceTree = ""; }; 56BF36E419B8EEAE00854524 /* GRMustacheRenderingEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheRenderingEngine.m; sourceTree = ""; }; 56BF36E519B8EEAE00854524 /* GRMustacheRenderingEngine_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheRenderingEngine_private.h; sourceTree = ""; }; - 56BF36E619B8EEAE00854524 /* GRMustacheSafeKeyAccess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheSafeKeyAccess.h; sourceTree = ""; }; 56BF36E719B8EEAE00854524 /* GRMustacheTagDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheTagDelegate.h; sourceTree = ""; }; 56BF370B19B8EEB900854524 /* GRMustacheTemplate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheTemplate.h; sourceTree = ""; }; 56BF370C19B8EEB900854524 /* GRMustacheTemplate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheTemplate.m; sourceTree = ""; }; @@ -627,16 +621,14 @@ 56BF372319B8EEC700854524 /* NSValueTransformer+GRMustache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSValueTransformer+GRMustache.m"; sourceTree = ""; }; 56BF372519B8EEC700854524 /* GRMustacheEachFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheEachFilter.m; sourceTree = ""; }; 56BF372619B8EEC700854524 /* GRMustacheEachFilter_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheEachFilter_private.h; sourceTree = ""; }; - 56BF372719B8EEC700854524 /* GRMustacheHTMLLibrary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheHTMLLibrary.m; sourceTree = ""; }; - 56BF372819B8EEC700854524 /* GRMustacheHTMLLibrary_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheHTMLLibrary_private.h; sourceTree = ""; }; - 56BF372919B8EEC700854524 /* GRMustacheJavascriptLibrary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheJavascriptLibrary.m; sourceTree = ""; }; - 56BF372A19B8EEC700854524 /* GRMustacheJavascriptLibrary_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheJavascriptLibrary_private.h; sourceTree = ""; }; + 56BF372719B8EEC700854524 /* GRMustacheHTMLEscapeFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheHTMLEscapeFilter.m; sourceTree = ""; }; + 56BF372819B8EEC700854524 /* GRMustacheHTMLEscapeFilter_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheHTMLEscapeFilter_private.h; sourceTree = ""; }; + 56BF372919B8EEC700854524 /* GRMustacheJavascriptEscapeFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheJavascriptEscapeFilter.m; sourceTree = ""; }; + 56BF372A19B8EEC700854524 /* GRMustacheJavascriptEscapeFilter_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheJavascriptEscapeFilter_private.h; sourceTree = ""; }; 56BF372B19B8EEC700854524 /* GRMustacheLocalizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheLocalizer.h; sourceTree = ""; }; 56BF372C19B8EEC700854524 /* GRMustacheLocalizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheLocalizer.m; sourceTree = ""; }; - 56BF372D19B8EEC700854524 /* GRMustacheStandardLibrary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheStandardLibrary.m; sourceTree = ""; }; - 56BF372E19B8EEC700854524 /* GRMustacheStandardLibrary_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheStandardLibrary_private.h; sourceTree = ""; }; - 56BF372F19B8EEC700854524 /* GRMustacheURLLibrary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheURLLibrary.m; sourceTree = ""; }; - 56BF373019B8EEC700854524 /* GRMustacheURLLibrary_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheURLLibrary_private.h; sourceTree = ""; }; + 56BF372F19B8EEC700854524 /* GRMustacheURLEscapeFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheURLEscapeFilter.m; sourceTree = ""; }; + 56BF373019B8EEC700854524 /* GRMustacheURLEscapeFilter_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheURLEscapeFilter_private.h; sourceTree = ""; }; 56BF375619B8EF2800854524 /* GRMustacheAvailabilityMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheAvailabilityMacros.h; sourceTree = ""; }; 56BF375719B8EF2800854524 /* GRMustacheAvailabilityMacros_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheAvailabilityMacros_private.h; sourceTree = ""; }; 56BF375819B8EF2800854524 /* GRMustacheBuffer_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheBuffer_private.h; sourceTree = ""; }; @@ -645,70 +637,65 @@ 56BF375B19B8EF2800854524 /* GRMustacheError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheError.m; sourceTree = ""; }; 56BF375C19B8EF2800854524 /* GRMustacheTranslateCharacters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheTranslateCharacters.m; sourceTree = ""; }; 56BF375D19B8EF2800854524 /* GRMustacheTranslateCharacters_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheTranslateCharacters_private.h; sourceTree = ""; }; - 56C1FDE719A66DBE00006AB4 /* GRMustacheSuites_7_2_Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheSuites_7_2_Test.m; sourceTree = ""; }; - 56C1FDEA19A66DC500006AB4 /* GRMustacheSuites_7_2 */ = {isa = PBXFileReference; lastKnownFileType = folder; path = GRMustacheSuites_7_2; sourceTree = ""; }; - 56C1FDF119A6721100006AB4 /* GRMustacheRenderingObject_7_2_Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheRenderingObject_7_2_Test.m; sourceTree = ""; }; - 56C1FDFC19A720B900006AB4 /* GRMustacheEachFilterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheEachFilterTest.m; sourceTree = ""; }; 56C88929190A349B0084FC5A /* GRMustacheTemplateGeneratorTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheTemplateGeneratorTest.m; sourceTree = ""; }; + 56DAC7111BB69DAC0010FE01 /* GRMustacheTestingDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheTestingDelegate.m; sourceTree = ""; }; + 56DAC7121BB69DAC0010FE01 /* GRMustacheTestingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheTestingDelegate.h; sourceTree = ""; }; + 56DAC7681BB69F6D0010FE01 /* GRMustacheiOSPrivateTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GRMustacheiOSPrivateTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 56DAC7951BB6A7DC0010FE01 /* GRMustacheEachFilterTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheEachFilterTest.m; sourceTree = ""; }; + 56DAC7A21BB6C8DD0010FE01 /* GRMustacheKeyValueCoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheKeyValueCoding.h; sourceTree = ""; }; + 56DAC7AA1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+GRMustacheKeyValueCoding_private.h"; sourceTree = ""; }; + 56DAC7AB1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+GRMustacheKeyValueCoding.m"; sourceTree = ""; }; + 56DAC7B21BB6DDAB0010FE01 /* GRMustache_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustache_private.h; sourceTree = ""; }; + 56DAC7B31BB6DDAB0010FE01 /* GRMustache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustache.h; sourceTree = ""; }; + 56DAC7B41BB6DDAB0010FE01 /* GRMustache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustache.m; sourceTree = ""; }; + 56DAC7BD1BB6E85B0010FE01 /* specs */ = {isa = PBXFileReference; lastKnownFileType = folder; name = specs; path = GRMustacheTests/vendor/mustache/spec/specs; sourceTree = SOURCE_ROOT; }; 56DEC1CB15262FF70031E8DC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 56DEC1F4152630710031E8DC /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; - 56DEC248152631040031E8DC /* libGRMustache7-MacOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libGRMustache7-MacOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 56DEC255152631040031E8DC /* GRMustache7-MacOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "GRMustache7-MacOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 56DEC26E1526311B0031E8DC /* libGRMustache7-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libGRMustache7-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 56DEC27B1526311C0031E8DC /* GRMustache7-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "GRMustache7-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 56DEC292152631300031E8DC /* GRMustache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustache.h; sourceTree = ""; }; - 56DEC293152631300031E8DC /* GRMustache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustache.m; sourceTree = ""; }; - 56DEC294152631300031E8DC /* GRMustache_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustache_private.h; sourceTree = ""; }; - 56DEC2BB152631300031E8DC /* GRMustacheVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheVersion.h; sourceTree = ""; }; 56DEC3AF152638E20031E8DC /* GRMustachePrivateAPITest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustachePrivateAPITest.h; sourceTree = ""; }; 56DEC3B0152638E20031E8DC /* GRMustachePrivateAPITest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustachePrivateAPITest.m; sourceTree = ""; }; 56DEC3B1152638E20031E8DC /* GRMustachePublicAPITest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustachePublicAPITest.h; sourceTree = ""; }; 56DEC3B2152638E20031E8DC /* GRMustachePublicAPITest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustachePublicAPITest.m; sourceTree = ""; }; - 56DEC3B3152638E20031E8DC /* GRMustacheTestBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GRMustacheTestBase.h; sourceTree = ""; }; - 56DEC3B4152638E20031E8DC /* GRMustacheTestBase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRMustacheTestBase.m; sourceTree = ""; }; 56DEC3BF152639560031E8DC /* GRSpecificationSuitesTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GRSpecificationSuitesTest.m; sourceTree = ""; }; - 56E2F2E616BA49A500F01DC2 /* TODO.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = TODO.md; path = ../TODO.md; sourceTree = ""; }; + 56E2F2E616BA49A500F01DC2 /* TODO.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = TODO.md; sourceTree = ""; }; 6586A05D1B9E2D720067C98E /* GRMustache.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GRMustache.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 6586A0C71B9E2F070067C98E /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = GRMustache/Info.plist; sourceTree = ""; }; - ABAF86A816A0A852001ADE96 /* GRMustache7Tests-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GRMustache7Tests-Info.plist"; sourceTree = ""; }; + 6586A0C71B9E2F070067C98E /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 56DEC245152631040031E8DC /* Frameworks */ = { + 56214B6B1BA1A34A0070C6CF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5682B4BE1528DF3F00ADD123 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 56DEC251152631040031E8DC /* Frameworks */ = { + 56214B781BA1A4C50070C6CF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5623853A18CF365D0034D982 /* XCTest.framework in Frameworks */, - 56DEC257152631040031E8DC /* Cocoa.framework in Frameworks */, - 56DEC25A152631040031E8DC /* libGRMustache7-MacOS.a in Frameworks */, + 56214B801BA1A4C50070C6CF /* GRMustache.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 56DEC26B1526311B0031E8DC /* Frameworks */ = { + 56214B871BA1A4D50070C6CF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5682B4C01528DF4A00ADD123 /* Foundation.framework in Frameworks */, + 56214B8F1BA1A4D50070C6CF /* GRMustache.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 56DEC2771526311C0031E8DC /* Frameworks */ = { + 56AC8C951BA1F637009E4319 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56DAC7461BB69F6D0010FE01 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5623853B18CF36660034D982 /* XCTest.framework in Frameworks */, - 5682B4C51528E0C600ADD123 /* CoreData.framework in Frameworks */, - 5682B4C31528E0B300ADD123 /* Foundation.framework in Frameworks */, - 56DEC27D1526311C0031E8DC /* UIKit.framework in Frameworks */, - 56DEC2811526311C0031E8DC /* libGRMustache7-iOS.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -726,16 +713,25 @@ isa = PBXGroup; children = ( 6586A0C71B9E2F070067C98E /* Info.plist */, - 56DEC291152631300031E8DC /* classes */, + 56DAC7B21BB6DDAB0010FE01 /* GRMustache_private.h */, + 56DAC7B31BB6DDAB0010FE01 /* GRMustache.h */, + 56DAC7B41BB6DDAB0010FE01 /* GRMustache.m */, + 56BF365619B8EE7A00854524 /* Configuration */, + 56BF366019B8EE8B00854524 /* Parsing */, + 56BF367319B8EE9D00854524 /* Compiling */, + 56BF36D619B8EEAD00854524 /* Rendering */, + 56BF370A19B8EEB900854524 /* Templates */, + 56BF371D19B8EEC700854524 /* Services */, + 56BF375519B8EF2800854524 /* Shared */, 5682B4C21528DF6900ADD123 /* Frameworks */, ); - name = GRMustache; + path = GRMustache; sourceTree = ""; }; 5682B47A1528392300ADD123 /* groue/GRMustache */ = { isa = PBXGroup; children = ( - 563D66F315264B40008628C5 /* GRMustacheSuites */, + 563D66F315264B40008628C5 /* Tests */, 563D66E81526497E008628C5 /* GRMustacheSuitesTest.m */, ); path = groue/GRMustache; @@ -780,8 +776,8 @@ 5682B47F1528399100ADD123 /* mustache/spec */ = { isa = PBXGroup; children = ( + 56DAC7BD1BB6E85B0010FE01 /* specs */, 56DEC3BF152639560031E8DC /* GRSpecificationSuitesTest.m */, - 56B477A618D0E41A00EFF629 /* specs */, ); path = mustache/spec; sourceTree = ""; @@ -907,6 +903,7 @@ 56BA245318C7A5BE006DA5F3 /* GRMustacheServicesTest */ = { isa = PBXGroup; children = ( + 56DAC7951BB6A7DC0010FE01 /* GRMustacheEachFilterTest.m */, 56BA245418C7A5BE006DA5F3 /* GRMustacheLocalizerTest.m */, 56BA247318C7A5CB006DA5F3 /* GRMustacheLocalizerTestBundle */, 56BA245818C7A5BE006DA5F3 /* GRMustacheNSFormatterTest.m */, @@ -928,7 +925,6 @@ 56BA248318C7A62E006DA5F3 /* GRMustacheContextTest */ = { isa = PBXGroup; children = ( - 56B4778C18CF8A7600EFF629 /* GRMustacheKeyedSubscriptingTest.m */, 56BA249818C7A65E006DA5F3 /* GRMustacheContextHasValueForMustacheExpressionTest.m */, 56B4779018CF8AD100EFF629 /* GRMustacheContextProtectedObjectTest.m */, 56BA248518C7A62E006DA5F3 /* GRMustacheContextTest.m */, @@ -952,12 +948,12 @@ 56BF366019B8EE8B00854524 /* Parsing */ = { isa = PBXGroup; children = ( - 56BF366119B8EE8B00854524 /* GRMustacheExpressionParser.m */, 56BF366219B8EE8B00854524 /* GRMustacheExpressionParser_private.h */, - 56BF366319B8EE8B00854524 /* GRMustacheTemplateParser.m */, + 56BF366119B8EE8B00854524 /* GRMustacheExpressionParser.m */, 56BF366419B8EE8B00854524 /* GRMustacheTemplateParser_private.h */, - 56BF366519B8EE8B00854524 /* GRMustacheToken.m */, + 56BF366319B8EE8B00854524 /* GRMustacheTemplateParser.m */, 56BF366619B8EE8B00854524 /* GRMustacheToken_private.h */, + 56BF366519B8EE8B00854524 /* GRMustacheToken.m */, ); path = Parsing; sourceTree = ""; @@ -965,8 +961,8 @@ 56BF367319B8EE9D00854524 /* Compiling */ = { isa = PBXGroup; children = ( - 56BF368019B8EE9D00854524 /* GRMustacheCompiler.m */, 56BF368119B8EE9D00854524 /* GRMustacheCompiler_private.h */, + 56BF368019B8EE9D00854524 /* GRMustacheCompiler.m */, 56BF367419B8EE9D00854524 /* Expressions */, 56BF368219B8EE9D00854524 /* TemplateAST */, ); @@ -976,17 +972,17 @@ 56BF367419B8EE9D00854524 /* Expressions */ = { isa = PBXGroup; children = ( - 56BF367519B8EE9D00854524 /* GRMustacheExpression.m */, 56BF367619B8EE9D00854524 /* GRMustacheExpression_private.h */, + 56BF367519B8EE9D00854524 /* GRMustacheExpression.m */, 56BF367719B8EE9D00854524 /* GRMustacheExpressionVisitor_private.h */, - 56BF367819B8EE9D00854524 /* GRMustacheFilteredExpression.m */, 56BF367919B8EE9D00854524 /* GRMustacheFilteredExpression_private.h */, - 56BF367A19B8EE9D00854524 /* GRMustacheIdentifierExpression.m */, + 56BF367819B8EE9D00854524 /* GRMustacheFilteredExpression.m */, 56BF367B19B8EE9D00854524 /* GRMustacheIdentifierExpression_private.h */, - 56BF367C19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m */, + 56BF367A19B8EE9D00854524 /* GRMustacheIdentifierExpression.m */, 56BF367D19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression_private.h */, - 56BF367E19B8EE9D00854524 /* GRMustacheScopedExpression.m */, + 56BF367C19B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m */, 56BF367F19B8EE9D00854524 /* GRMustacheScopedExpression_private.h */, + 56BF367E19B8EE9D00854524 /* GRMustacheScopedExpression.m */, ); path = Expressions; sourceTree = ""; @@ -994,25 +990,25 @@ 56BF368219B8EE9D00854524 /* TemplateAST */ = { isa = PBXGroup; children = ( - 56BF368319B8EE9D00854524 /* GRMustacheInheritedPartialNode.m */, - 56BF368419B8EE9D00854524 /* GRMustacheInheritedPartialNode_private.h */, - 56BF368519B8EE9D00854524 /* GRMustacheInheritableSectionNode.m */, - 56BF368619B8EE9D00854524 /* GRMustacheInheritableSectionNode_private.h */, - 56BF368719B8EE9D00854524 /* GRMustachePartialNode.m */, + 56BF368619B8EE9D00854524 /* GRMustacheBlock_private.h */, + 56BF368519B8EE9D00854524 /* GRMustacheBlock.m */, 56BF368819B8EE9D00854524 /* GRMustachePartialNode_private.h */, - 56BF368919B8EE9D00854524 /* GRMustacheSectionTag.m */, + 56BF368719B8EE9D00854524 /* GRMustachePartialNode.m */, + 56BF368419B8EE9D00854524 /* GRMustachePartialOverrideNode_private.h */, + 56BF368319B8EE9D00854524 /* GRMustachePartialOverrideNode.m */, 56BF368A19B8EE9D00854524 /* GRMustacheSectionTag_private.h */, + 56BF368919B8EE9D00854524 /* GRMustacheSectionTag.m */, + 56BF368D19B8EE9D00854524 /* GRMustacheTag_private.h */, 56BF368B19B8EE9D00854524 /* GRMustacheTag.h */, 56BF368C19B8EE9D00854524 /* GRMustacheTag.m */, - 56BF368D19B8EE9D00854524 /* GRMustacheTag_private.h */, - 56BF368E19B8EE9D00854524 /* GRMustacheTemplateAST.m */, 56BF368F19B8EE9D00854524 /* GRMustacheTemplateAST_private.h */, + 56BF368E19B8EE9D00854524 /* GRMustacheTemplateAST.m */, 56BF369019B8EE9D00854524 /* GRMustacheTemplateASTNode_private.h */, 56BF369119B8EE9D00854524 /* GRMustacheTemplateASTVisitor_private.h */, - 56BF369219B8EE9D00854524 /* GRMustacheTextNode.m */, 56BF369319B8EE9D00854524 /* GRMustacheTextNode_private.h */, - 56BF369419B8EE9D00854524 /* GRMustacheVariableTag.m */, + 56BF369219B8EE9D00854524 /* GRMustacheTextNode.m */, 56BF369519B8EE9D00854524 /* GRMustacheVariableTag_private.h */, + 56BF369419B8EE9D00854524 /* GRMustacheVariableTag.m */, ); path = TemplateAST; sourceTree = ""; @@ -1020,23 +1016,25 @@ 56BF36D619B8EEAD00854524 /* Rendering */ = { isa = PBXGroup; children = ( + 56BF36D919B8EEAD00854524 /* GRMustacheContext_private.h */, 56BF36D719B8EEAD00854524 /* GRMustacheContext.h */, 56BF36D819B8EEAD00854524 /* GRMustacheContext.m */, - 56BF36D919B8EEAD00854524 /* GRMustacheContext_private.h */, - 56BF36DA19B8EEAD00854524 /* GRMustacheExpressionInvocation.m */, 56BF36DB19B8EEAD00854524 /* GRMustacheExpressionInvocation_private.h */, + 56BF36DA19B8EEAD00854524 /* GRMustacheExpressionInvocation.m */, + 56BF36DE19B8EEAD00854524 /* GRMustacheFilter_private.h */, 56BF36DC19B8EEAD00854524 /* GRMustacheFilter.h */, 56BF36DD19B8EEAD00854524 /* GRMustacheFilter.m */, - 56BF36DE19B8EEAD00854524 /* GRMustacheFilter_private.h */, - 56BF36DF19B8EEAE00854524 /* GRMustacheKeyAccess.m */, 56BF36E019B8EEAE00854524 /* GRMustacheKeyAccess_private.h */, + 56BF36DF19B8EEAE00854524 /* GRMustacheKeyAccess.m */, + 56DAC7A21BB6C8DD0010FE01 /* GRMustacheKeyValueCoding.h */, + 56BF36E319B8EEAE00854524 /* GRMustacheRendering_private.h */, 56BF36E119B8EEAE00854524 /* GRMustacheRendering.h */, 56BF36E219B8EEAE00854524 /* GRMustacheRendering.m */, - 56BF36E319B8EEAE00854524 /* GRMustacheRendering_private.h */, - 56BF36E419B8EEAE00854524 /* GRMustacheRenderingEngine.m */, 56BF36E519B8EEAE00854524 /* GRMustacheRenderingEngine_private.h */, - 56BF36E619B8EEAE00854524 /* GRMustacheSafeKeyAccess.h */, + 56BF36E419B8EEAE00854524 /* GRMustacheRenderingEngine.m */, 56BF36E719B8EEAE00854524 /* GRMustacheTagDelegate.h */, + 56DAC7AA1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding_private.h */, + 56DAC7AB1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m */, ); path = Rendering; sourceTree = ""; @@ -1044,12 +1042,12 @@ 56BF370A19B8EEB900854524 /* Templates */ = { isa = PBXGroup; children = ( + 56BF370D19B8EEB900854524 /* GRMustacheTemplate_private.h */, 56BF370B19B8EEB900854524 /* GRMustacheTemplate.h */, 56BF370C19B8EEB900854524 /* GRMustacheTemplate.m */, - 56BF370D19B8EEB900854524 /* GRMustacheTemplate_private.h */, + 56BF371019B8EEB900854524 /* GRMustacheTemplateRepository_private.h */, 56BF370E19B8EEB900854524 /* GRMustacheTemplateRepository.h */, 56BF370F19B8EEB900854524 /* GRMustacheTemplateRepository.m */, - 56BF371019B8EEB900854524 /* GRMustacheTemplateRepository_private.h */, ); path = Templates; sourceTree = ""; @@ -1057,10 +1055,10 @@ 56BF371D19B8EEC700854524 /* Services */ = { isa = PBXGroup; children = ( - 56B01A4B19C49AF5000439C7 /* GRMustacheExpressionGenerator.m */, 56B01A4A19C49AF5000439C7 /* GRMustacheExpressionGenerator_private.h */, - 56BF371E19B8EEC700854524 /* GRMustacheTemplateGenerator.m */, + 56B01A4B19C49AF5000439C7 /* GRMustacheExpressionGenerator.m */, 56BF371F19B8EEC700854524 /* GRMustacheTemplateGenerator_private.h */, + 56BF371E19B8EEC700854524 /* GRMustacheTemplateGenerator.m */, 56BF372019B8EEC700854524 /* NSFormatter+GRMustache.h */, 56BF372119B8EEC700854524 /* NSFormatter+GRMustache.m */, 56BF372219B8EEC700854524 /* NSValueTransformer+GRMustache.h */, @@ -1073,18 +1071,16 @@ 56BF372419B8EEC700854524 /* StandardLibrary */ = { isa = PBXGroup; children = ( - 56BF372519B8EEC700854524 /* GRMustacheEachFilter.m */, 56BF372619B8EEC700854524 /* GRMustacheEachFilter_private.h */, - 56BF372719B8EEC700854524 /* GRMustacheHTMLLibrary.m */, - 56BF372819B8EEC700854524 /* GRMustacheHTMLLibrary_private.h */, - 56BF372919B8EEC700854524 /* GRMustacheJavascriptLibrary.m */, - 56BF372A19B8EEC700854524 /* GRMustacheJavascriptLibrary_private.h */, + 56BF372519B8EEC700854524 /* GRMustacheEachFilter.m */, + 56BF372819B8EEC700854524 /* GRMustacheHTMLEscapeFilter_private.h */, + 56BF372719B8EEC700854524 /* GRMustacheHTMLEscapeFilter.m */, + 56BF372A19B8EEC700854524 /* GRMustacheJavascriptEscapeFilter_private.h */, + 56BF372919B8EEC700854524 /* GRMustacheJavascriptEscapeFilter.m */, 56BF372B19B8EEC700854524 /* GRMustacheLocalizer.h */, 56BF372C19B8EEC700854524 /* GRMustacheLocalizer.m */, - 56BF372D19B8EEC700854524 /* GRMustacheStandardLibrary.m */, - 56BF372E19B8EEC700854524 /* GRMustacheStandardLibrary_private.h */, - 56BF372F19B8EEC700854524 /* GRMustacheURLLibrary.m */, - 56BF373019B8EEC700854524 /* GRMustacheURLLibrary_private.h */, + 56BF373019B8EEC700854524 /* GRMustacheURLEscapeFilter_private.h */, + 56BF372F19B8EEC700854524 /* GRMustacheURLEscapeFilter.m */, ); path = StandardLibrary; sourceTree = ""; @@ -1092,51 +1088,22 @@ 56BF375519B8EF2800854524 /* Shared */ = { isa = PBXGroup; children = ( - 56BF375619B8EF2800854524 /* GRMustacheAvailabilityMacros.h */, 56BF375719B8EF2800854524 /* GRMustacheAvailabilityMacros_private.h */, + 56BF375619B8EF2800854524 /* GRMustacheAvailabilityMacros.h */, 56BF375819B8EF2800854524 /* GRMustacheBuffer_private.h */, 56BF375919B8EF2800854524 /* GRMustacheContentType.h */, 56BF375A19B8EF2800854524 /* GRMustacheError.h */, 56BF375B19B8EF2800854524 /* GRMustacheError.m */, - 56BF375C19B8EF2800854524 /* GRMustacheTranslateCharacters.m */, 56BF375D19B8EF2800854524 /* GRMustacheTranslateCharacters_private.h */, + 56BF375C19B8EF2800854524 /* GRMustacheTranslateCharacters.m */, ); path = Shared; sourceTree = ""; }; - 56C1FDD419A4BE3D00006AB4 /* v7.2 */ = { - isa = PBXGroup; - children = ( - 56C1FDE519A66D8E00006AB4 /* Suites */, - 56C1FDFC19A720B900006AB4 /* GRMustacheEachFilterTest.m */, - 56C1FDF119A6721100006AB4 /* GRMustacheRenderingObject_7_2_Test.m */, - ); - path = v7.2; - sourceTree = ""; - }; - 56C1FDE519A66D8E00006AB4 /* Suites */ = { - isa = PBXGroup; - children = ( - 56C1FDE619A66D9F00006AB4 /* groue:GRMustache */, - ); - path = Suites; - sourceTree = ""; - }; - 56C1FDE619A66D9F00006AB4 /* groue:GRMustache */ = { - isa = PBXGroup; - children = ( - 56C1FDEA19A66DC500006AB4 /* GRMustacheSuites_7_2 */, - 56C1FDE719A66DBE00006AB4 /* GRMustacheSuites_7_2_Test.m */, - ); - name = "groue:GRMustache"; - path = groue/GRMustache; - sourceTree = ""; - }; 56DEC19A15262FC80031E8DC = { isa = PBXGroup; children = ( 5662BA3E15A05268001FD2CA /* AppledocSettings.plist */, - 56A731B818123F1900B8570A /* Makefile */, 56E2F2E616BA49A500F01DC2 /* TODO.md */, 567AEC4E15278C9A0009CA61 /* GRMustache */, 56DEC3AE152638CD0031E8DC /* Tests */, @@ -1147,11 +1114,12 @@ 56DEC1A615262FC90031E8DC /* Products */ = { isa = PBXGroup; children = ( - 56DEC248152631040031E8DC /* libGRMustache7-MacOS.a */, - 56DEC255152631040031E8DC /* GRMustache7-MacOSTests.xctest */, - 56DEC26E1526311B0031E8DC /* libGRMustache7-iOS.a */, - 56DEC27B1526311C0031E8DC /* GRMustache7-iOSTests.xctest */, 6586A05D1B9E2D720067C98E /* GRMustache.framework */, + 56214B6F1BA1A34A0070C6CF /* GRMustache.framework */, + 56214B7B1BA1A4C50070C6CF /* GRMustacheiOSTests.xctest */, + 56214B8A1BA1A4D50070C6CF /* GRMustacheOSXTests.xctest */, + 56AC8C981BA1F637009E4319 /* GRMustacheOSXPrivateTests.xctest */, + 56DAC7681BB69F6D0010FE01 /* GRMustacheiOSPrivateTests.xctest */, ); name = Products; sourceTree = ""; @@ -1167,24 +1135,6 @@ name = Frameworks; sourceTree = ""; }; - 56DEC291152631300031E8DC /* classes */ = { - isa = PBXGroup; - children = ( - 56BF365619B8EE7A00854524 /* Configuration */, - 56BF366019B8EE8B00854524 /* Parsing */, - 56BF367319B8EE9D00854524 /* Compiling */, - 56BF36D619B8EEAD00854524 /* Rendering */, - 56BF370A19B8EEB900854524 /* Templates */, - 56BF371D19B8EEC700854524 /* Services */, - 56BF375519B8EF2800854524 /* Shared */, - 56DEC292152631300031E8DC /* GRMustache.h */, - 56DEC294152631300031E8DC /* GRMustache_private.h */, - 56DEC293152631300031E8DC /* GRMustache.m */, - 56DEC2BB152631300031E8DC /* GRMustacheVersion.h */, - ); - path = classes; - sourceTree = ""; - }; 56DEC34A152636000031E8DC /* vendor */ = { isa = PBXGroup; children = ( @@ -1196,16 +1146,16 @@ 56DEC3AE152638CD0031E8DC /* Tests */ = { isa = PBXGroup; children = ( - ABAF86A816A0A852001ADE96 /* GRMustache7Tests-Info.plist */, - 56DEC3B3152638E20031E8DC /* GRMustacheTestBase.h */, - 56DEC3B4152638E20031E8DC /* GRMustacheTestBase.m */, + 56214B951BA1A5100070C6CF /* Info.plist */, + 56DAC7111BB69DAC0010FE01 /* GRMustacheTestingDelegate.m */, + 56DAC7121BB69DAC0010FE01 /* GRMustacheTestingDelegate.h */, 56DEC3BB152638FB0031E8DC /* Private */, 56DEC3BC152639050031E8DC /* Public */, 56DEC34A152636000031E8DC /* vendor */, 56DEC1A815262FC90031E8DC /* Frameworks */, ); name = Tests; - path = tests; + path = GRMustacheTests; sourceTree = ""; }; 56DEC3BB152638FB0031E8DC /* Private */ = { @@ -1225,19 +1175,19 @@ children = ( 56DEC3B1152638E20031E8DC /* GRMustachePublicAPITest.h */, 56DEC3B2152638E20031E8DC /* GRMustachePublicAPITest.m */, - 56DEC3BD152639420031E8DC /* v7.0 */, - 56C1FDD419A4BE3D00006AB4 /* v7.2 */, + 56DEC3BD152639420031E8DC /* v8.0 */, ); path = Public; sourceTree = ""; }; - 56DEC3BD152639420031E8DC /* v7.0 */ = { + 56DEC3BD152639420031E8DC /* v8.0 */ = { isa = PBXGroup; children = ( 56B477A918D0E55A00EFF629 /* Suites */, 560CE88E1526EEF4004F935E /* GRBooleanTest.m */, 56BA242518C7A494006DA5F3 /* GRMustacheErrorHandlingTest.m */, 563A5EA6163403C000E7E810 /* GRMustacheFoundationCollectionTest.m */, + 560959BE1BD3C7A40000511D /* GRMustacheLambdaTest.m */, 5623B795152731B600DF16A6 /* GRMustacheParsingErrorsTest.m */, 568140E616365D6000310B7F /* GRMustachePositionFilterTest.m */, 568140D7163659CB00310B7F /* GRMustacheRenderingObjectTest.m */, @@ -1249,137 +1199,72 @@ 56B4779318CF8BB500EFF629 /* GRMustacheTemplateTest */, 5682B49B1528487700ADD123 /* GRMustacheTemplateRepositoryTest */, ); - path = v7.0; + path = v8.0; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 56DEC246152631040031E8DC /* Headers */ = { + 56214B6C1BA1A34A0070C6CF /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 56BF373919B8EEC700854524 /* NSValueTransformer+GRMustache.h in Headers */, - 56BF373319B8EEC700854524 /* GRMustacheTemplateGenerator_private.h in Headers */, - 56DEC2BC152631300031E8DC /* GRMustache.h in Headers */, - 56DEC2C0152631300031E8DC /* GRMustache_private.h in Headers */, - 56BF371719B8EEB900854524 /* GRMustacheTemplateRepository.h in Headers */, - 56BF36EC19B8EEAE00854524 /* GRMustacheContext_private.h in Headers */, - 56BF374719B8EEC700854524 /* GRMustacheJavascriptLibrary_private.h in Headers */, - 56BF371519B8EEB900854524 /* GRMustacheTemplate_private.h in Headers */, - 56BF374919B8EEC700854524 /* GRMustacheLocalizer.h in Headers */, - 56BF36B219B8EE9D00854524 /* GRMustacheInheritedPartialNode_private.h in Headers */, - 56BF370019B8EEAE00854524 /* GRMustacheRendering_private.h in Headers */, - 56BF367119B8EE8B00854524 /* GRMustacheToken_private.h in Headers */, - 56BF36E819B8EEAE00854524 /* GRMustacheContext.h in Headers */, - 56BF365E19B8EE7A00854524 /* GRMustacheConfiguration_private.h in Headers */, - 56BF36F019B8EEAE00854524 /* GRMustacheExpressionInvocation_private.h in Headers */, - 56BF371119B8EEB900854524 /* GRMustacheTemplate.h in Headers */, - 56BF375E19B8EF2800854524 /* GRMustacheAvailabilityMacros.h in Headers */, - 56B01A4C19C49AF5000439C7 /* GRMustacheExpressionGenerator_private.h in Headers */, - 56BF36CA19B8EE9E00854524 /* GRMustacheTemplateASTNode_private.h in Headers */, - 56BF36C419B8EE9E00854524 /* GRMustacheTag_private.h in Headers */, - 56BF36AE19B8EE9D00854524 /* GRMustacheCompiler_private.h in Headers */, - 56BF36F219B8EEAE00854524 /* GRMustacheFilter.h in Headers */, - 56BF370819B8EEAE00854524 /* GRMustacheTagDelegate.h in Headers */, - 56BF369A19B8EE9D00854524 /* GRMustacheExpressionVisitor_private.h in Headers */, - 56BF376019B8EF2800854524 /* GRMustacheAvailabilityMacros_private.h in Headers */, - 56BF36F619B8EEAE00854524 /* GRMustacheFilter_private.h in Headers */, - 56BF36CC19B8EE9E00854524 /* GRMustacheTemplateASTVisitor_private.h in Headers */, - 56DEC30E152631300031E8DC /* GRMustacheVersion.h in Headers */, - 56BF366D19B8EE8B00854524 /* GRMustacheTemplateParser_private.h in Headers */, - 56BF376619B8EF2800854524 /* GRMustacheError.h in Headers */, - 56BF36BA19B8EE9D00854524 /* GRMustachePartialNode_private.h in Headers */, - 56BF36FC19B8EEAE00854524 /* GRMustacheRendering.h in Headers */, - 56BF373519B8EEC700854524 /* NSFormatter+GRMustache.h in Headers */, - 56BF366919B8EE8B00854524 /* GRMustacheExpressionParser_private.h in Headers */, - 56BF374F19B8EEC700854524 /* GRMustacheStandardLibrary_private.h in Headers */, - 56BF369E19B8EE9D00854524 /* GRMustacheFilteredExpression_private.h in Headers */, - 56BF365A19B8EE7A00854524 /* GRMustacheConfiguration.h in Headers */, - 56BF373F19B8EEC700854524 /* GRMustacheEachFilter_private.h in Headers */, - 56BF36D419B8EE9E00854524 /* GRMustacheVariableTag_private.h in Headers */, - 56BF36D019B8EE9E00854524 /* GRMustacheTextNode_private.h in Headers */, - 56BF370619B8EEAE00854524 /* GRMustacheSafeKeyAccess.h in Headers */, - 56BF36AA19B8EE9D00854524 /* GRMustacheScopedExpression_private.h in Headers */, - 56BF371B19B8EEB900854524 /* GRMustacheTemplateRepository_private.h in Headers */, - 56BF369819B8EE9D00854524 /* GRMustacheExpression_private.h in Headers */, - 56BF375319B8EEC700854524 /* GRMustacheURLLibrary_private.h in Headers */, - 56BF36A619B8EE9D00854524 /* GRMustacheImplicitIteratorExpression_private.h in Headers */, - 56BF36C019B8EE9D00854524 /* GRMustacheTag.h in Headers */, - 56BF36FA19B8EEAE00854524 /* GRMustacheKeyAccess_private.h in Headers */, - 56BF370419B8EEAE00854524 /* GRMustacheRenderingEngine_private.h in Headers */, - 56BF376419B8EF2800854524 /* GRMustacheContentType.h in Headers */, - 56BF36C819B8EE9E00854524 /* GRMustacheTemplateAST_private.h in Headers */, - 56BF376C19B8EF2800854524 /* GRMustacheTranslateCharacters_private.h in Headers */, - 56BF36BE19B8EE9D00854524 /* GRMustacheSectionTag_private.h in Headers */, - 56BF36A219B8EE9D00854524 /* GRMustacheIdentifierExpression_private.h in Headers */, - 56BF36B619B8EE9D00854524 /* GRMustacheInheritableSectionNode_private.h in Headers */, - 56BF374319B8EEC700854524 /* GRMustacheHTMLLibrary_private.h in Headers */, - 56BF376219B8EF2800854524 /* GRMustacheBuffer_private.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 56DEC26C1526311B0031E8DC /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 56BF373A19B8EEC700854524 /* NSValueTransformer+GRMustache.h in Headers */, - 56BF373419B8EEC700854524 /* GRMustacheTemplateGenerator_private.h in Headers */, - 56DEC2BD152631300031E8DC /* GRMustache.h in Headers */, - 56DEC2C1152631300031E8DC /* GRMustache_private.h in Headers */, - 56BF371819B8EEB900854524 /* GRMustacheTemplateRepository.h in Headers */, - 56BF36ED19B8EEAE00854524 /* GRMustacheContext_private.h in Headers */, - 56BF374819B8EEC700854524 /* GRMustacheJavascriptLibrary_private.h in Headers */, - 56BF371619B8EEB900854524 /* GRMustacheTemplate_private.h in Headers */, - 56BF374A19B8EEC700854524 /* GRMustacheLocalizer.h in Headers */, - 56BF36B319B8EE9D00854524 /* GRMustacheInheritedPartialNode_private.h in Headers */, - 56BF370119B8EEAE00854524 /* GRMustacheRendering_private.h in Headers */, - 56BF367219B8EE8B00854524 /* GRMustacheToken_private.h in Headers */, - 56BF36E919B8EEAE00854524 /* GRMustacheContext.h in Headers */, - 56BF365F19B8EE7A00854524 /* GRMustacheConfiguration_private.h in Headers */, - 56BF36F119B8EEAE00854524 /* GRMustacheExpressionInvocation_private.h in Headers */, - 56BF371219B8EEB900854524 /* GRMustacheTemplate.h in Headers */, - 56BF375F19B8EF2800854524 /* GRMustacheAvailabilityMacros.h in Headers */, - 56B01A4D19C49AF5000439C7 /* GRMustacheExpressionGenerator_private.h in Headers */, - 56BF36CB19B8EE9E00854524 /* GRMustacheTemplateASTNode_private.h in Headers */, - 56BF36C519B8EE9E00854524 /* GRMustacheTag_private.h in Headers */, - 56BF36AF19B8EE9D00854524 /* GRMustacheCompiler_private.h in Headers */, - 56BF36F319B8EEAE00854524 /* GRMustacheFilter.h in Headers */, - 56BF370919B8EEAE00854524 /* GRMustacheTagDelegate.h in Headers */, - 56BF369B19B8EE9D00854524 /* GRMustacheExpressionVisitor_private.h in Headers */, - 56BF376119B8EF2800854524 /* GRMustacheAvailabilityMacros_private.h in Headers */, - 56BF36F719B8EEAE00854524 /* GRMustacheFilter_private.h in Headers */, - 56BF36CD19B8EE9E00854524 /* GRMustacheTemplateASTVisitor_private.h in Headers */, - 56DEC30F152631300031E8DC /* GRMustacheVersion.h in Headers */, - 56BF366E19B8EE8B00854524 /* GRMustacheTemplateParser_private.h in Headers */, - 56BF376719B8EF2800854524 /* GRMustacheError.h in Headers */, - 56BF36BB19B8EE9D00854524 /* GRMustachePartialNode_private.h in Headers */, - 56BF36FD19B8EEAE00854524 /* GRMustacheRendering.h in Headers */, - 56BF373619B8EEC700854524 /* NSFormatter+GRMustache.h in Headers */, - 56BF366A19B8EE8B00854524 /* GRMustacheExpressionParser_private.h in Headers */, - 56BF375019B8EEC700854524 /* GRMustacheStandardLibrary_private.h in Headers */, - 56BF369F19B8EE9D00854524 /* GRMustacheFilteredExpression_private.h in Headers */, - 56BF365B19B8EE7A00854524 /* GRMustacheConfiguration.h in Headers */, - 56BF374019B8EEC700854524 /* GRMustacheEachFilter_private.h in Headers */, - 56BF36D519B8EE9E00854524 /* GRMustacheVariableTag_private.h in Headers */, - 56BF36D119B8EE9E00854524 /* GRMustacheTextNode_private.h in Headers */, - 56BF370719B8EEAE00854524 /* GRMustacheSafeKeyAccess.h in Headers */, - 56BF36AB19B8EE9D00854524 /* GRMustacheScopedExpression_private.h in Headers */, - 56BF371C19B8EEB900854524 /* GRMustacheTemplateRepository_private.h in Headers */, - 56BF369919B8EE9D00854524 /* GRMustacheExpression_private.h in Headers */, - 56BF375419B8EEC700854524 /* GRMustacheURLLibrary_private.h in Headers */, - 56BF36A719B8EE9D00854524 /* GRMustacheImplicitIteratorExpression_private.h in Headers */, - 56BF36C119B8EE9D00854524 /* GRMustacheTag.h in Headers */, - 56BF36FB19B8EEAE00854524 /* GRMustacheKeyAccess_private.h in Headers */, - 56BF370519B8EEAE00854524 /* GRMustacheRenderingEngine_private.h in Headers */, - 56BF376519B8EF2800854524 /* GRMustacheContentType.h in Headers */, - 56BF36C919B8EE9E00854524 /* GRMustacheTemplateAST_private.h in Headers */, - 56BF376D19B8EF2800854524 /* GRMustacheTranslateCharacters_private.h in Headers */, - 56BF36BF19B8EE9D00854524 /* GRMustacheSectionTag_private.h in Headers */, - 56BF36A319B8EE9D00854524 /* GRMustacheIdentifierExpression_private.h in Headers */, - 56BF36B719B8EE9D00854524 /* GRMustacheInheritableSectionNode_private.h in Headers */, - 56BF374419B8EEC700854524 /* GRMustacheHTMLLibrary_private.h in Headers */, - 56BF376319B8EF2800854524 /* GRMustacheBuffer_private.h in Headers */, + 56214C861BA1A70D0070C6CF /* GRMustacheTemplateParser_private.h in Headers */, + 56214CA91BA1A7490070C6CF /* GRMustacheContext.h in Headers */, + 56214CA21BA1A70D0070C6CF /* GRMustacheTemplateGenerator_private.h in Headers */, + 56214C9A1BA1A70D0070C6CF /* GRMustacheExpressionInvocation_private.h in Headers */, + 56214C891BA1A70D0070C6CF /* GRMustacheExpression_private.h in Headers */, + 56214C851BA1A70D0070C6CF /* GRMustacheExpressionParser_private.h in Headers */, + 56214C991BA1A70D0070C6CF /* GRMustacheContext_private.h in Headers */, + 56214C301BA1A6AD0070C6CF /* GRMustacheTranslateCharacters_private.h in Headers */, + 56214C361BA1A6C20070C6CF /* GRMustacheAvailabilityMacros_private.h in Headers */, + 56DAC7B71BB6DDAB0010FE01 /* GRMustache.h in Headers */, + 56214CB01BA1A7490070C6CF /* NSFormatter+GRMustache.h in Headers */, + 56214CA31BA1A70D0070C6CF /* GRMustacheEachFilter_private.h in Headers */, + 56214C961BA1A70D0070C6CF /* GRMustacheTemplateASTVisitor_private.h in Headers */, + 56214CA71BA1A7240070C6CF /* GRMustacheConfiguration.h in Headers */, + 56214C351BA1A6BE0070C6CF /* GRMustacheBuffer_private.h in Headers */, + 56214CAF1BA1A7490070C6CF /* GRMustacheTemplateRepository.h in Headers */, + 56DAC7B51BB6DDAB0010FE01 /* GRMustache_private.h in Headers */, + 56214C951BA1A70D0070C6CF /* GRMustacheTemplateASTNode_private.h in Headers */, + 56214C371BA1A6C50070C6CF /* GRMustacheAvailabilityMacros.h in Headers */, + 56214C341BA1A6BA0070C6CF /* GRMustacheContentType.h in Headers */, + 56214CB11BA1A7490070C6CF /* NSValueTransformer+GRMustache.h in Headers */, + 56214C8C1BA1A70D0070C6CF /* GRMustacheIdentifierExpression_private.h in Headers */, + 56214C881BA1A70D0070C6CF /* GRMustacheCompiler_private.h in Headers */, + 56214CA81BA1A7300070C6CF /* GRMustacheTag.h in Headers */, + 56214C8F1BA1A70D0070C6CF /* GRMustachePartialOverrideNode_private.h in Headers */, + 56214CA11BA1A70D0070C6CF /* GRMustacheExpressionGenerator_private.h in Headers */, + 56214C331BA1A6B50070C6CF /* GRMustacheError.h in Headers */, + 56214C931BA1A70D0070C6CF /* GRMustacheTag_private.h in Headers */, + 56214CA01BA1A70D0070C6CF /* GRMustacheTemplateRepository_private.h in Headers */, + 56214CB21BA1A7490070C6CF /* GRMustacheLocalizer.h in Headers */, + 56214CAB1BA1A7490070C6CF /* GRMustacheRendering.h in Headers */, + 56214C941BA1A70D0070C6CF /* GRMustacheTemplateAST_private.h in Headers */, + 56214C8B1BA1A70D0070C6CF /* GRMustacheFilteredExpression_private.h in Headers */, + 56DAC7AC1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding_private.h in Headers */, + 56214C8D1BA1A70D0070C6CF /* GRMustacheImplicitIteratorExpression_private.h in Headers */, + 56214C9C1BA1A70D0070C6CF /* GRMustacheKeyAccess_private.h in Headers */, + 56214C981BA1A70D0070C6CF /* GRMustacheVariableTag_private.h in Headers */, + 56214CAE1BA1A7490070C6CF /* GRMustacheTemplate.h in Headers */, + 56214CA51BA1A70D0070C6CF /* GRMustacheJavascriptEscapeFilter_private.h in Headers */, + 56DAC7A41BB6C8DD0010FE01 /* GRMustacheKeyValueCoding.h in Headers */, + 56214C9B1BA1A70D0070C6CF /* GRMustacheFilter_private.h in Headers */, + 56214CAD1BA1A7490070C6CF /* GRMustacheTagDelegate.h in Headers */, + 56214CA41BA1A70D0070C6CF /* GRMustacheHTMLEscapeFilter_private.h in Headers */, + 56214C9D1BA1A70D0070C6CF /* GRMustacheRendering_private.h in Headers */, + 56214C871BA1A70D0070C6CF /* GRMustacheToken_private.h in Headers */, + 56214C971BA1A70D0070C6CF /* GRMustacheTextNode_private.h in Headers */, + 56214C8A1BA1A70D0070C6CF /* GRMustacheExpressionVisitor_private.h in Headers */, + 56214C8E1BA1A70D0070C6CF /* GRMustacheScopedExpression_private.h in Headers */, + 56214C381BA1A6CD0070C6CF /* GRMustacheURLEscapeFilter_private.h in Headers */, + 56214C921BA1A70D0070C6CF /* GRMustacheSectionTag_private.h in Headers */, + 56214C911BA1A70D0070C6CF /* GRMustachePartialNode_private.h in Headers */, + 56214C841BA1A70D0070C6CF /* GRMustacheConfiguration_private.h in Headers */, + 56214C901BA1A70D0070C6CF /* GRMustacheBlock_private.h in Headers */, + 56214C9E1BA1A70D0070C6CF /* GRMustacheRenderingEngine_private.h in Headers */, + 56214CAA1BA1A7490070C6CF /* GRMustacheFilter.h in Headers */, + 56214C9F1BA1A70D0070C6CF /* GRMustacheTemplate_private.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1387,23 +1272,22 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 6586A0651B9E2DAD0067C98E /* GRMustache.h in Headers */, 6586A0971B9E2E4F0067C98E /* GRMustacheRendering_private.h in Headers */, 6586A0B01B9E2E5B0067C98E /* GRMustacheVariableTag_private.h in Headers */, 6586A08B1B9E2E4F0067C98E /* GRMustacheContext.h in Headers */, - 6586A07C1B9E2E360067C98E /* GRMustacheHTMLLibrary_private.h in Headers */, + 6586A07C1B9E2E360067C98E /* GRMustacheHTMLEscapeFilter_private.h in Headers */, 6586A09D1B9E2E550067C98E /* GRMustacheCompiler_private.h in Headers */, - 6586A0681B9E2DBC0067C98E /* GRMustacheVersion.h in Headers */, 6586A0901B9E2E4F0067C98E /* GRMustacheFilter.h in Headers */, 6586A0B31B9E2E600067C98E /* GRMustacheExpressionVisitor_private.h in Headers */, 6586A0AE1B9E2E5B0067C98E /* GRMustacheTextNode_private.h in Headers */, + 56DAC7B81BB6DDAB0010FE01 /* GRMustache.h in Headers */, 6586A0C41B9E2E6A0067C98E /* GRMustacheConfiguration_private.h in Headers */, - 6586A0661B9E2DB30067C98E /* GRMustache_private.h in Headers */, 6586A0951B9E2E4F0067C98E /* GRMustacheRendering.h in Headers */, - 6586A07E1B9E2E360067C98E /* GRMustacheJavascriptLibrary_private.h in Headers */, + 6586A07E1B9E2E360067C98E /* GRMustacheJavascriptEscapeFilter_private.h in Headers */, 6586A0BD1B9E2E660067C98E /* GRMustacheExpressionParser_private.h in Headers */, 6586A0941B9E2E4F0067C98E /* GRMustacheKeyAccess_private.h in Headers */, 6586A0991B9E2E4F0067C98E /* GRMustacheRenderingEngine_private.h in Headers */, + 56DAC7B61BB6DDAB0010FE01 /* GRMustache_private.h in Headers */, 6586A0871B9E2E4A0067C98E /* GRMustacheTemplate_private.h in Headers */, 6586A08F1B9E2E4F0067C98E /* GRMustacheExpressionInvocation_private.h in Headers */, 6586A08D1B9E2E4F0067C98E /* GRMustacheContext_private.h in Headers */, @@ -1412,21 +1296,21 @@ 6586A06A1B9E2E100067C98E /* GRMustacheAvailabilityMacros_private.h in Headers */, 6586A0B91B9E2E600067C98E /* GRMustacheImplicitIteratorExpression_private.h in Headers */, 6586A0751B9E2E310067C98E /* NSFormatter+GRMustache.h in Headers */, - 6586A0841B9E2E360067C98E /* GRMustacheURLLibrary_private.h in Headers */, + 6586A0841B9E2E360067C98E /* GRMustacheURLEscapeFilter_private.h in Headers */, 6586A0851B9E2E4A0067C98E /* GRMustacheTemplate.h in Headers */, 6586A0921B9E2E4F0067C98E /* GRMustacheFilter_private.h in Headers */, 6586A06D1B9E2E100067C98E /* GRMustacheError.h in Headers */, 6586A0691B9E2E100067C98E /* GRMustacheAvailabilityMacros.h in Headers */, 6586A0BF1B9E2E660067C98E /* GRMustacheTemplateParser_private.h in Headers */, - 6586A0821B9E2E360067C98E /* GRMustacheStandardLibrary_private.h in Headers */, 6586A0721B9E2E310067C98E /* GRMustacheExpressionGenerator_private.h in Headers */, - 6586A09A1B9E2E4F0067C98E /* GRMustacheSafeKeyAccess.h in Headers */, - 6586A09F1B9E2E5B0067C98E /* GRMustacheInheritedPartialNode_private.h in Headers */, + 56DAC7AD1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding_private.h in Headers */, + 6586A09F1B9E2E5B0067C98E /* GRMustachePartialOverrideNode_private.h in Headers */, 6586A0C21B9E2E6A0067C98E /* GRMustacheConfiguration.h in Headers */, 6586A0A81B9E2E5B0067C98E /* GRMustacheTag_private.h in Headers */, 6586A0881B9E2E4A0067C98E /* GRMustacheTemplateRepository.h in Headers */, 6586A0A51B9E2E5B0067C98E /* GRMustacheSectionTag_private.h in Headers */, - 6586A0A11B9E2E5B0067C98E /* GRMustacheInheritableSectionNode_private.h in Headers */, + 56DAC7A51BB6C8DD0010FE01 /* GRMustacheKeyValueCoding.h in Headers */, + 6586A0A11B9E2E5B0067C98E /* GRMustacheBlock_private.h in Headers */, 6586A0B71B9E2E600067C98E /* GRMustacheIdentifierExpression_private.h in Headers */, 6586A07F1B9E2E360067C98E /* GRMustacheLocalizer.h in Headers */, 6586A09B1B9E2E4F0067C98E /* GRMustacheTagDelegate.h in Headers */, @@ -1450,81 +1334,97 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 56DEC247152631040031E8DC /* GRMustache7-MacOS */ = { + 56214B6E1BA1A34A0070C6CF /* GRMustacheOSX */ = { isa = PBXNativeTarget; - buildConfigurationList = 56DEC264152631040031E8DC /* Build configuration list for PBXNativeTarget "GRMustache7-MacOS" */; + buildConfigurationList = 56214B741BA1A34A0070C6CF /* Build configuration list for PBXNativeTarget "GRMustacheOSX" */; buildPhases = ( - 56DEC244152631040031E8DC /* Sources */, - 56DEC245152631040031E8DC /* Frameworks */, - 56DEC246152631040031E8DC /* Headers */, + 56214B6A1BA1A34A0070C6CF /* Sources */, + 56214B6B1BA1A34A0070C6CF /* Frameworks */, + 56214B6C1BA1A34A0070C6CF /* Headers */, + 56214B6D1BA1A34A0070C6CF /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = "GRMustache7-MacOS"; - productName = "GRMustache7-MacOS"; - productReference = 56DEC248152631040031E8DC /* libGRMustache7-MacOS.a */; - productType = "com.apple.product-type.library.static"; + name = GRMustacheOSX; + productName = GRMustacheOSX; + productReference = 56214B6F1BA1A34A0070C6CF /* GRMustache.framework */; + productType = "com.apple.product-type.framework"; }; - 56DEC254152631040031E8DC /* GRMustache7-MacOSTests */ = { + 56214B7A1BA1A4C50070C6CF /* GRMustacheiOSTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 56DEC267152631040031E8DC /* Build configuration list for PBXNativeTarget "GRMustache7-MacOSTests" */; + buildConfigurationList = 56214B831BA1A4C50070C6CF /* Build configuration list for PBXNativeTarget "GRMustacheiOSTests" */; buildPhases = ( - 56DEC250152631040031E8DC /* Sources */, - 56DEC251152631040031E8DC /* Frameworks */, - 56DEC252152631040031E8DC /* Resources */, - 56DEC253152631040031E8DC /* ShellScript */, + 56214B771BA1A4C50070C6CF /* Sources */, + 56214B781BA1A4C50070C6CF /* Frameworks */, + 56214B791BA1A4C50070C6CF /* Resources */, ); buildRules = ( ); dependencies = ( - 56DEC259152631040031E8DC /* PBXTargetDependency */, + 56214B821BA1A4C50070C6CF /* PBXTargetDependency */, ); - name = "GRMustache7-MacOSTests"; - productName = "GRMustache7-MacOSTests"; - productReference = 56DEC255152631040031E8DC /* GRMustache7-MacOSTests.xctest */; + name = GRMustacheiOSTests; + productName = GRMustacheiOSTests; + productReference = 56214B7B1BA1A4C50070C6CF /* GRMustacheiOSTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 56DEC26D1526311B0031E8DC /* GRMustache7-iOS */ = { + 56214B891BA1A4D50070C6CF /* GRMustacheOSXTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 56DEC28B1526311C0031E8DC /* Build configuration list for PBXNativeTarget "GRMustache7-iOS" */; + buildConfigurationList = 56214B921BA1A4D50070C6CF /* Build configuration list for PBXNativeTarget "GRMustacheOSXTests" */; buildPhases = ( - 56DEC26A1526311B0031E8DC /* Sources */, - 56DEC26B1526311B0031E8DC /* Frameworks */, - 56DEC26C1526311B0031E8DC /* Headers */, + 56214B861BA1A4D50070C6CF /* Sources */, + 56214B871BA1A4D50070C6CF /* Frameworks */, + 56214B881BA1A4D50070C6CF /* Resources */, ); buildRules = ( ); dependencies = ( + 56214B911BA1A4D50070C6CF /* PBXTargetDependency */, ); - name = "GRMustache7-iOS"; - productName = "GRMustache7-iOS"; - productReference = 56DEC26E1526311B0031E8DC /* libGRMustache7-iOS.a */; - productType = "com.apple.product-type.library.static"; + name = GRMustacheOSXTests; + productName = GRMustacheOSXTests; + productReference = 56214B8A1BA1A4D50070C6CF /* GRMustacheOSXTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; }; - 56DEC27A1526311C0031E8DC /* GRMustache7-iOSTests */ = { + 56AC8C971BA1F637009E4319 /* GRMustacheOSXPrivateTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 56DEC28E1526311C0031E8DC /* Build configuration list for PBXNativeTarget "GRMustache7-iOSTests" */; + buildConfigurationList = 56AC8C9D1BA1F637009E4319 /* Build configuration list for PBXNativeTarget "GRMustacheOSXPrivateTests" */; buildPhases = ( - 56DEC2761526311C0031E8DC /* Sources */, - 56DEC2771526311C0031E8DC /* Frameworks */, - 56DEC2781526311C0031E8DC /* Resources */, - 56DEC2791526311C0031E8DC /* ShellScript */, + 56AC8C941BA1F637009E4319 /* Sources */, + 56AC8C951BA1F637009E4319 /* Frameworks */, + 56AC8C961BA1F637009E4319 /* Resources */, ); buildRules = ( ); dependencies = ( - 56DEC2801526311C0031E8DC /* PBXTargetDependency */, ); - name = "GRMustache7-iOSTests"; - productName = "GRMustache7-iOSTests"; - productReference = 56DEC27B1526311C0031E8DC /* GRMustache7-iOSTests.xctest */; + name = GRMustacheOSXPrivateTests; + productName = GRMustacheOSXPrivateTests; + productReference = 56AC8C981BA1F637009E4319 /* GRMustacheOSXPrivateTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - 6586A05C1B9E2D720067C98E /* GRMustache */ = { + 56DAC7161BB69F6D0010FE01 /* GRMustacheiOSPrivateTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 6586A0641B9E2D720067C98E /* Build configuration list for PBXNativeTarget "GRMustache" */; + buildConfigurationList = 56DAC7651BB69F6D0010FE01 /* Build configuration list for PBXNativeTarget "GRMustacheiOSPrivateTests" */; + buildPhases = ( + 56DAC7191BB69F6D0010FE01 /* Sources */, + 56DAC7461BB69F6D0010FE01 /* Frameworks */, + 56DAC7481BB69F6D0010FE01 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = GRMustacheiOSPrivateTests; + productName = GRMustacheiOSTests; + productReference = 56DAC7681BB69F6D0010FE01 /* GRMustacheiOSPrivateTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 6586A05C1B9E2D720067C98E /* GRMustacheiOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6586A0641B9E2D720067C98E /* Build configuration list for PBXNativeTarget "GRMustacheiOS" */; buildPhases = ( 6586A0581B9E2D720067C98E /* Sources */, 6586A0591B9E2D720067C98E /* Frameworks */, @@ -1535,7 +1435,7 @@ ); dependencies = ( ); - name = GRMustache; + name = GRMustacheiOS; productName = GRMustache; productReference = 6586A05D1B9E2D720067C98E /* GRMustache.framework */; productType = "com.apple.product-type.framework"; @@ -1546,8 +1446,20 @@ 56DEC19C15262FC80031E8DC /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0630; + LastUpgradeCheck = 0700; TargetAttributes = { + 56214B6E1BA1A34A0070C6CF = { + CreatedOnToolsVersion = 7.0; + }; + 56214B7A1BA1A4C50070C6CF = { + CreatedOnToolsVersion = 7.0; + }; + 56214B891BA1A4D50070C6CF = { + CreatedOnToolsVersion = 7.0; + }; + 56AC8C971BA1F637009E4319 = { + CreatedOnToolsVersion = 7.0; + }; 6586A05C1B9E2D720067C98E = { CreatedOnToolsVersion = 7.0; }; @@ -1565,324 +1477,383 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 56DEC247152631040031E8DC /* GRMustache7-MacOS */, - 56DEC254152631040031E8DC /* GRMustache7-MacOSTests */, - 56DEC26D1526311B0031E8DC /* GRMustache7-iOS */, - 56DEC27A1526311C0031E8DC /* GRMustache7-iOSTests */, - 6586A05C1B9E2D720067C98E /* GRMustache */, + 56214B6E1BA1A34A0070C6CF /* GRMustacheOSX */, + 56214B891BA1A4D50070C6CF /* GRMustacheOSXTests */, + 56AC8C971BA1F637009E4319 /* GRMustacheOSXPrivateTests */, + 6586A05C1B9E2D720067C98E /* GRMustacheiOS */, + 56214B7A1BA1A4C50070C6CF /* GRMustacheiOSTests */, + 56DAC7161BB69F6D0010FE01 /* GRMustacheiOSPrivateTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 56DEC252152631040031E8DC /* Resources */ = { + 56214B6D1BA1A34A0070C6CF /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 56B477A718D0E41A00EFF629 /* specs in Resources */, - 563D66F415264B40008628C5 /* GRMustacheSuites in Resources */, - 56A8D4931527A23900D9C718 /* GRMustacheTagDelegateTest.mustache in Resources */, - 56A8D4961527A3CE00D9C718 /* GRMustacheTagDelegateTest_wrapper.mustache in Resources */, - 5682B46515282BCA00ADD123 /* GRMustacheTemplateFromMethodsTest.mustache in Resources */, - 5682B4681528324800ADD123 /* GRMustacheTemplateFromMethodsTest.json in Resources */, - 5682B46F1528370E00ADD123 /* GRMustacheTemplateFromMethodsTest in Resources */, - 5682B4741528372000ADD123 /* GRMustacheTemplateRenderMethodsTest in Resources */, - 56B477A418CF9F6E00EFF629 /* GRMustacheJavaSuites in Resources */, - 56BA247418C7A5CB006DA5F3 /* GRMustacheLocalizerTestBundle in Resources */, - 5682B4761528372000ADD123 /* GRMustacheTemplateRenderMethodsTest.json in Resources */, - 56C1FDEB19A66DC500006AB4 /* GRMustacheSuites_7_2 in Resources */, - 5682B4781528372000ADD123 /* GRMustacheTemplateRenderMethodsTest.mustache in Resources */, - 5682B4971528486C00ADD123 /* GRMustacheTemplateRepositoryTest_ISOLatin1 in Resources */, - 5688264D199DFCDF00922497 /* GRMustacheTemplateRepositoryWithBundleTestResources in Resources */, - 5682B4991528486C00ADD123 /* GRMustacheTemplateRepositoryTest_UTF8 in Resources */, - 5682B49E152849FE00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.mustache in Resources */, - 5682B4A0152849FE00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache in Resources */, - 56B4779A18CF8D3300EFF629 /* GRHoganSuites in Resources */, - 5682B4A415284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest in Resources */, - 5682B4A615284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.text in Resources */, - 5682B4A915284AB600ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial in Resources */, - 5682B4AC15284ABD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.text in Resources */, - 5682B4B21528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserError.mustache in Resources */, - 5682B4B41528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache in Resources */, - 5682B4B81528D0FA00ADD123 /* GRMustacheTemplateFromMethodsTest_compilerError.mustache in Resources */, - 5682B4BA1528D0FA00ADD123 /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache in Resources */, - 568140DE16365CF500310B7F /* GRMustacheTemplateRepositoryTest in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 56DEC2781526311C0031E8DC /* Resources */ = { + 56214B791BA1A4C50070C6CF /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 56B477A818D0E41A00EFF629 /* specs in Resources */, - 563D66F515264B40008628C5 /* GRMustacheSuites in Resources */, - 56A8D4941527A23900D9C718 /* GRMustacheTagDelegateTest.mustache in Resources */, - 56A8D4971527A3CE00D9C718 /* GRMustacheTagDelegateTest_wrapper.mustache in Resources */, - 5682B46615282BCA00ADD123 /* GRMustacheTemplateFromMethodsTest.mustache in Resources */, - 5682B4691528324800ADD123 /* GRMustacheTemplateFromMethodsTest.json in Resources */, - 5682B4701528370E00ADD123 /* GRMustacheTemplateFromMethodsTest in Resources */, - 5682B4751528372000ADD123 /* GRMustacheTemplateRenderMethodsTest in Resources */, - 56B477A518CF9F6E00EFF629 /* GRMustacheJavaSuites in Resources */, - 56BA247618C7A5CB006DA5F3 /* GRMustacheLocalizerTestBundle in Resources */, - 5682B4771528372000ADD123 /* GRMustacheTemplateRenderMethodsTest.json in Resources */, - 56C1FDEC19A66DC500006AB4 /* GRMustacheSuites_7_2 in Resources */, - 5682B4791528372000ADD123 /* GRMustacheTemplateRenderMethodsTest.mustache in Resources */, - 5682B4981528486C00ADD123 /* GRMustacheTemplateRepositoryTest_ISOLatin1 in Resources */, - 5688264E199DFCDF00922497 /* GRMustacheTemplateRepositoryWithBundleTestResources in Resources */, - 5682B49A1528486C00ADD123 /* GRMustacheTemplateRepositoryTest_UTF8 in Resources */, - 5682B49F152849FE00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.mustache in Resources */, - 5682B4A1152849FE00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache in Resources */, - 56B4779B18CF8D3300EFF629 /* GRHoganSuites in Resources */, - 5682B4A515284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest in Resources */, - 5682B4A715284A9400ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.text in Resources */, - 5682B4AA15284AB600ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial in Resources */, - 5682B4AD15284ABD00ADD123 /* GRMustacheTemplateRepositoryWithBundleTest_partial.text in Resources */, - 5682B4B31528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserError.mustache in Resources */, - 5682B4B51528C69C00ADD123 /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache in Resources */, - 5682B4B91528D0FA00ADD123 /* GRMustacheTemplateFromMethodsTest_compilerError.mustache in Resources */, - 5682B4BB1528D0FA00ADD123 /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache in Resources */, - 568140DF16365CF500310B7F /* GRMustacheTemplateRepositoryTest in Resources */, + 56DAC7BF1BB6E85B0010FE01 /* specs in Resources */, + 56214C151BA1A59E0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest.mustache in Resources */, + 56214BF51BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest in Resources */, + 56214BF61BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest.json in Resources */, + 56214C031BA1A58E0070C6CF /* GRMustacheTemplateRenderMethodsTest.mustache in Resources */, + 56214BAB1BA1A54C0070C6CF /* GRHoganSuites in Resources */, + 56214C171BA1A59E0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest_partial in Resources */, + 56214C221BA1A5AB0070C6CF /* GRMustacheTemplateRepositoryTest_ISOLatin1 in Resources */, + 56214C021BA1A58E0070C6CF /* GRMustacheTemplateRenderMethodsTest.json in Resources */, + 56214C161BA1A59E0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest.text in Resources */, + 56214C011BA1A58E0070C6CF /* GRMustacheTemplateRenderMethodsTest in Resources */, + 56214BA31BA1A5450070C6CF /* Tests in Resources */, + 56214BE61BA1A5800070C6CF /* GRMustacheTagDelegateTest.mustache in Resources */, + 56214C191BA1A59E0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest_partial.text in Resources */, + 56214C141BA1A59E0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest in Resources */, + 56214BFA1BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_parserError.mustache in Resources */, + 56214C211BA1A5AB0070C6CF /* GRMustacheTemplateRepositoryTest in Resources */, + 56214BE71BA1A5800070C6CF /* GRMustacheTagDelegateTest_wrapper.mustache in Resources */, + 56214BF71BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest.mustache in Resources */, + 56214BD91BA1A5760070C6CF /* GRMustacheLocalizerTestBundle in Resources */, + 56214C0D1BA1A59A0070C6CF /* GRMustacheTemplateRepositoryWithBundleTestResources in Resources */, + 56214BAA1BA1A54C0070C6CF /* GRMustacheJavaSuites in Resources */, + 56214BF81BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_compilerError.mustache in Resources */, + 56214BF91BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache in Resources */, + 56214BFB1BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache in Resources */, + 56214C181BA1A59E0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache in Resources */, + 56214C231BA1A5AB0070C6CF /* GRMustacheTemplateRepositoryTest_UTF8 in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6586A05B1B9E2D720067C98E /* Resources */ = { + 56214B881BA1A4D50070C6CF /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 56DAC7BE1BB6E85B0010FE01 /* specs in Resources */, + 56214C0F1BA1A59D0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest.mustache in Resources */, + 56214BED1BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest in Resources */, + 56214BEE1BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest.json in Resources */, + 56214BFF1BA1A58D0070C6CF /* GRMustacheTemplateRenderMethodsTest.mustache in Resources */, + 56214BA81BA1A54C0070C6CF /* GRHoganSuites in Resources */, + 56214C111BA1A59D0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest_partial in Resources */, + 56214C1F1BA1A5AB0070C6CF /* GRMustacheTemplateRepositoryTest_ISOLatin1 in Resources */, + 56214BFE1BA1A58D0070C6CF /* GRMustacheTemplateRenderMethodsTest.json in Resources */, + 56214C101BA1A59D0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest.text in Resources */, + 56214BFD1BA1A58D0070C6CF /* GRMustacheTemplateRenderMethodsTest in Resources */, + 56214BA21BA1A5440070C6CF /* Tests in Resources */, + 56214BE31BA1A5800070C6CF /* GRMustacheTagDelegateTest.mustache in Resources */, + 56214C131BA1A59D0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest_partial.text in Resources */, + 56214C0E1BA1A59D0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest in Resources */, + 56214BF21BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_parserError.mustache in Resources */, + 56214C1E1BA1A5AB0070C6CF /* GRMustacheTemplateRepositoryTest in Resources */, + 56214BE41BA1A5800070C6CF /* GRMustacheTagDelegateTest_wrapper.mustache in Resources */, + 56214BEF1BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest.mustache in Resources */, + 56214BD81BA1A5760070C6CF /* GRMustacheLocalizerTestBundle in Resources */, + 56214C0C1BA1A59A0070C6CF /* GRMustacheTemplateRepositoryWithBundleTestResources in Resources */, + 56214BA71BA1A54C0070C6CF /* GRMustacheJavaSuites in Resources */, + 56214BF01BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_compilerError.mustache in Resources */, + 56214BF11BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache in Resources */, + 56214BF31BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache in Resources */, + 56214C121BA1A59D0070C6CF /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache in Resources */, + 56214C201BA1A5AB0070C6CF /* GRMustacheTemplateRepositoryTest_UTF8 in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 56DEC253152631040031E8DC /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; + 56AC8C961BA1F637009E4319 /* Resources */ = { + isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( - ); - outputPaths = ( - ); runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; }; - 56DEC2791526311C0031E8DC /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; + 56DAC7481BB69F6D0010FE01 /* Resources */ = { + isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 56DAC7491BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTest.mustache in Resources */, + 56DAC74A1BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest in Resources */, + 56DAC74B1BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest.json in Resources */, + 56DAC74C1BB69F6D0010FE01 /* GRMustacheTemplateRenderMethodsTest.mustache in Resources */, + 56DAC74D1BB69F6D0010FE01 /* GRHoganSuites in Resources */, + 56DAC74E1BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTest_partial in Resources */, + 56DAC74F1BB69F6D0010FE01 /* GRMustacheTemplateRepositoryTest_ISOLatin1 in Resources */, + 56DAC7501BB69F6D0010FE01 /* GRMustacheTemplateRenderMethodsTest.json in Resources */, + 56DAC7511BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTest.text in Resources */, + 56DAC7521BB69F6D0010FE01 /* GRMustacheTemplateRenderMethodsTest in Resources */, + 56DAC7551BB69F6D0010FE01 /* GRMustacheTagDelegateTest.mustache in Resources */, + 56DAC7561BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTest_partial.text in Resources */, + 56DAC7571BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTest in Resources */, + 56DAC7591BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest_parserError.mustache in Resources */, + 56DAC75A1BB69F6D0010FE01 /* GRMustacheTemplateRepositoryTest in Resources */, + 56DAC75B1BB69F6D0010FE01 /* GRMustacheTagDelegateTest_wrapper.mustache in Resources */, + 56DAC75C1BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest.mustache in Resources */, + 56DAC75D1BB69F6D0010FE01 /* GRMustacheLocalizerTestBundle in Resources */, + 56DAC75E1BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTestResources in Resources */, + 56DAC75F1BB69F6D0010FE01 /* GRMustacheJavaSuites in Resources */, + 56DAC7601BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest_compilerError.mustache in Resources */, + 56DAC7611BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache in Resources */, + 56DAC7621BB69F6D0010FE01 /* GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache in Resources */, + 56DAC7631BB69F6D0010FE01 /* GRMustacheTemplateRepositoryWithBundleTest_partial.mustache in Resources */, + 56DAC7641BB69F6D0010FE01 /* GRMustacheTemplateRepositoryTest_UTF8 in Resources */, ); - inputPaths = ( - ); - outputPaths = ( + runOnlyForDeploymentPostprocessing = 0; + }; + 6586A05B1B9E2D720067C98E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( ); runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n"; }; -/* End PBXShellScriptBuildPhase section */ +/* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 56DEC244152631040031E8DC /* Sources */ = { + 56214B6A1BA1A34A0070C6CF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 56214C721BA1A6F20070C6CF /* GRMustacheKeyAccess.m in Sources */, + 56214C821BA1A6F20070C6CF /* GRMustacheTranslateCharacters.m in Sources */, + 56DAC7B91BB6DDAB0010FE01 /* GRMustache.m in Sources */, + 56214C671BA1A6F20070C6CF /* GRMustachePartialOverrideNode.m in Sources */, + 56214C6B1BA1A6F20070C6CF /* GRMustacheTag.m in Sources */, + 56214C621BA1A6F20070C6CF /* GRMustacheExpression.m in Sources */, + 56214C801BA1A6F20070C6CF /* GRMustacheURLEscapeFilter.m in Sources */, + 56214C761BA1A6F20070C6CF /* GRMustacheTemplateRepository.m in Sources */, + 56214C601BA1A6F20070C6CF /* GRMustacheToken.m in Sources */, + 56214C7E1BA1A6F20070C6CF /* GRMustacheLocalizer.m in Sources */, + 56214C781BA1A6F20070C6CF /* GRMustacheTemplateGenerator.m in Sources */, + 56214C741BA1A6F20070C6CF /* GRMustacheRenderingEngine.m in Sources */, + 56214C731BA1A6F20070C6CF /* GRMustacheRendering.m in Sources */, + 56214C771BA1A6F20070C6CF /* GRMustacheExpressionGenerator.m in Sources */, + 56214C7B1BA1A6F20070C6CF /* GRMustacheEachFilter.m in Sources */, + 56214C661BA1A6F20070C6CF /* GRMustacheScopedExpression.m in Sources */, + 56214C641BA1A6F20070C6CF /* GRMustacheIdentifierExpression.m in Sources */, + 56214C811BA1A6F20070C6CF /* GRMustacheError.m in Sources */, + 56214C5F1BA1A6F20070C6CF /* GRMustacheTemplateParser.m in Sources */, + 56214C651BA1A6F20070C6CF /* GRMustacheImplicitIteratorExpression.m in Sources */, + 56214C7C1BA1A6F20070C6CF /* GRMustacheHTMLEscapeFilter.m in Sources */, + 56214C711BA1A6F20070C6CF /* GRMustacheFilter.m in Sources */, + 56214C701BA1A6F20070C6CF /* GRMustacheExpressionInvocation.m in Sources */, + 56DAC7AE1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m in Sources */, + 56214C6D1BA1A6F20070C6CF /* GRMustacheTextNode.m in Sources */, + 56214C751BA1A6F20070C6CF /* GRMustacheTemplate.m in Sources */, + 56214C6E1BA1A6F20070C6CF /* GRMustacheVariableTag.m in Sources */, + 56214C6A1BA1A6F20070C6CF /* GRMustacheSectionTag.m in Sources */, + 56214C6C1BA1A6F20070C6CF /* GRMustacheTemplateAST.m in Sources */, + 56214C5D1BA1A6F20070C6CF /* GRMustacheConfiguration.m in Sources */, + 56214C611BA1A6F20070C6CF /* GRMustacheCompiler.m in Sources */, + 56214C6F1BA1A6F20070C6CF /* GRMustacheContext.m in Sources */, + 56214C631BA1A6F20070C6CF /* GRMustacheFilteredExpression.m in Sources */, + 56214C681BA1A6F20070C6CF /* GRMustacheBlock.m in Sources */, + 56214C791BA1A6F20070C6CF /* NSFormatter+GRMustache.m in Sources */, + 56214C7A1BA1A6F20070C6CF /* NSValueTransformer+GRMustache.m in Sources */, + 56214C7D1BA1A6F20070C6CF /* GRMustacheJavascriptEscapeFilter.m in Sources */, + 56214C5E1BA1A6F20070C6CF /* GRMustacheExpressionParser.m in Sources */, + 56214C691BA1A6F20070C6CF /* GRMustachePartialNode.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 56214B771BA1A4C50070C6CF /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 56DEC2BE152631300031E8DC /* GRMustache.m in Sources */, - 56BF375119B8EEC700854524 /* GRMustacheURLLibrary.m in Sources */, - 56BF36FE19B8EEAE00854524 /* GRMustacheRendering.m in Sources */, - 56BF36B819B8EE9D00854524 /* GRMustachePartialNode.m in Sources */, - 56BF371919B8EEB900854524 /* GRMustacheTemplateRepository.m in Sources */, - 56BF373D19B8EEC700854524 /* GRMustacheEachFilter.m in Sources */, - 56BF36A819B8EE9D00854524 /* GRMustacheScopedExpression.m in Sources */, - 56BF373719B8EEC700854524 /* NSFormatter+GRMustache.m in Sources */, - 56BF36BC19B8EE9D00854524 /* GRMustacheSectionTag.m in Sources */, - 56BF374D19B8EEC700854524 /* GRMustacheStandardLibrary.m in Sources */, - 56BF36AC19B8EE9D00854524 /* GRMustacheCompiler.m in Sources */, - 56BF36EE19B8EEAE00854524 /* GRMustacheExpressionInvocation.m in Sources */, - 56BF376A19B8EF2800854524 /* GRMustacheTranslateCharacters.m in Sources */, - 56BF36F419B8EEAE00854524 /* GRMustacheFilter.m in Sources */, - 56BF374B19B8EEC700854524 /* GRMustacheLocalizer.m in Sources */, - 56BF36A019B8EE9D00854524 /* GRMustacheIdentifierExpression.m in Sources */, - 56BF374519B8EEC700854524 /* GRMustacheJavascriptLibrary.m in Sources */, - 56BF366B19B8EE8B00854524 /* GRMustacheTemplateParser.m in Sources */, - 56BF36B019B8EE9D00854524 /* GRMustacheInheritedPartialNode.m in Sources */, - 56BF36CE19B8EE9E00854524 /* GRMustacheTextNode.m in Sources */, - 56BF365C19B8EE7A00854524 /* GRMustacheConfiguration.m in Sources */, - 56BF36D219B8EE9E00854524 /* GRMustacheVariableTag.m in Sources */, - 56BF371319B8EEB900854524 /* GRMustacheTemplate.m in Sources */, - 56BF369C19B8EE9D00854524 /* GRMustacheFilteredExpression.m in Sources */, - 56BF374119B8EEC700854524 /* GRMustacheHTMLLibrary.m in Sources */, - 56BF36C219B8EE9D00854524 /* GRMustacheTag.m in Sources */, - 56BF36A419B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m in Sources */, - 56BF366719B8EE8B00854524 /* GRMustacheExpressionParser.m in Sources */, - 56BF36C619B8EE9E00854524 /* GRMustacheTemplateAST.m in Sources */, - 56BF366F19B8EE8B00854524 /* GRMustacheToken.m in Sources */, - 56BF36F819B8EEAE00854524 /* GRMustacheKeyAccess.m in Sources */, - 56BF376819B8EF2800854524 /* GRMustacheError.m in Sources */, - 56BF369619B8EE9D00854524 /* GRMustacheExpression.m in Sources */, - 56BF370219B8EEAE00854524 /* GRMustacheRenderingEngine.m in Sources */, - 56BF373119B8EEC700854524 /* GRMustacheTemplateGenerator.m in Sources */, - 56BF373B19B8EEC700854524 /* NSValueTransformer+GRMustache.m in Sources */, - 56BF36B419B8EE9D00854524 /* GRMustacheInheritableSectionNode.m in Sources */, - 56BF36EA19B8EEAE00854524 /* GRMustacheContext.m in Sources */, - 56B01A4E19C49AF5000439C7 /* GRMustacheExpressionGenerator.m in Sources */, + 56214BB71BA1A5560070C6CF /* GRHoganSuitesTest.m in Sources */, + 56214BC41BA1A5690070C6CF /* GRMustacheConfigurationTagDelimitersTest.m in Sources */, + 56DAC7151BB69F170010FE01 /* GRMustacheTestingDelegate.m in Sources */, + 56214BA51BA1A5480070C6CF /* GRMustacheSuitesTest.m in Sources */, + 56214C071BA1A5920070C6CF /* GRMustacheTemplateRepositoryTest.m in Sources */, + 56214BEA1BA1A5850070C6CF /* GRMustacheTemplateExtendBaseContextTest.m in Sources */, + 56214BD21BA1A56D0070C6CF /* GRMustacheContextValueForMustacheKeyTest.m in Sources */, + 56214BD31BA1A56D0070C6CF /* GRMustacheContextKeyAccessTest.m in Sources */, + 56214BBB1BA1A5560070C6CF /* GRMustacheParsingErrorsTest.m in Sources */, + 56214C001BA1A58E0070C6CF /* GRMustacheTemplateRenderMethodsTest.m in Sources */, + 56214BD11BA1A56D0070C6CF /* GRMustacheContextTopMustacheObjectTest.m in Sources */, + 56214BBC1BA1A5560070C6CF /* GRMustachePositionFilterTest.m in Sources */, + 56214BEB1BA1A5850070C6CF /* GRMustacheTemplateTemplateRepositoryTest.m in Sources */, + 56214C1C1BA1A5A70070C6CF /* GRMustacheTemplateRepositoryWithBaseURLTest.m in Sources */, + 56214CB41BA1A8BE0070C6CF /* NSJSONSerialization+Comments.m in Sources */, + 56214BCF1BA1A56D0070C6CF /* GRMustacheContextProtectedObjectTest.m in Sources */, + 56214BA11BA1A5350070C6CF /* GRMustachePublicAPITest.m in Sources */, + 56214BC21BA1A5690070C6CF /* GRMustacheConfigurationBaseContextTest.m in Sources */, + 56214C1D1BA1A5A70070C6CF /* GRMustacheTemplateRepositoryWithDirectoryTest.m in Sources */, + 56214BF41BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest.m in Sources */, + 56214C091BA1A5920070C6CF /* GRMustacheTemplateRepositoryWithDictionaryTest.m in Sources */, + 56214BDE1BA1A57C0070C6CF /* GRMustacheLocalizerTest.m in Sources */, + 56214BC31BA1A5690070C6CF /* GRMustacheConfigurationExtendBaseContextTest.m in Sources */, + 560959C01BD3C7A40000511D /* GRMustacheLambdaTest.m in Sources */, + 56214BE11BA1A57C0070C6CF /* GRMustacheStandardLibraryTest.m in Sources */, + 56214C0B1BA1A5970070C6CF /* GRMustacheTemplateRepositoryWithBundleTest.m in Sources */, + 56214BCE1BA1A56D0070C6CF /* GRMustacheContextHasValueForMustacheExpressionTest.m in Sources */, + 56214BC51BA1A5690070C6CF /* GRMustacheConfigurationTest.m in Sources */, + 56214C081BA1A5920070C6CF /* GRMustacheTemplateRepositoryDataSourceTest.m in Sources */, + 56214BE01BA1A57C0070C6CF /* GRMustacheNSValueTransformerTest.m in Sources */, + 56DAC7971BB6A7DC0010FE01 /* GRMustacheEachFilterTest.m in Sources */, + 56214BBD1BA1A5560070C6CF /* GRMustacheRenderingObjectTest.m in Sources */, + 56214BB51BA1A5560070C6CF /* GRSpecificationSuitesTest.m in Sources */, + 56214BE51BA1A5800070C6CF /* GRMustacheTagDelegateTest.m in Sources */, + 56214BB61BA1A5560070C6CF /* GRMustacheJavaSuitesTest.m in Sources */, + 56214BB91BA1A5560070C6CF /* GRMustacheErrorHandlingTest.m in Sources */, + 56214BD71BA1A5710070C6CF /* GRMustacheVariadicFilterTest.m in Sources */, + 56214BD01BA1A56D0070C6CF /* GRMustacheContextTest.m in Sources */, + 56214BB81BA1A5560070C6CF /* GRBooleanTest.m in Sources */, + 56214BD61BA1A5710070C6CF /* GRMustacheFilterTest.m in Sources */, + 56214BDF1BA1A57C0070C6CF /* GRMustacheNSFormatterTest.m in Sources */, + 56214BBA1BA1A5560070C6CF /* GRMustacheFoundationCollectionTest.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 56DEC250152631040031E8DC /* Sources */ = { + 56214B861BA1A4D50070C6CF /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 56DEC3B5152638E20031E8DC /* GRMustachePrivateAPITest.m in Sources */, - 56BA246718C7A5BE006DA5F3 /* GRMustacheNSFormatterTest.m in Sources */, - 56DEC3B7152638E20031E8DC /* GRMustachePublicAPITest.m in Sources */, - 56DEC3B9152638E20031E8DC /* GRMustacheTestBase.m in Sources */, - 56B477A118CF9F6100EFF629 /* GRMustacheJavaSuitesTest.m in Sources */, - 56BA246F18C7A5BE006DA5F3 /* GRMustacheStandardLibraryTest.m in Sources */, - 56BA243C18C7A550006DA5F3 /* GRMustacheConfigurationTagDelimitersTest.m in Sources */, - 56BA245B18C7A5BE006DA5F3 /* GRMustacheLocalizerTest.m in Sources */, - 56BA247F18C7A5F8006DA5F3 /* GRMustacheVariadicFilterTest.m in Sources */, - 56BA249918C7A65E006DA5F3 /* GRMustacheContextHasValueForMustacheExpressionTest.m in Sources */, - 56DEC3C0152639560031E8DC /* GRSpecificationSuitesTest.m in Sources */, - 56C8892A190A349B0084FC5A /* GRMustacheTemplateGeneratorTest.m in Sources */, - 563D66E91526497E008628C5 /* GRMustacheSuitesTest.m in Sources */, - 56BA247B18C7A5F8006DA5F3 /* GRMustacheFilterTest.m in Sources */, - 56BA244018C7A550006DA5F3 /* GRMustacheConfigurationTest.m in Sources */, - 56A7591719C173E6008D119F /* NSJSONSerialization+Comments.m in Sources */, - 563D66EF152649DF008628C5 /* GRMustacheContextPrivateTest.m in Sources */, - 563D66F1152649DF008628C5 /* GRMustacheExpressionParserTest.m in Sources */, - 56BA24A818C7A6D4006DA5F3 /* GRMustacheTemplateExtendBaseContextTest.m in Sources */, - 56BA248B18C7A62E006DA5F3 /* GRMustacheContextTest.m in Sources */, - 560CE8921526F673004F935E /* GRBooleanTest.m in Sources */, - 56C1FDE819A66DBE00006AB4 /* GRMustacheSuites_7_2_Test.m in Sources */, - 56C1FDFD19A720B900006AB4 /* GRMustacheEachFilterTest.m in Sources */, - 5623B796152731B600DF16A6 /* GRMustacheParsingErrorsTest.m in Sources */, - 56A8D48C15279F8A00D9C718 /* GRMustacheTagDelegateTest.m in Sources */, - 56B4779118CF8AD100EFF629 /* GRMustacheContextProtectedObjectTest.m in Sources */, - 5682B46115282B8200ADD123 /* GRMustacheTemplateFromMethodsTest.m in Sources */, - 5682B46C1528342D00ADD123 /* GRMustacheTemplateRenderMethodsTest.m in Sources */, - 5682B48B1528473200ADD123 /* GRMustacheTemplateRepositoryDataSourceTest.m in Sources */, - 5682B48F1528473200ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.m in Sources */, - 5682B4931528473200ADD123 /* GRMustacheTemplateRepositoryWithDictionaryTest.m in Sources */, - 56C1FDF419A6721100006AB4 /* GRMustacheRenderingObject_7_2_Test.m in Sources */, - 56BA249418C7A648006DA5F3 /* GRMustacheContextTopMustacheObjectTest.m in Sources */, - 563A5EA7163403C000E7E810 /* GRMustacheFoundationCollectionTest.m in Sources */, - 56B4778E18CF8A7C00EFF629 /* GRMustacheKeyedSubscriptingTest.m in Sources */, - 56BA248F18C7A62E006DA5F3 /* GRMustacheContextValueForMustacheKeyTest.m in Sources */, - 56B4779718CF8D2A00EFF629 /* GRHoganSuitesTest.m in Sources */, - 568140D9163659CC00310B7F /* GRMustacheRenderingObjectTest.m in Sources */, - 56BA24A318C7A6B2006DA5F3 /* GRMustacheConfigurationExtendBaseContextTest.m in Sources */, - 56BA243818C7A550006DA5F3 /* GRMustacheConfigurationBaseContextTest.m in Sources */, - 568140E216365D3000310B7F /* GRMustacheTemplateRepositoryWithBaseURLTest.m in Sources */, - 56BA24B318C9A2EE006DA5F3 /* GRMustacheContextKeyAccessTest.m in Sources */, - 568140E416365D3000310B7F /* GRMustacheTemplateRepositoryWithDirectoryTest.m in Sources */, - 568140E816365D6100310B7F /* GRMustachePositionFilterTest.m in Sources */, - 56ABDBC318D23CF7009DF17A /* GRMustacheTemplateTemplateRepositoryTest.m in Sources */, - 5648F1B718998BC5001F4B83 /* GRMustacheTemplateRepositoryTest.m in Sources */, - 56BA246B18C7A5BE006DA5F3 /* GRMustacheNSValueTransformerTest.m in Sources */, - 56BA242618C7A494006DA5F3 /* GRMustacheErrorHandlingTest.m in Sources */, + 56214BAE1BA1A5550070C6CF /* GRHoganSuitesTest.m in Sources */, + 56214BC01BA1A5690070C6CF /* GRMustacheConfigurationTagDelimitersTest.m in Sources */, + 56DAC7141BB69F160010FE01 /* GRMustacheTestingDelegate.m in Sources */, + 56214BA41BA1A5480070C6CF /* GRMustacheSuitesTest.m in Sources */, + 56214C041BA1A5920070C6CF /* GRMustacheTemplateRepositoryTest.m in Sources */, + 56214BE81BA1A5850070C6CF /* GRMustacheTemplateExtendBaseContextTest.m in Sources */, + 56214BCB1BA1A56D0070C6CF /* GRMustacheContextValueForMustacheKeyTest.m in Sources */, + 56214BCC1BA1A56D0070C6CF /* GRMustacheContextKeyAccessTest.m in Sources */, + 56214BB21BA1A5550070C6CF /* GRMustacheParsingErrorsTest.m in Sources */, + 56214BFC1BA1A58D0070C6CF /* GRMustacheTemplateRenderMethodsTest.m in Sources */, + 56214BCA1BA1A56D0070C6CF /* GRMustacheContextTopMustacheObjectTest.m in Sources */, + 56214BB31BA1A5550070C6CF /* GRMustachePositionFilterTest.m in Sources */, + 56214BE91BA1A5850070C6CF /* GRMustacheTemplateTemplateRepositoryTest.m in Sources */, + 56214C1A1BA1A5A60070C6CF /* GRMustacheTemplateRepositoryWithBaseURLTest.m in Sources */, + 56214CB31BA1A8BE0070C6CF /* NSJSONSerialization+Comments.m in Sources */, + 56214BC81BA1A56D0070C6CF /* GRMustacheContextProtectedObjectTest.m in Sources */, + 56214BA01BA1A5350070C6CF /* GRMustachePublicAPITest.m in Sources */, + 56214BBE1BA1A5690070C6CF /* GRMustacheConfigurationBaseContextTest.m in Sources */, + 56214C1B1BA1A5A60070C6CF /* GRMustacheTemplateRepositoryWithDirectoryTest.m in Sources */, + 56214BEC1BA1A58A0070C6CF /* GRMustacheTemplateFromMethodsTest.m in Sources */, + 56214C061BA1A5920070C6CF /* GRMustacheTemplateRepositoryWithDictionaryTest.m in Sources */, + 56214BDA1BA1A57C0070C6CF /* GRMustacheLocalizerTest.m in Sources */, + 56214BBF1BA1A5690070C6CF /* GRMustacheConfigurationExtendBaseContextTest.m in Sources */, + 560959BF1BD3C7A40000511D /* GRMustacheLambdaTest.m in Sources */, + 56214BDD1BA1A57C0070C6CF /* GRMustacheStandardLibraryTest.m in Sources */, + 56214C0A1BA1A5970070C6CF /* GRMustacheTemplateRepositoryWithBundleTest.m in Sources */, + 56214BC71BA1A56D0070C6CF /* GRMustacheContextHasValueForMustacheExpressionTest.m in Sources */, + 56214BC11BA1A5690070C6CF /* GRMustacheConfigurationTest.m in Sources */, + 56214C051BA1A5920070C6CF /* GRMustacheTemplateRepositoryDataSourceTest.m in Sources */, + 56214BDC1BA1A57C0070C6CF /* GRMustacheNSValueTransformerTest.m in Sources */, + 56DAC7961BB6A7DC0010FE01 /* GRMustacheEachFilterTest.m in Sources */, + 56214BB41BA1A5550070C6CF /* GRMustacheRenderingObjectTest.m in Sources */, + 56214BAC1BA1A5550070C6CF /* GRSpecificationSuitesTest.m in Sources */, + 56214BE21BA1A5800070C6CF /* GRMustacheTagDelegateTest.m in Sources */, + 56214BAD1BA1A5550070C6CF /* GRMustacheJavaSuitesTest.m in Sources */, + 56214BB01BA1A5550070C6CF /* GRMustacheErrorHandlingTest.m in Sources */, + 56214BD51BA1A5710070C6CF /* GRMustacheVariadicFilterTest.m in Sources */, + 56214BC91BA1A56D0070C6CF /* GRMustacheContextTest.m in Sources */, + 56214BAF1BA1A5550070C6CF /* GRBooleanTest.m in Sources */, + 56214BD41BA1A5710070C6CF /* GRMustacheFilterTest.m in Sources */, + 56214BDB1BA1A57C0070C6CF /* GRMustacheNSFormatterTest.m in Sources */, + 56214BB11BA1A5550070C6CF /* GRMustacheFoundationCollectionTest.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 56DEC26A1526311B0031E8DC /* Sources */ = { + 56AC8C941BA1F637009E4319 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 56DEC2BF152631300031E8DC /* GRMustache.m in Sources */, - 56BF375219B8EEC700854524 /* GRMustacheURLLibrary.m in Sources */, - 56BF36FF19B8EEAE00854524 /* GRMustacheRendering.m in Sources */, - 56BF36B919B8EE9D00854524 /* GRMustachePartialNode.m in Sources */, - 56BF371A19B8EEB900854524 /* GRMustacheTemplateRepository.m in Sources */, - 56BF373E19B8EEC700854524 /* GRMustacheEachFilter.m in Sources */, - 56BF36A919B8EE9D00854524 /* GRMustacheScopedExpression.m in Sources */, - 56BF373819B8EEC700854524 /* NSFormatter+GRMustache.m in Sources */, - 56BF36BD19B8EE9D00854524 /* GRMustacheSectionTag.m in Sources */, - 56BF374E19B8EEC700854524 /* GRMustacheStandardLibrary.m in Sources */, - 56BF36AD19B8EE9D00854524 /* GRMustacheCompiler.m in Sources */, - 56BF36EF19B8EEAE00854524 /* GRMustacheExpressionInvocation.m in Sources */, - 56BF376B19B8EF2800854524 /* GRMustacheTranslateCharacters.m in Sources */, - 56BF36F519B8EEAE00854524 /* GRMustacheFilter.m in Sources */, - 56BF374C19B8EEC700854524 /* GRMustacheLocalizer.m in Sources */, - 56BF36A119B8EE9D00854524 /* GRMustacheIdentifierExpression.m in Sources */, - 56BF374619B8EEC700854524 /* GRMustacheJavascriptLibrary.m in Sources */, - 56BF366C19B8EE8B00854524 /* GRMustacheTemplateParser.m in Sources */, - 56BF36B119B8EE9D00854524 /* GRMustacheInheritedPartialNode.m in Sources */, - 56BF36CF19B8EE9E00854524 /* GRMustacheTextNode.m in Sources */, - 56BF365D19B8EE7A00854524 /* GRMustacheConfiguration.m in Sources */, - 56BF36D319B8EE9E00854524 /* GRMustacheVariableTag.m in Sources */, - 56BF371419B8EEB900854524 /* GRMustacheTemplate.m in Sources */, - 56BF369D19B8EE9D00854524 /* GRMustacheFilteredExpression.m in Sources */, - 56BF374219B8EEC700854524 /* GRMustacheHTMLLibrary.m in Sources */, - 56BF36C319B8EE9D00854524 /* GRMustacheTag.m in Sources */, - 56BF36A519B8EE9D00854524 /* GRMustacheImplicitIteratorExpression.m in Sources */, - 56BF366819B8EE8B00854524 /* GRMustacheExpressionParser.m in Sources */, - 56BF36C719B8EE9E00854524 /* GRMustacheTemplateAST.m in Sources */, - 56BF367019B8EE8B00854524 /* GRMustacheToken.m in Sources */, - 56BF36F919B8EEAE00854524 /* GRMustacheKeyAccess.m in Sources */, - 56BF376919B8EF2800854524 /* GRMustacheError.m in Sources */, - 56BF369719B8EE9D00854524 /* GRMustacheExpression.m in Sources */, - 56BF370319B8EEAE00854524 /* GRMustacheRenderingEngine.m in Sources */, - 56BF373219B8EEC700854524 /* GRMustacheTemplateGenerator.m in Sources */, - 56BF373C19B8EEC700854524 /* NSValueTransformer+GRMustache.m in Sources */, - 56BF36B519B8EE9D00854524 /* GRMustacheInheritableSectionNode.m in Sources */, - 56BF36EB19B8EEAE00854524 /* GRMustacheContext.m in Sources */, - 56B01A4F19C49AF5000439C7 /* GRMustacheExpressionGenerator.m in Sources */, + 56AC8CBA1BA1F69B009E4319 /* GRMustacheRendering.m in Sources */, + 56AC8CAD1BA1F69B009E4319 /* GRMustacheScopedExpression.m in Sources */, + 56DAC7AF1BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m in Sources */, + 56DAC7131BB69DAC0010FE01 /* GRMustacheTestingDelegate.m in Sources */, + 56AC8CB31BA1F69B009E4319 /* GRMustacheTemplateAST.m in Sources */, + 56AC8CC41BA1F69B009E4319 /* GRMustacheJavascriptEscapeFilter.m in Sources */, + 56AC8CB91BA1F69B009E4319 /* GRMustacheKeyAccess.m in Sources */, + 56AC8CB61BA1F69B009E4319 /* GRMustacheContext.m in Sources */, + 56AC8CB11BA1F69B009E4319 /* GRMustacheSectionTag.m in Sources */, + 56AC8CC21BA1F69B009E4319 /* GRMustacheEachFilter.m in Sources */, + 56AC8CAC1BA1F69B009E4319 /* GRMustacheImplicitIteratorExpression.m in Sources */, + 56AC8CB01BA1F69B009E4319 /* GRMustachePartialNode.m in Sources */, + 56AC8CA81BA1F69B009E4319 /* GRMustacheCompiler.m in Sources */, + 56AC8CA71BA1F69B009E4319 /* GRMustacheToken.m in Sources */, + 56AC8CC71BA1F69B009E4319 /* GRMustacheURLEscapeFilter.m in Sources */, + 56AC8CC31BA1F69B009E4319 /* GRMustacheHTMLEscapeFilter.m in Sources */, + 56AC8CA41BA1F69B009E4319 /* GRMustacheConfiguration.m in Sources */, + 56AC8CA61BA1F69B009E4319 /* GRMustacheTemplateParser.m in Sources */, + 56AC8CBC1BA1F69B009E4319 /* GRMustacheTemplate.m in Sources */, + 56AC8CB51BA1F69B009E4319 /* GRMustacheVariableTag.m in Sources */, + 56AC8CBF1BA1F69B009E4319 /* GRMustacheTemplateGenerator.m in Sources */, + 56AC8CBB1BA1F69B009E4319 /* GRMustacheRenderingEngine.m in Sources */, + 56AC8CC91BA1F69B009E4319 /* GRMustacheTranslateCharacters.m in Sources */, + 56AC8CAA1BA1F69B009E4319 /* GRMustacheFilteredExpression.m in Sources */, + 56AC8CBD1BA1F69B009E4319 /* GRMustacheTemplateRepository.m in Sources */, + 56AC8CB21BA1F69B009E4319 /* GRMustacheTag.m in Sources */, + 56AC8CAE1BA1F69B009E4319 /* GRMustachePartialOverrideNode.m in Sources */, + 56AC8CA91BA1F69B009E4319 /* GRMustacheExpression.m in Sources */, + 56AC8CAB1BA1F69B009E4319 /* GRMustacheIdentifierExpression.m in Sources */, + 56AC8CC81BA1F69B009E4319 /* GRMustacheError.m in Sources */, + 56AC8CB71BA1F69B009E4319 /* GRMustacheExpressionInvocation.m in Sources */, + 56AC8CAF1BA1F69B009E4319 /* GRMustacheBlock.m in Sources */, + 56AC8CA51BA1F69B009E4319 /* GRMustacheExpressionParser.m in Sources */, + 56AC8CB81BA1F69B009E4319 /* GRMustacheFilter.m in Sources */, + 56AC8CB41BA1F69B009E4319 /* GRMustacheTextNode.m in Sources */, + 56AC8CA11BA1F67D009E4319 /* GRMustacheContextPrivateTest.m in Sources */, + 56AC8CA01BA1F67D009E4319 /* GRMustachePrivateAPITest.m in Sources */, + 56AC8CA31BA1F67D009E4319 /* GRMustacheTemplateGeneratorTest.m in Sources */, + 56AC8CC01BA1F69B009E4319 /* NSFormatter+GRMustache.m in Sources */, + 56AC8CBE1BA1F69B009E4319 /* GRMustacheExpressionGenerator.m in Sources */, + 56AC8CA21BA1F67D009E4319 /* GRMustacheExpressionParserTest.m in Sources */, + 56DAC7BA1BB6DDAB0010FE01 /* GRMustache.m in Sources */, + 56AC8CC51BA1F69B009E4319 /* GRMustacheLocalizer.m in Sources */, + 56AC8CC11BA1F69B009E4319 /* NSValueTransformer+GRMustache.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 56DEC2761526311C0031E8DC /* Sources */ = { + 56DAC7191BB69F6D0010FE01 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 56DEC3B6152638E20031E8DC /* GRMustachePrivateAPITest.m in Sources */, - 56BA246918C7A5BE006DA5F3 /* GRMustacheNSFormatterTest.m in Sources */, - 56DEC3B8152638E20031E8DC /* GRMustachePublicAPITest.m in Sources */, - 56DEC3BA152638E20031E8DC /* GRMustacheTestBase.m in Sources */, - 56B477A218CF9F6100EFF629 /* GRMustacheJavaSuitesTest.m in Sources */, - 56BA247118C7A5BE006DA5F3 /* GRMustacheStandardLibraryTest.m in Sources */, - 56BA243E18C7A550006DA5F3 /* GRMustacheConfigurationTagDelimitersTest.m in Sources */, - 56BA245D18C7A5BE006DA5F3 /* GRMustacheLocalizerTest.m in Sources */, - 56BA248118C7A5F8006DA5F3 /* GRMustacheVariadicFilterTest.m in Sources */, - 56BA249B18C7A65E006DA5F3 /* GRMustacheContextHasValueForMustacheExpressionTest.m in Sources */, - 56DEC3C1152639560031E8DC /* GRSpecificationSuitesTest.m in Sources */, - 56C8892B190A349B0084FC5A /* GRMustacheTemplateGeneratorTest.m in Sources */, - 563D66EA1526497E008628C5 /* GRMustacheSuitesTest.m in Sources */, - 56BA247D18C7A5F8006DA5F3 /* GRMustacheFilterTest.m in Sources */, - 56BA244218C7A550006DA5F3 /* GRMustacheConfigurationTest.m in Sources */, - 56A7591819C173E6008D119F /* NSJSONSerialization+Comments.m in Sources */, - 563D66F0152649DF008628C5 /* GRMustacheContextPrivateTest.m in Sources */, - 563D66F2152649DF008628C5 /* GRMustacheExpressionParserTest.m in Sources */, - 56BA24AA18C7A6D4006DA5F3 /* GRMustacheTemplateExtendBaseContextTest.m in Sources */, - 56BA248D18C7A62E006DA5F3 /* GRMustacheContextTest.m in Sources */, - 560CE8911526F672004F935E /* GRBooleanTest.m in Sources */, - 56C1FDE919A66DBE00006AB4 /* GRMustacheSuites_7_2_Test.m in Sources */, - 56C1FDFE19A720B900006AB4 /* GRMustacheEachFilterTest.m in Sources */, - 5623B797152731B600DF16A6 /* GRMustacheParsingErrorsTest.m in Sources */, - 56A8D48D15279F8A00D9C718 /* GRMustacheTagDelegateTest.m in Sources */, - 56B4779218CF8AD100EFF629 /* GRMustacheContextProtectedObjectTest.m in Sources */, - 5682B46215282B8200ADD123 /* GRMustacheTemplateFromMethodsTest.m in Sources */, - 5682B46D1528342D00ADD123 /* GRMustacheTemplateRenderMethodsTest.m in Sources */, - 5682B48C1528473200ADD123 /* GRMustacheTemplateRepositoryDataSourceTest.m in Sources */, - 5682B4901528473200ADD123 /* GRMustacheTemplateRepositoryWithBundleTest.m in Sources */, - 5682B4941528473200ADD123 /* GRMustacheTemplateRepositoryWithDictionaryTest.m in Sources */, - 56C1FDF519A6721100006AB4 /* GRMustacheRenderingObject_7_2_Test.m in Sources */, - 56BA249618C7A648006DA5F3 /* GRMustacheContextTopMustacheObjectTest.m in Sources */, - 563A5EA8163403C000E7E810 /* GRMustacheFoundationCollectionTest.m in Sources */, - 56B4778F18CF8A7C00EFF629 /* GRMustacheKeyedSubscriptingTest.m in Sources */, - 56BA249118C7A62E006DA5F3 /* GRMustacheContextValueForMustacheKeyTest.m in Sources */, - 56B4779818CF8D2A00EFF629 /* GRHoganSuitesTest.m in Sources */, - 568140DA163659CC00310B7F /* GRMustacheRenderingObjectTest.m in Sources */, - 56BA24A518C7A6B2006DA5F3 /* GRMustacheConfigurationExtendBaseContextTest.m in Sources */, - 56BA243A18C7A550006DA5F3 /* GRMustacheConfigurationBaseContextTest.m in Sources */, - 568140E316365D3000310B7F /* GRMustacheTemplateRepositoryWithBaseURLTest.m in Sources */, - 56BA24B518C9A2EE006DA5F3 /* GRMustacheContextKeyAccessTest.m in Sources */, - 568140E516365D3000310B7F /* GRMustacheTemplateRepositoryWithDirectoryTest.m in Sources */, - 568140E916365D6100310B7F /* GRMustachePositionFilterTest.m in Sources */, - 56ABDBC418D23CF7009DF17A /* GRMustacheTemplateTemplateRepositoryTest.m in Sources */, - 5648F1B918998BC5001F4B83 /* GRMustacheTemplateRepositoryTest.m in Sources */, - 56BA246D18C7A5BE006DA5F3 /* GRMustacheNSValueTransformerTest.m in Sources */, - 56BA242818C7A494006DA5F3 /* GRMustacheErrorHandlingTest.m in Sources */, + 56DAC76E1BB6A0040010FE01 /* GRMustacheConfiguration.m in Sources */, + 56DAC76F1BB6A0040010FE01 /* GRMustacheExpressionParser.m in Sources */, + 56DAC7701BB6A0040010FE01 /* GRMustacheTemplateParser.m in Sources */, + 56DAC7711BB6A0040010FE01 /* GRMustacheToken.m in Sources */, + 56DAC7721BB6A0040010FE01 /* GRMustacheCompiler.m in Sources */, + 56DAC7B11BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m in Sources */, + 56DAC7731BB6A0040010FE01 /* GRMustacheExpression.m in Sources */, + 56DAC7741BB6A0040010FE01 /* GRMustacheFilteredExpression.m in Sources */, + 56DAC7751BB6A0040010FE01 /* GRMustacheIdentifierExpression.m in Sources */, + 56DAC7761BB6A0040010FE01 /* GRMustacheImplicitIteratorExpression.m in Sources */, + 56DAC7771BB6A0040010FE01 /* GRMustacheScopedExpression.m in Sources */, + 56DAC7781BB6A0040010FE01 /* GRMustachePartialOverrideNode.m in Sources */, + 56DAC7791BB6A0040010FE01 /* GRMustacheBlock.m in Sources */, + 56DAC77A1BB6A0040010FE01 /* GRMustachePartialNode.m in Sources */, + 56DAC77B1BB6A0040010FE01 /* GRMustacheSectionTag.m in Sources */, + 56DAC77C1BB6A0040010FE01 /* GRMustacheTag.m in Sources */, + 56DAC77D1BB6A0040010FE01 /* GRMustacheTemplateAST.m in Sources */, + 56DAC77E1BB6A0040010FE01 /* GRMustacheTextNode.m in Sources */, + 56DAC7BC1BB6DDAB0010FE01 /* GRMustache.m in Sources */, + 56DAC77F1BB6A0040010FE01 /* GRMustacheVariableTag.m in Sources */, + 56DAC7801BB6A0040010FE01 /* GRMustacheContext.m in Sources */, + 56DAC7811BB6A0040010FE01 /* GRMustacheExpressionInvocation.m in Sources */, + 56DAC7821BB6A0040010FE01 /* GRMustacheFilter.m in Sources */, + 56DAC7831BB6A0040010FE01 /* GRMustacheKeyAccess.m in Sources */, + 56DAC7841BB6A0040010FE01 /* GRMustacheRendering.m in Sources */, + 56DAC7851BB6A0040010FE01 /* GRMustacheRenderingEngine.m in Sources */, + 56DAC7861BB6A0040010FE01 /* GRMustacheTemplate.m in Sources */, + 56DAC7871BB6A0040010FE01 /* GRMustacheTemplateRepository.m in Sources */, + 56DAC7881BB6A0040010FE01 /* GRMustacheExpressionGenerator.m in Sources */, + 56DAC7891BB6A0040010FE01 /* GRMustacheTemplateGenerator.m in Sources */, + 56DAC78A1BB6A0040010FE01 /* NSFormatter+GRMustache.m in Sources */, + 56DAC78B1BB6A0040010FE01 /* NSValueTransformer+GRMustache.m in Sources */, + 56DAC78C1BB6A0040010FE01 /* GRMustacheEachFilter.m in Sources */, + 56DAC78D1BB6A0040010FE01 /* GRMustacheHTMLEscapeFilter.m in Sources */, + 56DAC78E1BB6A0040010FE01 /* GRMustacheJavascriptEscapeFilter.m in Sources */, + 56DAC78F1BB6A0040010FE01 /* GRMustacheLocalizer.m in Sources */, + 56DAC7911BB6A0040010FE01 /* GRMustacheURLEscapeFilter.m in Sources */, + 56DAC7921BB6A0040010FE01 /* GRMustacheError.m in Sources */, + 56DAC7931BB6A0040010FE01 /* GRMustacheTranslateCharacters.m in Sources */, + 56DAC76A1BB69FC40010FE01 /* GRMustachePrivateAPITest.m in Sources */, + 56DAC76B1BB69FC40010FE01 /* GRMustacheContextPrivateTest.m in Sources */, + 56DAC76C1BB69FC40010FE01 /* GRMustacheExpressionParserTest.m in Sources */, + 56DAC76D1BB69FC40010FE01 /* GRMustacheTemplateGeneratorTest.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1892,8 +1863,9 @@ files = ( 6586A0781B9E2E310067C98E /* NSValueTransformer+GRMustache.m in Sources */, 6586A0961B9E2E4F0067C98E /* GRMustacheRendering.m in Sources */, + 56DAC7BB1BB6DDAB0010FE01 /* GRMustache.m in Sources */, 6586A0891B9E2E4A0067C98E /* GRMustacheTemplateRepository.m in Sources */, - 6586A0831B9E2E360067C98E /* GRMustacheURLLibrary.m in Sources */, + 6586A0831B9E2E360067C98E /* GRMustacheURLEscapeFilter.m in Sources */, 6586A0761B9E2E310067C98E /* NSFormatter+GRMustache.m in Sources */, 6586A0801B9E2E360067C98E /* GRMustacheLocalizer.m in Sources */, 6586A0861B9E2E4A0067C98E /* GRMustacheTemplate.m in Sources */, @@ -1901,17 +1873,18 @@ 6586A09C1B9E2E550067C98E /* GRMustacheCompiler.m in Sources */, 6586A08C1B9E2E4F0067C98E /* GRMustacheContext.m in Sources */, 6586A0AF1B9E2E5B0067C98E /* GRMustacheVariableTag.m in Sources */, - 6586A07B1B9E2E360067C98E /* GRMustacheHTMLLibrary.m in Sources */, + 6586A07B1B9E2E360067C98E /* GRMustacheHTMLEscapeFilter.m in Sources */, 6586A0B41B9E2E600067C98E /* GRMustacheFilteredExpression.m in Sources */, - 6586A0A01B9E2E5B0067C98E /* GRMustacheInheritableSectionNode.m in Sources */, + 6586A0A01B9E2E5B0067C98E /* GRMustacheBlock.m in Sources */, 6586A0A21B9E2E5B0067C98E /* GRMustachePartialNode.m in Sources */, 6586A0AD1B9E2E5B0067C98E /* GRMustacheTextNode.m in Sources */, 6586A0B61B9E2E600067C98E /* GRMustacheIdentifierExpression.m in Sources */, - 6586A09E1B9E2E5B0067C98E /* GRMustacheInheritedPartialNode.m in Sources */, + 6586A09E1B9E2E5B0067C98E /* GRMustachePartialOverrideNode.m in Sources */, 6586A0A91B9E2E5B0067C98E /* GRMustacheTemplateAST.m in Sources */, 6586A0BC1B9E2E660067C98E /* GRMustacheExpressionParser.m in Sources */, 6586A0BE1B9E2E660067C98E /* GRMustacheTemplateParser.m in Sources */, - 6586A07D1B9E2E360067C98E /* GRMustacheJavascriptLibrary.m in Sources */, + 6586A07D1B9E2E360067C98E /* GRMustacheJavascriptEscapeFilter.m in Sources */, + 56DAC7B01BB6C9040010FE01 /* NSObject+GRMustacheKeyValueCoding.m in Sources */, 6586A0711B9E2E310067C98E /* GRMustacheExpressionGenerator.m in Sources */, 6586A0791B9E2E360067C98E /* GRMustacheEachFilter.m in Sources */, 6586A0B81B9E2E600067C98E /* GRMustacheImplicitIteratorExpression.m in Sources */, @@ -1919,7 +1892,6 @@ 6586A0931B9E2E4F0067C98E /* GRMustacheKeyAccess.m in Sources */, 6586A06F1B9E2E100067C98E /* GRMustacheTranslateCharacters.m in Sources */, 6586A08E1B9E2E4F0067C98E /* GRMustacheExpressionInvocation.m in Sources */, - 6586A0671B9E2DB90067C98E /* GRMustache.m in Sources */, 6586A0C31B9E2E6A0067C98E /* GRMustacheConfiguration.m in Sources */, 6586A0C01B9E2E660067C98E /* GRMustacheToken.m in Sources */, 6586A0911B9E2E4F0067C98E /* GRMustacheFilter.m in Sources */, @@ -1927,7 +1899,6 @@ 6586A0A41B9E2E5B0067C98E /* GRMustacheSectionTag.m in Sources */, 6586A0731B9E2E310067C98E /* GRMustacheTemplateGenerator.m in Sources */, 6586A06E1B9E2E100067C98E /* GRMustacheError.m in Sources */, - 6586A0811B9E2E360067C98E /* GRMustacheStandardLibrary.m in Sources */, 6586A0981B9E2E4F0067C98E /* GRMustacheRenderingEngine.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1935,19 +1906,264 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 56DEC259152631040031E8DC /* PBXTargetDependency */ = { + 56214B821BA1A4C50070C6CF /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 56DEC247152631040031E8DC /* GRMustache7-MacOS */; - targetProxy = 56DEC258152631040031E8DC /* PBXContainerItemProxy */; + target = 6586A05C1B9E2D720067C98E /* GRMustacheiOS */; + targetProxy = 56214B811BA1A4C50070C6CF /* PBXContainerItemProxy */; }; - 56DEC2801526311C0031E8DC /* PBXTargetDependency */ = { + 56214B911BA1A4D50070C6CF /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 56DEC26D1526311B0031E8DC /* GRMustache7-iOS */; - targetProxy = 56DEC27F1526311C0031E8DC /* PBXContainerItemProxy */; + target = 56214B6E1BA1A34A0070C6CF /* GRMustacheOSX */; + targetProxy = 56214B901BA1A4D50070C6CF /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ + 56214B751BA1A34A0070C6CF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = GRMustache/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustache; + PRODUCT_NAME = GRMustache; + PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 56214B761BA1A34A0070C6CF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = NO; + FRAMEWORK_VERSION = A; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = GRMustache/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.9; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustache; + PRODUCT_NAME = GRMustache; + PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; + SKIP_INSTALL = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 56214B841BA1A4C50070C6CF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + DEBUG_INFORMATION_FORMAT = dwarf; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = GRMustacheTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustacheiOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 56214B851BA1A4C50070C6CF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = GRMustacheTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustacheiOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 56214B931BA1A4D50070C6CF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = GRMustacheTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustacheOSXTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 56214B941BA1A4D50070C6CF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = GRMustacheTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustacheOSXTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 56AC8C9E1BA1F637009E4319 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = GRMustacheTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustacheOSXPrivateTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 56AC8C9F1BA1F637009E4319 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = GRMustacheTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustacheOSXPrivateTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 56DAC7661BB69F6D0010FE01 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + DEBUG_INFORMATION_FORMAT = dwarf; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = GRMustacheTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustacheiOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 56DAC7671BB69F6D0010FE01 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = NO; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + COPY_PHASE_STRIP = NO; + ENABLE_NS_ASSERTIONS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = GRMustacheTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustacheiOSTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; 56DEC1B215262FC90031E8DC /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1961,6 +2177,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; @@ -1982,7 +2199,6 @@ IPHONEOS_DEPLOYMENT_TARGET = 4.3; MACOSX_DEPLOYMENT_TARGET = ""; ONLY_ACTIVE_ARCH = YES; - PUBLIC_HEADERS_FOLDER_PATH = include/GRMustache; SDKROOT = macosx; }; name = Debug; @@ -2014,140 +2230,17 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 4.3; MACOSX_DEPLOYMENT_TARGET = ""; - PUBLIC_HEADERS_FOLDER_PATH = include/GRMustache; SDKROOT = macosx; }; name = Release; }; - 56DEC265152631040031E8DC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DSTROOT = "/tmp/$(TARGET_NAME).dst"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 56DEC266152631040031E8DC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - DSTROOT = "/tmp/$(TARGET_NAME).dst"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 56DEC268152631040031E8DC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - INFOPLIST_FILE = "tests/GRMustache7Tests-Info.plist"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = "-all_load"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 56DEC269152631040031E8DC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - INFOPLIST_FILE = "tests/GRMustache7Tests-Info.plist"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = "-all_load"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 56DEC28C1526311C0031E8DC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - DSTROOT = "/tmp/$(TARGET_NAME).dst"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_THUMB_SUPPORT = NO; - OTHER_CFLAGS = "-DTARGET_OS_IPHONE"; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - 56DEC28D1526311C0031E8DC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - DSTROOT = "/tmp/$(TARGET_NAME).dst"; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_THUMB_SUPPORT = NO; - OTHER_CFLAGS = ( - "-DNS_BLOCK_ASSERTIONS=1", - "-DTARGET_OS_IPHONE", - ); - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 56DEC28F1526311C0031E8DC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(DEVELOPER_LIBRARY_DIR)/Frameworks", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - INFOPLIST_FILE = "tests/GRMustache7Tests-Info.plist"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = "-all_load"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - WRAPPER_EXTENSION = xctest; - }; - name = Debug; - }; - 56DEC2901526311C0031E8DC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(DEVELOPER_LIBRARY_DIR)/Frameworks", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - INFOPLIST_FILE = "tests/GRMustache7Tests-Info.plist"; - OTHER_CFLAGS = ""; - OTHER_LDFLAGS = "-all_load"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - WRAPPER_EXTENSION = xctest; - }; - name = Release; - }; 6586A0621B9E2D720067C98E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_ARC = NO; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -2166,7 +2259,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustache; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_NAME = GRMustache; PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -2182,7 +2275,7 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_ARC = NO; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -2201,7 +2294,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = com.github.groue.GRMustache; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_NAME = GRMustache; PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -2215,52 +2308,61 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 56DEC19F15262FC80031E8DC /* Build configuration list for PBXProject "GRMustache" */ = { + 56214B741BA1A34A0070C6CF /* Build configuration list for PBXNativeTarget "GRMustacheOSX" */ = { isa = XCConfigurationList; buildConfigurations = ( - 56DEC1B215262FC90031E8DC /* Debug */, - 56DEC1B315262FC90031E8DC /* Release */, + 56214B751BA1A34A0070C6CF /* Debug */, + 56214B761BA1A34A0070C6CF /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 56DEC264152631040031E8DC /* Build configuration list for PBXNativeTarget "GRMustache7-MacOS" */ = { + 56214B831BA1A4C50070C6CF /* Build configuration list for PBXNativeTarget "GRMustacheiOSTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 56DEC265152631040031E8DC /* Debug */, - 56DEC266152631040031E8DC /* Release */, + 56214B841BA1A4C50070C6CF /* Debug */, + 56214B851BA1A4C50070C6CF /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 56DEC267152631040031E8DC /* Build configuration list for PBXNativeTarget "GRMustache7-MacOSTests" */ = { + 56214B921BA1A4D50070C6CF /* Build configuration list for PBXNativeTarget "GRMustacheOSXTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 56DEC268152631040031E8DC /* Debug */, - 56DEC269152631040031E8DC /* Release */, + 56214B931BA1A4D50070C6CF /* Debug */, + 56214B941BA1A4D50070C6CF /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 56DEC28B1526311C0031E8DC /* Build configuration list for PBXNativeTarget "GRMustache7-iOS" */ = { + 56AC8C9D1BA1F637009E4319 /* Build configuration list for PBXNativeTarget "GRMustacheOSXPrivateTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 56DEC28C1526311C0031E8DC /* Debug */, - 56DEC28D1526311C0031E8DC /* Release */, + 56AC8C9E1BA1F637009E4319 /* Debug */, + 56AC8C9F1BA1F637009E4319 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 56DEC28E1526311C0031E8DC /* Build configuration list for PBXNativeTarget "GRMustache7-iOSTests" */ = { + 56DAC7651BB69F6D0010FE01 /* Build configuration list for PBXNativeTarget "GRMustacheiOSPrivateTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 56DEC28F1526311C0031E8DC /* Debug */, - 56DEC2901526311C0031E8DC /* Release */, + 56DAC7661BB69F6D0010FE01 /* Debug */, + 56DAC7671BB69F6D0010FE01 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 56DEC19F15262FC80031E8DC /* Build configuration list for PBXProject "GRMustache" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 56DEC1B215262FC90031E8DC /* Debug */, + 56DEC1B315262FC90031E8DC /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 6586A0641B9E2D720067C98E /* Build configuration list for PBXNativeTarget "GRMustache" */ = { + 6586A0641B9E2D720067C98E /* Build configuration list for PBXNativeTarget "GRMustacheiOS" */ = { isa = XCConfigurationList; buildConfigurations = ( 6586A0621B9E2D720067C98E /* Debug */, diff --git a/GRMustache.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/GRMustache.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/GRMustache.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/GRMustache.xcodeproj/xcshareddata/xcschemes/GRMustacheOSX.xcscheme b/GRMustache.xcodeproj/xcshareddata/xcschemes/GRMustacheOSX.xcscheme new file mode 100644 index 00000000..5e47245c --- /dev/null +++ b/GRMustache.xcodeproj/xcshareddata/xcschemes/GRMustacheOSX.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/GRMustache.xcodeproj/xcshareddata/xcschemes/GRMustache.xcscheme b/GRMustache.xcodeproj/xcshareddata/xcschemes/GRMustacheiOS.xcscheme similarity index 95% rename from src/GRMustache.xcodeproj/xcshareddata/xcschemes/GRMustache.xcscheme rename to GRMustache.xcodeproj/xcshareddata/xcschemes/GRMustacheiOS.xcscheme index afb0b6a7..a8b761ba 100644 --- a/src/GRMustache.xcodeproj/xcshareddata/xcschemes/GRMustache.xcscheme +++ b/GRMustache.xcodeproj/xcshareddata/xcschemes/GRMustacheiOS.xcscheme @@ -16,7 +16,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "6586A05C1B9E2D720067C98E" BuildableName = "GRMustache.framework" - BlueprintName = "GRMustache" + BlueprintName = "GRMustacheiOS" ReferencedContainer = "container:GRMustache.xcodeproj"> @@ -47,7 +47,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "6586A05C1B9E2D720067C98E" BuildableName = "GRMustache.framework" - BlueprintName = "GRMustache" + BlueprintName = "GRMustacheiOS" ReferencedContainer = "container:GRMustache.xcodeproj"> @@ -65,7 +65,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "6586A05C1B9E2D720067C98E" BuildableName = "GRMustache.framework" - BlueprintName = "GRMustache" + BlueprintName = "GRMustacheiOS" ReferencedContainer = "container:GRMustache.xcodeproj"> diff --git a/GRMustache.xcworkspace/contents.xcworkspacedata b/GRMustache.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..2022e213 --- /dev/null +++ b/GRMustache.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/src/classes/Compiling/Expressions/GRMustacheExpression.m b/GRMustache/Compiling/Expressions/GRMustacheExpression.m similarity index 93% rename from src/classes/Compiling/Expressions/GRMustacheExpression.m rename to GRMustache/Compiling/Expressions/GRMustacheExpression.m index 67470d53..c3835683 100644 --- a/src/classes/Compiling/Expressions/GRMustacheExpression.m +++ b/GRMustache/Compiling/Expressions/GRMustacheExpression.m @@ -20,10 +20,13 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheExpression_private.h" @implementation GRMustacheExpression -@synthesize token=_token; - (void)dealloc { diff --git a/src/classes/Compiling/Expressions/GRMustacheExpressionVisitor_private.h b/GRMustache/Compiling/Expressions/GRMustacheExpressionVisitor_private.h similarity index 100% rename from src/classes/Compiling/Expressions/GRMustacheExpressionVisitor_private.h rename to GRMustache/Compiling/Expressions/GRMustacheExpressionVisitor_private.h diff --git a/src/classes/Compiling/Expressions/GRMustacheExpression_private.h b/GRMustache/Compiling/Expressions/GRMustacheExpression_private.h similarity index 96% rename from src/classes/Compiling/Expressions/GRMustacheExpression_private.h rename to GRMustache/Compiling/Expressions/GRMustacheExpression_private.h index b10ddb97..7634e782 100644 --- a/src/classes/Compiling/Expressions/GRMustacheExpression_private.h +++ b/GRMustache/Compiling/Expressions/GRMustacheExpression_private.h @@ -30,10 +30,7 @@ * The GRMustacheExpression is the base class for objects that represent * Mustache expression such as `name`, `uppercase(name)`, or `user.name`. */ -@interface GRMustacheExpression : NSObject { -@private - GRMustacheToken *_token; -} +@interface GRMustacheExpression : NSObject /** * This property stores a token whose sole purpose is to help the library user diff --git a/src/classes/Compiling/Expressions/GRMustacheFilteredExpression.m b/GRMustache/Compiling/Expressions/GRMustacheFilteredExpression.m similarity index 95% rename from src/classes/Compiling/Expressions/GRMustacheFilteredExpression.m rename to GRMustache/Compiling/Expressions/GRMustacheFilteredExpression.m index abbbc627..ee9edabb 100644 --- a/src/classes/Compiling/Expressions/GRMustacheFilteredExpression.m +++ b/GRMustache/Compiling/Expressions/GRMustacheFilteredExpression.m @@ -20,14 +20,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import #import "GRMustacheFilteredExpression_private.h" #import "GRMustacheExpressionVisitor_private.h" @implementation GRMustacheFilteredExpression -@synthesize filterExpression=_filterExpression; -@synthesize argumentExpression=_argumentExpression; -@synthesize curried=_curried; + (instancetype)expressionWithFilterExpression:(GRMustacheExpression *)filterExpression argumentExpression:(GRMustacheExpression *)argumentExpression curried:(BOOL)curried { diff --git a/src/classes/Compiling/Expressions/GRMustacheFilteredExpression_private.h b/GRMustache/Compiling/Expressions/GRMustacheFilteredExpression_private.h similarity index 93% rename from src/classes/Compiling/Expressions/GRMustacheFilteredExpression_private.h rename to GRMustache/Compiling/Expressions/GRMustacheFilteredExpression_private.h index 1b2f8e51..5152e79b 100644 --- a/src/classes/Compiling/Expressions/GRMustacheFilteredExpression_private.h +++ b/GRMustache/Compiling/Expressions/GRMustacheFilteredExpression_private.h @@ -26,13 +26,7 @@ * The GRMustacheFilteredExpression represents expressions such as * `()`. */ -@interface GRMustacheFilteredExpression : GRMustacheExpression { -@private - GRMustacheExpression *_filterExpression; - GRMustacheExpression *_argumentExpression; - BOOL _curried; -} - +@interface GRMustacheFilteredExpression : GRMustacheExpression @property (nonatomic, retain, readonly) GRMustacheExpression *filterExpression GRMUSTACHE_API_INTERNAL; @property (nonatomic, retain, readonly) GRMustacheExpression *argumentExpression GRMUSTACHE_API_INTERNAL; @property (nonatomic, getter=isCurried, readonly) BOOL curried GRMUSTACHE_API_INTERNAL; diff --git a/src/classes/Compiling/Expressions/GRMustacheIdentifierExpression.m b/GRMustache/Compiling/Expressions/GRMustacheIdentifierExpression.m similarity index 95% rename from src/classes/Compiling/Expressions/GRMustacheIdentifierExpression.m rename to GRMustache/Compiling/Expressions/GRMustacheIdentifierExpression.m index 43055b6c..5965b910 100644 --- a/src/classes/Compiling/Expressions/GRMustacheIdentifierExpression.m +++ b/GRMustache/Compiling/Expressions/GRMustacheIdentifierExpression.m @@ -20,11 +20,14 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheIdentifierExpression_private.h" #import "GRMustacheExpressionVisitor_private.h" @implementation GRMustacheIdentifierExpression -@synthesize identifier=_identifier; + (instancetype)expressionWithIdentifier:(NSString *)identifier { diff --git a/src/classes/Compiling/Expressions/GRMustacheIdentifierExpression_private.h b/GRMustache/Compiling/Expressions/GRMustacheIdentifierExpression_private.h similarity index 97% rename from src/classes/Compiling/Expressions/GRMustacheIdentifierExpression_private.h rename to GRMustache/Compiling/Expressions/GRMustacheIdentifierExpression_private.h index a72831cd..3d8d36f7 100644 --- a/src/classes/Compiling/Expressions/GRMustacheIdentifierExpression_private.h +++ b/GRMustache/Compiling/Expressions/GRMustacheIdentifierExpression_private.h @@ -26,11 +26,7 @@ * The GRMustacheIdentifierExpression represents expressions such as * `identifier`. */ -@interface GRMustacheIdentifierExpression : GRMustacheExpression { -@private - NSString *_identifier; -} - +@interface GRMustacheIdentifierExpression : GRMustacheExpression @property (nonatomic, retain, readonly) NSString *identifier GRMUSTACHE_API_INTERNAL; /** diff --git a/src/classes/Compiling/Expressions/GRMustacheImplicitIteratorExpression.m b/GRMustache/Compiling/Expressions/GRMustacheImplicitIteratorExpression.m similarity index 94% rename from src/classes/Compiling/Expressions/GRMustacheImplicitIteratorExpression.m rename to GRMustache/Compiling/Expressions/GRMustacheImplicitIteratorExpression.m index b28fc786..2a09f94c 100644 --- a/src/classes/Compiling/Expressions/GRMustacheImplicitIteratorExpression.m +++ b/GRMustache/Compiling/Expressions/GRMustacheImplicitIteratorExpression.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheImplicitIteratorExpression_private.h" #import "GRMustacheExpressionVisitor_private.h" diff --git a/src/classes/Compiling/Expressions/GRMustacheImplicitIteratorExpression_private.h b/GRMustache/Compiling/Expressions/GRMustacheImplicitIteratorExpression_private.h similarity index 100% rename from src/classes/Compiling/Expressions/GRMustacheImplicitIteratorExpression_private.h rename to GRMustache/Compiling/Expressions/GRMustacheImplicitIteratorExpression_private.h diff --git a/src/classes/Compiling/Expressions/GRMustacheScopedExpression.m b/GRMustache/Compiling/Expressions/GRMustacheScopedExpression.m similarity index 96% rename from src/classes/Compiling/Expressions/GRMustacheScopedExpression.m rename to GRMustache/Compiling/Expressions/GRMustacheScopedExpression.m index 204d415e..da7eb0f6 100644 --- a/src/classes/Compiling/Expressions/GRMustacheScopedExpression.m +++ b/GRMustache/Compiling/Expressions/GRMustacheScopedExpression.m @@ -20,13 +20,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheScopedExpression_private.h" #import "GRMustacheExpressionVisitor_private.h" @implementation GRMustacheScopedExpression -@synthesize baseExpression=_baseExpression; -@synthesize identifier=_identifier; + (instancetype)expressionWithBaseExpression:(GRMustacheExpression *)baseExpression identifier:(NSString *)identifier { diff --git a/src/classes/Compiling/Expressions/GRMustacheScopedExpression_private.h b/GRMustache/Compiling/Expressions/GRMustacheScopedExpression_private.h similarity index 93% rename from src/classes/Compiling/Expressions/GRMustacheScopedExpression_private.h rename to GRMustache/Compiling/Expressions/GRMustacheScopedExpression_private.h index 282c5566..7bc25ecf 100644 --- a/src/classes/Compiling/Expressions/GRMustacheScopedExpression_private.h +++ b/GRMustache/Compiling/Expressions/GRMustacheScopedExpression_private.h @@ -26,12 +26,7 @@ * The GRMustacheScopedExpression represents expressions such as * `.identifier`. */ -@interface GRMustacheScopedExpression : GRMustacheExpression { -@private - GRMustacheExpression *_baseExpression; - NSString *_identifier; -} - +@interface GRMustacheScopedExpression : GRMustacheExpression @property (nonatomic, retain, readonly) GRMustacheExpression *baseExpression GRMUSTACHE_API_INTERNAL; @property (nonatomic, retain, readonly) NSString *identifier GRMUSTACHE_API_INTERNAL; diff --git a/src/classes/Compiling/GRMustacheCompiler.m b/GRMustache/Compiling/GRMustacheCompiler.m similarity index 87% rename from src/classes/Compiling/GRMustacheCompiler.m rename to GRMustache/Compiling/GRMustacheCompiler.m index 8c56bfe4..26b72857 100644 --- a/src/classes/Compiling/GRMustacheCompiler.m +++ b/GRMustache/Compiling/GRMustacheCompiler.m @@ -20,14 +20,18 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheCompiler_private.h" #import "GRMustachePartialNode_private.h" #import "GRMustacheTemplateRepository_private.h" #import "GRMustacheTextNode_private.h" #import "GRMustacheVariableTag_private.h" #import "GRMustacheSectionTag_private.h" -#import "GRMustacheInheritableSectionNode_private.h" -#import "GRMustacheInheritedPartialNode_private.h" +#import "GRMustacheBlock_private.h" +#import "GRMustachePartialOverrideNode_private.h" #import "GRMustacheExpressionParser_private.h" #import "GRMustacheExpression_private.h" #import "GRMustacheToken_private.h" @@ -111,16 +115,10 @@ @interface GRMustacheCompiler() @end -@implementation GRMustacheCompiler -@synthesize fatalError=_fatalError; -@synthesize templateRepository=_templateRepository; -@synthesize baseTemplateID=_baseTemplateID; -@synthesize currentOpeningToken=_currentOpeningToken; -@synthesize openingTokenStack=_openingTokenStack; -@synthesize currentTagValue=_currentTagValue; -@synthesize tagValueStack=_tagValueStack; -@synthesize currentASTNodes=_currentASTNodes; -@synthesize ASTNodesStack=_ASTNodesStack; +@implementation GRMustacheCompiler { + GRMustacheContentType _contentType; + BOOL _contentTypeLocked; +} - (instancetype)initWithContentType:(GRMustacheContentType)contentType { @@ -215,6 +213,12 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar case GRMustacheTokenTypeEscapedVariable: { + // Context validation + if (_currentOpeningToken && _currentOpeningToken.type == GRMustacheTokenTypePartialOverride) { + [self failWithFatalError:[self parseErrorAtToken:token description:@"Illegal tag inside a partial override tag."]]; + return NO; + } + // Expression validation NSError *error; GRMustacheExpressionParser *expressionParser = [[[GRMustacheExpressionParser alloc] init] autorelease]; @@ -226,7 +230,7 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar // Success: append GRMustacheVariableTag expression.token = token; - [_currentASTNodes addObject:[GRMustacheVariableTag variableTagWithExpression:expression escapesHTML:YES contentType:_contentType]]; + [_currentASTNodes addObject:[GRMustacheVariableTag variableTagWithExpression:expression escapesHTML:YES contentType:_contentType tagStartDelimiter:token.tagStartDelimiter tagEndDelimiter:token.tagEndDelimiter]]; // lock _contentType _contentTypeLocked = YES; @@ -234,6 +238,12 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar case GRMustacheTokenTypeUnescapedVariable: { + // Context validation + if (_currentOpeningToken && _currentOpeningToken.type == GRMustacheTokenTypePartialOverride) { + [self failWithFatalError:[self parseErrorAtToken:token description:@"Illegal tag inside a partial override tag."]]; + return NO; + } + // Expression validation NSError *error; GRMustacheExpressionParser *expressionParser = [[[GRMustacheExpressionParser alloc] init] autorelease]; @@ -245,7 +255,7 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar // Success: append GRMustacheVariableTag expression.token = token; - [_currentASTNodes addObject:[GRMustacheVariableTag variableTagWithExpression:expression escapesHTML:NO contentType:_contentType]]; + [_currentASTNodes addObject:[GRMustacheVariableTag variableTagWithExpression:expression escapesHTML:NO contentType:_contentType tagStartDelimiter:token.tagStartDelimiter tagEndDelimiter:token.tagEndDelimiter]]; // lock _contentType _contentTypeLocked = YES; @@ -253,6 +263,12 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar case GRMustacheTokenTypeSectionOpening: { + // Context validation + if (_currentOpeningToken && _currentOpeningToken.type == GRMustacheTokenTypePartialOverride) { + [self failWithFatalError:[self parseErrorAtToken:token description:@"Illegal tag inside a partial override tag."]]; + return NO; + } + // Expression validation NSError *error; BOOL empty; @@ -276,7 +292,9 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar inverted:YES templateString:token.templateString innerRange:innerRange - innerTemplateAST:templateAST]; + innerTemplateAST:templateAST + tagStartDelimiter:_currentOpeningToken.tagStartDelimiter + tagEndDelimiter:_currentOpeningToken.tagEndDelimiter]; [_openingTokenStack removeLastObject]; self.currentOpeningToken = token; @@ -316,6 +334,12 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar case GRMustacheTokenTypeInvertedSectionOpening: { + // Context validation + if (_currentOpeningToken && _currentOpeningToken.type == GRMustacheTokenTypePartialOverride) { + [self failWithFatalError:[self parseErrorAtToken:token description:@"Illegal tag inside a partial override tag."]]; + return NO; + } + // Expression validation NSError *error; BOOL empty; @@ -326,7 +350,7 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar _currentOpeningToken.type == GRMustacheTokenTypeSectionOpening && ((expression == nil && empty) || (expression != nil && [expression isEqual:_currentTagValue]))) { - // We found the "else" close of a regular or inheritable section: + // We found the "else" close of a section: // {{#foo}}...{{^}}...{{/foo}} // {{#foo}}...{{^foo}}...{{/foo}} @@ -339,7 +363,9 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar inverted:NO templateString:token.templateString innerRange:innerRange - innerTemplateAST:templateAST]; + innerTemplateAST:templateAST + tagStartDelimiter:_currentOpeningToken.tagStartDelimiter + tagEndDelimiter:_currentOpeningToken.tagEndDelimiter]; [_openingTokenStack removeLastObject]; self.currentOpeningToken = token; @@ -378,12 +404,12 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar } break; - case GRMustacheTokenTypeInheritableSectionOpening: { - // Inheritable section name validation - NSError *inheritableSectionError; - NSString *name = [parser parseInheritableSectionName:token.tagInnerContent empty:NULL error:&inheritableSectionError]; + case GRMustacheTokenTypeBlockOpening: { + // Block name validation + NSError *blockError; + NSString *name = [parser parseBlockName:token.tagInnerContent empty:NULL error:&blockError]; if (name == nil) { - [self failWithFatalError:[self parseErrorAtToken:token description:[NSString stringWithFormat:@"%@ in inheritable section tag", inheritableSectionError.localizedDescription]]]; + [self failWithFatalError:[self parseErrorAtToken:token description:[NSString stringWithFormat:@"%@ in block", blockError.localizedDescription]]]; return NO; } @@ -402,7 +428,7 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar } break; - case GRMustacheTokenTypeInheritedPartial: { + case GRMustacheTokenTypePartialOverride: { // Partial name validation NSError *partialError; NSString *partialName = [parser parseTemplateName:token.tagInnerContent empty:NULL error:&partialError]; @@ -471,16 +497,18 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar inverted:(_currentOpeningToken.type == GRMustacheTokenTypeInvertedSectionOpening) templateString:token.templateString innerRange:innerRange - innerTemplateAST:templateAST]; + innerTemplateAST:templateAST + tagStartDelimiter:_currentOpeningToken.tagStartDelimiter + tagEndDelimiter:_currentOpeningToken.tagEndDelimiter]; } break; - case GRMustacheTokenTypeInheritableSectionOpening: { - // Inheritable section name validation - // We need a valid name that matches section opening, + case GRMustacheTokenTypeBlockOpening: { + // Block name validation + // We need a valid name that matches block opening, // or an empty `{{/}}` closing tags. NSError *error; BOOL empty; - NSString *name = [parser parseInheritableSectionName:token.tagInnerContent empty:&empty error:&error]; + NSString *name = [parser parseBlockName:token.tagInnerContent empty:&empty error:&error]; if (name && ![name isEqual:_currentTagValue]) { [self failWithFatalError:[self parseErrorAtToken:token description:[NSString stringWithFormat:@"Unexpected %@ closing tag", token.templateSubstring]]]; return NO; @@ -494,12 +522,12 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar return NO; } - // Success: create new GRMustacheInheritableSection + // Success: create new GRMustacheBlock GRMustacheTemplateAST *templateAST = [GRMustacheTemplateAST templateASTWithASTNodes:_currentASTNodes contentType:_contentType]; - wrapperASTNode = [GRMustacheInheritableSectionNode inheritableSectionNodeWithName:(NSString *)_currentTagValue innerTemplateAST:templateAST]; + wrapperASTNode = [GRMustacheBlock blockWithName:(NSString *)_currentTagValue innerTemplateAST:templateAST]; } break; - case GRMustacheTokenTypeInheritedPartial: { + case GRMustacheTokenTypePartialOverride: { // Validate token: inheritable template ending should be missing, or match inheritable template opening NSError *error; BOOL empty; @@ -536,10 +564,10 @@ - (BOOL)templateParser:(GRMustacheTemplateParser *)parser shouldContinueAfterPar return NO; } - // Success: create new GRMustacheInheritedPartialNode + // Success: create new GRMustachePartialOverrideNode GRMustachePartialNode *partialNode = [GRMustachePartialNode partialNodeWithTemplateAST:templateAST name:partialName]; GRMustacheTemplateAST *overridingTemplateAST = [GRMustacheTemplateAST templateASTWithASTNodes:_currentASTNodes contentType:_contentType]; - wrapperASTNode = [GRMustacheInheritedPartialNode inheritedPartialNodeWithParentPartialNode:partialNode overridingTemplateAST:overridingTemplateAST]; + wrapperASTNode = [GRMustachePartialOverrideNode partialOverrideNodeWithParentPartialNode:partialNode overridingTemplateAST:overridingTemplateAST]; } break; default: diff --git a/src/classes/Compiling/GRMustacheCompiler_private.h b/GRMustache/Compiling/GRMustacheCompiler_private.h similarity index 88% rename from src/classes/Compiling/GRMustacheCompiler_private.h rename to GRMustache/Compiling/GRMustacheCompiler_private.h index 60133c31..50f408f0 100644 --- a/src/classes/Compiling/GRMustacheCompiler_private.h +++ b/GRMustache/Compiling/GRMustacheCompiler_private.h @@ -37,24 +37,7 @@ * @see GRMustacheToken * @see GRMustacheTemplateParser */ -@interface GRMustacheCompiler : NSObject { -@private - NSError *_fatalError; - - NSMutableArray *_currentASTNodes; - NSMutableArray *_ASTNodesStack; - - GRMustacheToken *_currentOpeningToken; - NSMutableArray *_openingTokenStack; - - NSObject *_currentTagValue; - NSMutableArray *_tagValueStack; - - GRMustacheTemplateRepository *_templateRepository; - id _baseTemplateID; - GRMustacheContentType _contentType; - BOOL _contentTypeLocked; -} +@interface GRMustacheCompiler : NSObject /** * The template repository that provides partial templates to the compiler. diff --git a/src/classes/Compiling/TemplateAST/GRMustacheInheritableSectionNode.m b/GRMustache/Compiling/TemplateAST/GRMustacheBlock.m similarity index 76% rename from src/classes/Compiling/TemplateAST/GRMustacheInheritableSectionNode.m rename to GRMustache/Compiling/TemplateAST/GRMustacheBlock.m index 845a2935..96a9ca10 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheInheritableSectionNode.m +++ b/GRMustache/Compiling/TemplateAST/GRMustacheBlock.m @@ -20,14 +20,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "GRMustacheInheritableSectionNode_private.h" +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + +#import "GRMustacheBlock_private.h" #import "GRMustacheTemplateASTVisitor_private.h" -@implementation GRMustacheInheritableSectionNode -@synthesize name=_name; -@synthesize innerTemplateAST=_innerTemplateAST; +@implementation GRMustacheBlock -+ (instancetype)inheritableSectionNodeWithName:(NSString *)name innerTemplateAST:(GRMustacheTemplateAST *)innerTemplateAST ++ (instancetype)blockWithName:(NSString *)name innerTemplateAST:(GRMustacheTemplateAST *)innerTemplateAST { return [[[self alloc] initWithName:name innerTemplateAST:innerTemplateAST] autorelease]; } @@ -44,20 +46,20 @@ - (void)dealloc - (BOOL)acceptTemplateASTVisitor:(id)visitor error:(NSError **)error { - return [visitor visitInheritableSectionNode:self error:error]; + return [visitor visitBlock:self error:error]; } - (id)resolveTemplateASTNode:(id)templateASTNode { // {{$ name }}...{{/ name }} // - // An inheritable section is overriden by another inheritable section with the same name: + // A block is overriden by another block with the same name: - if (![templateASTNode isKindOfClass:[GRMustacheInheritableSectionNode class]]) { + if (![templateASTNode isKindOfClass:[GRMustacheBlock class]]) { return templateASTNode; } - if (![((GRMustacheInheritableSectionNode *)templateASTNode).name isEqualToString:_name]) { + if (![((GRMustacheBlock *)templateASTNode).name isEqualToString:_name]) { return templateASTNode; } diff --git a/src/classes/Compiling/TemplateAST/GRMustacheInheritableSectionNode_private.h b/GRMustache/Compiling/TemplateAST/GRMustacheBlock_private.h similarity index 71% rename from src/classes/Compiling/TemplateAST/GRMustacheInheritableSectionNode_private.h rename to GRMustache/Compiling/TemplateAST/GRMustacheBlock_private.h index 9e301ebe..269eebd5 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheInheritableSectionNode_private.h +++ b/GRMustache/Compiling/TemplateAST/GRMustacheBlock_private.h @@ -27,39 +27,35 @@ @class GRMustacheTemplateAST; /** - * A GRMustacheInheritableSection is an AST node that represents inheritable - * sections as `{{$name}}...{{/name}}`. + * A GRMustacheBlock is an AST node that represents blocks such + * as `{{$name}}...{{/name}}`. */ -@interface GRMustacheInheritableSectionNode : NSObject { -@private - NSString *_name; - GRMustacheTemplateAST *_innerTemplateAST; -} +@interface GRMustacheBlock : NSObject /** - * The AST of the inner content of the section + * The AST of the inner content of the block * * {{$ ... }} AST {{/ }} */ @property (nonatomic, retain, readonly) GRMustacheTemplateAST *innerTemplateAST GRMUSTACHE_API_INTERNAL; /** - * The name of the inheritable section: + * The name of the block: * * {{$ name }} ... {{/ }} */ @property (nonatomic, readonly) NSString *name GRMUSTACHE_API_INTERNAL; /** - * Returns a new inheritable section. + * Returns a new block. * - * @param name The name of the inheritable section - * @param innerTemplateAST The AST of the inner content of the section + * @param name The name of the block + * @param innerTemplateAST The AST of the inner content of the block * - * @return a new GRMustacheInheritableSection. + * @return a new GRMustacheBlock. * * @see GRMustacheTemplateASTNode */ -+ (instancetype)inheritableSectionNodeWithName:(NSString *)name innerTemplateAST:(GRMustacheTemplateAST *)innerTemplateAST GRMUSTACHE_API_INTERNAL; ++ (instancetype)blockWithName:(NSString *)name innerTemplateAST:(GRMustacheTemplateAST *)innerTemplateAST GRMUSTACHE_API_INTERNAL; @end diff --git a/src/classes/Compiling/TemplateAST/GRMustachePartialNode.m b/GRMustache/Compiling/TemplateAST/GRMustachePartialNode.m similarity index 94% rename from src/classes/Compiling/TemplateAST/GRMustachePartialNode.m rename to GRMustache/Compiling/TemplateAST/GRMustachePartialNode.m index 5ed53455..a5b5b223 100644 --- a/src/classes/Compiling/TemplateAST/GRMustachePartialNode.m +++ b/GRMustache/Compiling/TemplateAST/GRMustachePartialNode.m @@ -20,14 +20,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustachePartialNode_private.h" #import "GRMustacheTemplateAST_private.h" #import "GRMustacheTemplateASTVisitor_private.h" @implementation GRMustachePartialNode -@synthesize templateAST=_templateAST; -@synthesize name=_name; - (void)dealloc { @@ -55,7 +57,7 @@ - (BOOL)acceptTemplateASTVisitor:(id)visitor error // Relevant test: // // { - // "name": "Partials in inherited partials can override inheritable sections", + // "name": "Partials in partial overrides can override blocks", // "data": { }, // "template": "{{partial1}}{{/partial2}}", // "partials": { diff --git a/src/classes/Compiling/TemplateAST/GRMustachePartialNode_private.h b/GRMustache/Compiling/TemplateAST/GRMustachePartialNode_private.h similarity index 96% rename from src/classes/Compiling/TemplateAST/GRMustachePartialNode_private.h rename to GRMustache/Compiling/TemplateAST/GRMustachePartialNode_private.h index 7cff6cb5..47bde5f1 100644 --- a/src/classes/Compiling/TemplateAST/GRMustachePartialNode_private.h +++ b/GRMustache/Compiling/TemplateAST/GRMustachePartialNode_private.h @@ -29,11 +29,7 @@ * A GRMustachePartialNode is an AST node that represents partial tags as * `{{>name}}`. */ -@interface GRMustachePartialNode : NSObject { -@private - NSString *_name; - GRMustacheTemplateAST *_templateAST; -} +@interface GRMustachePartialNode : NSObject /** * The name of the partial: diff --git a/src/classes/Compiling/TemplateAST/GRMustacheInheritedPartialNode.m b/GRMustache/Compiling/TemplateAST/GRMustachePartialOverrideNode.m similarity index 80% rename from src/classes/Compiling/TemplateAST/GRMustacheInheritedPartialNode.m rename to GRMustache/Compiling/TemplateAST/GRMustachePartialOverrideNode.m index f67e69f0..a4076416 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheInheritedPartialNode.m +++ b/GRMustache/Compiling/TemplateAST/GRMustachePartialOverrideNode.m @@ -20,16 +20,18 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "GRMustacheInheritedPartialNode_private.h" +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + +#import "GRMustachePartialOverrideNode_private.h" #import "GRMustachePartialNode_private.h" #import "GRMustacheTemplateAST_private.h" #import "GRMustacheTemplateASTVisitor_private.h" -@implementation GRMustacheInheritedPartialNode -@synthesize overridingTemplateAST=_overridingTemplateAST; -@synthesize parentPartialNode=_parentPartialNode; +@implementation GRMustachePartialOverrideNode -+ (instancetype)inheritedPartialNodeWithParentPartialNode:(GRMustachePartialNode *)parentPartialNode overridingTemplateAST:(GRMustacheTemplateAST *)overridingTemplateAST ++ (instancetype)partialOverrideNodeWithParentPartialNode:(GRMustachePartialNode *)parentPartialNode overridingTemplateAST:(GRMustacheTemplateAST *)overridingTemplateAST { return [[[self alloc] initWithParentPartialNode:parentPartialNode overridingTemplateAST:overridingTemplateAST] autorelease]; } @@ -46,20 +48,20 @@ - (void)dealloc - (BOOL)acceptTemplateASTVisitor:(id)visitor error:(NSError **)error { - return [visitor visitInheritedPartialNode:self error:error]; + return [visitor visitPartialOverrideNode:self error:error]; } - (id)resolveTemplateASTNode:(id)templateASTNode { // {{< partial }}...{{/ partial }} // - // Inherited partials can provide an override in two ways: in + // Partial overrides can provide an override in two ways: in // the parent partial, and inside the overriding section. // // Relevant tests: // // { - // "name": "Two levels of inheritance: inherited partial with overriding content containing another inherited partial", + // "name": "Two levels of inheritance: partial override with overriding content containing another partial override", // "data": { }, // "template": "{{)visitor error // "expected": "inherited" // }, // { - // "name": "Two levels of inheritance: inherited partial with overriding content containing another inherited partial with overriding content containing an inheritable section", + // "name": "Two levels of inheritance: partial override with overriding content containing another partial override with overriding content containing a block", // "data": { }, // "template": "{{ { -@private - GRMustachePartialNode *_parentPartialNode; - GRMustacheTemplateAST *_overridingTemplateAST; -} +@interface GRMustachePartialOverrideNode : NSObject /** - * The overriding AST, built from the inner content of the inherited partial - * node: + * The overriding AST, built from the inner content of the overriding partial: * * {{< ... }} AST {{/ }} */ @@ -53,13 +48,13 @@ @property (nonatomic, retain, readonly) GRMustachePartialNode *parentPartialNode GRMUSTACHE_API_INTERNAL; /** - * Builds a GRMustacheInheritedPartialNode. + * Builds a GRMustachePartialOverrideNode. * * @param parentPartialNode The inherited partial. - * @param templateAST The AST that overrides the inherited partial template. + * @param templateAST The AST that overrides the inherited partial. * - * @return A GRMustacheInheritedPartialNode + * @return A GRMustachePartialOverrideNode */ -+ (instancetype)inheritedPartialNodeWithParentPartialNode:(GRMustachePartialNode *)parentPartialNode overridingTemplateAST:(GRMustacheTemplateAST *)overridingTemplateAST GRMUSTACHE_API_INTERNAL; ++ (instancetype)partialOverrideNodeWithParentPartialNode:(GRMustachePartialNode *)parentPartialNode overridingTemplateAST:(GRMustacheTemplateAST *)overridingTemplateAST GRMUSTACHE_API_INTERNAL; @end diff --git a/src/classes/Compiling/TemplateAST/GRMustacheSectionTag.m b/GRMustache/Compiling/TemplateAST/GRMustacheSectionTag.m similarity index 80% rename from src/classes/Compiling/TemplateAST/GRMustacheSectionTag.m rename to GRMustache/Compiling/TemplateAST/GRMustacheSectionTag.m index 1a3ddca0..557f97fc 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheSectionTag.m +++ b/GRMustache/Compiling/TemplateAST/GRMustacheSectionTag.m @@ -20,15 +20,20 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheSectionTag_private.h" #import "GRMustacheExpression_private.h" #import "GRMustacheToken_private.h" #import "GRMustacheTemplateAST_private.h" #import "GRMustacheRenderingEngine_private.h" -@implementation GRMustacheSectionTag -@synthesize expression=_expression; -@synthesize innerTemplateAST=_innerTemplateAST; +@implementation GRMustacheSectionTag { + NSString *_templateString; + NSRange _innerRange; +} @synthesize inverted=_inverted; - (void)dealloc @@ -39,9 +44,9 @@ - (void)dealloc [super dealloc]; } -+ (instancetype)sectionTagWithExpression:(GRMustacheExpression *)expression inverted:(BOOL)inverted templateString:(NSString *)templateString innerRange:(NSRange)innerRange innerTemplateAST:(GRMustacheTemplateAST *)innerTemplateAST ++ (instancetype)sectionTagWithExpression:(GRMustacheExpression *)expression inverted:(BOOL)inverted templateString:(NSString *)templateString innerRange:(NSRange)innerRange innerTemplateAST:(GRMustacheTemplateAST *)innerTemplateAST tagStartDelimiter:(NSString *)tagStartDelimiter tagEndDelimiter:(NSString *)tagEndDelimiter { - return [[[self alloc] initWithExpression:expression inverted:inverted templateString:templateString innerRange:innerRange innerTemplateAST:innerTemplateAST] autorelease]; + return [[[self alloc] initWithExpression:expression inverted:inverted templateString:templateString innerRange:innerRange innerTemplateAST:innerTemplateAST tagStartDelimiter:tagStartDelimiter tagEndDelimiter:tagEndDelimiter] autorelease]; } @@ -69,8 +74,8 @@ - (GRMustacheTagType)type - (NSString *)renderContentWithContext:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error { - GRMustacheRenderingEngine *renderingEngine = [GRMustacheRenderingEngine renderingEngineWithContentType:_innerTemplateAST.contentType context:context]; - return [renderingEngine renderTemplateAST:_innerTemplateAST HTMLSafe:HTMLSafe error:error]; + GRMustacheRenderingEngine *renderingEngine = [GRMustacheRenderingEngine renderingEngineWithTemplateAST:_innerTemplateAST context:context]; + return [renderingEngine renderHTMLSafe:HTMLSafe error:error]; } @@ -84,9 +89,9 @@ - (BOOL)acceptTemplateASTVisitor:(id)visitor error #pragma mark - Private -- (instancetype)initWithExpression:(GRMustacheExpression *)expression inverted:(BOOL)inverted templateString:(NSString *)templateString innerRange:(NSRange)innerRange innerTemplateAST:(GRMustacheTemplateAST *)innerTemplateAST +- (instancetype)initWithExpression:(GRMustacheExpression *)expression inverted:(BOOL)inverted templateString:(NSString *)templateString innerRange:(NSRange)innerRange innerTemplateAST:(GRMustacheTemplateAST *)innerTemplateAST tagStartDelimiter:(NSString *)tagStartDelimiter tagEndDelimiter:(NSString *)tagEndDelimiter { - self = [super init]; + self = [super initWithTagStartDelimiter:tagStartDelimiter tagEndDelimiter:tagEndDelimiter]; if (self) { _expression = [expression retain]; _inverted = inverted; diff --git a/src/classes/Compiling/TemplateAST/GRMustacheSectionTag_private.h b/GRMustache/Compiling/TemplateAST/GRMustacheSectionTag_private.h similarity index 89% rename from src/classes/Compiling/TemplateAST/GRMustacheSectionTag_private.h rename to GRMustache/Compiling/TemplateAST/GRMustacheSectionTag_private.h index a55fa2e3..8f2fc2cd 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheSectionTag_private.h +++ b/GRMustache/Compiling/TemplateAST/GRMustacheSectionTag_private.h @@ -27,15 +27,7 @@ @class GRMustacheExpression; @class GRMustacheTemplateAST; -@interface GRMustacheSectionTag : GRMustacheTag { -@private - GRMustacheExpression *_expression; - BOOL _inverted; - NSString *_templateString; - NSRange _innerRange; - GRMustacheTemplateAST *_innerTemplateAST; -} - +@interface GRMustacheSectionTag : GRMustacheTag @property (nonatomic, retain, readonly) GRMustacheExpression *expression GRMUSTACHE_API_INTERNAL; @property (nonatomic, retain, readonly) GRMustacheTemplateAST *innerTemplateAST GRMUSTACHE_API_INTERNAL; @@ -61,6 +53,6 @@ * * @see GRMustacheExpression */ -+ (instancetype)sectionTagWithExpression:(GRMustacheExpression *)expression inverted:(BOOL)inverted templateString:(NSString *)templateString innerRange:(NSRange)innerRange innerTemplateAST:(GRMustacheTemplateAST *)innerTemplateAST GRMUSTACHE_API_INTERNAL; ++ (instancetype)sectionTagWithExpression:(GRMustacheExpression *)expression inverted:(BOOL)inverted templateString:(NSString *)templateString innerRange:(NSRange)innerRange innerTemplateAST:(GRMustacheTemplateAST *)innerTemplateAST tagStartDelimiter:(NSString *)tagStartDelimiter tagEndDelimiter:(NSString *)tagEndDelimiter GRMUSTACHE_API_INTERNAL; @end diff --git a/src/classes/Compiling/TemplateAST/GRMustacheTag.h b/GRMustache/Compiling/TemplateAST/GRMustacheTag.h similarity index 82% rename from src/classes/Compiling/TemplateAST/GRMustacheTag.h rename to GRMustache/Compiling/TemplateAST/GRMustacheTag.h index 64795082..4a0da886 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheTag.h +++ b/GRMustache/Compiling/TemplateAST/GRMustacheTag.h @@ -37,7 +37,7 @@ typedef NS_ENUM(NSUInteger, GRMustacheTagType) { * * @since v6.0 */ - GRMustacheTagTypeVariable = 1 << 1 AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, + GRMustacheTagTypeVariable = 1 << 1 AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER, /** * The type for regular and inverted section tags, such as @@ -45,19 +45,10 @@ typedef NS_ENUM(NSUInteger, GRMustacheTagType) { * * @since v6.0 */ - GRMustacheTagTypeSection = 1 << 2 AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, + GRMustacheTagTypeSection = 1 << 2 AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER, -} AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +} AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; -/** - * The type for inverted section tags such as {{^ name }}...{{/}} - * - * This value is deprecated. - * - * @since v6.0 - * @deprecated v7.2 - */ -AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 static GRMustacheTagType const GRMustacheTagTypeInvertedSection = 1 << 3; /** * GRMustacheTag instances represent Mustache tags that render values, such as @@ -79,7 +70,7 @@ AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_ /** * The type of the tag */ -@property (nonatomic, readonly) GRMustacheTagType type AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic, readonly) GRMustacheTagType type AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns the literal and unprocessed inner content of the tag. @@ -89,7 +80,21 @@ AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_ * Variable tags such as `{{ name }}` have no inner content: their inner * template string is the empty string. */ -@property (nonatomic, readonly) NSString *innerTemplateString AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic, readonly) NSString *innerTemplateString AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; + +/** + * The opening delimiter of the tag. + * + * @since v8.0 + */ +@property (nonatomic, readonly, retain) NSString *tagStartDelimiter AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; + +/** + * The closing delimiter of the tag. + * + * @since v8.0 + */ +@property (nonatomic, readonly, retain) NSString *tagEndDelimiter AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns the description of the tag. @@ -106,20 +111,6 @@ AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_ /// @name Methods Dedicated to the GRMustacheRendering Protocol //////////////////////////////////////////////////////////////////////////////// -/** - * This method is deprecated. - * - * Replace `[tag.templateRepository templateFromString:... error:...]` with - * `[GRMustacheTemplate templateFromString:... error:...]`. - * - * Replace `[tag.templateRepository templateNamed:... error:...]` with explicit - * invocation of the targeted template repository. - * - * @since v6.0 - * @deprecated v7.0 - */ -@property (nonatomic, readonly) GRMustacheTemplateRepository *templateRepository AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED; - /** * Returns the rendering of the tag's inner content, rendering all inner * Mustache tags with the rendering context argument. @@ -146,6 +137,6 @@ AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_ * * @return The rendering of the tag's inner content. */ -- (NSString *)renderContentWithContext:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (NSString *)renderContentWithContext:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end diff --git a/src/classes/Compiling/TemplateAST/GRMustacheTag.m b/GRMustache/Compiling/TemplateAST/GRMustacheTag.m similarity index 80% rename from src/classes/Compiling/TemplateAST/GRMustacheTag.m rename to GRMustache/Compiling/TemplateAST/GRMustacheTag.m index 8491c88b..4d15550a 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheTag.m +++ b/GRMustache/Compiling/TemplateAST/GRMustacheTag.m @@ -20,21 +20,37 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import #import "GRMustacheTag_private.h" #import "GRMustacheRendering_private.h" @implementation GRMustacheTag -- (GRMustacheTagType)type +- (instancetype)initWithTagStartDelimiter:(NSString *)tagStartDelimiter tagEndDelimiter:(NSString *)tagEndDelimiter { - [self doesNotRecognizeSelector:_cmd]; - return 0; + self = [super init]; + if (self) { + _tagStartDelimiter = [tagStartDelimiter retain]; + _tagEndDelimiter = [tagEndDelimiter retain]; + } + return self; +} + +- (void)dealloc +{ + [_tagStartDelimiter release]; + [_tagEndDelimiter release]; + [super dealloc]; } -- (GRMustacheTemplateRepository *)templateRepository +- (GRMustacheTagType)type { - return [GRMustacheRendering currentTemplateRepository]; + [self doesNotRecognizeSelector:_cmd]; + return 0; } - (NSString *)innerTemplateString diff --git a/src/classes/Compiling/TemplateAST/GRMustacheTag_private.h b/GRMustache/Compiling/TemplateAST/GRMustacheTag_private.h similarity index 86% rename from src/classes/Compiling/TemplateAST/GRMustacheTag_private.h rename to GRMustache/Compiling/TemplateAST/GRMustacheTag_private.h index 0485c731..fab6dc82 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheTag_private.h +++ b/GRMustache/Compiling/TemplateAST/GRMustacheTag_private.h @@ -43,7 +43,10 @@ typedef NS_ENUM(NSUInteger, GRMustacheTagType) { @property (nonatomic, readonly) NSString *innerTemplateString GRMUSTACHE_API_PUBLIC; // Documented in GRMustacheTag.h -@property (nonatomic, readonly) GRMustacheTemplateRepository *templateRepository GRMUSTACHE_API_PUBLIC_BUT_DEPRECATED; +@property (nonatomic, retain) NSString *tagStartDelimiter GRMUSTACHE_API_PUBLIC; + +// Documented in GRMustacheTag.h +@property (nonatomic, retain) NSString *tagEndDelimiter GRMUSTACHE_API_PUBLIC; // Documented in GRMustacheTag.h - (NSString *)renderContentWithContext:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error GRMUSTACHE_API_PUBLIC; @@ -53,4 +56,6 @@ typedef NS_ENUM(NSUInteger, GRMustacheTagType) { */ @property (nonatomic, readonly, getter=isInverted) BOOL inverted GRMUSTACHE_API_INTERNAL; +- (instancetype)initWithTagStartDelimiter:(NSString *)tagStartDelimiter tagEndDelimiter:(NSString *)tagEndDelimiter GRMUSTACHE_API_INTERNAL; + @end diff --git a/src/classes/Compiling/TemplateAST/GRMustacheTemplateAST.m b/GRMustache/Compiling/TemplateAST/GRMustacheTemplateAST.m similarity index 96% rename from src/classes/Compiling/TemplateAST/GRMustacheTemplateAST.m rename to GRMustache/Compiling/TemplateAST/GRMustacheTemplateAST.m index 5904da44..b2f8d88f 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheTemplateAST.m +++ b/GRMustache/Compiling/TemplateAST/GRMustacheTemplateAST.m @@ -20,13 +20,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheTemplateAST_private.h" #import "GRMustacheTemplateASTNode_private.h" #import "GRMustacheTemplateASTVisitor_private.h" @implementation GRMustacheTemplateAST -@synthesize templateASTNodes=_templateASTNodes; -@synthesize contentType=_contentType; - (void)dealloc { diff --git a/src/classes/Compiling/TemplateAST/GRMustacheTemplateASTNode_private.h b/GRMustache/Compiling/TemplateAST/GRMustacheTemplateASTNode_private.h similarity index 95% rename from src/classes/Compiling/TemplateAST/GRMustacheTemplateASTNode_private.h rename to GRMustache/Compiling/TemplateAST/GRMustacheTemplateASTNode_private.h index e6f8d35c..b30be735 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheTemplateASTNode_private.h +++ b/GRMustache/Compiling/TemplateAST/GRMustacheTemplateASTNode_private.h @@ -59,8 +59,8 @@ * rendered in lieu of the node argument. * * All classes conforming to the GRMustacheTemplateASTNode protocol return - * the node argument, but GRMustacheInheritableSectionNode, - * GRMustacheInheritedPartialNode, and GRMustachePartialNode. + * the node argument, but GRMustacheBlock, + * GRMustachePartialOverrideNode, and GRMustachePartialNode. * * @param templateASTNode A node * diff --git a/src/classes/Compiling/TemplateAST/GRMustacheTemplateASTVisitor_private.h b/GRMustache/Compiling/TemplateAST/GRMustacheTemplateASTVisitor_private.h similarity index 85% rename from src/classes/Compiling/TemplateAST/GRMustacheTemplateASTVisitor_private.h rename to GRMustache/Compiling/TemplateAST/GRMustacheTemplateASTVisitor_private.h index 1fcab0b4..131931aa 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheTemplateASTVisitor_private.h +++ b/GRMustache/Compiling/TemplateAST/GRMustacheTemplateASTVisitor_private.h @@ -24,8 +24,8 @@ #import "GRMustacheAvailabilityMacros_private.h" @class GRMustacheTemplateAST; -@class GRMustacheInheritedPartialNode; -@class GRMustacheInheritableSectionNode; +@class GRMustachePartialOverrideNode; +@class GRMustacheBlock; @class GRMustachePartialNode; @class GRMustacheVariableTag; @class GRMustacheSectionTag; @@ -35,8 +35,8 @@ // Don't use these methods directly. Use -[ { -@private - NSArray *_templateASTNodes; - GRMustacheContentType _contentType; -} +@interface GRMustacheTemplateAST : NSObject /** * An NSArray containing instances diff --git a/src/classes/Compiling/TemplateAST/GRMustacheTextNode.m b/GRMustache/Compiling/TemplateAST/GRMustacheTextNode.m similarity index 92% rename from src/classes/Compiling/TemplateAST/GRMustacheTextNode.m rename to GRMustache/Compiling/TemplateAST/GRMustacheTextNode.m index 52a0a363..f025600c 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheTextNode.m +++ b/GRMustache/Compiling/TemplateAST/GRMustacheTextNode.m @@ -20,10 +20,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheTextNode_private.h" #import "GRMustacheTemplateASTVisitor_private.h" -@implementation GRMustacheTextNode +@implementation GRMustacheTextNode { + NSString *_text; +} + (instancetype)textNodeWithText:(NSString *)text { diff --git a/src/classes/Compiling/TemplateAST/GRMustacheTextNode_private.h b/GRMustache/Compiling/TemplateAST/GRMustacheTextNode_private.h similarity index 97% rename from src/classes/Compiling/TemplateAST/GRMustacheTextNode_private.h rename to GRMustache/Compiling/TemplateAST/GRMustacheTextNode_private.h index 7b226a58..2069c4e2 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheTextNode_private.h +++ b/GRMustache/Compiling/TemplateAST/GRMustacheTextNode_private.h @@ -27,10 +27,7 @@ /** * A GRMustacheTextNode is an AST node that represents raw text. */ -@interface GRMustacheTextNode: NSObject { -@private - NSString *_text; -} +@interface GRMustacheTextNode: NSObject /** * The text of the text node. diff --git a/src/classes/Compiling/TemplateAST/GRMustacheVariableTag.m b/GRMustache/Compiling/TemplateAST/GRMustacheVariableTag.m similarity index 82% rename from src/classes/Compiling/TemplateAST/GRMustacheVariableTag.m rename to GRMustache/Compiling/TemplateAST/GRMustacheVariableTag.m index bbe6ae1b..a0acb844 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheVariableTag.m +++ b/GRMustache/Compiling/TemplateAST/GRMustacheVariableTag.m @@ -20,13 +20,17 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheVariableTag_private.h" #import "GRMustacheExpression_private.h" #import "GRMustacheToken_private.h" -@implementation GRMustacheVariableTag -@synthesize expression=_expression; -@synthesize escapesHTML=_escapesHTML; +@implementation GRMustacheVariableTag { + GRMustacheContentType _contentType; +} - (void)dealloc { @@ -34,9 +38,9 @@ - (void)dealloc [super dealloc]; } -+ (instancetype)variableTagWithExpression:(GRMustacheExpression *)expression escapesHTML:(BOOL)escapesHTML contentType:(GRMustacheContentType)contentType ++ (instancetype)variableTagWithExpression:(GRMustacheExpression *)expression escapesHTML:(BOOL)escapesHTML contentType:(GRMustacheContentType)contentType tagStartDelimiter:(NSString *)tagStartDelimiter tagEndDelimiter:(NSString *)tagEndDelimiter { - return [[[self alloc] initWithExpression:expression escapesHTML:escapesHTML contentType:contentType] autorelease]; + return [[[self alloc] initWithExpression:expression escapesHTML:escapesHTML contentType:contentType tagStartDelimiter:tagStartDelimiter tagEndDelimiter:tagEndDelimiter] autorelease]; } @@ -86,9 +90,9 @@ - (BOOL)acceptTemplateASTVisitor:(id)visitor error #pragma mark - Private -- (instancetype)initWithExpression:(GRMustacheExpression *)expression escapesHTML:(BOOL)escapesHTML contentType:(GRMustacheContentType)contentType +- (instancetype)initWithExpression:(GRMustacheExpression *)expression escapesHTML:(BOOL)escapesHTML contentType:(GRMustacheContentType)contentType tagStartDelimiter:(NSString *)tagStartDelimiter tagEndDelimiter:(NSString *)tagEndDelimiter { - self = [super init]; + self = [super initWithTagStartDelimiter:tagStartDelimiter tagEndDelimiter:tagEndDelimiter]; if (self) { _expression = [expression retain]; _escapesHTML = escapesHTML; diff --git a/src/classes/Compiling/TemplateAST/GRMustacheVariableTag_private.h b/GRMustache/Compiling/TemplateAST/GRMustacheVariableTag_private.h similarity index 75% rename from src/classes/Compiling/TemplateAST/GRMustacheVariableTag_private.h rename to GRMustache/Compiling/TemplateAST/GRMustacheVariableTag_private.h index 8d780389..1713bb9e 100644 --- a/src/classes/Compiling/TemplateAST/GRMustacheVariableTag_private.h +++ b/GRMustache/Compiling/TemplateAST/GRMustacheVariableTag_private.h @@ -26,28 +26,24 @@ @class GRMustacheExpression; -@interface GRMustacheVariableTag : GRMustacheTag { -@private - GRMustacheExpression *_expression; - BOOL _escapesHTML; - GRMustacheContentType _contentType; -} - +@interface GRMustacheVariableTag : GRMustacheTag @property (nonatomic, retain, readonly) GRMustacheExpression *expression GRMUSTACHE_API_INTERNAL; @property (nonatomic, readonly) BOOL escapesHTML GRMUSTACHE_API_INTERNAL; /** * Builds and returns a GRMustacheVariableTag. * - * @param expression The expression that would evaluate against a rendering - * contex. - * @param escapesHTML YES if the value should be escaped. - * @param contentType The content type of the tag rendering. + * @param expression The expression that would evaluate against a + * rendering context. + * @param escapesHTML YES if the value should be escaped. + * @param contentType The content type of the tag rendering. + * @param tagStartDelimiter The opening delimiter. + * @param tagEndDelimiter The closing delimiter. * * @return a GRMustacheVariableTag * * @see GRMustacheExpression */ -+ (instancetype)variableTagWithExpression:(GRMustacheExpression *)expression escapesHTML:(BOOL)escapesHTML contentType:(GRMustacheContentType)contentType GRMUSTACHE_API_INTERNAL; ++ (instancetype)variableTagWithExpression:(GRMustacheExpression *)expression escapesHTML:(BOOL)escapesHTML contentType:(GRMustacheContentType)contentType tagStartDelimiter:(NSString *)tagStartDelimiter tagEndDelimiter:(NSString *)tagEndDelimiter GRMUSTACHE_API_INTERNAL; @end diff --git a/include/GRMustacheConfiguration.h b/GRMustache/Configuration/GRMustacheConfiguration.h similarity index 93% rename from include/GRMustacheConfiguration.h rename to GRMustache/Configuration/GRMustacheConfiguration.h index 2d061ae9..4ddc2487 100644 --- a/include/GRMustacheConfiguration.h +++ b/GRMustache/Configuration/GRMustacheConfiguration.h @@ -75,14 +75,7 @@ * * @since v6.2 */ -@interface GRMustacheConfiguration : NSObject { -@private - GRMustacheContentType _contentType; - NSString *_tagStartDelimiter; - NSString *_tagEndDelimiter; - GRMustacheContext *_baseContext; - BOOL _locked; -} +@interface GRMustacheConfiguration : NSObject //////////////////////////////////////////////////////////////////////////////// @@ -103,7 +96,7 @@ * * @since v6.2 */ -+ (GRMustacheConfiguration *)defaultConfiguration AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (GRMustacheConfiguration *)defaultConfiguration AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; //////////////////////////////////////////////////////////////////////////////// @@ -119,7 +112,7 @@ * * @since v6.2 */ -+ (GRMustacheConfiguration *)configuration AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)configuration AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; //////////////////////////////////////////////////////////////////////////////// @@ -135,7 +128,7 @@ * * @since v6.4 */ -@property (nonatomic, retain) GRMustacheContext *baseContext AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic, retain) GRMustacheContext *baseContext AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Extends the base context of the receiver with the provided object, making its @@ -176,7 +169,7 @@ * * @since v6.8 */ -- (void)extendBaseContextWithObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (void)extendBaseContextWithObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Extends the base context of the receiver with the provided object, making its @@ -211,7 +204,7 @@ * * @since v6.8 */ -- (void)extendBaseContextWithProtectedObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER;; +- (void)extendBaseContextWithProtectedObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER;; /** * Extends the base context of the receiver with a tag delegate, making it aware @@ -231,7 +224,7 @@ * * @since v6.8 */ -- (void)extendBaseContextWithTagDelegate:(id)tagDelegate AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER;; +- (void)extendBaseContextWithTagDelegate:(id)tagDelegate AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER;; /** * The content type of strings rendered by templates. @@ -271,7 +264,7 @@ * * @since v6.2 */ -@property (nonatomic) GRMustacheContentType contentType AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic) GRMustacheContentType contentType AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * The opening delimiter for Mustache tags. Its default value is `{{`. @@ -281,7 +274,7 @@ * * @since v6.4 */ -@property (nonatomic, copy) NSString *tagStartDelimiter AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic, copy) NSString *tagStartDelimiter AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * The closing delimiter for Mustache tags. Its default value is `}}`. @@ -291,6 +284,6 @@ * * @since v6.4 */ -@property (nonatomic, copy) NSString *tagEndDelimiter AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic, copy) NSString *tagEndDelimiter AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end diff --git a/src/classes/Configuration/GRMustacheConfiguration.m b/GRMustache/Configuration/GRMustacheConfiguration.m similarity index 91% rename from src/classes/Configuration/GRMustacheConfiguration.m rename to GRMustache/Configuration/GRMustacheConfiguration.m index 0f09254c..c5c78958 100644 --- a/src/classes/Configuration/GRMustacheConfiguration.m +++ b/GRMustache/Configuration/GRMustacheConfiguration.m @@ -20,16 +20,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheConfiguration_private.h" #import "GRMustache_private.h" #import "GRMustacheContext_private.h" + @implementation GRMustacheConfiguration -@synthesize contentType=_contentType; -@synthesize tagStartDelimiter=_tagStartDelimiter; -@synthesize tagEndDelimiter=_tagEndDelimiter; -@synthesize baseContext=_baseContext; -@synthesize locked=_locked; + (GRMustacheConfiguration *)defaultConfiguration { @@ -41,9 +41,9 @@ + (GRMustacheConfiguration *)defaultConfiguration return defaultConfiguration; } -+ (GRMustacheConfiguration *)configuration ++ (instancetype)configuration { - return [[[GRMustacheConfiguration alloc] init] autorelease]; + return [[[self alloc] init] autorelease]; } - (void)dealloc @@ -61,7 +61,7 @@ - (instancetype)init _contentType = GRMustacheContentTypeHTML; _tagStartDelimiter = [@"{{" retain]; // useless retain that matches the release in dealloc _tagEndDelimiter = [@"}}" retain]; // useless retain that matches the release in dealloc - _baseContext = [[GRMustacheContext contextWithObject:[GRMustache standardLibrary]] retain]; + _baseContext = [[GRMustacheContext context] retain]; } return self; } diff --git a/src/classes/Configuration/GRMustacheConfiguration_private.h b/GRMustache/Configuration/GRMustacheConfiguration_private.h similarity index 90% rename from src/classes/Configuration/GRMustacheConfiguration_private.h rename to GRMustache/Configuration/GRMustacheConfiguration_private.h index e2c155bd..423d1e49 100644 --- a/src/classes/Configuration/GRMustacheConfiguration_private.h +++ b/GRMustache/Configuration/GRMustacheConfiguration_private.h @@ -28,21 +28,13 @@ @protocol GRMustacheTagDelegate; // Documented in GRMustacheConfiguration.h -@interface GRMustacheConfiguration : NSObject { -@private - GRMustacheContentType _contentType; - NSString *_tagStartDelimiter; - NSString *_tagEndDelimiter; - GRMustacheContext *_baseContext; - BOOL _locked; -} - +@interface GRMustacheConfiguration : NSObject // Documented in GRMustacheConfiguration.h + (GRMustacheConfiguration *)defaultConfiguration GRMUSTACHE_API_PUBLIC; // Documented in GRMustacheConfiguration.h -+ (GRMustacheConfiguration *)configuration GRMUSTACHE_API_PUBLIC; ++ (instancetype)configuration GRMUSTACHE_API_PUBLIC; // Documented in GRMustacheConfiguration.h @property (nonatomic) GRMustacheContentType contentType GRMUSTACHE_API_PUBLIC; diff --git a/src/classes/GRMustache.h b/GRMustache/GRMustache.h similarity index 54% rename from src/classes/GRMustache.h rename to GRMustache/GRMustache.h index e926703e..725a5bff 100644 --- a/src/classes/GRMustache.h +++ b/GRMustache/GRMustache.h @@ -23,20 +23,11 @@ #import #import "GRMustacheAvailabilityMacros.h" -@protocol GRMustacheRendering; -@class GRMustacheTag; -@class GRMustacheContext; +//! Project version number for GRMustache. +FOUNDATION_EXPORT double GRMustacheVersionNumber; -/** - * A C struct that hold GRMustache version information - * - * @since v1.0 - */ -typedef struct { - int major; /**< The major component of the version. */ - int minor; /**< The minor component of the version. */ - int patch; /**< The patch-level component of the version. */ -} GRMustacheVersion; +//! Project version string for GRMustache. +FOUNDATION_EXPORT const unsigned char GRMustacheVersionString[]; /** @@ -47,57 +38,55 @@ typedef struct { */ @interface GRMustache: NSObject + //////////////////////////////////////////////////////////////////////////////// -/// @name Getting the GRMustache version +/// @name Standard Library //////////////////////////////////////////////////////////////////////////////// /** - * @return The version of GRMustache as a GRMustacheVersion struct. + * @return The GRMustache standard `each`. * - * @since v7.0 + * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/standard_library.md + * + * @since v8.0 */ -+ (GRMustacheVersion)libraryVersion AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Standard Library -//////////////////////////////////////////////////////////////////////////////// ++ (id)standardEach AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** - * @return The GRMustache standard library. + * @return The GRMustache standard `HTMLEscape`. * * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/standard_library.md * - * @since v6.4 + * @since v8.0 */ -+ (NSObject *)standardLibrary AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - ++ (id)standardHTMLEscape AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; -//////////////////////////////////////////////////////////////////////////////// -/// @name Building rendering objects -//////////////////////////////////////////////////////////////////////////////// +/** + * @return The GRMustache standard `URLEscape`. + * + * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/standard_library.md + * + * @since v8.0 + */ ++ (id)standardURLEscape AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** - * This method is deprecated. Use - * `+[GRMustacheRendering renderingObjectForObject:]` instead. + * @return The GRMustache standard `javascriptEscape`. * - * @see GRMustacheRendering class + * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/standard_library.md * - * @since v6.0 - * @deprecated v7.0 + * @since v8.0 */ -+ (id)renderingObjectForObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED; ++ (id)standardJavascriptEscape AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** - * This method is deprecated. Use - * `+[GRMustacheRendering renderingObjectWithBlock:]` instead. + * @return The GRMustache standard `zip`. * - * @see GRMustacheRendering class + * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/standard_library.md * - * @since v6.0 - * @deprecated v7.0 + * @since v8.0 */ -+ (id)renderingObjectWithBlock:(NSString *(^)(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error))block AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED; ++ (id)standardZip AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end @@ -106,13 +95,12 @@ typedef struct { #import "GRMustacheTemplateRepository.h" #import "GRMustacheFilter.h" #import "GRMustacheError.h" -#import "GRMustacheVersion.h" #import "GRMustacheContentType.h" #import "GRMustacheContext.h" #import "GRMustacheRendering.h" #import "GRMustacheTag.h" #import "GRMustacheConfiguration.h" #import "GRMustacheLocalizer.h" -#import "GRMustacheSafeKeyAccess.h" +#import "GRMustacheKeyValueCoding.h" #import "NSValueTransformer+GRMustache.h" #import "NSFormatter+GRMustache.h" diff --git a/GRMustache/GRMustache.m b/GRMustache/GRMustache.m new file mode 100644 index 00000000..075ab190 --- /dev/null +++ b/GRMustache/GRMustache.m @@ -0,0 +1,159 @@ +// The MIT License +// +// Copyright (c) 2014 Gwendal Roué +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + +#import "GRMustache_private.h" +#import "GRMustacheKeyAccess_private.h" +#import "GRMustacheRendering_private.h" +#import "GRMustacheJavascriptEscapeFilter_private.h" +#import "GRMustacheHTMLEscapeFilter_private.h" +#import "GRMustacheURLEscapeFilter_private.h" +#import "GRMustacheEachFilter_private.h" +#import "GRMustacheLocalizer.h" +#import "GRMustacheContext_private.h" +#import "GRMustacheError.h" +#import "GRMustacheTag_private.h" + + +// ============================================================================= +#pragma mark - GRMustache + +@implementation GRMustache + + +// ============================================================================= +#pragma mark - Standard library + +// Documented in GRMustache.h ++ (id)standardEach +{ + return [[[GRMustacheEachFilter alloc] init] autorelease]; +} + +// Documented in GRMustache.h ++ (id)standardHTMLEscape +{ + return [[[GRMustacheHTMLEscapeFilter alloc] init] autorelease]; +} + +// Documented in GRMustache.h ++ (id)standardURLEscape +{ + return [[[GRMustacheURLEscapeFilter alloc] init] autorelease]; +} + +// Documented in GRMustache.h ++ (id)standardJavascriptEscape +{ + return [[[GRMustacheJavascriptEscapeFilter alloc] init] autorelease]; +} + +// Documented in GRMustache.h ++ (id)standardZip +{ + return [GRMustacheFilter variadicFilterWithBlock:^id(NSArray *arguments) { + + // GRMustache generally identifies collections as objects conforming + // to NSFastEnumeration, excluding NSDictionary. + // + // Let's validate our arguments first. + + for (id argument in arguments) { + if (![argument respondsToSelector:@selector(countByEnumeratingWithState:objects:count:)] || [argument isKindOfClass:[NSDictionary class]]) { + return [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { + if (error) { + *error = [NSError errorWithDomain:GRMustacheErrorDomain code:GRMustacheErrorCodeRenderingError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Tag %@: Non-enumerable argument in zip filter: %@", tag, argument] }]; + } + return nil; + }]; + } + } + + + // Turn NSFastEnumeration arguments into enumerators. This is + // because enumerators can be iterated all together, when + // NSFastEnumeration objects can not. + + NSMutableArray *enumerators = [NSMutableArray array]; + for (id argument in arguments) { + if ([argument respondsToSelector:@selector(objectEnumerator)]) { + // Assume objectEnumerator method returns what we need. + [enumerators addObject:[argument objectEnumerator]]; + } else { + // Turn NSFastEnumeration argument into an array, + // and extract enumerator from the array. + NSMutableArray *array = [NSMutableArray array]; + for (id object in argument) { + [array addObject:object]; + } + [enumerators addObject:[array objectEnumerator]]; + } + } + + + // Build an array of objects which will perform custom rendering. + + NSMutableArray *renderingObjects = [NSMutableArray array]; + while (YES) { + + // Extract from all iterators the objects that should enter the + // rendering context at each iteration. + // + // Given the [1,2,3], [a,b,c] input collections, those objects + // would be [1,a] then [2,b] and finally [3,c]. + + NSMutableArray *objects = [NSMutableArray array]; + for (NSEnumerator *enumerator in enumerators) { + id object = [enumerator nextObject]; + if (object) { + [objects addObject:object]; + } + } + + + // All iterators have been enumerated: stop + + if (objects.count == 0) { + break; + } + + + // Build a rendering object which extends the rendering context + // before rendering the tag. + + id renderingObject = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { + for (id object in objects) { + context = [context contextByAddingObject:object]; + } + return [tag renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; + }]; + [renderingObjects addObject:renderingObject]; + } + + return renderingObjects; + }]; +} + +@end diff --git a/src/classes/GRMustache_private.h b/GRMustache/GRMustache_private.h similarity index 75% rename from src/classes/GRMustache_private.h rename to GRMustache/GRMustache_private.h index fb9d4cff..0312318c 100644 --- a/src/classes/GRMustache_private.h +++ b/GRMustache/GRMustache_private.h @@ -27,25 +27,21 @@ @class GRMustacheTag; @class GRMustacheContext; -// Documented in GRMustache.h -typedef struct { - int major; - int minor; - int patch; -} GRMustacheVersion; - @interface GRMustache: NSObject // Documented in GRMustache.h -+ (GRMustacheVersion)libraryVersion GRMUSTACHE_API_PUBLIC; ++ (id)standardEach GRMUSTACHE_API_PUBLIC; + +// Documented in GRMustache.h ++ (id)standardHTMLEscape GRMUSTACHE_API_PUBLIC; // Documented in GRMustache.h -+ (NSObject *)standardLibrary GRMUSTACHE_API_PUBLIC; ++ (id)standardURLEscape GRMUSTACHE_API_PUBLIC; // Documented in GRMustache.h -+ (id)renderingObjectForObject:(id)object GRMUSTACHE_API_PUBLIC_BUT_DEPRECATED; ++ (id)standardJavascriptEscape GRMUSTACHE_API_PUBLIC; // Documented in GRMustache.h -+ (id)renderingObjectWithBlock:(NSString *(^)(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error))block GRMUSTACHE_API_PUBLIC_BUT_DEPRECATED; ++ (id)standardZip GRMUSTACHE_API_PUBLIC; @end diff --git a/src/GRMustache/Info.plist b/GRMustache/Info.plist similarity index 97% rename from src/GRMustache/Info.plist rename to GRMustache/Info.plist index 913ca181..11bf68aa 100644 --- a/src/GRMustache/Info.plist +++ b/GRMustache/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 8.0 + 8.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/src/classes/Parsing/GRMustacheExpressionParser.m b/GRMustache/Parsing/GRMustacheExpressionParser.m similarity index 99% rename from src/classes/Parsing/GRMustacheExpressionParser.m rename to GRMustache/Parsing/GRMustacheExpressionParser.m index 0a8d0e1e..d309f2af 100644 --- a/src/classes/Parsing/GRMustacheExpressionParser.m +++ b/GRMustache/Parsing/GRMustacheExpressionParser.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheExpressionParser_private.h" #import "GRMustacheImplicitIteratorExpression_private.h" #import "GRMustacheFilteredExpression_private.h" diff --git a/src/classes/Parsing/GRMustacheExpressionParser_private.h b/GRMustache/Parsing/GRMustacheExpressionParser_private.h similarity index 100% rename from src/classes/Parsing/GRMustacheExpressionParser_private.h rename to GRMustache/Parsing/GRMustacheExpressionParser_private.h diff --git a/src/classes/Parsing/GRMustacheTemplateParser.m b/GRMustache/Parsing/GRMustacheTemplateParser.m similarity index 92% rename from src/classes/Parsing/GRMustacheTemplateParser.m rename to GRMustache/Parsing/GRMustacheTemplateParser.m index 491d9c02..d3a2020c 100644 --- a/src/classes/Parsing/GRMustacheTemplateParser.m +++ b/GRMustache/Parsing/GRMustacheTemplateParser.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheTemplateParser_private.h" #import "GRMustacheConfiguration_private.h" #import "GRMustacheToken_private.h" @@ -40,9 +44,6 @@ @interface GRMustacheTemplateParser() @end @implementation GRMustacheTemplateParser -@synthesize delegate=_delegate; -@synthesize tagStartDelimiter=_tagStartDelimiter; -@synthesize tagEndDelimiter=_tagEndDelimiter; - (instancetype)initWithConfiguration:(GRMustacheConfiguration *)configuration { @@ -191,7 +192,9 @@ - (void)parseTemplateString:(NSString *)templateString templateID:(id)templateID templateString:templateString templateID:templateID line:lineNumber - range:(NSRange){ .location = start, .length = i-start}]; + range:(NSRange){ .location = start, .length = i-start} + tagStartDelimiter:tagStartDelimiter + tagEndDelimiter:tagEndDelimiter]; if (![self.delegate templateParser:self shouldContinueAfterParsingToken:token]) return; } tagStartLineNumber = lineNumber; @@ -207,7 +210,9 @@ - (void)parseTemplateString:(NSString *)templateString templateID:(id)templateID templateString:templateString templateID:templateID line:lineNumber - range:(NSRange){ .location = start, .length = i-start}]; + range:(NSRange){ .location = start, .length = i-start} + tagStartDelimiter:tagStartDelimiter + tagEndDelimiter:tagEndDelimiter]; if (![self.delegate templateParser:self shouldContinueAfterParsingToken:token]) return; } tagStartLineNumber = lineNumber; @@ -223,7 +228,9 @@ - (void)parseTemplateString:(NSString *)templateString templateID:(id)templateID templateString:templateString templateID:templateID line:lineNumber - range:(NSRange){ .location = start, .length = i-start}]; + range:(NSRange){ .location = start, .length = i-start} + tagStartDelimiter:tagStartDelimiter + tagEndDelimiter:tagEndDelimiter]; if (![self.delegate templateParser:self shouldContinueAfterParsingToken:token]) return; } tagStartLineNumber = lineNumber; @@ -258,7 +265,7 @@ - (void)parseTemplateString:(NSString *)templateString templateID:(id)templateID tagInnerRange = (NSRange){ .location = start+tagStartDelimiterLength+1, .length = i-(start+tagStartDelimiterLength+1) }; break; case '$': - type = GRMustacheTokenTypeInheritableSectionOpening; + type = GRMustacheTokenTypeBlockOpening; tagInnerRange = (NSRange){ .location = start+tagStartDelimiterLength+1, .length = i-(start+tagStartDelimiterLength+1) }; break; case '/': @@ -270,7 +277,7 @@ - (void)parseTemplateString:(NSString *)templateString templateID:(id)templateID tagInnerRange = (NSRange){ .location = start+tagStartDelimiterLength+1, .length = i-(start+tagStartDelimiterLength+1) }; break; case '<': - type = GRMustacheTokenTypeInheritedPartial; + type = GRMustacheTokenTypePartialOverride; tagInnerRange = (NSRange){ .location = start+tagStartDelimiterLength+1, .length = i-(start+tagStartDelimiterLength+1) }; break; case '{': @@ -294,7 +301,9 @@ - (void)parseTemplateString:(NSString *)templateString templateID:(id)templateID templateString:templateString templateID:templateID line:tagStartLineNumber - range:(NSRange){ .location = start, .length = (i+tagEndDelimiterLength)-start}]; + range:(NSRange){ .location = start, .length = (i+tagEndDelimiterLength)-start} + tagStartDelimiter:tagStartDelimiter + tagEndDelimiter:tagEndDelimiter]; token.tagInnerRange = tagInnerRange; if (![self.delegate templateParser:self shouldContinueAfterParsingToken:token]) return; @@ -316,7 +325,9 @@ - (void)parseTemplateString:(NSString *)templateString templateID:(id)templateID templateString:templateString templateID:templateID line:tagStartLineNumber - range:(NSRange){ .location = start, .length = (i+unescapedTagEndDelimiterLength)-start}]; + range:(NSRange){ .location = start, .length = (i+unescapedTagEndDelimiterLength)-start} + tagStartDelimiter:tagStartDelimiter + tagEndDelimiter:tagEndDelimiter]; token.tagInnerRange = (NSRange){ .location = start+unescapedTagStartDelimiterLength, .length = i-(start+unescapedTagStartDelimiterLength) }; if (![self.delegate templateParser:self shouldContinueAfterParsingToken:token]) return; @@ -351,7 +362,9 @@ - (void)parseTemplateString:(NSString *)templateString templateID:(id)templateID templateString:templateString templateID:templateID line:tagStartLineNumber - range:(NSRange){ .location = start, .length = (i+setDelimitersTagEndDelimiterLength)-start}]; + range:(NSRange){ .location = start, .length = (i+setDelimitersTagEndDelimiterLength)-start} + tagStartDelimiter:tagStartDelimiter + tagEndDelimiter:tagEndDelimiter]; token.tagInnerRange = (NSRange){ .location = start+setDelimitersTagStartDelimiterLength, .length = i-(start+setDelimitersTagStartDelimiterLength) }; if (![self.delegate templateParser:self shouldContinueAfterParsingToken:token]) return; @@ -398,7 +411,9 @@ - (void)parseTemplateString:(NSString *)templateString templateID:(id)templateID templateString:templateString templateID:templateID line:lineNumber - range:(NSRange){ .location = start, .length = i-start}]; + range:(NSRange){ .location = start, .length = i-start} + tagStartDelimiter:tagStartDelimiter + tagEndDelimiter:tagEndDelimiter]; if (![self.delegate templateParser:self shouldContinueAfterParsingToken:token]) return; } break; @@ -411,35 +426,35 @@ - (void)parseTemplateString:(NSString *)templateString templateID:(id)templateID } } -- (NSString *)parseInheritableSectionName:(NSString *)string empty:(BOOL *)empty error:(NSError **)error +- (NSString *)parseBlockName:(NSString *)string empty:(BOOL *)empty error:(NSError **)error { NSCharacterSet *whiteSpace = [NSCharacterSet whitespaceAndNewlineCharacterSet]; - NSString *inheritableSectionName = [string stringByTrimmingCharactersInSet:whiteSpace]; - if (inheritableSectionName.length == 0) { + NSString *blockName = [string stringByTrimmingCharactersInSet:whiteSpace]; + if (blockName.length == 0) { if (empty != NULL) { *empty = YES; } if (error != NULL) { *error = [NSError errorWithDomain:GRMustacheErrorDomain code:GRMustacheErrorCodeParseError - userInfo:[NSDictionary dictionaryWithObject:@"Missing inheritable section name" + userInfo:[NSDictionary dictionaryWithObject:@"Missing block name" forKey:NSLocalizedDescriptionKey]]; } return nil; } - if ([inheritableSectionName rangeOfCharacterFromSet:whiteSpace].location != NSNotFound) { + if ([blockName rangeOfCharacterFromSet:whiteSpace].location != NSNotFound) { if (empty != NULL) { *empty = NO; } if (error != NULL) { *error = [NSError errorWithDomain:GRMustacheErrorDomain code:GRMustacheErrorCodeParseError - userInfo:[NSDictionary dictionaryWithObject:@"Invalid inheritable section name" + userInfo:[NSDictionary dictionaryWithObject:@"Invalid block name" forKey:NSLocalizedDescriptionKey]]; } return nil; } - return inheritableSectionName; + return blockName; } - (NSString *)parseTemplateName:(NSString *)string empty:(BOOL *)empty error:(NSError **)error diff --git a/src/classes/Parsing/GRMustacheTemplateParser_private.h b/GRMustache/Parsing/GRMustacheTemplateParser_private.h similarity index 91% rename from src/classes/Parsing/GRMustacheTemplateParser_private.h rename to GRMustache/Parsing/GRMustacheTemplateParser_private.h index 52b3b2fa..45ff1466 100644 --- a/src/classes/Parsing/GRMustacheTemplateParser_private.h +++ b/GRMustache/Parsing/GRMustacheTemplateParser_private.h @@ -76,12 +76,7 @@ * @see GRMustacheToken * @see GRMustacheTemplateParserDelegate */ -@interface GRMustacheTemplateParser : NSObject { -@private - id _delegate; - NSString *_tagStartDelimiter; - NSString *_tagEndDelimiter; -} +@interface GRMustacheTemplateParser : NSObject /** * The parser's delegate. @@ -125,7 +120,7 @@ - (NSString *)parseTemplateName:(NSString *)string empty:(BOOL *)empty error:(NSError **)error GRMUSTACHE_API_INTERNAL; /** - * Returns an inheritable section name from a string. + * Returns a block name from a string. * * @param string A string. * @param empty If there is an error parsing an identifier, upon return @@ -133,9 +128,9 @@ * @param error If there is an error parsing an identifier, upon return * contains an NSError object that describes the problem. * - * @return a template name, or nil if the string is not a partial name. + * @return a block name, or nil if the string is not a partial name. */ -- (NSString *)parseInheritableSectionName:(NSString *)string empty:(BOOL *)empty error:(NSError **)error GRMUSTACHE_API_INTERNAL; +- (NSString *)parseBlockName:(NSString *)string empty:(BOOL *)empty error:(NSError **)error GRMUSTACHE_API_INTERNAL; /** * Returns a pragma from a string diff --git a/src/classes/Parsing/GRMustacheToken.m b/GRMustache/Parsing/GRMustacheToken.m similarity index 82% rename from src/classes/Parsing/GRMustacheToken.m rename to GRMustache/Parsing/GRMustacheToken.m index e53f3551..217a2886 100644 --- a/src/classes/Parsing/GRMustacheToken.m +++ b/GRMustache/Parsing/GRMustacheToken.m @@ -20,25 +20,25 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheToken_private.h" @implementation GRMustacheToken -@synthesize type=_type; -@synthesize templateString=_templateString; -@synthesize templateID=_templateID; -@synthesize line=_line; -@synthesize range=_range; -@synthesize tagInnerRange=_tagInnerRange; - (void)dealloc { [_templateString release]; [_templateID release]; + [_tagStartDelimiter release]; + [_tagEndDelimiter release]; [super dealloc]; } -+ (instancetype)tokenWithType:(GRMustacheTokenType)type templateString:(NSString *)templateString templateID:(id)templateID line:(NSUInteger)line range:(NSRange)range ++ (instancetype)tokenWithType:(GRMustacheTokenType)type templateString:(NSString *)templateString templateID:(id)templateID line:(NSUInteger)line range:(NSRange)range tagStartDelimiter:(NSString *)tagStartDelimiter tagEndDelimiter:(NSString *)tagEndDelimiter { GRMustacheToken *token = [[[self alloc] init] autorelease]; token.type = type; @@ -46,6 +46,8 @@ + (instancetype)tokenWithType:(GRMustacheTokenType)type templateString:(NSString token.templateID = templateID; token.line = line; token.range = range; + token.tagStartDelimiter = tagStartDelimiter; + token.tagEndDelimiter = tagEndDelimiter; return token; } diff --git a/src/classes/Parsing/GRMustacheToken_private.h b/GRMustache/Parsing/GRMustacheToken_private.h similarity index 87% rename from src/classes/Parsing/GRMustacheToken_private.h rename to GRMustache/Parsing/GRMustacheToken_private.h index 44bdc898..2ebfbb88 100644 --- a/src/classes/Parsing/GRMustacheToken_private.h +++ b/GRMustache/Parsing/GRMustacheToken_private.h @@ -81,16 +81,14 @@ typedef NS_ENUM(NSInteger, GRMustacheTokenType) { GRMustacheTokenTypePragma, /** - * The kind of tokens representing inherited partial tags such as - * `{{); - GRMUSTACHE_STACK_DECLARE_IVARS(inheritedPartialNodeStack, id); - - BOOL _unsafeKeyAccess; -} - +@interface GRMustacheContext : NSObject //////////////////////////////////////////////////////////////////////////////// /// @name Creating Rendering Contexts @@ -110,7 +94,7 @@ * * @since v6.4 */ -+ (instancetype)context AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)context AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a rendering context containing a single object. @@ -137,7 +121,7 @@ * * @since v6.4 */ -+ (instancetype)contextWithObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)contextWithObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a context containing a single priority object. @@ -166,7 +150,7 @@ * * @since v6.4 */ -+ (instancetype)contextWithProtectedObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)contextWithProtectedObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a context containing a single tag delegate. @@ -188,7 +172,7 @@ * * @since v6.4 */ -+ (instancetype)contextWithTagDelegate:(id)tagDelegate AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)contextWithTagDelegate:(id)tagDelegate AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; //////////////////////////////////////////////////////////////////////////////// @@ -232,7 +216,7 @@ * * @since v6.0 */ -- (instancetype)contextByAddingObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (instancetype)contextByAddingObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a new rendering context that is the copy of the receiver, and the @@ -260,7 +244,7 @@ * * @since v6.0 */ -- (instancetype)contextByAddingProtectedObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (instancetype)contextByAddingProtectedObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a new rendering context that is the copy of the receiver, and the @@ -283,7 +267,7 @@ * * @since v6.0 */ -- (instancetype)contextByAddingTagDelegate:(id)tagDelegate AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (instancetype)contextByAddingTagDelegate:(id)tagDelegate AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; //////////////////////////////////////////////////////////////////////////////// @@ -309,7 +293,7 @@ * * @since v6.7 */ -@property (nonatomic, readonly) id topMustacheObject AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic, readonly) id topMustacheObject AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns the value stored in the context stack for the given key. @@ -325,7 +309,7 @@ * 1. If the object responds to the `objectForKeyedSubscript:` instance method, * return the result of this method. * - * 2. Otherwise, build the list of safe keys: + * 2. Otherwise, build the list of safe keys (TODO): * a. If the object responds to the `safeMustacheKeys` class method defined * by the `GRMustacheSafeKeyAccess` protocol, use this method. * b. Otherwise, use the list of Objective-C properties declared with @@ -338,8 +322,6 @@ * * 4. Otherwise, return nil. * - * Contexts with unsafe key access skip the key validation step. - * * In this method, the following search pattern is used: * * 1. Searches the priority context stack for an object that has a non-nil @@ -357,12 +339,11 @@ * * @return The value found in the context stack for the given key. * - * @see contextWithUnsafeKeyAccess * @see hasValue:forMustacheExpression:error: * * @since v6.6 */ -- (id)valueForMustacheKey:(NSString *)key AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (id)valueForMustacheKey:(NSString *)key AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Evaluates an expression such as `name`, or `uppercase(user.name)`. @@ -380,103 +361,6 @@ * * @since v6.8 */ -- (BOOL)hasValue:(id *)value forMustacheExpression:(NSString *)expression error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Unsafe Key Access -//////////////////////////////////////////////////////////////////////////////// - -/** - * Returns whether this context allows unsafe key access or not. - * - * @since v7.0 - */ -@property (nonatomic, readonly) BOOL unsafeKeyAccess AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a new context with unsafe key access. - * - * Unsafe key access allows this context, and all contexts derived from it, to - * access keys that are normally forbidden: keys that are not declared as - * Objective-C properties, or keys that do not belong to the result of the - * `safeMustacheKeys` method. - * - * Compare: - * - * ``` - * @interface DBRecord : NSObject - * - (void)deleteRecord; - * @end - * - * @implementation DBRecord - * - (void)deleteRecord - * { - *     NSLog(@"Oooops, your record was just deleted!"); - * } - * @end - * - * DBRecord *record = ...; - * NSString *templateString = @"{{ deleteRecord }}"; - * GRMustacheTemplate * template = [GRMustacheTemplate templateWithString:templateString error:NULL]; - * - * // Safe rendering of the dangerous template: record is not deleted. - * [template renderObject:record error:NULL]; - * - * // Unsafe rendering of the dangerous template: record is deleted. - * template.baseContext = [GRMustacheContext contextWithUnsafeKeyAccess]; - * [template renderObject:record error:NULL]; - * ``` - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/security.md - * - * @see GRMustacheSafeKeyAccess - * - * @since v7.0 - */ -+ (instancetype)contextWithUnsafeKeyAccess AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a new rendering context that is the copy of the receiver, with unsafe - * key access. - * - * Unsafe key access allows this context, and all contexts derived from it, to - * access keys that are normally forbidden: keys that are not declared as - * Objective-C properties, or keys that do not belong to the result of the - * `safeMustacheKeys` method. - * - * Compare: - * - * ``` - * @interface DBRecord : NSObject - * - (void)deleteRecord; - * @end - * - * @implementation DBRecord - * - (void)deleteRecord - * { - *     NSLog(@"Oooops, your record was just deleted!"); - * } - * @end - * - * DBRecord *record = ...; - * NSString *templateString = @"{{ deleteRecord }}"; - * GRMustacheTemplate * template = [GRMustacheTemplate templateWithString:templateString error:NULL]; - * - * // Safe rendering of the dangerous template: record is not deleted. - * [template renderObject:record error:NULL]; - * - * // Unsafe rendering of the dangerous template: record is deleted. - * template.baseContext = [template.baseContext contextWithUnsafeKeyAccess]; - * [template renderObject:record error:NULL]; - * ``` - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/security.md - * - * @see GRMustacheSafeKeyAccess - * - * @since v7.0 - */ -- (instancetype)contextWithUnsafeKeyAccess AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (BOOL)hasValue:(id *)value forMustacheExpression:(NSString *)expression error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end diff --git a/src/classes/Rendering/GRMustacheContext.m b/GRMustache/Rendering/GRMustacheContext.m similarity index 68% rename from src/classes/Rendering/GRMustacheContext.m rename to GRMustache/Rendering/GRMustacheContext.m index e966ea43..d81d75b1 100644 --- a/src/classes/Rendering/GRMustacheContext.m +++ b/GRMustache/Rendering/GRMustacheContext.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import #import #import "GRMustacheContext_private.h" @@ -30,6 +34,7 @@ #import "GRMustachePartialNode_private.h" #import "GRMustacheTagDelegate.h" #import "GRMustacheExpressionInvocation_private.h" +#import "NSObject+GRMustacheKeyValueCoding_private.h" #define GRMUSTACHE_STACK_RELEASE(stackName) \ [GRMUSTACHE_STACK_TOP_IVAR(stackName) release]; \ @@ -93,18 +98,25 @@ static BOOL objectConformsToTagDelegateProtocol(id object) // ============================================================================= #pragma mark - GRMustacheContext -@implementation GRMustacheContext +@implementation GRMustacheContext { +#define GRMUSTACHE_STACK_TOP_IVAR(stackName) _ ## stackName ## Object +#define GRMUSTACHE_STACK_PARENT_IVAR(stackName) _ ## stackName ## Parent +#define GRMUSTACHE_STACK_DECLARE_IVARS(stackName, type) \ +GRMustacheContext *GRMUSTACHE_STACK_PARENT_IVAR(stackName); \ +type GRMUSTACHE_STACK_TOP_IVAR(stackName) + + GRMUSTACHE_STACK_DECLARE_IVARS(contextStack, id); + GRMUSTACHE_STACK_DECLARE_IVARS(protectedContextStack, id); + GRMUSTACHE_STACK_DECLARE_IVARS(hiddenContextStack, id); + GRMUSTACHE_STACK_DECLARE_IVARS(tagDelegateStack, id); + GRMUSTACHE_STACK_DECLARE_IVARS(partialOverrideNodeStack, GRMustachePartialOverrideNode *); +} + (void)initialize { setupTagDelegateClasses(); } -- (BOOL)unsafeKeyAccess -{ - return _unsafeKeyAccess; -} - // ============================================================================= #pragma mark - Creating Contexts @@ -114,13 +126,6 @@ + (instancetype)context return [[[self alloc] init] autorelease]; } -+ (instancetype)contextWithUnsafeKeyAccess -{ - GRMustacheContext *context = [[[self alloc] init] autorelease]; - context->_unsafeKeyAccess = YES; - return context; -} - + (instancetype)contextWithObject:(id)object { GRMustacheContext *context = [[[self alloc] init] autorelease]; @@ -151,7 +156,7 @@ - (void)dealloc GRMUSTACHE_STACK_RELEASE(protectedContextStack); GRMUSTACHE_STACK_RELEASE(hiddenContextStack); GRMUSTACHE_STACK_RELEASE(tagDelegateStack); - GRMUSTACHE_STACK_RELEASE(inheritedPartialNodeStack); + GRMUSTACHE_STACK_RELEASE(partialOverrideNodeStack); [super dealloc]; } @@ -166,12 +171,11 @@ - (instancetype)contextByAddingTagDelegate:(id)tagDelegat } GRMustacheContext *context = [GRMustacheContext context]; - context->_unsafeKeyAccess = _unsafeKeyAccess; GRMUSTACHE_STACK_COPY(contextStack, self, context); GRMUSTACHE_STACK_COPY(protectedContextStack, self, context); GRMUSTACHE_STACK_COPY(hiddenContextStack, self, context); - GRMUSTACHE_STACK_COPY(inheritedPartialNodeStack, self, context); + GRMUSTACHE_STACK_COPY(partialOverrideNodeStack, self, context); GRMUSTACHE_STACK_PUSH(tagDelegateStack, self, context, tagDelegate); @@ -185,11 +189,10 @@ - (instancetype)newContextByAddingObject:(id)object } GRMustacheContext *context = [[GRMustacheContext alloc] init]; - context->_unsafeKeyAccess = _unsafeKeyAccess; GRMUSTACHE_STACK_COPY(protectedContextStack, self, context); GRMUSTACHE_STACK_COPY(hiddenContextStack, self, context); - GRMUSTACHE_STACK_COPY(inheritedPartialNodeStack, self, context); + GRMUSTACHE_STACK_COPY(partialOverrideNodeStack, self, context); GRMUSTACHE_STACK_COPY(tagDelegateStack, self, context); GRMUSTACHE_STACK_PUSH(contextStack, self, context, object); @@ -215,11 +218,10 @@ - (instancetype)contextByAddingProtectedObject:(id)object } GRMustacheContext *context = [GRMustacheContext context]; - context->_unsafeKeyAccess = _unsafeKeyAccess; GRMUSTACHE_STACK_COPY(contextStack, self, context); GRMUSTACHE_STACK_COPY(hiddenContextStack, self, context); - GRMUSTACHE_STACK_COPY(inheritedPartialNodeStack, self, context); + GRMUSTACHE_STACK_COPY(partialOverrideNodeStack, self, context); GRMUSTACHE_STACK_COPY(tagDelegateStack, self, context); GRMUSTACHE_STACK_PUSH(protectedContextStack, self, context, object); @@ -234,11 +236,10 @@ - (instancetype)contextByAddingHiddenObject:(id)object } GRMustacheContext *context = [GRMustacheContext context]; - context->_unsafeKeyAccess = _unsafeKeyAccess; GRMUSTACHE_STACK_COPY(contextStack, self, context); GRMUSTACHE_STACK_COPY(protectedContextStack, self, context); - GRMUSTACHE_STACK_COPY(inheritedPartialNodeStack, self, context); + GRMUSTACHE_STACK_COPY(partialOverrideNodeStack, self, context); GRMUSTACHE_STACK_COPY(tagDelegateStack, self, context); GRMUSTACHE_STACK_PUSH(hiddenContextStack, self, context, object); @@ -246,94 +247,24 @@ - (instancetype)contextByAddingHiddenObject:(id)object return context; } -- (instancetype)contextByAddingInheritedPartialNode:(GRMustacheInheritedPartialNode *)inheritedPartialNode +- (instancetype)contextByAddingPartialOverrideNode:(GRMustachePartialOverrideNode *)partialOverrideNode { - if (inheritedPartialNode == nil) { + if (partialOverrideNode == nil) { return self; } GRMustacheContext *context = [GRMustacheContext context]; - context->_unsafeKeyAccess = _unsafeKeyAccess; GRMUSTACHE_STACK_COPY(contextStack, self, context); GRMUSTACHE_STACK_COPY(protectedContextStack, self, context); GRMUSTACHE_STACK_COPY(hiddenContextStack, self, context); GRMUSTACHE_STACK_COPY(tagDelegateStack, self, context); - GRMUSTACHE_STACK_PUSH(inheritedPartialNodeStack, self, context, inheritedPartialNode); + GRMUSTACHE_STACK_PUSH(partialOverrideNodeStack, self, context, partialOverrideNode); return context; } -- (instancetype)contextWithUnsafeKeyAccess -{ -#define GRMUSTACHE_CREATE_DEEP_UNSAFE_CONTEXTS(stackName) \ - GRMUSTACHE_STACK_ENUMERATE(stackName, self, __context) { \ - GRMustacheContext *__unsafeContext = CFDictionaryGetValue(unsafeContextForContext, __context); \ - if (!__unsafeContext) { \ - __unsafeContext = [GRMustacheContext contextWithUnsafeKeyAccess]; \ - GRMUSTACHE_STACK_COPY(contextStack, __context, __unsafeContext); \ - GRMUSTACHE_STACK_COPY(protectedContextStack, __context, __unsafeContext); \ - GRMUSTACHE_STACK_COPY(hiddenContextStack, __context, __unsafeContext); \ - GRMUSTACHE_STACK_COPY(tagDelegateStack, __context, __unsafeContext); \ - GRMUSTACHE_STACK_COPY(inheritedPartialNodeStack, __context, __unsafeContext); \ - CFDictionarySetValue(unsafeContextForContext, __context, __unsafeContext); \ - } \ - } - -#define GRMUSTACHE_UPDATE_UNSAFE_PARENT(stackName, context) { \ - GRMustacheContext *__safeParent = GRMUSTACHE_STACK_PARENT(stackName, context); \ - if (__safeParent) { \ - GRMustacheContext *__unsafeParent = CFDictionaryGetValue(unsafeContextForContext, __safeParent); \ - [__safeParent release]; \ - GRMUSTACHE_STACK_PARENT(stackName, context) = [__unsafeParent retain]; \ - } \ -} - - // Duplicate contexts of all stacks into unsafe contexts. - // The parents of unsafe contexts are still the safe ones, that we'll update later. - - CFMutableDictionaryRef unsafeContextForContext = CFDictionaryCreateMutable(NULL, 0, NULL, NULL); - - GRMUSTACHE_CREATE_DEEP_UNSAFE_CONTEXTS(contextStack); - GRMUSTACHE_CREATE_DEEP_UNSAFE_CONTEXTS(protectedContextStack); - GRMUSTACHE_CREATE_DEEP_UNSAFE_CONTEXTS(hiddenContextStack); - GRMUSTACHE_CREATE_DEEP_UNSAFE_CONTEXTS(tagDelegateStack); - GRMUSTACHE_CREATE_DEEP_UNSAFE_CONTEXTS(inheritedPartialNodeStack); - - - // Update safe parents of unsafe contexts with unsafe ones - - CFIndex count = CFDictionaryGetCount(unsafeContextForContext); - GRMustacheContext **unsafeContexts = malloc(count * sizeof(GRMustacheContext *)); - if (unsafeContexts == NULL) { - // Allocation failed. - // - // This method is supposed to return a newly created object, so we can - // behave like failing allocating methods and return nil. - // - // And make sure we cleanup allocated memory before. - CFRelease(unsafeContextForContext); - return nil; - } - CFDictionaryGetKeysAndValues(unsafeContextForContext, NULL, (const void **)unsafeContexts); - for (CFIndex i = 0; i < count; ++i) { - GRMustacheContext *unsafeContext = unsafeContexts[i]; - GRMUSTACHE_UPDATE_UNSAFE_PARENT(contextStack, unsafeContext); - GRMUSTACHE_UPDATE_UNSAFE_PARENT(protectedContextStack, unsafeContext); - GRMUSTACHE_UPDATE_UNSAFE_PARENT(hiddenContextStack, unsafeContext); - GRMUSTACHE_UPDATE_UNSAFE_PARENT(tagDelegateStack, unsafeContext); - GRMUSTACHE_UPDATE_UNSAFE_PARENT(inheritedPartialNodeStack, unsafeContext); - } - free(unsafeContexts); - - - // Done - - GRMustacheContext *unsafeContext = CFDictionaryGetValue(unsafeContextForContext, self); - CFRelease(unsafeContextForContext); - return unsafeContext; -} // ============================================================================= #pragma mark - Context Stack @@ -353,8 +284,8 @@ - (id)valueForMustacheKey:(NSString *)key protected:(BOOL *)protected // First look for in the protected context stack GRMUSTACHE_STACK_ENUMERATE(protectedContextStack, self, context) { - id value = [GRMustacheKeyAccess valueForMustacheKey:key inObject:GRMUSTACHE_STACK_TOP(protectedContextStack, context) unsafeKeyAccess:context->_unsafeKeyAccess]; - if (value != nil) { + id value; + if ([GRMUSTACHE_STACK_TOP(protectedContextStack, context) exceptionSafeHasValue:&value forMustacheKey:key]) { if (protected != NULL) { *protected = YES; } @@ -379,8 +310,8 @@ - (id)valueForMustacheKey:(NSString *)key protected:(BOOL *)protected } } if (hidden) { continue; } - id value = [GRMustacheKeyAccess valueForMustacheKey:key inObject:contextObject unsafeKeyAccess:context->_unsafeKeyAccess]; - if (value != nil) { + id value; + if ([contextObject exceptionSafeHasValue:&value forMustacheKey:key]) { if (protected != NULL) { *protected = NO; } @@ -434,18 +365,18 @@ - (NSArray *)tagDelegateStack // ============================================================================= #pragma mark - Overriding Template AST Stack -- (NSArray *)inheritedPartialNodeStack +- (NSArray *)partialOverrideNodeStack { - NSMutableArray *inheritedPartialNodeStack = nil; + NSMutableArray *partialOverrideNodeStack = nil; - GRMUSTACHE_STACK_ENUMERATE(inheritedPartialNodeStack, self, context) { - if (!inheritedPartialNodeStack) { - inheritedPartialNodeStack = [NSMutableArray array]; + GRMUSTACHE_STACK_ENUMERATE(partialOverrideNodeStack, self, context) { + if (!partialOverrideNodeStack) { + partialOverrideNodeStack = [NSMutableArray array]; } - [inheritedPartialNodeStack addObject:GRMUSTACHE_STACK_TOP(inheritedPartialNodeStack, context)]; + [partialOverrideNodeStack addObject:GRMUSTACHE_STACK_TOP(partialOverrideNodeStack, context)]; } - return inheritedPartialNodeStack; + return partialOverrideNodeStack; } @end diff --git a/src/classes/Rendering/GRMustacheContext_private.h b/GRMustache/Rendering/GRMustacheContext_private.h similarity index 76% rename from src/classes/Rendering/GRMustacheContext_private.h rename to GRMustache/Rendering/GRMustacheContext_private.h index d91a690c..a5c1a33a 100644 --- a/src/classes/Rendering/GRMustacheContext_private.h +++ b/GRMustache/Rendering/GRMustacheContext_private.h @@ -24,8 +24,7 @@ #import "GRMustacheAvailabilityMacros_private.h" @protocol GRMustacheTagDelegate; -@protocol GRMustacheTemplateASTNode; -@class GRMustacheInheritedPartialNode; +@class GRMustachePartialOverrideNode; /** * The GRMustacheContext maintains the following stacks: @@ -34,7 +33,7 @@ * - a protected context stack, * - a hidden context stack, * - a tag delegate stack, - * - an inherited partial stack. + * - a partial override stack. * * As such, it is able to: * @@ -49,32 +48,13 @@ * * - Let tag delegates interpret rendered values. * - * - Let inherited partial templates override AST nodes. + * - Let partials override AST nodes. */ -@interface GRMustacheContext : NSObject { -@private - -#define GRMUSTACHE_STACK_TOP_IVAR(stackName) _ ## stackName ## Object -#define GRMUSTACHE_STACK_PARENT_IVAR(stackName) _ ## stackName ## Parent -#define GRMUSTACHE_STACK_DECLARE_IVARS(stackName, type) \ - GRMustacheContext *GRMUSTACHE_STACK_PARENT_IVAR(stackName); \ - type GRMUSTACHE_STACK_TOP_IVAR(stackName) - - GRMUSTACHE_STACK_DECLARE_IVARS(contextStack, id); - GRMUSTACHE_STACK_DECLARE_IVARS(protectedContextStack, id); - GRMUSTACHE_STACK_DECLARE_IVARS(hiddenContextStack, id); - GRMUSTACHE_STACK_DECLARE_IVARS(tagDelegateStack, id); - GRMUSTACHE_STACK_DECLARE_IVARS(inheritedPartialNodeStack, GRMustacheInheritedPartialNode *); - - BOOL _unsafeKeyAccess; -} +@interface GRMustacheContext : NSObject // Documented in GRMustacheContext.h + (instancetype)context GRMUSTACHE_API_PUBLIC; -// Documented in GRMustacheContext.h -+ (instancetype)contextWithUnsafeKeyAccess GRMUSTACHE_API_PUBLIC; - // Documented in GRMustacheContext.h + (instancetype)contextWithObject:(id)object GRMUSTACHE_API_PUBLIC; @@ -93,9 +73,6 @@ // Documented in GRMustacheContext.h - (instancetype)contextByAddingTagDelegate:(id)tagDelegate GRMUSTACHE_API_PUBLIC; -// Documented in GRMustacheContext.h -- (instancetype)contextWithUnsafeKeyAccess GRMUSTACHE_API_PUBLIC; - // Documented in GRMustacheContext.h - (BOOL)hasValue:(id *)value forMustacheExpression:(NSString *)expression error:(NSError **)error GRMUSTACHE_API_PUBLIC; @@ -106,9 +83,6 @@ // @see -[GRMustacheImplicitIteratorExpression hasValue:withContext:protected:error:] @property (nonatomic, readonly) id topMustacheObject GRMUSTACHE_API_PUBLIC; -// Documented in GRMustacheContext.h -@property (nonatomic, readonly) BOOL unsafeKeyAccess GRMUSTACHE_API_PUBLIC; - /** * Same as [contextByAddingObject:object], but returns a retained object. * This method helps efficiently managing memory, and targeting slow methods. @@ -136,13 +110,13 @@ /** * Returns a GRMustacheContext object identical to the receiver, but for the - * overriding stack that is extended with _inheritedPartialNode_. + * overriding stack that is extended with _partialOverrideNode_. * - * @param inheritedPartialNode A template AST + * @param partialOverrideNode A template AST * * @return A GRMustacheContext object. */ -- (instancetype)contextByAddingInheritedPartialNode:(GRMustacheInheritedPartialNode *)inheritedPartialNode GRMUSTACHE_API_INTERNAL; +- (instancetype)contextByAddingPartialOverrideNode:(GRMustachePartialOverrideNode *)partialOverrideNode GRMUSTACHE_API_INTERNAL; /** * Performs a key lookup in the receiver's context stack, and returns the found @@ -169,6 +143,6 @@ /** * TODO */ -- (NSArray *)inheritedPartialNodeStack GRMUSTACHE_API_INTERNAL; +- (NSArray *)partialOverrideNodeStack GRMUSTACHE_API_INTERNAL; @end diff --git a/src/classes/Rendering/GRMustacheExpressionInvocation.m b/GRMustache/Rendering/GRMustacheExpressionInvocation.m similarity index 95% rename from src/classes/Rendering/GRMustacheExpressionInvocation.m rename to GRMustache/Rendering/GRMustacheExpressionInvocation.m index 435242ed..bd70de93 100644 --- a/src/classes/Rendering/GRMustacheExpressionInvocation.m +++ b/GRMustache/Rendering/GRMustacheExpressionInvocation.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheExpressionInvocation_private.h" #import "GRMustacheExpressionVisitor_private.h" #import "GRMustacheFilter_private.h" @@ -30,15 +34,12 @@ #import "GRMustacheToken_private.h" #import "GRMustacheKeyAccess_private.h" #import "GRMustacheError.h" +#import "NSObject+GRMustacheKeyValueCoding_private.h" @interface GRMustacheExpressionInvocation() @end @implementation GRMustacheExpressionInvocation -@synthesize context=_context; -@synthesize expression=_expression; -@synthesize value=_value; -@synthesize valueIsProtected=_valueIsProtected; - (BOOL)invokeReturningError:(NSError **)error { @@ -120,7 +121,9 @@ - (BOOL)visitScopedExpression:(GRMustacheScopedExpression *)expression error:(NS return NO; } - _value = [GRMustacheKeyAccess valueForMustacheKey:expression.identifier inObject:_value unsafeKeyAccess:_context.unsafeKeyAccess]; + if (![_value exceptionSafeHasValue:&_value forMustacheKey:expression.identifier]) { + _value = nil; + } _valueIsProtected = NO; return YES; } diff --git a/src/classes/Rendering/GRMustacheExpressionInvocation_private.h b/GRMustache/Rendering/GRMustacheExpressionInvocation_private.h similarity index 90% rename from src/classes/Rendering/GRMustacheExpressionInvocation_private.h rename to GRMustache/Rendering/GRMustacheExpressionInvocation_private.h index 316fd537..c76b6a4e 100644 --- a/src/classes/Rendering/GRMustacheExpressionInvocation_private.h +++ b/GRMustache/Rendering/GRMustacheExpressionInvocation_private.h @@ -29,13 +29,7 @@ /** * TODO */ -@interface GRMustacheExpressionInvocation : NSObject { -@private - GRMustacheContext *_context; - GRMustacheExpression *_expression; - id _value; - BOOL _valueIsProtected; -} +@interface GRMustacheExpressionInvocation : NSObject /** * TODO diff --git a/src/classes/Rendering/GRMustacheFilter.h b/GRMustache/Rendering/GRMustacheFilter.h similarity index 95% rename from src/classes/Rendering/GRMustacheFilter.h rename to GRMustache/Rendering/GRMustacheFilter.h index b89e2eca..2d700cb0 100644 --- a/src/classes/Rendering/GRMustacheFilter.h +++ b/GRMustache/Rendering/GRMustacheFilter.h @@ -60,7 +60,7 @@ * * @since v4.3 */ -- (id)transformedValue:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (id)transformedValue:(id)object AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end @@ -97,7 +97,7 @@ * * @see variadicFilterWithBlock: */ -+ (id)filterWithBlock:(id(^)(id value))block AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (id)filterWithBlock:(id(^)(id value))block AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a GRMustacheFilter object that executes the provided block, given an @@ -118,7 +118,7 @@ * * @see filterWithBlock: */ -+ (id)variadicFilterWithBlock:(id(^)(NSArray *arguments))block AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (id)variadicFilterWithBlock:(id(^)(NSArray *arguments))block AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end diff --git a/src/classes/Rendering/GRMustacheFilter.m b/GRMustache/Rendering/GRMustacheFilter.m similarity index 93% rename from src/classes/Rendering/GRMustacheFilter.m rename to GRMustache/Rendering/GRMustacheFilter.m index bbbc5496..24b1e7a6 100644 --- a/src/classes/Rendering/GRMustacheFilter.m +++ b/GRMustache/Rendering/GRMustacheFilter.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheFilter_private.h" // ============================================================================= @@ -29,10 +33,7 @@ * Private subclass of GRMustacheFilter that filters a single argument by * calling a block. */ -@interface GRMustacheBlockFilter: GRMustacheFilter { -@private - id(^_block)(id value); -} +@interface GRMustacheBlockFilter: GRMustacheFilter - (instancetype)initWithBlock:(id(^)(id value))block; @end @@ -44,11 +45,7 @@ - (instancetype)initWithBlock:(id(^)(id value))block; * Private subclass of GRMustacheFilter that filters an array of arguments by * calling a block. */ -@interface GRMustacheBlockVariadicFilter: GRMustacheFilter { -@private - NSArray *_arguments; - id(^_block)(NSArray *arguments); -} +@interface GRMustacheBlockVariadicFilter: GRMustacheFilter - (instancetype)initWithBlock:(id(^)(NSArray *arguments))block arguments:(NSArray *)arguments; @end @@ -79,7 +76,9 @@ - (id)transformedValue:(id)object // ============================================================================= #pragma mark - Private concrete class GRMustacheBlockFilter -@implementation GRMustacheBlockFilter +@implementation GRMustacheBlockFilter { + id(^_block)(id value); +} - (instancetype)initWithBlock:(id(^)(id value))block { @@ -114,7 +113,10 @@ - (id)transformedValue:(id)object // ============================================================================= #pragma mark - Private concrete class GRMustacheBlockVariadicFilter -@implementation GRMustacheBlockVariadicFilter +@implementation GRMustacheBlockVariadicFilter { + NSArray *_arguments; + id(^_block)(NSArray *arguments); +} - (instancetype)initWithBlock:(id(^)(NSArray *arguments))block arguments:(NSArray *)arguments { diff --git a/src/classes/Rendering/GRMustacheFilter_private.h b/GRMustache/Rendering/GRMustacheFilter_private.h similarity index 100% rename from src/classes/Rendering/GRMustacheFilter_private.h rename to GRMustache/Rendering/GRMustacheFilter_private.h diff --git a/GRMustache/Rendering/GRMustacheKeyAccess.m b/GRMustache/Rendering/GRMustacheKeyAccess.m new file mode 100644 index 00000000..127e9f11 --- /dev/null +++ b/GRMustache/Rendering/GRMustacheKeyAccess.m @@ -0,0 +1,168 @@ +// The MIT License +// +// Copyright (c) 2014 Gwendal Roué +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + +#import +#import +#import "GRMustacheKeyAccess_private.h" + +#if !defined(NS_BLOCK_ASSERTIONS) +// For testing purpose +BOOL GRMustacheKeyAccessDidCatchNSUndefinedKeyException; +#endif + + +// ============================================================================= +#pragma mark - Safe key access + +static pthread_key_t GRSafeKeysForClassKey; +void freeSafeKeysForClass(void *objects) { + CFRelease((CFMutableDictionaryRef)objects); +} +#define setupSafeKeysForClass() pthread_key_create(&GRSafeKeysForClassKey, freeSafeKeysForClass) +#define getCurrentThreadSafeKeysForClass() (CFMutableDictionaryRef)pthread_getspecific(GRSafeKeysForClassKey) +#define setCurrentThreadSafeKeysForClass(classes) pthread_setspecific(GRSafeKeysForClassKey, classes) + + +// ============================================================================= +#pragma mark - NSUndefinedKeyException prevention declarations + +@interface NSObject(GRMustacheKeyAccessPreventionOfNSUndefinedKeyException) +- (id)GRMustacheKeyAccessValueForUndefinedKey_NSObject:(NSString *)key; +- (id)GRMustacheKeyAccessValueForUndefinedKey_NSManagedObject:(NSString *)key; +@end; + + +// ============================================================================= +#pragma mark - GRMustacheKeyAccess + +static Class NSManagedObjectClass; + +@interface NSObject(GRMustacheCoreDataMethods) +- (NSDictionary *)propertiesByName; +- (id)entity; +@end + +@implementation GRMustacheKeyAccess + ++ (void)initialize +{ + NSManagedObjectClass = NSClassFromString(@"NSManagedObject"); + setupSafeKeysForClass(); +} + + +// ============================================================================= +#pragma mark - Foundation + +/** + * Return the set of methods without arguments, up to NSObject, non including NSObject. + */ ++ (NSMutableSet *)allPublicKeysForClass:(Class)klass +{ + NSMutableSet *keys = [NSMutableSet set]; + Class NSObjectClass = [NSObject class]; + while (klass && klass != NSObjectClass) { + unsigned int methodCount; + Method *methods = class_copyMethodList(klass, &methodCount); + for (unsigned int i = 0; i < methodCount; ++i) { + SEL selector = method_getName(methods[i]); + const char *selectorName = sel_getName(selector); + if (selectorName[0] != '_' && selectorName[strlen(selectorName) - 1] != '_' && strstr(selectorName, ":") == NULL) { + [keys addObject:NSStringFromSelector(selector)]; + } + } + free (methods); + klass = class_getSuperclass(klass); + } + + return keys; +} + + +// ============================================================================= +#pragma mark - Safe key access + ++ (BOOL)isSafeMustacheKey:(NSString *)key forObject:(id)object +{ + NSSet *safeKeys = nil; + { + CFMutableDictionaryRef safeKeysForClass = getCurrentThreadSafeKeysForClass(); + if (!safeKeysForClass) { + safeKeysForClass = CFDictionaryCreateMutable(NULL, 0, NULL, &kCFTypeDictionaryValueCallBacks); + setCurrentThreadSafeKeysForClass(safeKeysForClass); + } + + Class klass = [object class]; + safeKeys = (NSSet *)CFDictionaryGetValue(safeKeysForClass, klass); + if (safeKeys == nil) { + NSMutableSet *keys = [self propertyGettersForClass:klass]; + if (NSManagedObjectClass && [object isKindOfClass:NSManagedObjectClass]) { + [keys unionSet:[NSSet setWithArray:[[[object entity] propertiesByName] allKeys]]]; + } + safeKeys = keys; + CFDictionarySetValue(safeKeysForClass, klass, safeKeys); + } + } + + return [safeKeys containsObject:key]; +} + ++ (NSMutableSet *)propertyGettersForClass:(Class)klass +{ + NSMutableSet *safeKeys = [NSMutableSet set]; + while (klass) { + // Iterate properties + + unsigned int count; + objc_property_t *properties = class_copyPropertyList(klass, &count); + + for (unsigned int i=0; i +#import "GRMustacheAvailabilityMacros_private.h" + +@interface GRMustacheKeyAccess : NSObject ++ (BOOL)isSafeMustacheKey:(NSString *)key forObject:(id)object GRMUSTACHE_API_INTERNAL; +@end diff --git a/src/classes/Services/NSValueTransformer+GRMustache.h b/GRMustache/Rendering/GRMustacheKeyValueCoding.h similarity index 84% rename from src/classes/Services/NSValueTransformer+GRMustache.h rename to GRMustache/Rendering/GRMustacheKeyValueCoding.h index 1e7ff34b..3df4133f 100644 --- a/src/classes/Services/NSValueTransformer+GRMustache.h +++ b/GRMustache/Rendering/GRMustacheKeyValueCoding.h @@ -22,13 +22,14 @@ #import #import "GRMustacheAvailabilityMacros.h" -#import "GRMustacheFilter.h" /** - * A category on NSValueTransformer that allows them to be directly used as - * filters in GRMustache templates. - * - * @since v6.4 + * TODO */ -@interface NSValueTransformer (GRMustache) +@protocol GRMustacheKeyValueCoding + +/** + * TODO + */ +- (BOOL)hasValue:(id *)value forMustacheKey:(NSString *)key; @end diff --git a/include/GRMustacheRendering.h b/GRMustache/Rendering/GRMustacheRendering.h similarity index 89% rename from include/GRMustacheRendering.h rename to GRMustache/Rendering/GRMustacheRendering.h index f1b526a2..99dc0e47 100644 --- a/include/GRMustacheRendering.h +++ b/GRMustache/Rendering/GRMustacheRendering.h @@ -72,7 +72,7 @@ - (NSString *)renderForMustacheTag:(GRMustacheTag *)tag context:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe - error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; + error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end @@ -107,7 +107,7 @@ * * @since v7.0 */ -+ (id)renderingObjectForObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (id)renderingObjectForObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a rendering object that renders with the provided block. @@ -123,7 +123,22 @@ * * @since v7.0 */ -+ (id)renderingObjectWithBlock:(NSString *(^)(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error))renderingBlock AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (id)renderingObjectWithBlock:(NSString *(^)(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error))renderingBlock AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; + + +//////////////////////////////////////////////////////////////////////////////// +/// @name Creating Lambdas +//////////////////////////////////////////////////////////////////////////////// + +/** + * TODO + */ ++ (id)lambda:(NSString *(^)(void))lambda AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; + +/** + * TODO + */ ++ (id)sectionLambda:(NSString *(^)(NSString *string))lambda AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end diff --git a/src/classes/Rendering/GRMustacheRendering.m b/GRMustache/Rendering/GRMustacheRendering.m similarity index 86% rename from src/classes/Rendering/GRMustacheRendering.m rename to GRMustache/Rendering/GRMustacheRendering.m index ed7a138d..f510004e 100644 --- a/src/classes/Rendering/GRMustacheRendering.m +++ b/GRMustache/Rendering/GRMustacheRendering.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import #import #import "GRMustacheRendering_private.h" @@ -27,6 +31,7 @@ #import "GRMustacheConfiguration_private.h" #import "GRMustacheContext_private.h" #import "GRMustacheError.h" +#import "GRMustacheTemplate_private.h" #import "GRMustacheTemplateRepository_private.h" #import "GRMustacheBuffer_private.h" @@ -44,10 +49,7 @@ @interface GRMustacheNilRendering : NSObject { -@private - NSString *(^_renderingBlock)(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error); -} +@interface GRMustacheBlockRendering : NSObject - (instancetype)initWithRenderingBlock:(NSString *(^)(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error))renderingBlock; @end @@ -74,30 +76,6 @@ - (instancetype)initWithRenderingBlock:(NSString *(^)(GRMustacheTag *tag, GRMust static BOOL GRMustacheBoolValueNSFastEnumeration(id self, SEL _cmd); -// ============================================================================= -#pragma mark - Current Template Repository - -static pthread_key_t GRCurrentTemplateRepositoryStackKey; -void freeCurrentTemplateRepositoryStack(void *objects) { - [(NSMutableArray *)objects release]; -} -#define setupCurrentTemplateRepositoryStack() pthread_key_create(&GRCurrentTemplateRepositoryStackKey, freeCurrentTemplateRepositoryStack) -#define getCurrentThreadCurrentTemplateRepositoryStack() (NSMutableArray *)pthread_getspecific(GRCurrentTemplateRepositoryStackKey) -#define setCurrentThreadCurrentTemplateRepositoryStack(classes) pthread_setspecific(GRCurrentTemplateRepositoryStackKey, classes) - - -// ============================================================================= -#pragma mark - Current Content Type - -static pthread_key_t GRCurrentContentTypeStackKey; -void freeCurrentContentTypeStack(void *objects) { - [(NSMutableArray *)objects release]; -} -#define setupCurrentContentTypeStack() pthread_key_create(&GRCurrentContentTypeStackKey, freeCurrentContentTypeStack) -#define getCurrentThreadCurrentContentTypeStack() (NSMutableArray *)pthread_getspecific(GRCurrentContentTypeStackKey) -#define setCurrentThreadCurrentContentTypeStack(classes) pthread_setspecific(GRCurrentContentTypeStackKey, classes) - - // ============================================================================= #pragma mark - GRMustacheRendering @@ -105,9 +83,6 @@ @implementation GRMustacheRendering + (void)initialize { - setupCurrentTemplateRepositoryStack(); - setupCurrentContentTypeStack(); - nilRendering = [[GRMustacheNilRendering alloc] init]; // We could have declared categories on NSNull, NSNumber, NSString and @@ -147,61 +122,61 @@ + (void)initialize return [[[GRMustacheBlockRendering alloc] initWithRenderingBlock:renderingBlock] autorelease]; } - -#pragma mark - Current Template Repository - -+ (void)pushCurrentTemplateRepository:(GRMustacheTemplateRepository *)templateRepository -{ - NSMutableArray *stack = getCurrentThreadCurrentTemplateRepositoryStack(); - if (!stack) { - stack = [[NSMutableArray alloc] init]; - setCurrentThreadCurrentTemplateRepositoryStack(stack); - } - [stack addObject:templateRepository]; -} - -+ (void)popCurrentTemplateRepository -{ - NSMutableArray *stack = getCurrentThreadCurrentTemplateRepositoryStack(); - NSAssert(stack, @"Missing currentTemplateRepositoryStack"); - NSAssert(stack.count > 0, @"Empty currentTemplateRepositoryStack"); - [stack removeLastObject]; -} - -+ (GRMustacheTemplateRepository *)currentTemplateRepository -{ - NSMutableArray *stack = getCurrentThreadCurrentTemplateRepositoryStack(); - return [stack lastObject]; -} - - -#pragma mark - Current Content Type - -+ (void)pushCurrentContentType:(GRMustacheContentType)contentType -{ - NSMutableArray *stack = getCurrentThreadCurrentContentTypeStack(); - if (!stack) { - stack = [[NSMutableArray alloc] init]; - setCurrentThreadCurrentContentTypeStack(stack); - } - [stack addObject:[NSNumber numberWithUnsignedInteger:contentType]]; -} - -+ (void)popCurrentContentType ++ (id)lambda:(NSString *(^)(void))lambda { - NSMutableArray *stack = getCurrentThreadCurrentContentTypeStack(); - NSAssert(stack, @"Missing currentContentTypeStack"); - NSAssert(stack.count > 0, @"Empty currentContentTypeStack"); - [stack removeLastObject]; + return [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { + switch (tag.type) { + case GRMustacheTagTypeVariable: { + // {{ lambda }} + // + // https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/%7Elambdas.yml#L73 + // > Lambda results should be appropriately escaped + // + // Let's render a text template: + + GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepository]; + repo.configuration.contentType = GRMustacheContentTypeText; + + NSString *templateString = lambda(); + GRMustacheTemplate *template = [repo templateFromString:templateString error:error]; + return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; + } + + case GRMustacheTagTypeSection: { + // {{# lambda }}...{{/ lambda }} + // + // Behave as a true object, and render the section. + context = [context contextByAddingObject:[GRMustacheRendering lambda:lambda]]; + return [tag renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; + } + } + }]; } -+ (GRMustacheContentType)currentContentType ++ (id)sectionLambda:(NSString *(^)(NSString *string))lambda { - NSMutableArray *stack = getCurrentThreadCurrentContentTypeStack(); - if (stack.count > 0) { - return [(NSNumber *)[stack lastObject] unsignedIntegerValue]; - } - return ([self currentTemplateRepository].configuration ?: [GRMustacheConfiguration defaultConfiguration]).contentType; + return [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { + switch (tag.type) { + case GRMustacheTagTypeVariable: + // {{ lambda }} + return @"(Lambda)"; + + case GRMustacheTagTypeSection: { + // {{# lambda }}...{{/ lambda }} + // + // https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/%7Elambdas.yml#L117 + // > Lambdas used for sections should parse with the current delimiters + + GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepository]; + repo.configuration.tagStartDelimiter = tag.tagStartDelimiter; + repo.configuration.tagEndDelimiter = tag.tagEndDelimiter; + + NSString *templateString = lambda(tag.innerTemplateString); + GRMustacheTemplate *template = [repo templateFromString:templateString error:error]; + return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; + } + } + }]; } @@ -297,7 +272,9 @@ - (NSString *)renderForMustacheTag:(GRMustacheTag *)tag asEnumerationItem:(BOOL) @end -@implementation GRMustacheBlockRendering +@implementation GRMustacheBlockRendering { + NSString *(^_renderingBlock)(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error); +} - (void)dealloc { diff --git a/src/classes/Rendering/GRMustacheRenderingEngine.m b/GRMustache/Rendering/GRMustacheRenderingEngine.m similarity index 86% rename from src/classes/Rendering/GRMustacheRenderingEngine.m rename to GRMustache/Rendering/GRMustacheRenderingEngine.m index 6cc075e6..35055ae4 100644 --- a/src/classes/Rendering/GRMustacheRenderingEngine.m +++ b/GRMustache/Rendering/GRMustacheRenderingEngine.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import #import "GRMustacheRenderingEngine_private.h" #import "GRMustacheTemplateASTVisitor_private.h" @@ -31,12 +35,13 @@ #import "GRMustacheContext_private.h" #import "GRMustacheRendering_private.h" #import "GRMustacheTranslateCharacters_private.h" -#import "GRMustacheInheritedPartialNode_private.h" -#import "GRMustacheInheritableSectionNode_private.h" +#import "GRMustachePartialOverrideNode_private.h" +#import "GRMustacheBlock_private.h" #import "GRMustachePartialNode_private.h" #import "GRMustacheTextNode_private.h" #import "GRMustacheTagDelegate.h" #import "GRMustacheExpressionInvocation_private.h" +#import "GRMustacheBuffer_private.h" @interface GRMustacheRenderingEngine() @end @@ -58,24 +63,29 @@ void freeCurrentExpressionInvocation(void *object) { } -@implementation GRMustacheRenderingEngine +@implementation GRMustacheRenderingEngine { + GRMustacheBuffer _buffer; + GRMustacheTemplateAST *_templateAST; + GRMustacheContext *_context; + GRMustacheContentType _contentType; +} + (void)initialize { setupCurrentExpressionInvocation(); } -+ (instancetype)renderingEngineWithContentType:(GRMustacheContentType)contentType context:(GRMustacheContext *)context ++ (instancetype)renderingEngineWithTemplateAST:(GRMustacheTemplateAST *)templateAST context:(GRMustacheContext *)context { - return [[[self alloc] initWithContentType:contentType context:context] autorelease]; + return [[[self alloc] initWithTemplateAST:templateAST context:context] autorelease]; } -- (NSString *)renderTemplateAST:(GRMustacheTemplateAST *)templateAST HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error +- (NSString *)renderHTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error { _buffer = GRMustacheBufferCreate(1024); NSString *result = nil; - if ([self visitTemplateAST:templateAST error:error]) { + if ([self visitTemplateAST:_templateAST error:error]) { if (HTMLSafe) { *HTMLSafe = (_contentType == GRMustacheContentTypeHTML); } @@ -103,13 +113,19 @@ - (BOOL)visitTemplateAST:(GRMustacheTemplateAST *)templateAST error:(NSError **) // // So let's check for a content-type mismatch: GRMustacheContentType ASTContentType = templateAST.contentType; - if (_contentType != ASTContentType) + if (_contentType == ASTContentType) + { + // Content-type match + + return [self visitTemplateASTNodes:templateAST.templateASTNodes error:error]; + } + else { // Content-type mismatch: render separately... - GRMustacheRenderingEngine *renderingEngine = [[[GRMustacheRenderingEngine alloc] initWithContentType:ASTContentType context:_context] autorelease]; + GRMustacheRenderingEngine *renderingEngine = [GRMustacheRenderingEngine renderingEngineWithTemplateAST:templateAST context:_context]; BOOL HTMLSafe; - NSString *rendering = [renderingEngine renderTemplateAST:templateAST HTMLSafe:&HTMLSafe error:error]; + NSString *rendering = [renderingEngine renderHTMLSafe:&HTMLSafe error:error]; if (!rendering) { return NO; } @@ -122,29 +138,20 @@ - (BOOL)visitTemplateAST:(GRMustacheTemplateAST *)templateAST error:(NSError **) GRMustacheBufferAppendString(&_buffer, rendering); return YES; } - else - { - // Content-type match - - [GRMustacheRendering pushCurrentContentType:ASTContentType]; - BOOL success = [self visitTemplateASTNodes:templateAST.templateASTNodes error:error]; - [GRMustacheRendering popCurrentContentType]; - return success; - } } -- (BOOL)visitInheritedPartialNode:(GRMustacheInheritedPartialNode *)inheritedPartialNode error:(NSError **)error +- (BOOL)visitPartialOverrideNode:(GRMustachePartialOverrideNode *)partialOverrideNode error:(NSError **)error { GRMustacheContext *context = _context; - _context = [_context contextByAddingInheritedPartialNode:inheritedPartialNode]; - BOOL success = [self visitPartialNode:inheritedPartialNode.parentPartialNode error:error]; + _context = [_context contextByAddingPartialOverrideNode:partialOverrideNode]; + BOOL success = [self visitPartialNode:partialOverrideNode.parentPartialNode error:error]; _context = context; return success; } -- (BOOL)visitInheritableSectionNode:(GRMustacheInheritableSectionNode *)inheritableSectionNode error:(NSError **)error +- (BOOL)visitBlock:(GRMustacheBlock *)block error:(NSError **)error { - return [self visitTemplateAST:inheritableSectionNode.innerTemplateAST error:error]; + return [self visitTemplateAST:block.innerTemplateAST error:error]; } - (BOOL)visitPartialNode:(GRMustachePartialNode *)partialNode error:(NSError **)error @@ -171,14 +178,22 @@ - (BOOL)visitTextNode:(GRMustacheTextNode *)textNode error:(NSError **)error #pragma mark - Private -- (instancetype)initWithContentType:(GRMustacheContentType)contentType context:(GRMustacheContext *)context +- (void)dealloc +{ + [_templateAST release]; + [_context release]; + [super dealloc]; +} + +- (instancetype)initWithTemplateAST:(GRMustacheTemplateAST *)templateAST context:(GRMustacheContext *)context { NSAssert(context, @"Invalid context:nil"); self = [super init]; if (self) { - _contentType = contentType; - _context = context; + _templateAST = [templateAST retain]; + _contentType = templateAST.contentType; + _context = [context retain]; } return self; } @@ -365,17 +380,17 @@ - (BOOL)visitTemplateASTNodes:(NSArray *)templateASTNodes error:(NSError **)erro - (id)resolveTemplateASTNode:(id)node { NSMutableSet *usedTemplateASTs = [NSMutableSet set]; - for (GRMustacheInheritedPartialNode *inheritedPartialNode in _context.inheritedPartialNodeStack) { + for (GRMustachePartialOverrideNode *partialOverrideNode in _context.partialOverrideNodeStack) { // for -[GRMustacheJavaSuiteTests testExtensionNested] - if (![usedTemplateASTs containsObject:inheritedPartialNode.parentPartialNode.templateAST]) { + if (![usedTemplateASTs containsObject:partialOverrideNode.parentPartialNode.templateAST]) { id resolvedNode = node; - for (id overridingNode in inheritedPartialNode.overridingTemplateAST.templateASTNodes) { + for (id overridingNode in partialOverrideNode.overridingTemplateAST.templateASTNodes) { resolvedNode = [overridingNode resolveTemplateASTNode:resolvedNode]; } // for Hogan "Recursion in inherited templates" test if (node != resolvedNode) { - [usedTemplateASTs addObject:inheritedPartialNode.parentPartialNode.templateAST]; + [usedTemplateASTs addObject:partialOverrideNode.parentPartialNode.templateAST]; } node = resolvedNode; } diff --git a/GRMustache/Rendering/GRMustacheRenderingEngine_private.h b/GRMustache/Rendering/GRMustacheRenderingEngine_private.h new file mode 100644 index 00000000..5e11057d --- /dev/null +++ b/GRMustache/Rendering/GRMustacheRenderingEngine_private.h @@ -0,0 +1,44 @@ +// The MIT License +// +// Copyright (c) 2014 Gwendal Roué +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "GRMustacheAvailabilityMacros_private.h" + +@class GRMustacheContext; +@class GRMustacheTemplateAST; + +/** + * TODO + */ +@interface GRMustacheRenderingEngine : NSObject + +/** + * TODO + */ +- (NSString *)renderHTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error GRMUSTACHE_API_INTERNAL; + +/** + * TODO + */ ++ (instancetype)renderingEngineWithTemplateAST:(GRMustacheTemplateAST *)templateAST context:(GRMustacheContext *)context GRMUSTACHE_API_INTERNAL; + +@end diff --git a/src/classes/Rendering/GRMustacheRendering_private.h b/GRMustache/Rendering/GRMustacheRendering_private.h similarity index 91% rename from src/classes/Rendering/GRMustacheRendering_private.h rename to GRMustache/Rendering/GRMustacheRendering_private.h index 9ff0b29d..aa6c3647 100644 --- a/src/classes/Rendering/GRMustacheRendering_private.h +++ b/GRMustache/Rendering/GRMustacheRendering_private.h @@ -24,7 +24,7 @@ #import "GRMustacheAvailabilityMacros_private.h" #import "GRMustacheContentType.h" -// prevent GRMustacheFilter.h to load +// Prevent GRMustacheRendering.h from loading #define GRMUSTACHE_RENDERING @@ -145,13 +145,11 @@ // Documented in GRMustacheRendering.h + (id)renderingObjectWithBlock:(NSString *(^)(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error))renderingBlock GRMUSTACHE_API_PUBLIC; -+ (void)pushCurrentTemplateRepository:(GRMustacheTemplateRepository *)templateRepository GRMUSTACHE_API_INTERNAL; -+ (void)popCurrentTemplateRepository GRMUSTACHE_API_INTERNAL; -+ (GRMustacheTemplateRepository *)currentTemplateRepository GRMUSTACHE_API_INTERNAL; +// Documented in GRMustacheRendering.h ++ (id)lambda:(NSString *(^)(void))lambda GRMUSTACHE_API_PUBLIC; -+ (void)pushCurrentContentType:(GRMustacheContentType)contentType GRMUSTACHE_API_INTERNAL; -+ (void)popCurrentContentType GRMUSTACHE_API_INTERNAL; -+ (GRMustacheContentType)currentContentType GRMUSTACHE_API_INTERNAL; +// Documented in GRMustacheRendering.h ++ (id)sectionLambda:(NSString *(^)(NSString *string))lambda GRMUSTACHE_API_PUBLIC; @end diff --git a/include/GRMustacheTagDelegate.h b/GRMustache/Rendering/GRMustacheTagDelegate.h similarity index 95% rename from include/GRMustacheTagDelegate.h rename to GRMustache/Rendering/GRMustacheTagDelegate.h index 573410f3..7a77279d 100644 --- a/include/GRMustacheTagDelegate.h +++ b/GRMustache/Rendering/GRMustacheTagDelegate.h @@ -53,7 +53,7 @@ * * @since v6.0 */ -- (id)mustacheTag:(GRMustacheTag *)tag willRenderObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (id)mustacheTag:(GRMustacheTag *)tag willRenderObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Sent after a Mustache tag has rendered. @@ -66,7 +66,7 @@ * * @since v6.0 */ -- (void)mustacheTag:(GRMustacheTag *)tag didRenderObject:(id)object as:(NSString *)rendering AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (void)mustacheTag:(GRMustacheTag *)tag didRenderObject:(id)object as:(NSString *)rendering AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Sent right after a Mustache tag has failed rendering. @@ -79,6 +79,6 @@ * * @since v6.0 */ -- (void)mustacheTag:(GRMustacheTag *)tag didFailRenderingObject:(id)object withError:(NSError *)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (void)mustacheTag:(GRMustacheTag *)tag didFailRenderingObject:(id)object withError:(NSError *)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end diff --git a/GRMustache/Rendering/NSObject+GRMustacheKeyValueCoding.m b/GRMustache/Rendering/NSObject+GRMustacheKeyValueCoding.m new file mode 100644 index 00000000..0c36ff04 --- /dev/null +++ b/GRMustache/Rendering/NSObject+GRMustacheKeyValueCoding.m @@ -0,0 +1,140 @@ +// The MIT License +// +// Copyright (c) 2014 Gwendal Roué +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + +#import "NSObject+GRMustacheKeyValueCoding_private.h" +#import "GRMustacheKeyAccess_private.h" + +@implementation NSObject(GRMustacheKeyValueCoding) + +- (BOOL)exceptionSafeHasValue:(id *)value forMustacheKey:(NSString *)key +{ + @try { + return [self hasValue:value forMustacheKey:key]; + } + @catch (NSException *exception) { + // Swallow NSUndefinedKeyException only + if (![[exception name] isEqualToString:NSUndefinedKeyException]) { + [exception raise]; + } + // Missing key + return NO; + } +} + +- (BOOL)hasValue:(id *)value forMustacheKey:(NSString *)key +{ + // Try valueForKey: for safe keys onlys + if (![GRMustacheKeyAccess isSafeMustacheKey:key forObject:self]) { + return NO; + } + + // If property is nil, behave as if the key was missing. + *value = [self valueForKey:key]; + return (*value != nil); +} + +@end + +@implementation NSDictionary(GRMustacheKeyValueCoding) + +- (BOOL)hasValue:(id *)value forMustacheKey:(NSString *)key +{ + *value = [self objectForKey:key]; + return (*value != nil); +} + +@end + +@implementation NSArray(GRMustacheKeyValueCoding) + +- (BOOL)hasValue:(id *)value forMustacheKey:(NSString *)key +{ + if ([key isEqualToString:@"count"]) { + *value = @(self.count); + return YES; + } else if ([key isEqualToString:@"first"]) { + *value = self.firstObject; + return YES; + } else if ([key isEqualToString:@"last"]) { + *value = self.lastObject; + return YES; + } else { + return NO; + } +} + +@end + +@implementation NSOrderedSet(GRMustacheKeyValueCoding) + +- (BOOL)hasValue:(id *)value forMustacheKey:(NSString *)key +{ + if ([key isEqualToString:@"count"]) { + *value = @(self.count); + return YES; + } else if ([key isEqualToString:@"first"]) { + *value = self.firstObject; + return YES; + } else if ([key isEqualToString:@"last"]) { + *value = self.lastObject; + return YES; + } else { + return NO; + } +} + +@end + +@implementation NSSet(GRMustacheKeyValueCoding) + +- (BOOL)hasValue:(id *)value forMustacheKey:(NSString *)key +{ + if ([key isEqualToString:@"count"]) { + *value = @(self.count); + return YES; + } else if ([key isEqualToString:@"first"]) { + *value = self.anyObject; + return YES; + } else { + return NO; + } +} + +@end + +@implementation NSString(GRMustacheKeyValueCoding) + +- (BOOL)hasValue:(id *)value forMustacheKey:(NSString *)key +{ + if ([key isEqualToString:@"length"]) { + *value = @(self.length); + return YES; + } else { + return NO; + } +} + +@end diff --git a/GRMustache/Rendering/NSObject+GRMustacheKeyValueCoding_private.h b/GRMustache/Rendering/NSObject+GRMustacheKeyValueCoding_private.h new file mode 100644 index 00000000..90f25f50 --- /dev/null +++ b/GRMustache/Rendering/NSObject+GRMustacheKeyValueCoding_private.h @@ -0,0 +1,44 @@ +// The MIT License +// +// Copyright (c) 2014 Gwendal Roué +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "GRMustacheAvailabilityMacros.h" +#import "GRMustacheKeyValueCoding.h" + +@interface NSObject(GRMustacheKeyValueCoding) +- (BOOL)exceptionSafeHasValue:(id *)value forMustacheKey:(NSString *)key; +@end + +@interface NSDictionary(GRMustacheKeyValueCoding) +@end + +@interface NSArray(GRMustacheKeyValueCoding) +@end + +@interface NSOrderedSet(GRMustacheKeyValueCoding) +@end + +@interface NSSet(GRMustacheKeyValueCoding) +@end + +@interface NSString(GRMustacheKeyValueCoding) +@end diff --git a/src/classes/Services/GRMustacheExpressionGenerator.m b/GRMustache/Services/GRMustacheExpressionGenerator.m similarity index 93% rename from src/classes/Services/GRMustacheExpressionGenerator.m rename to GRMustache/Services/GRMustacheExpressionGenerator.m index 6be0ca47..6f7c8300 100644 --- a/src/classes/Services/GRMustacheExpressionGenerator.m +++ b/GRMustache/Services/GRMustacheExpressionGenerator.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheExpressionGenerator_private.h" #import "GRMustacheExpressionVisitor_private.h" #import "GRMustacheFilteredExpression_private.h" @@ -31,7 +35,9 @@ @interface GRMustacheExpressionGenerator() @end -@implementation GRMustacheExpressionGenerator +@implementation GRMustacheExpressionGenerator { + NSString *_expressionString; +} - (NSString *)stringWithExpression:(GRMustacheExpression *)expression { diff --git a/src/classes/Services/GRMustacheExpressionGenerator_private.h b/GRMustache/Services/GRMustacheExpressionGenerator_private.h similarity index 93% rename from src/classes/Services/GRMustacheExpressionGenerator_private.h rename to GRMustache/Services/GRMustacheExpressionGenerator_private.h index 355e3786..923f2ba2 100644 --- a/src/classes/Services/GRMustacheExpressionGenerator_private.h +++ b/GRMustache/Services/GRMustacheExpressionGenerator_private.h @@ -25,11 +25,6 @@ @class GRMustacheExpression; -@interface GRMustacheExpressionGenerator : NSObject { -@private - NSString *_expressionString; -} - +@interface GRMustacheExpressionGenerator : NSObject - (NSString *)stringWithExpression:(GRMustacheExpression *)expression GRMUSTACHE_API_INTERNAL; - @end diff --git a/src/classes/Services/GRMustacheTemplateGenerator.m b/GRMustache/Services/GRMustacheTemplateGenerator.m similarity index 88% rename from src/classes/Services/GRMustacheTemplateGenerator.m rename to GRMustache/Services/GRMustacheTemplateGenerator.m index 4ec75162..542ddcac 100644 --- a/src/classes/Services/GRMustacheTemplateGenerator.m +++ b/GRMustache/Services/GRMustacheTemplateGenerator.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheTemplateGenerator_private.h" #import "GRMustacheExpressionGenerator_private.h" #import "GRMustacheTemplateASTVisitor_private.h" @@ -27,8 +31,8 @@ #import "GRMustacheTemplate_private.h" #import "GRMustacheConfiguration_private.h" #import "GRMustacheTemplateAST_private.h" -#import "GRMustacheInheritedPartialNode_private.h" -#import "GRMustacheInheritableSectionNode_private.h" +#import "GRMustachePartialOverrideNode_private.h" +#import "GRMustacheBlock_private.h" #import "GRMustachePartialNode_private.h" #import "GRMustacheVariableTag_private.h" #import "GRMustacheSectionTag_private.h" @@ -38,8 +42,10 @@ @interface GRMustacheTemplateGenerator() @end -@implementation GRMustacheTemplateGenerator -@synthesize templateRepository=_templateRepository; +@implementation GRMustacheTemplateGenerator { + GRMustacheExpressionGenerator *_expressionGenerator; + NSMutableString *_templateString; +} - (void)dealloc { @@ -77,29 +83,29 @@ - (BOOL)visitTemplateAST:(GRMustacheTemplateAST *)templateAST error:(NSError **) return YES; } -- (BOOL)visitInheritedPartialNode:(GRMustacheInheritedPartialNode *)inheritedPartialNode error:(NSError **)error +- (BOOL)visitPartialOverrideNode:(GRMustachePartialOverrideNode *)partialOverrideNode error:(NSError **)error { NSString *tagStartDelimiter = _templateRepository.configuration.tagStartDelimiter; NSString *tagEndDelimiter = _templateRepository.configuration.tagEndDelimiter; - NSString *partialName = inheritedPartialNode.parentPartialNode.name; + NSString *partialName = partialOverrideNode.parentPartialNode.name; NSString *tagStartString = [NSString stringWithFormat:@"%@<%@%@", tagStartDelimiter, partialName, tagEndDelimiter]; NSString *tagEndString = [NSString stringWithFormat:@"%@/%@%@", tagStartDelimiter, partialName, tagEndDelimiter]; [_templateString appendString:tagStartString]; - [self visitTemplateAST:inheritedPartialNode.overridingTemplateAST error:error]; + [self visitTemplateAST:partialOverrideNode.overridingTemplateAST error:error]; [_templateString appendString:tagEndString]; return YES; } -- (BOOL)visitInheritableSectionNode:(GRMustacheInheritableSectionNode *)inheritableSectionNode error:(NSError **)error +- (BOOL)visitBlock:(GRMustacheBlock *)block error:(NSError **)error { NSString *tagStartDelimiter = _templateRepository.configuration.tagStartDelimiter; NSString *tagEndDelimiter = _templateRepository.configuration.tagEndDelimiter; - NSString *tagStartString = [NSString stringWithFormat:@"%@$%@%@", tagStartDelimiter, inheritableSectionNode.name, tagEndDelimiter]; - NSString *tagEndString = [NSString stringWithFormat:@"%@/%@%@", tagStartDelimiter, inheritableSectionNode.name, tagEndDelimiter]; + NSString *tagStartString = [NSString stringWithFormat:@"%@$%@%@", tagStartDelimiter, block.name, tagEndDelimiter]; + NSString *tagEndString = [NSString stringWithFormat:@"%@/%@%@", tagStartDelimiter, block.name, tagEndDelimiter]; [_templateString appendString:tagStartString]; - [self visitTemplateAST:inheritableSectionNode.innerTemplateAST error:error]; + [self visitTemplateAST:block.innerTemplateAST error:error]; [_templateString appendString:tagEndString]; return YES; } diff --git a/src/classes/Services/GRMustacheTemplateGenerator_private.h b/GRMustache/Services/GRMustacheTemplateGenerator_private.h similarity index 87% rename from src/classes/Services/GRMustacheTemplateGenerator_private.h rename to GRMustache/Services/GRMustacheTemplateGenerator_private.h index 722b243d..359d0feb 100644 --- a/src/classes/Services/GRMustacheTemplateGenerator_private.h +++ b/GRMustache/Services/GRMustacheTemplateGenerator_private.h @@ -26,15 +26,8 @@ @class GRMustacheTemplate; @class GRMustacheTemplateAST; @class GRMustacheTemplateRepository; -@class GRMustacheExpressionGenerator; - -@interface GRMustacheTemplateGenerator : NSObject { -@private - GRMustacheTemplateRepository *_templateRepository; - GRMustacheExpressionGenerator *_expressionGenerator; - NSMutableString *_templateString; -} +@interface GRMustacheTemplateGenerator : NSObject @property (nonatomic, retain, readonly) GRMustacheTemplateRepository *templateRepository GRMUSTACHE_API_INTERNAL; + (instancetype)templateGeneratorWithTemplateRepository:(GRMustacheTemplateRepository *)templateRepository GRMUSTACHE_API_INTERNAL; diff --git a/include/NSFormatter+GRMustache.h b/GRMustache/Services/NSFormatter+GRMustache.h similarity index 100% rename from include/NSFormatter+GRMustache.h rename to GRMustache/Services/NSFormatter+GRMustache.h diff --git a/src/classes/Services/NSFormatter+GRMustache.m b/GRMustache/Services/NSFormatter+GRMustache.m similarity index 97% rename from src/classes/Services/NSFormatter+GRMustache.m rename to GRMustache/Services/NSFormatter+GRMustache.m index a7e42f73..64ada60c 100644 --- a/src/classes/Services/NSFormatter+GRMustache.m +++ b/GRMustache/Services/NSFormatter+GRMustache.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "NSFormatter+GRMustache.h" #import "GRMustacheTag.h" #import "GRMustacheContext.h" diff --git a/include/NSValueTransformer+GRMustache.h b/GRMustache/Services/NSValueTransformer+GRMustache.h similarity index 100% rename from include/NSValueTransformer+GRMustache.h rename to GRMustache/Services/NSValueTransformer+GRMustache.h diff --git a/src/classes/Services/NSValueTransformer+GRMustache.m b/GRMustache/Services/NSValueTransformer+GRMustache.m similarity index 92% rename from src/classes/Services/NSValueTransformer+GRMustache.m rename to GRMustache/Services/NSValueTransformer+GRMustache.m index e82afccb..8b3b7ffd 100644 --- a/src/classes/Services/NSValueTransformer+GRMustache.m +++ b/GRMustache/Services/NSValueTransformer+GRMustache.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "NSValueTransformer+GRMustache.h" @implementation NSValueTransformer (GRMustache) diff --git a/src/classes/Services/StandardLibrary/GRMustacheEachFilter.m b/GRMustache/Services/StandardLibrary/GRMustacheEachFilter.m similarity index 98% rename from src/classes/Services/StandardLibrary/GRMustacheEachFilter.m rename to GRMustache/Services/StandardLibrary/GRMustacheEachFilter.m index 3c5d5d76..ddcf18fd 100644 --- a/src/classes/Services/StandardLibrary/GRMustacheEachFilter.m +++ b/GRMustache/Services/StandardLibrary/GRMustacheEachFilter.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheEachFilter_private.h" #import "GRMustacheRendering_private.h" #import "GRMustacheContext_private.h" diff --git a/src/classes/Services/StandardLibrary/GRMustacheEachFilter_private.h b/GRMustache/Services/StandardLibrary/GRMustacheEachFilter_private.h similarity index 96% rename from src/classes/Services/StandardLibrary/GRMustacheEachFilter_private.h rename to GRMustache/Services/StandardLibrary/GRMustacheEachFilter_private.h index a0261a05..c084c3c9 100644 --- a/src/classes/Services/StandardLibrary/GRMustacheEachFilter_private.h +++ b/GRMustache/Services/StandardLibrary/GRMustacheEachFilter_private.h @@ -20,8 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "GRMustacheFilter_private.h" +#import "GRMustacheFilter.h" @interface GRMustacheEachFilter : NSObject - @end diff --git a/src/classes/Services/StandardLibrary/GRMustacheHTMLLibrary.m b/GRMustache/Services/StandardLibrary/GRMustacheHTMLEscapeFilter.m similarity index 96% rename from src/classes/Services/StandardLibrary/GRMustacheHTMLLibrary.m rename to GRMustache/Services/StandardLibrary/GRMustacheHTMLEscapeFilter.m index cce13c11..1b36a9d9 100644 --- a/src/classes/Services/StandardLibrary/GRMustacheHTMLLibrary.m +++ b/GRMustache/Services/StandardLibrary/GRMustacheHTMLEscapeFilter.m @@ -20,7 +20,11 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "GRMustacheHTMLLibrary_private.h" +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + +#import "GRMustacheHTMLEscapeFilter_private.h" #import "GRMustacheTag_private.h" #import "GRMustacheContext_private.h" #import "GRMustacheTranslateCharacters_private.h" diff --git a/src/classes/Services/StandardLibrary/GRMustacheHTMLLibrary_private.h b/GRMustache/Services/StandardLibrary/GRMustacheHTMLEscapeFilter_private.h similarity index 97% rename from src/classes/Services/StandardLibrary/GRMustacheHTMLLibrary_private.h rename to GRMustache/Services/StandardLibrary/GRMustacheHTMLEscapeFilter_private.h index 2a973ffb..c2ef98f9 100644 --- a/src/classes/Services/StandardLibrary/GRMustacheHTMLLibrary_private.h +++ b/GRMustache/Services/StandardLibrary/GRMustacheHTMLEscapeFilter_private.h @@ -22,7 +22,7 @@ #import #import "GRMustacheRendering_private.h" -#import "GRMustacheFilter_private.h" +#import "GRMustacheFilter.h" #import "GRMustacheTagDelegate.h" diff --git a/src/classes/Services/StandardLibrary/GRMustacheJavascriptLibrary.m b/GRMustache/Services/StandardLibrary/GRMustacheJavascriptEscapeFilter.m similarity index 97% rename from src/classes/Services/StandardLibrary/GRMustacheJavascriptLibrary.m rename to GRMustache/Services/StandardLibrary/GRMustacheJavascriptEscapeFilter.m index 0bf3ccc1..9d4c06c8 100644 --- a/src/classes/Services/StandardLibrary/GRMustacheJavascriptLibrary.m +++ b/GRMustache/Services/StandardLibrary/GRMustacheJavascriptEscapeFilter.m @@ -20,15 +20,19 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "GRMustacheJavascriptLibrary_private.h" +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + +#import "GRMustacheJavascriptEscapeFilter_private.h" #import "GRMustacheTag_private.h" #import "GRMustacheContext_private.h" // ============================================================================= -#pragma mark - GRMustacheJavascriptEscaper +#pragma mark - GRMustacheJavascriptEscapeFilter -@implementation GRMustacheJavascriptEscaper +@implementation GRMustacheJavascriptEscapeFilter #pragma mark diff --git a/src/classes/Services/StandardLibrary/GRMustacheJavascriptLibrary_private.h b/GRMustache/Services/StandardLibrary/GRMustacheJavascriptEscapeFilter_private.h similarity index 87% rename from src/classes/Services/StandardLibrary/GRMustacheJavascriptLibrary_private.h rename to GRMustache/Services/StandardLibrary/GRMustacheJavascriptEscapeFilter_private.h index ce00d243..8cef2986 100644 --- a/src/classes/Services/StandardLibrary/GRMustacheJavascriptLibrary_private.h +++ b/GRMustache/Services/StandardLibrary/GRMustacheJavascriptEscapeFilter_private.h @@ -22,12 +22,12 @@ #import #import "GRMustacheRendering_private.h" -#import "GRMustacheFilter_private.h" +#import "GRMustacheFilter.h" #import "GRMustacheTagDelegate.h" // ============================================================================= -#pragma mark - GRMustacheJavascriptEscaper +#pragma mark - GRMustacheJavascriptEscapeFilter -@interface GRMustacheJavascriptEscaper: NSObject +@interface GRMustacheJavascriptEscapeFilter: NSObject @end diff --git a/include/GRMustacheLocalizer.h b/GRMustache/Services/StandardLibrary/GRMustacheLocalizer.h similarity index 93% rename from include/GRMustacheLocalizer.h rename to GRMustache/Services/StandardLibrary/GRMustacheLocalizer.h index d8887db7..a8a5f59b 100644 --- a/include/GRMustacheLocalizer.h +++ b/GRMustache/Services/StandardLibrary/GRMustacheLocalizer.h @@ -66,12 +66,7 @@ * * @since v6.4 */ -@interface GRMustacheLocalizer : NSObject { -@private - NSBundle *_bundle; - NSString *_tableName; - NSMutableArray *_formatArguments; -} +@interface GRMustacheLocalizer : NSObject /** * Returns an initialized localizing helper. @@ -85,14 +80,14 @@ * * @since v6.4 */ -- (instancetype)initWithBundle:(NSBundle *)bundle tableName:(NSString *)tableName AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (instancetype)initWithBundle:(NSBundle *)bundle tableName:(NSString *)tableName AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * The bundle where to look for localized strings. * * @since v6.4 */ -@property (nonatomic, retain, readonly) NSBundle *bundle AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic, retain, readonly) NSBundle *bundle AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * The table where to look for localized strings. @@ -101,7 +96,7 @@ * * @since v6.4 */ -@property (nonatomic, retain, readonly) NSString *tableName AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic, retain, readonly) NSString *tableName AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end diff --git a/src/classes/Services/StandardLibrary/GRMustacheLocalizer.m b/GRMustache/Services/StandardLibrary/GRMustacheLocalizer.m similarity index 98% rename from src/classes/Services/StandardLibrary/GRMustacheLocalizer.m rename to GRMustache/Services/StandardLibrary/GRMustacheLocalizer.m index d1623384..adf5e1b4 100644 --- a/src/classes/Services/StandardLibrary/GRMustacheLocalizer.m +++ b/GRMustache/Services/StandardLibrary/GRMustacheLocalizer.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheLocalizer.h" #import "GRMustacheContext.h" #import "GRMustacheTag.h" @@ -34,9 +38,6 @@ - (NSString *)stringWithFormat:(NSString *)format argumentArray:(NSArray *)argum @end @implementation GRMustacheLocalizer -@synthesize formatArguments=_formatArguments; -@synthesize bundle=_bundle; -@synthesize tableName=_tableName; - (void)dealloc { @@ -45,6 +46,11 @@ - (void)dealloc [super dealloc]; } +- (instancetype)init +{ + return [self initWithBundle:nil tableName:nil]; +} + - (instancetype)initWithBundle:(NSBundle *)bundle tableName:(NSString *)tableName { self = [super init]; diff --git a/src/classes/Services/StandardLibrary/GRMustacheURLLibrary.m b/GRMustache/Services/StandardLibrary/GRMustacheURLEscapeFilter.m similarity index 79% rename from src/classes/Services/StandardLibrary/GRMustacheURLLibrary.m rename to GRMustache/Services/StandardLibrary/GRMustacheURLEscapeFilter.m index b0725ca9..24a1e1c7 100644 --- a/src/classes/Services/StandardLibrary/GRMustacheURLLibrary.m +++ b/GRMustache/Services/StandardLibrary/GRMustacheURLEscapeFilter.m @@ -20,7 +20,11 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "GRMustacheURLLibrary_private.h" +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + +#import "GRMustacheURLEscapeFilter_private.h" #import "GRMustacheTag_private.h" #import "GRMustacheContext_private.h" #import "GRMustacheTranslateCharacters_private.h" @@ -108,34 +112,9 @@ - (id)mustacheTag:(GRMustacheTag *)tag willRenderObject:(id)object - (NSString *)escape:(NSString *)string { - // Perform a first escaping using Apple's implementation. - // It leaves many character unescaped. We'll have to go further. - - string = [string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - - static const NSString *escapeForCharacter[] = { - ['$'] = @"%24", - ['&'] = @"%26", - ['+'] = @"%2B", - [','] = @"%2C", - ['/'] = @"%2F", - [':'] = @"%3A", - [';'] = @"%3B", - ['='] = @"%3D", - ['?'] = @"%3F", - ['@'] = @"%40", - [' '] = @"%20", - ['\t'] = @"%09", - ['#'] = @"%23", - ['<'] = @"%3C", - ['>'] = @"%3E", - ['\"'] = @"%22", - ['\n'] = @"%0A", - ['\r'] = @"%0D", - }; - static const int escapeForCharacterLength = sizeof(escapeForCharacter) / sizeof(NSString *); - NSUInteger capacity = ([string length] + 20) * 1.2; - return GRMustacheTranslateCharacters(string, escapeForCharacter, escapeForCharacterLength, capacity); + NSMutableCharacterSet *cs = [[[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy] autorelease]; + [cs removeCharactersInString:@"?&="]; + return [string stringByAddingPercentEncodingWithAllowedCharacters: cs]; } @end diff --git a/src/classes/Services/StandardLibrary/GRMustacheURLLibrary_private.h b/GRMustache/Services/StandardLibrary/GRMustacheURLEscapeFilter_private.h similarity index 97% rename from src/classes/Services/StandardLibrary/GRMustacheURLLibrary_private.h rename to GRMustache/Services/StandardLibrary/GRMustacheURLEscapeFilter_private.h index d9284590..e5c3ac14 100644 --- a/src/classes/Services/StandardLibrary/GRMustacheURLLibrary_private.h +++ b/GRMustache/Services/StandardLibrary/GRMustacheURLEscapeFilter_private.h @@ -22,7 +22,7 @@ #import #import "GRMustacheRendering_private.h" -#import "GRMustacheFilter_private.h" +#import "GRMustacheFilter.h" #import "GRMustacheTagDelegate.h" diff --git a/GRMustache/Shared/GRMustacheAvailabilityMacros.h b/GRMustache/Shared/GRMustacheAvailabilityMacros.h new file mode 100644 index 00000000..55d92827 --- /dev/null +++ b/GRMustache/Shared/GRMustacheAvailabilityMacros.h @@ -0,0 +1,93 @@ +// The MIT License +// +// Copyright (c) 2014 Gwendal Roué +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + + + + + +/* + * Set up standard GRMustache versions + */ +#define GRMUSTACHE_VERSION_8_0 8000 + + + + + + +/* + * If max GRMustacheVersion not specified, assume 8.0 + */ +#ifndef GRMUSTACHE_VERSION_MAX_ALLOWED +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 +#endif + +/* + * if min GRMustacheVersion not specified, assume max + */ +#ifndef GRMUSTACHE_VERSION_MIN_REQUIRED +#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_MAX_ALLOWED +#endif + +/* + * Error on bad values + */ +#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_MIN_REQUIRED +#error GRMUSTACHE_VERSION_MAX_ALLOWED must be >= GRMUSTACHE_VERSION_MIN_REQUIRED +#endif +#if GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_8_0 +#error GRMUSTACHE_VERSION_MIN_REQUIRED must be >= GRMUSTACHE_VERSION_8_0 +#endif + + + + + + +/* + * AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER + * + * Used on declarations introduced in GRMustache 8.0 + */ +#define AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER + +/* + * AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER_BUT_DEPRECATED + * + * Used on declarations introduced in GRMustache 8.0, + * and deprecated in GRMustache 8.0 + */ +#define AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE + +/* + * DEPRECATED_IN_GRMUSTACHE_VERSION_8_0_AND_LATER + * + * Used on types deprecated in GRMustache 8.0 + */ +#define DEPRECATED_IN_GRMUSTACHE_VERSION_8_0_AND_LATER DEPRECATED_ATTRIBUTE + + + + + + diff --git a/src/classes/Shared/GRMustacheAvailabilityMacros_private.h b/GRMustache/Shared/GRMustacheAvailabilityMacros_private.h similarity index 100% rename from src/classes/Shared/GRMustacheAvailabilityMacros_private.h rename to GRMustache/Shared/GRMustacheAvailabilityMacros_private.h diff --git a/src/classes/Shared/GRMustacheBuffer_private.h b/GRMustache/Shared/GRMustacheBuffer_private.h similarity index 100% rename from src/classes/Shared/GRMustacheBuffer_private.h rename to GRMustache/Shared/GRMustacheBuffer_private.h diff --git a/src/classes/Shared/GRMustacheContentType.h b/GRMustache/Shared/GRMustacheContentType.h similarity index 91% rename from src/classes/Shared/GRMustacheContentType.h rename to GRMustache/Shared/GRMustacheContentType.h index 712f9878..229da344 100644 --- a/src/classes/Shared/GRMustacheContentType.h +++ b/GRMustache/Shared/GRMustacheContentType.h @@ -39,7 +39,7 @@ typedef NS_ENUM(NSUInteger, GRMustacheContentType) { * * @since v6.2 */ - GRMustacheContentTypeHTML AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, + GRMustacheContentTypeHTML AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER, /** * The `GRMustacheContentTypeText` content type has templates render text. @@ -48,6 +48,6 @@ typedef NS_ENUM(NSUInteger, GRMustacheContentType) { * * @since v6.2 */ - GRMustacheContentTypeText AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, -} AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; + GRMustacheContentTypeText AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER, +} AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; diff --git a/src/classes/Shared/GRMustacheError.h b/GRMustache/Shared/GRMustacheError.h similarity index 90% rename from src/classes/Shared/GRMustacheError.h rename to GRMustache/Shared/GRMustacheError.h index 8556e8b0..ae89f385 100644 --- a/src/classes/Shared/GRMustacheError.h +++ b/GRMustache/Shared/GRMustacheError.h @@ -35,23 +35,23 @@ typedef NS_ENUM(NSInteger, GRMustacheErrorCode) { * * @since v1.0 */ - GRMustacheErrorCodeParseError AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, + GRMustacheErrorCodeParseError AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER, /** * The error code for missing templates and partials. * * @since v1.0 */ - GRMustacheErrorCodeTemplateNotFound AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, + GRMustacheErrorCodeTemplateNotFound AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER, /** * The error code for rendering errors. * * @since v6.3 */ - GRMustacheErrorCodeRenderingError AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, + GRMustacheErrorCodeRenderingError AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER, -} AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +} AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** @@ -59,7 +59,7 @@ typedef NS_ENUM(NSInteger, GRMustacheErrorCode) { * * @since v1.0 */ -extern NSString *const GRMustacheErrorDomain AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +extern NSString *const GRMustacheErrorDomain AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** @@ -67,5 +67,5 @@ extern NSString *const GRMustacheErrorDomain AVAILABLE_GRMUSTACHE_VERSION_7_0_AN * * @since v5.1 */ -extern NSString *const GRMustacheRenderingException AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +extern NSString *const GRMustacheRenderingException AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; diff --git a/src/classes/Shared/GRMustacheError.m b/GRMustache/Shared/GRMustacheError.m similarity index 93% rename from src/classes/Shared/GRMustacheError.m rename to GRMustache/Shared/GRMustacheError.m index 59e0469e..c200f7ad 100644 --- a/src/classes/Shared/GRMustacheError.m +++ b/GRMustache/Shared/GRMustacheError.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheError.h" diff --git a/src/classes/Shared/GRMustacheTranslateCharacters.m b/GRMustache/Shared/GRMustacheTranslateCharacters.m similarity index 97% rename from src/classes/Shared/GRMustacheTranslateCharacters.m rename to GRMustache/Shared/GRMustacheTranslateCharacters.m index f300958d..a9130d95 100644 --- a/src/classes/Shared/GRMustacheTranslateCharacters.m +++ b/GRMustache/Shared/GRMustacheTranslateCharacters.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheTranslateCharacters_private.h" #import "GRMustacheBuffer_private.h" diff --git a/src/classes/Shared/GRMustacheTranslateCharacters_private.h b/GRMustache/Shared/GRMustacheTranslateCharacters_private.h similarity index 100% rename from src/classes/Shared/GRMustacheTranslateCharacters_private.h rename to GRMustache/Shared/GRMustacheTranslateCharacters_private.h diff --git a/include/GRMustacheTemplate.h b/GRMustache/Templates/GRMustacheTemplate.h similarity index 94% rename from include/GRMustacheTemplate.h rename to GRMustache/Templates/GRMustacheTemplate.h index 19c499e5..0a21fb48 100644 --- a/include/GRMustacheTemplate.h +++ b/GRMustache/Templates/GRMustacheTemplate.h @@ -36,12 +36,7 @@ * * @since v1.0 */ -@interface GRMustacheTemplate: NSObject { -@private - GRMustacheTemplateRepository *_templateRepository; - id _templateAST; - GRMustacheContext *_baseContext; -} +@interface GRMustacheTemplate: NSObject //////////////////////////////////////////////////////////////////////////////// @@ -60,7 +55,7 @@ * * @since v1.11 */ -+ (instancetype)templateFromString:(NSString *)templateString error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)templateFromString:(NSString *)templateString error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Parses a template file, and returns a compiled template. @@ -79,7 +74,7 @@ * * @since v1.11 */ -+ (instancetype)templateFromContentsOfFile:(NSString *)path error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)templateFromContentsOfFile:(NSString *)path error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Parses a template file, and returns a compiled template. @@ -98,7 +93,7 @@ * * @since v1.11 */ -+ (instancetype)templateFromContentsOfURL:(NSURL *)url error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)templateFromContentsOfURL:(NSURL *)url error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Parses a bundle resource template, and returns a compiled template. @@ -122,7 +117,7 @@ * * @since v1.11 */ -+ (instancetype)templateFromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)templateFromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; //////////////////////////////////////////////////////////////////////////////// @@ -145,7 +140,7 @@ * * @since v6.0 */ -@property (nonatomic, retain) GRMustacheContext *baseContext AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic, retain) GRMustacheContext *baseContext AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Extends the base context of the receiver with the provided object, making its @@ -186,7 +181,7 @@ * * @since v6.8 */ -- (void)extendBaseContextWithObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (void)extendBaseContextWithObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Extends the base context of the receiver with the provided object, making its @@ -222,7 +217,7 @@ * * @since v6.8 */ -- (void)extendBaseContextWithProtectedObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (void)extendBaseContextWithProtectedObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Extends the base context of the receiver with a tag delegate, making it aware @@ -242,7 +237,7 @@ * * @since v6.8 */ -- (void)extendBaseContextWithTagDelegate:(id)tagDelegate AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER;; +- (void)extendBaseContextWithTagDelegate:(id)tagDelegate AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER;; //////////////////////////////////////////////////////////////////////////////// @@ -262,7 +257,7 @@ * * @since v1.0 */ -+ (NSString *)renderObject:(id)object fromString:(NSString *)templateString error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (NSString *)renderObject:(id)object fromString:(NSString *)templateString error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Renders an object from a bundle resource template. @@ -286,7 +281,7 @@ * * @since v1.0 */ -+ (NSString *)renderObject:(id)object fromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (NSString *)renderObject:(id)object fromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Renders a template with a context stack initialized with the provided object @@ -301,7 +296,7 @@ * * @since v6.0 */ -- (NSString *)renderObject:(id)object error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (NSString *)renderObject:(id)object error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Renders a template with a context stack initialized with the provided objects @@ -316,7 +311,7 @@ * * @since v6.0 */ -- (NSString *)renderObjectsFromArray:(NSArray *)objects error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (NSString *)renderObjectsFromArray:(NSArray *)objects error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns the rendering of the receiver, given a rendering context. @@ -336,7 +331,7 @@ * * @since v6.0 */ -- (NSString *)renderContentWithContext:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (NSString *)renderContentWithContext:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; //////////////////////////////////////////////////////////////////////////////// /// @name Accessing Sibling Templates @@ -378,6 +373,6 @@ * * @since v7.0 */ -@property (nonatomic, retain, readonly) GRMustacheTemplateRepository *templateRepository AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic, retain, readonly) GRMustacheTemplateRepository *templateRepository AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end diff --git a/src/classes/Templates/GRMustacheTemplate.m b/GRMustache/Templates/GRMustacheTemplate.m similarity index 72% rename from src/classes/Templates/GRMustacheTemplate.m rename to GRMustache/Templates/GRMustacheTemplate.m index 00378f10..34aa60d0 100644 --- a/src/classes/Templates/GRMustacheTemplate.m +++ b/GRMustache/Templates/GRMustacheTemplate.m @@ -20,25 +20,26 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheTemplate_private.h" #import "GRMustacheContext_private.h" #import "GRMustacheTemplateRepository_private.h" #import "GRMustacheTemplateAST_private.h" #import "GRMustacheRenderingEngine_private.h" +#import "GRMustacheTag_private.h" +#import "GRMustachePartialOverrideNode_private.h" +#import "GRMustachePartialNode_private.h" +#import "GRMustacheSectionTag_private.h" @implementation GRMustacheTemplate -@synthesize templateRepository=_templateRepository; -@synthesize templateAST=_templateAST; -@synthesize baseContext=_baseContext; + (instancetype)templateFromString:(NSString *)templateString error:(NSError **)error { - GRMustacheTemplateRepository *templateRepository = [GRMustacheRendering currentTemplateRepository]; - if (templateRepository == nil) { - templateRepository = [GRMustacheTemplateRepository templateRepositoryWithBundle:[NSBundle mainBundle]]; - } - GRMustacheContentType contentType = [GRMustacheRendering currentContentType]; - return [templateRepository templateFromString:templateString contentType:contentType error:error]; + GRMustacheTemplateRepository *templateRepository = [GRMustacheTemplateRepository templateRepository]; + return [templateRepository templateFromString:templateString error:error]; } + (instancetype)templateFromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)error @@ -117,14 +118,8 @@ - (NSString *)renderObjectsFromArray:(NSArray *)objects error:(NSError **)error - (NSString *)renderContentWithContext:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error { - NSString *rendering = nil; - - [GRMustacheRendering pushCurrentTemplateRepository:self.templateRepository]; - GRMustacheRenderingEngine *renderingEngine = [GRMustacheRenderingEngine renderingEngineWithContentType:_templateAST.contentType context:context]; - rendering = [renderingEngine renderTemplateAST:_templateAST HTMLSafe:HTMLSafe error:error]; - [GRMustacheRendering popCurrentTemplateRepository]; - - return rendering; + GRMustacheRenderingEngine *renderingEngine = [GRMustacheRenderingEngine renderingEngineWithTemplateAST:_templateAST context:context]; + return [renderingEngine renderHTMLSafe:HTMLSafe error:error]; } - (void)setBaseContext:(GRMustacheContext *)baseContext @@ -146,7 +141,30 @@ - (void)setBaseContext:(GRMustacheContext *)baseContext // Allows template to render as "dynamic partials" - (NSString *)renderForMustacheTag:(GRMustacheTag *)tag context:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error { - return [self renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; + switch (tag.type) { + case GRMustacheTagTypeVariable: + // {{ template }} behaves just like {{> partial }} + // + // Let's simply render the template: + return [self renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; + case GRMustacheTagTypeSection: { + // {{# template }}...{{/ template }} behaves just like {{< partial }}...{{/ partial }} + // + // Let's render the template, overriding blocks with the content + // of the section. + // + // Overriding requires an GRMustachePartialOverrideNode: + + GRMustachePartialNode *partialNode = [GRMustachePartialNode partialNodeWithTemplateAST:self.templateAST name:nil]; + GRMustachePartialOverrideNode *partialOverrideNode = [GRMustachePartialOverrideNode partialOverrideNodeWithParentPartialNode:partialNode overridingTemplateAST:((GRMustacheSectionTag *)tag).innerTemplateAST]; + + // Only GRMustacheRenderingEngine knows how to render GRMustachePartialOverrideNode. + // So wrap the node into a TemplateAST, and render. + GRMustacheTemplateAST *templateAST = [GRMustacheTemplateAST templateASTWithASTNodes:@[partialOverrideNode] contentType:self.templateAST.contentType]; + GRMustacheRenderingEngine *renderingEngine = [GRMustacheRenderingEngine renderingEngineWithTemplateAST:templateAST context:context]; + return [renderingEngine renderHTMLSafe:HTMLSafe error:error]; + } + } } @end diff --git a/src/classes/Templates/GRMustacheTemplateRepository.h b/GRMustache/Templates/GRMustacheTemplateRepository.h similarity index 95% rename from src/classes/Templates/GRMustacheTemplateRepository.h rename to GRMustache/Templates/GRMustacheTemplateRepository.h index 31ab8ca6..ebfb2d67 100644 --- a/src/classes/Templates/GRMustacheTemplateRepository.h +++ b/GRMustache/Templates/GRMustacheTemplateRepository.h @@ -83,7 +83,7 @@ * * @since v1.13 */ -- (id)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateIDForName:(NSString *)name relativeToTemplateID:(id)baseTemplateID AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (id)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateIDForName:(NSString *)name relativeToTemplateID:(id)baseTemplateID AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Provided with a template ID that comes from @@ -109,7 +109,7 @@ * * @since v1.13 */ -- (NSString *)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateStringForTemplateID:(id)templateID error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (NSString *)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateStringForTemplateID:(id)templateID error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end @@ -129,12 +129,7 @@ * * @since v1.13 */ -@interface GRMustacheTemplateRepository : NSObject { -@private - id _dataSource; - NSMutableDictionary *_templateASTForTemplateID; - GRMustacheConfiguration *_configuration; -} +@interface GRMustacheTemplateRepository : NSObject //////////////////////////////////////////////////////////////////////////////// @@ -185,7 +180,7 @@ * * @since v1.13 */ -+ (instancetype)templateRepository AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)templateRepository AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a GRMustacheTemplateRepository that loads Mustache template strings @@ -226,7 +221,7 @@ * * @since v1.13 */ -+ (instancetype)templateRepositoryWithDirectory:(NSString *)path AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)templateRepositoryWithDirectory:(NSString *)path AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a GRMustacheTemplateRepository that loads Mustache template strings @@ -272,7 +267,7 @@ * * @since v1.13 */ -+ (instancetype)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a GRMustacheTemplateRepository that loads Mustache template strings @@ -314,7 +309,7 @@ * * @since v1.13 */ -+ (instancetype)templateRepositoryWithBaseURL:(NSURL *)URL AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)templateRepositoryWithBaseURL:(NSURL *)URL AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a GRMustacheTemplateRepository that loads Mustache template strings @@ -361,7 +356,7 @@ * * @since v1.13 */ -+ (instancetype)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a GRMustacheTemplateRepository that loads Mustache template strings @@ -391,7 +386,7 @@ * * @since v1.13 */ -+ (instancetype)templateRepositoryWithBundle:(NSBundle *)bundle AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)templateRepositoryWithBundle:(NSBundle *)bundle AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a GRMustacheTemplateRepository that loads Mustache template strings @@ -425,7 +420,7 @@ * * @since v1.13 */ -+ (instancetype)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a GRMustacheTemplateRepository that loads Mustache template strings @@ -459,7 +454,7 @@ * * @since v1.13 */ -+ (instancetype)templateRepositoryWithDictionary:(NSDictionary *)templates AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; ++ (instancetype)templateRepositoryWithDictionary:(NSDictionary *)templates AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; //////////////////////////////////////////////////////////////////////////////// @@ -495,7 +490,7 @@ * * @since v6.2 */ -@property (nonatomic, copy) GRMustacheConfiguration *configuration AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic, copy) GRMustacheConfiguration *configuration AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * The repository's data source. @@ -504,7 +499,7 @@ * * @since v1.13 */ -@property (nonatomic, assign) id dataSource AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +@property (nonatomic, assign) id dataSource AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; //////////////////////////////////////////////////////////////////////////////// @@ -527,7 +522,7 @@ * * @since v1.13 */ -- (GRMustacheTemplate *)templateNamed:(NSString *)name error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (GRMustacheTemplate *)templateNamed:(NSString *)name error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Returns a template built from the provided Mustache template string. @@ -545,7 +540,7 @@ * * @since v1.13 */ -- (GRMustacheTemplate *)templateFromString:(NSString *)templateString error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (GRMustacheTemplate *)templateFromString:(NSString *)templateString error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; /** * Have the template repository reload its templates. @@ -571,6 +566,6 @@ * * @since v7.0 */ -- (void)reloadTemplates AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; +- (void)reloadTemplates AVAILABLE_GRMUSTACHE_VERSION_8_0_AND_LATER; @end diff --git a/src/classes/Templates/GRMustacheTemplateRepository.m b/GRMustache/Templates/GRMustacheTemplateRepository.m similarity index 98% rename from src/classes/Templates/GRMustacheTemplateRepository.m rename to GRMustache/Templates/GRMustacheTemplateRepository.m index 30e50568..c91b8acb 100644 --- a/src/classes/Templates/GRMustacheTemplateRepository.m +++ b/GRMustache/Templates/GRMustacheTemplateRepository.m @@ -20,6 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#if __has_feature(objc_arc) +#error Manual Reference Counting required: use -fno-objc-arc. +#endif + #import "GRMustacheTemplateRepository_private.h" #import "GRMustacheTemplate_private.h" #import "GRMustacheCompiler_private.h" @@ -38,12 +42,7 @@ * Private subclass of GRMustacheTemplateRepository that is its own data source, * and loads templates from a base URL. */ -@interface GRMustacheTemplateRepositoryBaseURL : GRMustacheTemplateRepository { -@private - NSURL *_baseURL; - NSString *_templateExtension; - NSStringEncoding _encoding; -} +@interface GRMustacheTemplateRepositoryBaseURL : GRMustacheTemplateRepository - (instancetype)initWithBaseURL:(NSURL *)baseURL templateExtension:(NSString *)templateExtension encoding:(NSStringEncoding)encoding; @end @@ -55,12 +54,7 @@ - (instancetype)initWithBaseURL:(NSURL *)baseURL templateExtension:(NSString *)t * Private subclass of GRMustacheTemplateRepository that is its own data source, * and loads templates from a directory identified by its path. */ -@interface GRMustacheTemplateRepositoryDirectory : GRMustacheTemplateRepository { -@private - NSString *_directoryPath; - NSString *_templateExtension; - NSStringEncoding _encoding; -} +@interface GRMustacheTemplateRepositoryDirectory : GRMustacheTemplateRepository - (instancetype)initWithDirectory:(NSString *)directoryPath templateExtension:(NSString *)templateExtension encoding:(NSStringEncoding)encoding; @end @@ -72,12 +66,7 @@ - (instancetype)initWithDirectory:(NSString *)directoryPath templateExtension:(N * Private subclass of GRMustacheTemplateRepository that is its own data source, * and loads templates from a bundle. */ -@interface GRMustacheTemplateRepositoryBundle : GRMustacheTemplateRepository { -@private - NSBundle *_bundle; - NSString *_templateExtension; - NSStringEncoding _encoding; -} +@interface GRMustacheTemplateRepositoryBundle : GRMustacheTemplateRepository - (instancetype)initWithBundle:(NSBundle *)bundle templateExtension:(NSString *)templateExtension encoding:(NSStringEncoding)encoding; @end @@ -100,9 +89,9 @@ - (instancetype)initWithPartialsDictionary:(NSDictionary *)partialsDictionary; // ============================================================================= #pragma mark - GRMustacheTemplateRepository -@implementation GRMustacheTemplateRepository -@synthesize dataSource=_dataSource; -@synthesize configuration=_configuration; +@implementation GRMustacheTemplateRepository { + NSMutableDictionary *_templateASTForTemplateID; +} + (instancetype)templateRepositoryWithBaseURL:(NSURL *)URL { @@ -337,7 +326,11 @@ - (GRMustacheTemplateAST *)templateASTNamed:(NSString *)name relativeToTemplateI @interface GRMustacheTemplateRepositoryBaseURL() @end -@implementation GRMustacheTemplateRepositoryBaseURL +@implementation GRMustacheTemplateRepositoryBaseURL { + NSURL *_baseURL; + NSString *_templateExtension; + NSStringEncoding _encoding; +} - (instancetype)initWithBaseURL:(NSURL *)baseURL templateExtension:(NSString *)templateExtension encoding:(NSStringEncoding)encoding { @@ -400,7 +393,11 @@ - (NSString *)templateRepository:(GRMustacheTemplateRepository *)templateReposit @interface GRMustacheTemplateRepositoryDirectory() @end -@implementation GRMustacheTemplateRepositoryDirectory +@implementation GRMustacheTemplateRepositoryDirectory { + NSString *_directoryPath; + NSString *_templateExtension; + NSStringEncoding _encoding; +} - (instancetype)initWithDirectory:(NSString *)directoryPath templateExtension:(NSString *)templateExtension encoding:(NSStringEncoding)encoding { @@ -464,7 +461,11 @@ - (NSString *)templateRepository:(GRMustacheTemplateRepository *)templateReposit @interface GRMustacheTemplateRepositoryBundle() @end -@implementation GRMustacheTemplateRepositoryBundle +@implementation GRMustacheTemplateRepositoryBundle { + NSBundle *_bundle; + NSString *_templateExtension; + NSStringEncoding _encoding; +} - (instancetype)initWithBundle:(NSBundle *)bundle templateExtension:(NSString *)templateExtension encoding:(NSStringEncoding)encoding { diff --git a/src/classes/Templates/GRMustacheTemplateRepository_private.h b/GRMustache/Templates/GRMustacheTemplateRepository_private.h similarity index 95% rename from src/classes/Templates/GRMustacheTemplateRepository_private.h rename to GRMustache/Templates/GRMustacheTemplateRepository_private.h index 1707c67d..6d0dfdbd 100644 --- a/src/classes/Templates/GRMustacheTemplateRepository_private.h +++ b/GRMustache/Templates/GRMustacheTemplateRepository_private.h @@ -40,12 +40,7 @@ @end // Documented in GRMustacheTemplateRepository.h -@interface GRMustacheTemplateRepository : NSObject { -@private - id _dataSource; - NSMutableDictionary *_templateASTForTemplateID; - GRMustacheConfiguration *_configuration; -} +@interface GRMustacheTemplateRepository : NSObject // Documented in GRMustacheTemplateRepository.h @property (nonatomic, assign) id dataSource GRMUSTACHE_API_PUBLIC; diff --git a/src/classes/Templates/GRMustacheTemplate_private.h b/GRMustache/Templates/GRMustacheTemplate_private.h similarity index 94% rename from src/classes/Templates/GRMustacheTemplate_private.h rename to GRMustache/Templates/GRMustacheTemplate_private.h index 8231764e..c0b60ff3 100644 --- a/src/classes/Templates/GRMustacheTemplate_private.h +++ b/GRMustache/Templates/GRMustacheTemplate_private.h @@ -30,12 +30,7 @@ @protocol GRMustacheTagDelegate; // Documented in GRMustacheTemplate.h -@interface GRMustacheTemplate: NSObject { -@private - GRMustacheTemplateRepository *_templateRepository; - GRMustacheTemplateAST *_templateAST; - GRMustacheContext *_baseContext; -} +@interface GRMustacheTemplate: NSObject @property (nonatomic, retain) GRMustacheTemplateAST *templateAST GRMUSTACHE_API_INTERNAL; diff --git a/src/tests/GRMustacheTestBase.h b/GRMustacheTests/GRMustacheTestingDelegate.h similarity index 93% rename from src/tests/GRMustacheTestBase.h rename to GRMustacheTests/GRMustacheTestingDelegate.h index b14ba6d2..774436dd 100644 --- a/src/tests/GRMustacheTestBase.h +++ b/GRMustacheTests/GRMustacheTestingDelegate.h @@ -20,13 +20,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import #import "GRMustacheTagDelegate.h" -@interface GRMustacheTestBase: XCTestCase -@property (nonatomic, readonly) NSBundle *testBundle; -@end - @interface GRMustacheTestingDelegate : NSObject { id(^_mustacheTagWillRenderObjectBlock)(GRMustacheTag *tag, id object); void(^_mustacheTagDidRenderAsBlock)(GRMustacheTag *tag, id object, NSString *rendering); diff --git a/src/tests/GRMustacheTestBase.m b/GRMustacheTests/GRMustacheTestingDelegate.m similarity index 90% rename from src/tests/GRMustacheTestBase.m rename to GRMustacheTests/GRMustacheTestingDelegate.m index 8e5e5a95..dad7635f 100644 --- a/src/tests/GRMustacheTestBase.m +++ b/GRMustacheTests/GRMustacheTestingDelegate.m @@ -20,18 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "GRMustacheTemplate_private.h" -#import "GRMustacheTestBase.h" - -@implementation GRMustacheTestBase -@dynamic testBundle; - -- (NSBundle *)testBundle -{ - return [NSBundle bundleWithIdentifier:@"com.github.groue.GRMustache"]; -} - -@end +#import "GRMustacheTestingDelegate.h" @implementation GRMustacheTestingDelegate @synthesize mustacheTagWillRenderObjectBlock=_mustacheTagWillRenderObjectBlock; diff --git a/src/tests/GRMustache7Tests-Info.plist b/GRMustacheTests/Info.plist similarity index 77% rename from src/tests/GRMustache7Tests-Info.plist rename to GRMustacheTests/Info.plist index 76e2c012..ba72822e 100644 --- a/src/tests/GRMustache7Tests-Info.plist +++ b/GRMustacheTests/Info.plist @@ -5,11 +5,13 @@ CFBundleDevelopmentRegion en CFBundleExecutable - ${EXECUTABLE_NAME} + $(EXECUTABLE_NAME) CFBundleIdentifier - com.github.groue.GRMustache + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion - 7.0 + 6.0 + CFBundleName + $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString diff --git a/src/tests/Private/GRMustacheContextPrivateTest.m b/GRMustacheTests/Private/GRMustacheContextPrivateTest.m similarity index 95% rename from src/tests/Private/GRMustacheContextPrivateTest.m rename to GRMustacheTests/Private/GRMustacheContextPrivateTest.m index dbf1b383..662deec6 100644 --- a/src/tests/Private/GRMustacheContextPrivateTest.m +++ b/GRMustacheTests/Private/GRMustacheContextPrivateTest.m @@ -23,13 +23,13 @@ #import "GRMustachePrivateAPITest.h" #import "GRMustacheContext_private.h" #import "GRMustacheTemplate_private.h" -#import "GRMustacheSafeKeyAccess.h" +#import "NSObject+GRMustacheKeyValueCoding_private.h" @interface GRMustacheContextPrivateTest : GRMustachePrivateAPITest @end -@interface GRKVCRecorder: NSObject { +@interface GRKVCRecorder: NSObject { NSString *lastAccessedKey; NSArray *keys; } @@ -41,9 +41,10 @@ @implementation GRKVCRecorder @synthesize lastAccessedKey; @synthesize keys; -+ (NSSet *)safeMustacheKeys +- (BOOL)hasValue:(id *)value forMustacheKey:(NSString *)key { - return [NSSet setWithObjects:@"foo", @"root", @"top", @"name", nil]; + *value = [self valueForKey:key]; + return YES; } + (instancetype)recorderWithRecognizedKeys:(NSArray *)keys @@ -78,14 +79,15 @@ - (void)dealloc @end -@interface ThrowingObjectFromValueForKey: NSObject +@interface ThrowingObjectFromValueForKey: NSObject @end @implementation ThrowingObjectFromValueForKey -+ (NSSet *)safeMustacheKeys +- (BOOL)hasValue:(id *)value forMustacheKey:(NSString *)key { - return [NSSet setWithObjects:@"KnownKey", @"NonNSUndefinedKeyException", @"NonSelfNSUndefinedKeyException", @"SelfNSUndefinedKeyException", nil]; + *value = [self valueForKey:key]; + return YES; } - (id)valueForKey:(NSString *)key @@ -104,14 +106,15 @@ - (id)valueForKey:(NSString *)key @end -@interface ThrowingObjectFromValueForUndefinedKey: NSObject +@interface ThrowingObjectFromValueForUndefinedKey: NSObject @end @implementation ThrowingObjectFromValueForUndefinedKey -+ (NSSet *)safeMustacheKeys +- (BOOL)hasValue:(id *)value forMustacheKey:(NSString *)key { - return [NSSet setWithObjects:@"KnownKey", @"NonNSUndefinedKeyException", @"NonSelfNSUndefinedKeyException", @"SelfNSUndefinedKeyException", nil]; + *value = [self valueForKey:key]; + return YES; } - (id)valueForUndefinedKey:(NSString *)key diff --git a/src/tests/Private/GRMustacheExpressionParserTest.m b/GRMustacheTests/Private/GRMustacheExpressionParserTest.m similarity index 100% rename from src/tests/Private/GRMustacheExpressionParserTest.m rename to GRMustacheTests/Private/GRMustacheExpressionParserTest.m diff --git a/src/tests/Private/GRMustachePrivateAPITest.h b/GRMustacheTests/Private/GRMustachePrivateAPITest.h similarity index 92% rename from src/tests/Private/GRMustachePrivateAPITest.h rename to GRMustacheTests/Private/GRMustachePrivateAPITest.h index 731aa480..3d0a3399 100644 --- a/src/tests/Private/GRMustachePrivateAPITest.h +++ b/GRMustacheTests/Private/GRMustachePrivateAPITest.h @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "GRMustacheTestBase.h" +#import -@interface GRMustachePrivateAPITest : GRMustacheTestBase +@interface GRMustachePrivateAPITest : XCTestCase @end diff --git a/src/tests/Private/GRMustachePrivateAPITest.m b/GRMustacheTests/Private/GRMustachePrivateAPITest.m similarity index 100% rename from src/tests/Private/GRMustachePrivateAPITest.m rename to GRMustacheTests/Private/GRMustachePrivateAPITest.m diff --git a/src/tests/Private/GRMustacheTemplateGeneratorTest.m b/GRMustacheTests/Private/GRMustacheTemplateGeneratorTest.m similarity index 100% rename from src/tests/Private/GRMustacheTemplateGeneratorTest.m rename to GRMustacheTests/Private/GRMustacheTemplateGeneratorTest.m diff --git a/src/tests/Private/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodeld/.xccurrentversion b/GRMustacheTests/Private/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodeld/.xccurrentversion similarity index 100% rename from src/tests/Private/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodeld/.xccurrentversion rename to GRMustacheTests/Private/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodeld/.xccurrentversion diff --git a/src/tests/Private/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodeld/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodel/elements b/GRMustacheTests/Private/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodeld/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodel/elements similarity index 100% rename from src/tests/Private/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodeld/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodel/elements rename to GRMustacheTests/Private/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodeld/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodel/elements diff --git a/src/tests/Private/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodeld/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodel/layout b/GRMustacheTests/Private/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodeld/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodel/layout similarity index 100% rename from src/tests/Private/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodeld/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodel/layout rename to GRMustacheTests/Private/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodeld/GRPreventNSUndefinedKeyExceptionAttackTest.xcdatamodel/layout diff --git a/src/tests/Public/GRMustachePublicAPITest.h b/GRMustacheTests/Public/GRMustachePublicAPITest.h similarity index 94% rename from src/tests/Public/GRMustachePublicAPITest.h rename to GRMustacheTests/Public/GRMustachePublicAPITest.h index 04246c92..8d5bc05a 100644 --- a/src/tests/Public/GRMustachePublicAPITest.h +++ b/GRMustacheTests/Public/GRMustachePublicAPITest.h @@ -20,10 +20,10 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "GRMustache.h" -#import "GRMustacheTestBase.h" +@import XCTest; +@import GRMustache; -@interface GRMustachePublicAPITest: GRMustacheTestBase +@interface GRMustachePublicAPITest: XCTestCase @end @interface GRMustachePublicAPISuiteTest: GRMustachePublicAPITest diff --git a/src/tests/Public/GRMustachePublicAPITest.m b/GRMustacheTests/Public/GRMustachePublicAPITest.m similarity index 93% rename from src/tests/Public/GRMustachePublicAPITest.m rename to GRMustacheTests/Public/GRMustachePublicAPITest.m index cbf7e651..5ffceb79 100644 --- a/src/tests/Public/GRMustachePublicAPITest.m +++ b/GRMustacheTests/Public/GRMustachePublicAPITest.m @@ -57,7 +57,8 @@ @implementation GRMustachePublicAPISuiteTest - (void)runTestsFromResource:(NSString *)name subdirectory:(NSString *)subpath { - NSString *path = [[self.testBundle pathForResource:subpath ofType:nil] stringByAppendingPathComponent:name]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + NSString *path = [[testBundle pathForResource:subpath ofType:nil] stringByAppendingPathComponent:name]; NSError *error; NSData *testSuiteData = [NSData dataWithContentsOfFile:path]; @@ -247,6 +248,21 @@ - (void)runTestsFromResource:(NSString *)name subdirectory:(NSString *)subpath - (GRMustacheTemplate *)templateForTemplateString:(NSString *)templateString partialsDictionary:(NSDictionary *)partialsDictionary error:(NSError **)error { GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partialsDictionary]; + NSDictionary *library = @{ + // Standard Library + @"each": [GRMustache standardEach], + // @"zip": [[[GRMustacheZipFilter alloc] init] autorelease], + @"localize": [[[GRMustacheLocalizer alloc] initWithBundle:nil tableName:nil] autorelease], + @"HTMLEscape": [GRMustache standardHTMLEscape], + @"URLEscape": [GRMustache standardURLEscape], + @"javascriptEscape": [GRMustache standardJavascriptEscape], + @"zip": [GRMustache standardZip], + + // Support for filters.json + @"capitalized": [GRMustacheFilter filterWithBlock:^id(id value) { + return [(NSString *)value capitalizedString]; + }]}; + [repository.configuration extendBaseContextWithObject:library]; return [repository templateFromString:templateString error:error]; } diff --git a/src/tests/Public/v7.0/GRBooleanTest.m b/GRMustacheTests/Public/v8.0/GRBooleanTest.m similarity index 94% rename from src/tests/Public/v7.0/GRBooleanTest.m rename to GRMustacheTests/Public/v8.0/GRBooleanTest.m index 0444e441..563054e7 100644 --- a/src/tests/Public/v7.0/GRBooleanTest.m +++ b/GRMustacheTests/Public/v8.0/GRBooleanTest.m @@ -20,13 +20,13 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRBooleanTest : GRMustachePublicAPITest @end -@interface GRBooleanTestSupport: NSObject { +@interface GRBooleanTestSupport: NSObject { BOOL _customGetterBOOLProperty; bool _customGetterboolProperty; } @@ -68,34 +68,10 @@ - (unsigned char)unsigned_charTrueMethod { return YES; } - (int)intFalseMethod { return NO; } - (int)intTrueMethod { return YES; } -+ (NSSet *)safeMustacheKeys -{ - return [NSSet setWithObjects: - @"boolFalseProperty", - @"boolTrueProperty", - @"BOOLFalseProperty", - @"BOOLTrueProperty", - @"charFalseProperty", - @"charTrueProperty", - @"unsigned_charFalseProperty", - @"unsigned_charTrueProperty", - @"intFalseProperty", - @"intTrueProperty", - @"customGetterBOOLProperty", - @"isCustomGetterBOOLProperty", - @"customGetterboolProperty", - @"isCustomGetterboolProperty", - @"boolFalseMethod", - @"boolTrueMethod", - @"BOOLFalseMethod", - @"BOOLTrueMethod", - @"charFalseMethod", - @"charTrueMethod", - @"unsigned_charFalseMethod", - @"unsigned_charTrueMethod", - @"intFalseMethod", - @"intTrueMethod", - nil]; +- (BOOL)hasValue:(id *)value forMustacheKey:(NSString *)key +{ + *value = [self valueForKey:key]; + return YES; } @end diff --git a/src/tests/Public/v7.0/GRMustacheConfigurationTest/GRMustacheConfigurationBaseContextTest.m b/GRMustacheTests/Public/v8.0/GRMustacheConfigurationTest/GRMustacheConfigurationBaseContextTest.m similarity index 92% rename from src/tests/Public/v7.0/GRMustacheConfigurationTest/GRMustacheConfigurationBaseContextTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheConfigurationTest/GRMustacheConfigurationBaseContextTest.m index 50fd26f5..bf7eba48 100644 --- a/src/tests/Public/v7.0/GRMustacheConfigurationTest/GRMustacheConfigurationBaseContextTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheConfigurationTest/GRMustacheConfigurationBaseContextTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheConfigurationBaseContextTest : GRMustachePublicAPITest @@ -36,16 +36,6 @@ - (void)tearDown [GRMustacheConfiguration defaultConfiguration].baseContext = [GRMustacheConfiguration configuration].baseContext; } -- (void)testFactoryConfigurationHasStandardLibraryInBaseContextRegardlessOfDefaultConfiguration -{ - [GRMustacheConfiguration defaultConfiguration].baseContext = [GRMustacheContext contextWithObject:[NSDictionary dictionaryWithObject:@"success" forKey:@"foo"]]; - GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepository]; - repo.configuration = [GRMustacheConfiguration configuration]; - GRMustacheTemplate *template = [repo templateFromString:@"{{uppercase(foo)}}" error:NULL]; - NSString *rendering = [template renderObject:[NSDictionary dictionaryWithObject:@"success" forKey:@"foo"] error:NULL]; - XCTAssertEqualObjects(rendering, @"SUCCESS", @""); -} - - (void)testDefaultConfigurationMustacheBaseContext { [GRMustacheConfiguration defaultConfiguration].baseContext = [GRMustacheContext contextWithObject:[NSDictionary dictionaryWithObject:@"success" forKey:@"foo"]]; diff --git a/src/tests/Public/v7.0/GRMustacheConfigurationTest/GRMustacheConfigurationExtendBaseContextTest.m b/GRMustacheTests/Public/v8.0/GRMustacheConfigurationTest/GRMustacheConfigurationExtendBaseContextTest.m similarity index 97% rename from src/tests/Public/v7.0/GRMustacheConfigurationTest/GRMustacheConfigurationExtendBaseContextTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheConfigurationTest/GRMustacheConfigurationExtendBaseContextTest.m index 681ab7a2..9ae030d6 100644 --- a/src/tests/Public/v7.0/GRMustacheConfigurationTest/GRMustacheConfigurationExtendBaseContextTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheConfigurationTest/GRMustacheConfigurationExtendBaseContextTest.m @@ -20,8 +20,9 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" +#import "GRMustacheTestingDelegate.h" @interface GRMustacheConfigurationExtendBaseContextTest : GRMustachePublicAPITest @end diff --git a/src/tests/Public/v7.0/GRMustacheConfigurationTest/GRMustacheConfigurationTagDelimitersTest.m b/GRMustacheTests/Public/v8.0/GRMustacheConfigurationTest/GRMustacheConfigurationTagDelimitersTest.m similarity index 99% rename from src/tests/Public/v7.0/GRMustacheConfigurationTest/GRMustacheConfigurationTagDelimitersTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheConfigurationTest/GRMustacheConfigurationTagDelimitersTest.m index 4086cd67..b1927080 100644 --- a/src/tests/Public/v7.0/GRMustacheConfigurationTest/GRMustacheConfigurationTagDelimitersTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheConfigurationTest/GRMustacheConfigurationTagDelimitersTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheConfigurationTagDelimitersTest : GRMustachePublicAPITest diff --git a/src/tests/Public/v7.0/GRMustacheConfigurationTest/GRMustacheConfigurationTest.m b/GRMustacheTests/Public/v8.0/GRMustacheConfigurationTest/GRMustacheConfigurationTest.m similarity index 99% rename from src/tests/Public/v7.0/GRMustacheConfigurationTest/GRMustacheConfigurationTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheConfigurationTest/GRMustacheConfigurationTest.m index d6745cb8..32034887 100644 --- a/src/tests/Public/v7.0/GRMustacheConfigurationTest/GRMustacheConfigurationTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheConfigurationTest/GRMustacheConfigurationTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheConfigurationTest : GRMustachePublicAPITest diff --git a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextHasValueForMustacheExpressionTest.m b/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextHasValueForMustacheExpressionTest.m similarity index 95% rename from src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextHasValueForMustacheExpressionTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextHasValueForMustacheExpressionTest.m index c0b0bf0f..bfba30d7 100644 --- a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextHasValueForMustacheExpressionTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextHasValueForMustacheExpressionTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheContextHasValueForMustacheExpressionTest : GRMustachePublicAPITest @@ -30,7 +30,7 @@ @implementation GRMustacheContextHasValueForMustacheExpressionTest - (void)testHasValueForMustacheExpression { - GRMustacheContext *context = [GRMustacheContext contextWithObject:[GRMustache standardLibrary]]; + GRMustacheContext *context = [GRMustacheContext context]; id filter = [GRMustacheFilter filterWithBlock:^id(id value) { return [[value description] uppercaseString]; }]; diff --git a/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextKeyAccessTest.m b/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextKeyAccessTest.m new file mode 100644 index 00000000..80839219 --- /dev/null +++ b/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextKeyAccessTest.m @@ -0,0 +1,119 @@ +// The MIT License +// +// Copyright (c) 2014 Gwendal Roué +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 +#import "GRMustachePublicAPITest.h" + + +@interface GRMustacheContextKeyAccess_ClassWithProperties : NSObject +@property (nonatomic, copy) NSString *property; +@end + +@implementation GRMustacheContextKeyAccess_ClassWithProperties + +- (void)dealloc +{ + self.property = nil; + [super dealloc]; +} + +- (instancetype)initWithProperty:(NSString *)property +{ + self = [self init]; + if (self) { + self.property = property; + } + return self; +} + +- (NSString *)method +{ + return @"method"; +} + +@end + +// + +@interface GRMustacheContextKeyAccess_ClassWithProperties2 : NSObject +@property (nonatomic, readonly) NSString *property2; +@end + +@implementation GRMustacheContextKeyAccess_ClassWithProperties2 + +- (NSString *)property2 +{ + return @"property2"; +} + +- (NSString *)method2 +{ + return @"method2"; +} + +@end + +// + +@interface GRMustacheContextKeyAccessTest : GRMustachePublicAPITest +@end + +@implementation GRMustacheContextKeyAccessTest + +- (void)testPropertiesAreAllowed +{ + GRMustacheContextKeyAccess_ClassWithProperties *object = [[[GRMustacheContextKeyAccess_ClassWithProperties alloc] initWithProperty:@"property"] autorelease]; + + // test setup + XCTAssertFalse([object respondsToSelector:@selector(objectForKeyedSubscript:)], @""); + XCTAssertEqualObjects(object.property, @"property", @""); + XCTAssertEqualObjects([object valueForKey:@"property"], @"property", @""); + + // test context + GRMustacheContext *context = [GRMustacheContext contextWithObject:object]; + XCTAssertEqualObjects([context valueForMustacheKey:@"property"], @"property", @""); +} + +- (void)testNilPropertyEvaluatesToMissingKeyAndDoesNotStopContextStackLookup +{ + GRMustacheContextKeyAccess_ClassWithProperties *object = [[[GRMustacheContextKeyAccess_ClassWithProperties alloc] initWithProperty:nil] autorelease]; + GRMustacheContext *context = [GRMustacheContext contextWithObject:@{@"property": @"root"}]; + XCTAssertEqualObjects([context valueForMustacheKey:@"property"], @"root", @""); + context = [context contextByAddingObject:object]; + XCTAssertEqualObjects([context valueForMustacheKey:@"property"], @"root"); +} + +- (void)testMethodAreDisallowed +{ + GRMustacheContextKeyAccess_ClassWithProperties *object = [[[GRMustacheContextKeyAccess_ClassWithProperties alloc] initWithProperty:@"property"] autorelease]; + + // test setup + XCTAssertFalse([object respondsToSelector:@selector(objectForKeyedSubscript:)], @""); + XCTAssertEqualObjects([object method], @"method", @""); + XCTAssertEqualObjects([object valueForKey:@"method"], @"method", @""); + + // test context + GRMustacheContext *context = [GRMustacheContext contextWithObject:object]; + XCTAssertNil([context valueForMustacheKey:@"method"], @""); +} + +@end diff --git a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextProtectedObjectTest.m b/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextProtectedObjectTest.m similarity index 98% rename from src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextProtectedObjectTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextProtectedObjectTest.m index 265f3d80..ddd5367e 100644 --- a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextProtectedObjectTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextProtectedObjectTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheContextProtectedObjectTest : GRMustachePublicAPITest diff --git a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextTest.m b/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextTest.m similarity index 83% rename from src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextTest.m index 5dd694f5..a755eaab 100644 --- a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextTest.m @@ -20,34 +20,15 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" +#import "GRMustacheTestingDelegate.h" @interface GRMustacheContextTest : GRMustachePublicAPITest @end @implementation GRMustacheContextTest -- (void)testContextConstructor -{ - GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{uppercase(foo)}}" error:NULL]; - id data = @{ @"foo": @"bar" }; - - { - NSString *rendering = [template renderObject:data error:NULL]; - XCTAssertEqualObjects(rendering, @"BAR", @""); - } - { - template.baseContext = [GRMustacheContext context]; - NSError *error; - NSString *rendering = [template renderObject:data error:&error]; - XCTAssertNil(rendering, @""); - XCTAssertNotNil(error, @""); - XCTAssertEqualObjects(error.domain, GRMustacheErrorDomain, @""); - XCTAssertEqual(error.code, GRMustacheErrorCodeRenderingError, @""); - } -} - - (void)testContextWithObjectConstructor { GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{foo}}" error:NULL]; diff --git a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextTopMustacheObjectTest.m b/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextTopMustacheObjectTest.m similarity index 95% rename from src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextTopMustacheObjectTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextTopMustacheObjectTest.m index c9c54814..8af88185 100644 --- a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextTopMustacheObjectTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextTopMustacheObjectTest.m @@ -20,8 +20,9 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" +#import "GRMustacheTestingDelegate.h" @interface GRMustacheContextTopMustacheObjectTest : GRMustachePublicAPITest @end diff --git a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextValueForMustacheKeyTest.m b/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextValueForMustacheKeyTest.m similarity index 84% rename from src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextValueForMustacheKeyTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextValueForMustacheKeyTest.m index cce9d72f..edc0d159 100644 --- a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextValueForMustacheKeyTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheContextTest/GRMustacheContextValueForMustacheKeyTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheContextValueForMustacheKeyTest : GRMustachePublicAPITest @@ -30,7 +30,7 @@ @implementation GRMustacheContextValueForMustacheKeyTest - (void)testValueForMustacheKey { - GRMustacheContext *context = [GRMustacheContext contextWithObject:[GRMustache standardLibrary]]; + GRMustacheContext *context = [GRMustacheContext context]; id data = @{ @"name": @"name1", @"a": @{ @"name": @"name2" }}; context = [context contextByAddingObject:data]; { @@ -48,11 +48,6 @@ - (void)testValueForMustacheKey id value = [context valueForMustacheKey:@"a.name"]; XCTAssertNil(value, @""); } - { - // 'uppercase' is a key - id value = [context valueForMustacheKey:@"uppercase"]; - XCTAssertTrue([value conformsToProtocol:@protocol(GRMustacheFilter)], @""); - } } @end diff --git a/src/tests/Public/v7.0/GRMustacheErrorHandlingTest.m b/GRMustacheTests/Public/v8.0/GRMustacheErrorHandlingTest.m similarity index 97% rename from src/tests/Public/v7.0/GRMustacheErrorHandlingTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheErrorHandlingTest.m index 01fc4718..abf7475f 100644 --- a/src/tests/Public/v7.0/GRMustacheErrorHandlingTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheErrorHandlingTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheErrorHandlingTest : GRMustachePublicAPITest diff --git a/src/tests/Public/v7.0/GRMustacheFilterTest/GRMustacheFilterTest.m b/GRMustacheTests/Public/v8.0/GRMustacheFilterTest/GRMustacheFilterTest.m similarity index 97% rename from src/tests/Public/v7.0/GRMustacheFilterTest/GRMustacheFilterTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheFilterTest/GRMustacheFilterTest.m index 5bc3b329..6b42d599 100644 --- a/src/tests/Public/v7.0/GRMustacheFilterTest/GRMustacheFilterTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheFilterTest/GRMustacheFilterTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheFilterTestSupport: NSObject @@ -122,6 +122,9 @@ - (void)testFilteredSectionClosingTagCanBeBlank NSString *templateString = @"<{{#uppercase(.)}}{{.}}{{/}}> <{{#uppercase(.)}}{{.}}{{/ }}>"; GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; XCTAssertNotNil(template); + [template extendBaseContextWithObject:@{ @"uppercase": [GRMustacheFilter filterWithBlock:^(id object) { + return [[object description] uppercaseString]; + }]}]; NSString *rendering = [template renderObject:@"foo" error:NULL]; XCTAssertEqualObjects(rendering, @" "); } diff --git a/src/tests/Public/v7.0/GRMustacheFilterTest/GRMustacheVariadicFilterTest.m b/GRMustacheTests/Public/v8.0/GRMustacheFilterTest/GRMustacheVariadicFilterTest.m similarity index 98% rename from src/tests/Public/v7.0/GRMustacheFilterTest/GRMustacheVariadicFilterTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheFilterTest/GRMustacheVariadicFilterTest.m index 3aa3de64..169649f1 100644 --- a/src/tests/Public/v7.0/GRMustacheFilterTest/GRMustacheVariadicFilterTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheFilterTest/GRMustacheVariadicFilterTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheVariadicFilterTest : GRMustachePublicAPITest diff --git a/src/tests/Public/v7.0/GRMustacheFoundationCollectionTest.m b/GRMustacheTests/Public/v8.0/GRMustacheFoundationCollectionTest.m similarity index 94% rename from src/tests/Public/v7.0/GRMustacheFoundationCollectionTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheFoundationCollectionTest.m index a4102fcf..f577d5e2 100644 --- a/src/tests/Public/v7.0/GRMustacheFoundationCollectionTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheFoundationCollectionTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheFoundationCollectionTest : GRMustachePublicAPITest @@ -52,7 +52,7 @@ - (void)testNSArray { // [NSArray lastObject] should be accessible (test for method returning an object) - NSString *rendering = [[GRMustacheTemplate templateFromString:@"{{collection.lastObject.key}}" error:NULL] renderObject:data error:NULL]; + NSString *rendering = [[GRMustacheTemplate templateFromString:@"{{collection.last.key}}" error:NULL] renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @"value", @""); } } @@ -81,7 +81,7 @@ - (void)testNSSet { // [NSSet anyObject] should be accessible (test for method returning an object) - NSString *rendering = [[GRMustacheTemplate templateFromString:@"{{collection.anyObject.key}}" error:NULL] renderObject:data error:NULL]; + NSString *rendering = [[GRMustacheTemplate templateFromString:@"{{collection.first.key}}" error:NULL] renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @"value", @""); } } @@ -110,7 +110,7 @@ - (void)testNSOrderedSet { // [NSOrderedSet firstObject] should be accessible (test for method returning an object) - NSString *rendering = [[GRMustacheTemplate templateFromString:@"{{collection.firstObject.key}}" error:NULL] renderObject:data error:NULL]; + NSString *rendering = [[GRMustacheTemplate templateFromString:@"{{collection.first.key}}" error:NULL] renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @"value", @""); } } diff --git a/GRMustacheTests/Public/v8.0/GRMustacheLambdaTest.m b/GRMustacheTests/Public/v8.0/GRMustacheLambdaTest.m new file mode 100644 index 00000000..09a1a9bf --- /dev/null +++ b/GRMustacheTests/Public/v8.0/GRMustacheLambdaTest.m @@ -0,0 +1,213 @@ +// The MIT License +// +// Copyright (c) 2015 Gwendal Roué +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 +#import "GRMustachePublicAPITest.h" + +@interface GRMustacheLambdaTest : GRMustachePublicAPITest + +@end + +@implementation GRMustacheLambdaTest + + +- (void)testMustacheSpecInterpolation +{ + // https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/%7Elambdas.yml#L15 + id lambda = [GRMustacheRendering lambda:^{ return @"world"; }]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"Hello, {{lambda}}!" error:NULL]; + id data = @{ @"lambda": lambda }; + NSString *rendering = [template renderObject:data error:NULL]; + XCTAssertEqualObjects(rendering, @"Hello, world!"); +} + +- (void)testMustacheSpecInterpolationExpansion +{ + // https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/%7Elambdas.yml#L29 + id lambda = [GRMustacheRendering lambda:^{ return @"{{planet}}"; }]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"Hello, {{lambda}}!" error:NULL]; + id data = @{ + @"planet": @"world", + @"lambda": lambda, + }; + NSString *rendering = [template renderObject:data error:NULL]; + XCTAssertEqualObjects(rendering, @"Hello, world!"); +} + +- (void)testMustacheSpecInterpolationAlternateDelimiters +{ + // https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/%7Elambdas.yml#L44 + // With a difference: remove the "\n" character because GRMustache does + // not honor mustache spec white space rules. + id lambda = [GRMustacheRendering lambda:^{ return @"|planet| => {{planet}}"; }]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{= | | =}}Hello, (|&lambda|)!" error:NULL]; + id data = @{ + @"planet": @"world", + @"lambda": lambda, + }; + NSString *rendering = [template renderObject:data error:NULL]; + XCTAssertEqualObjects(rendering, @"Hello, (|planet| => world)!"); +} + +- (void)testMustacheSpecMultipleCalls +{ + // https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/%7Elambdas.yml#L59 + __block NSUInteger calls = 0; + id lambda = [GRMustacheRendering lambda:^{ + ++calls; + return [NSString stringWithFormat:@"%@", @(calls)]; + }]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{lambda}} == {{{lambda}}} == {{lambda}}" error:NULL]; + id data = @{ @"lambda": lambda }; + NSString *rendering = [template renderObject:data error:NULL]; + XCTAssertEqualObjects(rendering, @"1 == 2 == 3"); +} + +- (void)testMustacheSpecEscaping +{ + // https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/%7Elambdas.yml#L73 + id lambda = [GRMustacheRendering lambda:^{ return @">"; }]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"<{{lambda}}{{{lambda}}}" error:NULL]; + id data = @{ @"lambda": lambda }; + NSString *rendering = [template renderObject:data error:NULL]; + XCTAssertEqualObjects(rendering, @"<>>"); +} + +- (void)testMustacheSpecSection +{ + // https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/%7Elambdas.yml#L87 + id lambda = [GRMustacheRendering sectionLambda:^(NSString *string) { + if ([string isEqualToString:@"{{x}}"]) { + return @"yes"; + } else { + return @"no"; + } + }]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"<{{#lambda}}{{x}}{{/lambda}}>" error:NULL]; + id data = @{ @"lambda": lambda }; + NSString *rendering = [template renderObject:data error:NULL]; + XCTAssertEqualObjects(rendering, @""); +} + +- (void)testMustacheSpecSectionExpansion +{ + // https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/%7Elambdas.yml#L102 + id lambda = [GRMustacheRendering sectionLambda:^(NSString *string) { + return [NSString stringWithFormat:@"%@{{planet}}%@", string, string]; + }]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"<{{#lambda}}-{{/lambda}}>" error:NULL]; + id data = @{ + @"planet": @"Earth", + @"lambda": lambda, + }; + NSString *rendering = [template renderObject:data error:NULL]; + XCTAssertEqualObjects(rendering, @"<-Earth->"); +} + +- (void)testMustacheSpecSectionAlternateDelimiters +{ + // https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/%7Elambdas.yml#L117 + id lambda = [GRMustacheRendering sectionLambda:^(NSString *string) { + return [NSString stringWithFormat:@"%@{{planet}} => |planet|%@", string, string]; + }]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{= | | =}}<|#lambda|-|/lambda|>" error:NULL]; + id data = @{ + @"planet": @"Earth", + @"lambda": lambda, + }; + NSString *rendering = [template renderObject:data error:NULL]; + XCTAssertEqualObjects(rendering, @"<-{{planet}} => Earth->"); +} + +- (void)testMustacheSpecSectionMultipleCalls +{ + // https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/%7Elambdas.yml#L132 + id lambda = [GRMustacheRendering sectionLambda:^(NSString *string) { + return [NSString stringWithFormat:@"__%@__", string]; + }]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{#lambda}}FILE{{/lambda}} != {{#lambda}}LINE{{/lambda}}" error:NULL]; + id data = @{ @"lambda": lambda }; + NSString *rendering = [template renderObject:data error:NULL]; + XCTAssertEqualObjects(rendering, @"__FILE__ != __LINE__"); +} + +- (void)testMustacheSpecInvertedSection +{ + // https://github.com/mustache/spec/blob/83b0721610a4e11832e83df19c73ace3289972b9/specs/%7Elambdas.yml#L146 + id lambda = [GRMustacheRendering sectionLambda:^(NSString *string) { + return @""; + }]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"<{{^lambda}}{{static}}{{/lambda}}>" error:NULL]; + id data = @{ @"lambda": lambda }; + NSString *rendering = [template renderObject:data error:NULL]; + XCTAssertEqualObjects(rendering, @"<>"); +} + +- (void)testPartialInArity0Lambda +{ + // Lambda can't render partials + NSDictionary *partials = @{ @"partial" : @"success" }; + GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partials]; + id lambda = [GRMustacheRendering lambda:^{ return @"{{>partial}}"; }]; + GRMustacheTemplate *template = [repo templateFromString:@"<{{lambda}}>" error:NULL]; + id data = @{ @"lambda": lambda }; + NSError *error; + NSString *rendering = [template renderObject:data error:&error]; + XCTAssertNil(rendering); + XCTAssertEqualObjects(error.domain, GRMustacheErrorDomain); + XCTAssertEqual(error.code, GRMustacheErrorCodeTemplateNotFound); +} + +- (void)testPartialInArity1Lambda +{ + // Lambda can't render partials + NSDictionary *partials = @{ @"partial" : @"success" }; + GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partials]; + id lambda = [GRMustacheRendering sectionLambda:^(NSString *string) { return @"{{>partial}}"; }]; + GRMustacheTemplate *template = [repo templateFromString:@"<{{#lambda}}...{{/lambda}}>" error:NULL]; + id data = @{ @"lambda": lambda }; + NSError *error; + NSString *rendering = [template renderObject:data error:&error]; + XCTAssertNil(rendering); + XCTAssertEqualObjects(error.domain, GRMustacheErrorDomain); + XCTAssertEqual(error.code, GRMustacheErrorCodeTemplateNotFound); +} + +- (void)testArity0LambdaInSectionTag +{ + id lambda = [GRMustacheRendering lambda:^{ return @"success"; }]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{#lambda}}<{{.}}>{{/lambda}}" error:NULL]; + id data = @{ @"lambda": lambda }; + NSString *rendering = [template renderObject:data error:NULL]; + XCTAssertEqualObjects(rendering, @""); +} + +- (void)testArity1LambdaInVariableTag +{ + id lambda = [GRMustacheRendering sectionLambda:^(NSString *string) { return string; }]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"<{{lambda}}>" error:NULL]; + id data = @{ @"lambda": lambda }; + NSString *rendering = [template renderObject:data error:NULL]; + XCTAssertEqualObjects(rendering, @"<(Lambda)>"); +} + +@end diff --git a/src/tests/Public/v7.0/GRMustacheParsingErrorsTest.m b/GRMustacheTests/Public/v8.0/GRMustacheParsingErrorsTest.m similarity index 99% rename from src/tests/Public/v7.0/GRMustacheParsingErrorsTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheParsingErrorsTest.m index 5519b9ce..2b79e65c 100644 --- a/src/tests/Public/v7.0/GRMustacheParsingErrorsTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheParsingErrorsTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheParsingErrorsTest : GRMustachePublicAPITest diff --git a/src/tests/Public/v7.0/GRMustachePositionFilterTest.m b/GRMustacheTests/Public/v8.0/GRMustachePositionFilterTest.m similarity index 98% rename from src/tests/Public/v7.0/GRMustachePositionFilterTest.m rename to GRMustacheTests/Public/v8.0/GRMustachePositionFilterTest.m index 9f717bb2..5b6f4e9d 100644 --- a/src/tests/Public/v7.0/GRMustachePositionFilterTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustachePositionFilterTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustachePositionFilter : NSObject diff --git a/src/tests/Public/v7.0/GRMustacheRenderingObjectTest.m b/GRMustacheTests/Public/v8.0/GRMustacheRenderingObjectTest.m similarity index 76% rename from src/tests/Public/v7.0/GRMustacheRenderingObjectTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheRenderingObjectTest.m index f1a82426..58bfc15c 100644 --- a/src/tests/Public/v7.0/GRMustacheRenderingObjectTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheRenderingObjectTest.m @@ -20,8 +20,29 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" +#import "GRMustacheTestingDelegate.h" + +@interface GRMustacheImplicitTrueRenderingObject : NSObject +@end + +@implementation GRMustacheImplicitTrueRenderingObject + +- (NSString *)renderForMustacheTag:(GRMustacheTag *)tag context:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error +{ + switch (tag.type) { + case GRMustacheTagTypeVariable: + return @"variable"; + break; + + case GRMustacheTagTypeSection: + return @"section"; + break; + } +} + +@end @interface GRMustacheRenderingObjectTest : GRMustachePublicAPITest @end @@ -324,31 +345,31 @@ - (void)testRenderingObjectCanRenderCurrentContextInDistinctTemplate } } -- (void)testRenderingObjectCanRenderCurrentContextInDistinctTemplateContainingPartial -{ - { - id object = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { - GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{> partial}}" error:NULL]; - return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; - }]; - NSDictionary *partials = @{@"partial": @"{{subject}}"}; - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partials]; - NSDictionary *context = @{ @"object": object, @"subject": @"---" }; - NSString *result = [[repository templateFromString:@"{{object}}" error:nil] renderObject:context error:NULL]; - XCTAssertEqualObjects(result, @"---", @""); - } - { - id object = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { - GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{> partial}}" error:NULL]; - return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; - }]; - NSDictionary *partials = @{@"partial": @"{{subject}}"}; - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partials]; - NSDictionary *context = @{ @"object": object, @"subject": @"---" }; - NSString *result = [[repository templateFromString:@"{{#object}}{{/object}}" error:nil] renderObject:context error:NULL]; - XCTAssertEqualObjects(result, @"---", @""); - } -} +//- (void)testRenderingObjectCanRenderCurrentContextInDistinctTemplateContainingPartial +//{ +// { +// id object = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { +// GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{> partial}}" error:NULL]; +// return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; +// }]; +// NSDictionary *partials = @{@"partial": @"{{subject}}"}; +// GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partials]; +// NSDictionary *context = @{ @"object": object, @"subject": @"---" }; +// NSString *result = [[repository templateFromString:@"{{object}}" error:nil] renderObject:context error:NULL]; +// XCTAssertEqualObjects(result, @"---", @""); +// } +// { +// id object = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { +// GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{> partial}}" error:NULL]; +// return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; +// }]; +// NSDictionary *partials = @{@"partial": @"{{subject}}"}; +// GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partials]; +// NSDictionary *context = @{ @"object": object, @"subject": @"---" }; +// NSString *result = [[repository templateFromString:@"{{#object}}{{/object}}" error:nil] renderObject:context error:NULL]; +// XCTAssertEqualObjects(result, @"---", @""); +// } +//} - (void)testRenderingObjectDoesNotAutomaticallyEntersCurrentContext { @@ -688,92 +709,180 @@ - (void)testTemplateAreNotHTMLEscaped XCTAssertEqualObjects(result, @"&<>&<>", @""); } -- (void)testCurrentTemplateRepositoryIsAvailableForRenderingObjects -{ - NSDictionary *partials = @{ @"partial": @"partial" }; - GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partials]; - id data = @{ @"renderingObject" : [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { - GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{> partial }}" error:NULL]; - return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; - }]}; - GRMustacheTemplate *template = [repo templateFromString:@"{{renderingObject}}" error:NULL]; - NSString *rendering = [template renderObject:data error:NULL]; - XCTAssertEqualObjects(rendering, @"partial"); -} +//- (void)testCurrentTemplateRepositoryIsAvailableForRenderingObjects +//{ +// NSDictionary *partials = @{ @"partial": @"partial" }; +// GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partials]; +// id data = @{ @"renderingObject" : [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { +// GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{> partial }}" error:NULL]; +// return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; +// }]}; +// GRMustacheTemplate *template = [repo templateFromString:@"{{renderingObject}}" error:NULL]; +// NSString *rendering = [template renderObject:data error:NULL]; +// XCTAssertEqualObjects(rendering, @"partial"); +//} +// +//- (void)testCurrentTemplateRepositoryIsUpdatedByDynamicPartials +//{ +// NSDictionary *partials1 = @{ @"template1": @"{{ renderingObject }}|{{ template2 }}", +// @"partial": @"partial1" }; +// GRMustacheTemplateRepository *repo1 = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partials1]; +// +// NSDictionary *partials2 = @{ @"template2": @"{{ renderingObject }}", +// @"partial": @"partial2" }; +// GRMustacheTemplateRepository *repo2 = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partials2]; +// +// id data = @{ @"template2": [repo2 templateNamed:@"template2" error:NULL], +// @"renderingObject" : [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { +// GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{> partial }}" error:NULL]; +// return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; +// }]}; +// GRMustacheTemplate *template = [repo1 templateNamed:@"template1" error:NULL]; +// NSString *rendering = [template renderObject:data error:NULL]; +// XCTAssertEqualObjects(rendering, @"partial1|partial2"); +//} +// +//- (void)testCurrentContentTypeIsAvailableForRenderingObjects +//{ +// id data = @{ @"value": @"&", +// @"renderingObject" : [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { +// GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{ value }}" error:NULL]; +// return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; +// }]}; +// { +// GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{%CONTENT_TYPE:HTML}}{{renderingObject}}" error:NULL]; +// NSString *rendering = [template renderObject:data error:NULL]; +// XCTAssertEqualObjects(rendering, @"&"); +// } +// { +// GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{%CONTENT_TYPE:TEXT}}{{renderingObject}}" error:NULL]; +// NSString *rendering = [template renderObject:data error:NULL]; +// XCTAssertEqualObjects(rendering, @"&"); +// } +//} +// +//- (void)testCurrentContentTypeIsUpdatedByPartials +//{ +// NSDictionary *partialsHTML = @{ @"templateHTML": @"{{ renderingObject }}|{{> templateText }}", +// @"templateText": @"{{% CONTENT_TYPE:TEXT }}{{ renderingObject }}"}; +// GRMustacheTemplateRepository *repoHTML = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partialsHTML]; +// +// id data = @{ @"value": @"&", +// @"renderingObject" : [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { +// GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{ value }}" error:NULL]; +// return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; +// }]}; +// GRMustacheTemplate *template = [repoHTML templateNamed:@"templateHTML" error:NULL]; +// NSString *rendering = [template renderObject:data error:NULL]; +// XCTAssertEqualObjects(rendering, @"&|&"); +//} -- (void)testCurrentTemplateRepositoryIsUpdatedByDynamicPartials +- (void)testCurrentContentTypeIsUpdatedByDynamicPartials { - NSDictionary *partials1 = @{ @"template1": @"{{ renderingObject }}|{{ template2 }}", - @"partial": @"partial1" }; - GRMustacheTemplateRepository *repo1 = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partials1]; + NSDictionary *partialsHTML = @{ @"templateHTML": @"{{ renderingObject }}|{{ templateText }}" }; + GRMustacheTemplateRepository *repoHTML = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partialsHTML]; - NSDictionary *partials2 = @{ @"template2": @"{{ renderingObject }}", - @"partial": @"partial2" }; - GRMustacheTemplateRepository *repo2 = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partials2]; + NSDictionary *partialsText = @{ @"templateText": @"{{ renderingObject }}" }; + GRMustacheTemplateRepository *repo2 = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partialsText]; + repo2.configuration.contentType = GRMustacheContentTypeText; - id data = @{ @"template2": [repo2 templateNamed:@"template2" error:NULL], + id data = @{ @"value": @"&", + @"templateText": [repo2 templateNamed:@"templateText" error:NULL], @"renderingObject" : [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { - GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{> partial }}" error:NULL]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{{ value }}}" error:NULL]; return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; }]}; - GRMustacheTemplate *template = [repo1 templateNamed:@"template1" error:NULL]; + GRMustacheTemplate *template = [repoHTML templateNamed:@"templateHTML" error:NULL]; NSString *rendering = [template renderObject:data error:NULL]; - XCTAssertEqualObjects(rendering, @"partial1|partial2"); + XCTAssertEqualObjects(rendering, @"&|&"); } -- (void)testCurrentContentTypeIsAvailableForRenderingObjects + +- (void)testImplicitTrueRenderingObjects { - id data = @{ @"value": @"&", - @"renderingObject" : [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { - GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{ value }}" error:NULL]; - return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; - }]}; + id object = [[[GRMustacheImplicitTrueRenderingObject alloc] init] autorelease]; + { - GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{%CONTENT_TYPE:HTML}}{{renderingObject}}" error:NULL]; - NSString *rendering = [template renderObject:data error:NULL]; - XCTAssertEqualObjects(rendering, @"&"); + NSString *rendering = [GRMustacheTemplate renderObject:@{ @"object": object } + fromString:@"<{{ object }}>" + error:NULL]; + XCTAssertEqualObjects(rendering, @""); } { - GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{%CONTENT_TYPE:TEXT}}{{renderingObject}}" error:NULL]; - NSString *rendering = [template renderObject:data error:NULL]; - XCTAssertEqualObjects(rendering, @"&"); + NSString *rendering = [GRMustacheTemplate renderObject:@{ @"object": object } + fromString:@"<{{# object }}...{{/ }}>" + error:NULL]; + XCTAssertEqualObjects(rendering, @"
"); + } + { + NSString *rendering = [GRMustacheTemplate renderObject:@{ @"object": object } + fromString:@"<{{^ object }}...{{/ }}>" + error:NULL]; + XCTAssertEqualObjects(rendering, @"<>"); } } -- (void)testCurrentContentTypeIsUpdatedByPartials +- (void)testImplicitTrueRenderingObjectsWithBlocks { - NSDictionary *partialsHTML = @{ @"templateHTML": @"{{ renderingObject }}|{{> templateText }}", - @"templateText": @"{{% CONTENT_TYPE:TEXT }}{{ renderingObject }}"}; - GRMustacheTemplateRepository *repoHTML = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partialsHTML]; + id object = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { + switch (tag.type) { + case GRMustacheTagTypeVariable: + return @"variable"; + break; + + case GRMustacheTagTypeSection: + return @"section"; + break; + } + }]; - id data = @{ @"value": @"&", - @"renderingObject" : [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { - GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{ value }}" error:NULL]; - return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; - }]}; - GRMustacheTemplate *template = [repoHTML templateNamed:@"templateHTML" error:NULL]; + { + NSString *rendering = [GRMustacheTemplate renderObject:@{ @"object": object } + fromString:@"<{{ object }}>" + error:NULL]; + XCTAssertEqualObjects(rendering, @""); + } + { + NSString *rendering = [GRMustacheTemplate renderObject:@{ @"object": object } + fromString:@"<{{# object }}...{{/ }}>" + error:NULL]; + XCTAssertEqualObjects(rendering, @"
"); + } + { + NSString *rendering = [GRMustacheTemplate renderObject:@{ @"object": object } + fromString:@"<{{^ object }}...{{/ }}>" + error:NULL]; + XCTAssertEqualObjects(rendering, @"<>"); + } +} + + +- (void)testDynamicPartialOverride +{ + NSDictionary *templates = @{ @"layout": @"<{{$a}}Default{{subject}}{{/a}},{{$b}}Ignored{{/b}}>", + @"partial": @"[{{#layout}}---{{$b}}Overriden{{subject}}{{/b}}---{{/layout}}]" }; + GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepositoryWithDictionary:templates]; + GRMustacheTemplate *template = [repo templateNamed:@"partial" error:NULL]; + GRMustacheTemplate *layout = [repo templateNamed:@"layout" error:NULL]; + id data = @{ @"layout": layout, @"subject": @"---" }; NSString *rendering = [template renderObject:data error:NULL]; - XCTAssertEqualObjects(rendering, @"&|&"); + XCTAssertEqualObjects(rendering, @"[]"); } -- (void)testCurrentContentTypeIsUpdatedByDynamicPartials +- (void)testArrayOfRenderingObjectsInSectionTagDoesNotNeedExplicitInvocation { - NSDictionary *partialsHTML = @{ @"templateHTML": @"{{ renderingObject }}|{{ templateText }}" }; - GRMustacheTemplateRepository *repoHTML = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partialsHTML]; - - NSDictionary *partialsText = @{ @"templateText": @"{{ renderingObject }}" }; - GRMustacheTemplateRepository *repo2 = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partialsText]; - repo2.configuration.contentType = GRMustacheContentTypeText; + id object1 = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { + NSString *tagRendering = [tag renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; + return [NSString stringWithFormat:@"[1:%@]", tagRendering]; + }]; + id object2 = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { + NSString *tagRendering = [tag renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; + return [NSString stringWithFormat:@"[2:%@]", tagRendering]; + }]; - id data = @{ @"value": @"&", - @"templateText": [repo2 templateNamed:@"templateText" error:NULL], - @"renderingObject" : [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { - GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{{ value }}}" error:NULL]; - return [template renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; - }]}; - GRMustacheTemplate *template = [repoHTML templateNamed:@"templateHTML" error:NULL]; - NSString *rendering = [template renderObject:data error:NULL]; - XCTAssertEqualObjects(rendering, @"&|&"); + id items = @{@"items": @[object1, object2, @YES, @NO] }; + NSString *rendering = [[GRMustacheTemplate templateFromString:@"{{#items}}---{{/items}},{{#items}}{{#.}}---{{/.}}{{/items}}" error:NULL] renderObject:items error:NULL]; + XCTAssertEqualObjects(rendering, @"[1:---][2:---]------,[1:---][2:---]---", @""); } @end diff --git a/src/tests/Public/v7.2/GRMustacheEachFilterTest.m b/GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheEachFilterTest.m similarity index 91% rename from src/tests/Public/v7.2/GRMustacheEachFilterTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheEachFilterTest.m index db642384..e3851731 100644 --- a/src/tests/Public/v7.2/GRMustacheEachFilterTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheEachFilterTest.m @@ -34,7 +34,8 @@ - (void)testGRMustacheEachFilterTriggersRenderingObjectItemsInArray id renderingObject = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { return [NSString stringWithFormat:@"<%@>", [tag renderContentWithContext:context HTMLSafe:HTMLSafe error:error]]; }]; - id data = @{ @"array": @[renderingObject] }; + id data = @{ @"array": @[renderingObject], + @"each": [GRMustache standardEach] }; NSString *rendering = [[GRMustacheTemplate templateFromString:@"{{#each(array)}}{{@index}}{{/}}" error:NULL] renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @"<0>", @""); } @@ -44,7 +45,8 @@ - (void)testGRMustacheEachFilterTriggersRenderingObjectItemsInDictionary id renderingObject = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { return [NSString stringWithFormat:@"<%@>", [tag renderContentWithContext:context HTMLSafe:HTMLSafe error:error]]; }]; - id data = @{ @"dictionary": @{ @"a": renderingObject } }; + id data = @{ @"dictionary": @{ @"a": renderingObject }, + @"each": [GRMustache standardEach] }; NSString *rendering = [[GRMustacheTemplate templateFromString:@"{{#each(dictionary)}}{{@key}}{{/}}" error:NULL] renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @"", @""); } diff --git a/src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheLocalizerTest.m b/GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheLocalizerTest.m similarity index 90% rename from src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheLocalizerTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheLocalizerTest.m index 66457884..0d997295 100644 --- a/src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheLocalizerTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheLocalizerTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheLocalizerTest : GRMustachePublicAPITest { @@ -37,7 +37,8 @@ @implementation GRMustacheLocalizerTest - (void)setUp { - NSString *path = [[self testBundle] pathForResource:@"GRMustacheLocalizerTestBundle" ofType:nil]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + NSString *path = [testBundle pathForResource:@"GRMustacheLocalizerTestBundle" ofType:nil]; self.localizableBundle = [NSBundle bundleWithPath:path]; self.localizer = [[[GRMustacheLocalizer alloc] initWithBundle:self.localizableBundle tableName:nil] autorelease]; } @@ -77,7 +78,8 @@ - (void)testDefaultLocalizerAsFilter { NSString *templateString = @"{{localize(foo)}}"; GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; - id data = @{ @"foo": @"bar" }; + id data = @{ @"foo": @"bar", + @"localize": [[[GRMustacheLocalizer alloc] init] autorelease] }; NSString *rendering = [template renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @"bar", @""); } @@ -86,7 +88,8 @@ - (void)testDefaultLocalizerAsRenderingObject { NSString *templateString = @"{{#localize}}...{{/}}"; GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; - NSString *rendering = [template renderObject:nil error:NULL]; + id data = @{ @"localize": [[[GRMustacheLocalizer alloc] init] autorelease] }; + NSString *rendering = [template renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @"...", @""); } @@ -94,7 +97,8 @@ - (void)testDefaultLocalizerAsRenderingObjectWithArgument { NSString *templateString = @"{{#localize}}..{{foo}}..{{/}}"; GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; - id data = @{ @"foo": @"bar" }; + id data = @{ @"foo": @"bar", + @"localize": [[[GRMustacheLocalizer alloc] init] autorelease] }; NSString *rendering = [template renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @"..bar..", @""); } @@ -103,7 +107,9 @@ - (void)testDefaultLocalizerAsRenderingObjectWithArgumentAndConditions { NSString *templateString = @"{{#localize}}.{{foo}}.{{^false}}{{baz}}{{/}}.{{/}}"; GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; - id data = @{ @"foo": @"bar", @"baz": @"truc" }; + id data = @{ @"foo": @"bar", + @"baz": @"truc", + @"localize": [[[GRMustacheLocalizer alloc] init] autorelease] }; NSString *rendering = [template renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @".bar.truc.", @""); } @@ -230,14 +236,14 @@ - (void)testLocalizerRendersHTMLEscapedValuesOfHTMLTemplates { NSString *templateString = @"{{#localize}}..{{foo}}..{{/}}"; GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; - id data = @{ @"foo": @"&" }; + id data = @{ @"foo": @"&", @"localize": [[[GRMustacheLocalizer alloc] init] autorelease] }; NSString *rendering = [template renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @"..&..", @""); } { NSString *templateString = @"{{#localize}}..{{{foo}}}..{{/}}"; GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; - id data = @{ @"foo": @"&" }; + id data = @{ @"foo": @"&", @"localize": [[[GRMustacheLocalizer alloc] init] autorelease] }; NSString *rendering = [template renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @"..&..", @""); } @@ -248,14 +254,14 @@ - (void)testLocalizerRendersUnescapedValuesOfTextTemplates { NSString *templateString = @"{{% CONTENT_TYPE:TEXT }}{{#localize}}..{{foo}}..{{/}}"; GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; - id data = @{ @"foo": @"&" }; + id data = @{ @"foo": @"&", @"localize": [[[GRMustacheLocalizer alloc] init] autorelease] }; NSString *rendering = [template renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @"..&..", @""); } { NSString *templateString = @"{{% CONTENT_TYPE:TEXT }}{{#localize}}..{{{foo}}}..{{/}}"; GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; - id data = @{ @"foo": @"&" }; + id data = @{ @"foo": @"&", @"localize": [[[GRMustacheLocalizer alloc] init] autorelease] }; NSString *rendering = [template renderObject:data error:NULL]; XCTAssertEqualObjects(rendering, @"..&..", @""); } diff --git a/src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheLocalizerTestBundle/Localizable.strings b/GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheLocalizerTestBundle/Localizable.strings similarity index 100% rename from src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheLocalizerTestBundle/Localizable.strings rename to GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheLocalizerTestBundle/Localizable.strings diff --git a/src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheLocalizerTestBundle/Table.strings b/GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheLocalizerTestBundle/Table.strings similarity index 100% rename from src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheLocalizerTestBundle/Table.strings rename to GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheLocalizerTestBundle/Table.strings diff --git a/src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheNSFormatterTest.m b/GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheNSFormatterTest.m similarity index 99% rename from src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheNSFormatterTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheNSFormatterTest.m index fdf7a7fd..e00fca45 100644 --- a/src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheNSFormatterTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheNSFormatterTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheNSFormatterTest : GRMustachePublicAPITest diff --git a/src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheNSValueTransformerTest.m b/GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheNSValueTransformerTest.m similarity index 97% rename from src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheNSValueTransformerTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheNSValueTransformerTest.m index 9a24f5b0..18707e82 100644 --- a/src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheNSValueTransformerTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheNSValueTransformerTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheNSValueTransformerTest : GRMustachePublicAPITest diff --git a/src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheStandardLibraryTest.m b/GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheStandardLibraryTest.m similarity index 76% rename from src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheStandardLibraryTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheStandardLibraryTest.m index 6d932b54..923ecdb3 100644 --- a/src/tests/Public/v7.0/GRMustacheServicesTest/GRMustacheStandardLibraryTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheServicesTest/GRMustacheStandardLibraryTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheStandardLibraryTest : GRMustachePublicAPITest @@ -28,18 +28,6 @@ @interface GRMustacheStandardLibraryTest : GRMustachePublicAPITest @implementation GRMustacheStandardLibraryTest -- (void)testStandardLibraryExists -{ - XCTAssertNotNil([GRMustache standardLibrary], @""); -} - -- (void)testStandardLibraryHasUppercaseKey -{ - id filter = [[GRMustache standardLibrary] valueForKey:@"uppercase"]; - XCTAssertNotNil(filter, @""); - XCTAssertTrue([filter conformsToProtocol:@protocol(GRMustacheFilter)], @""); -} - - (void)testStandardLibraryHTMLEscapeDoesEscapeNonHTMLSafeRenderingObjects { { @@ -47,8 +35,9 @@ - (void)testStandardLibraryHTMLEscapeDoesEscapeNonHTMLSafeRenderingObjects *HTMLSafe = NO; return @"<"; }]; - id data = @{ @"object": object }; - NSString *rendering = [GRMustacheTemplate renderObject:data fromString:@"{{# HTML.escape }}{{ object }}{{/ }}" error:NULL]; + id data = @{ @"object": object, + @"HTMLEscape": [GRMustache standardHTMLEscape] }; + NSString *rendering = [GRMustacheTemplate renderObject:data fromString:@"{{# HTMLEscape }}{{ object }}{{/ }}" error:NULL]; XCTAssertEqualObjects(rendering, @"&lt;", @""); } { @@ -56,8 +45,9 @@ - (void)testStandardLibraryHTMLEscapeDoesEscapeNonHTMLSafeRenderingObjects *HTMLSafe = NO; return @"<"; }]; - id data = @{ @"object": object }; - NSString *rendering = [GRMustacheTemplate renderObject:data fromString:@"{{# HTML.escape }}{{{ object }}}{{/ }}" error:NULL]; + id data = @{ @"object": object, + @"HTMLEscape": [GRMustache standardHTMLEscape] }; + NSString *rendering = [GRMustacheTemplate renderObject:data fromString:@"{{# HTMLEscape }}{{{ object }}}{{/ }}" error:NULL]; XCTAssertEqualObjects(rendering, @"<", @""); } } @@ -69,8 +59,9 @@ - (void)testStandardLibraryHTMLEscapeDoesEscapeHTMLSafeRenderingObjects *HTMLSafe = YES; return @"
"; }]; - id data = @{ @"object": object }; - NSString *rendering = [GRMustacheTemplate renderObject:data fromString:@"{{# HTML.escape }}{{ object }}{{/ }}" error:NULL]; + id data = @{ @"object": object, + @"HTMLEscape": [GRMustache standardHTMLEscape] }; + NSString *rendering = [GRMustacheTemplate renderObject:data fromString:@"{{# HTMLEscape }}{{ object }}{{/ }}" error:NULL]; XCTAssertEqualObjects(rendering, @"<br>", @""); } { @@ -78,8 +69,9 @@ - (void)testStandardLibraryHTMLEscapeDoesEscapeHTMLSafeRenderingObjects *HTMLSafe = YES; return @"
"; }]; - id data = @{ @"object": object }; - NSString *rendering = [GRMustacheTemplate renderObject:data fromString:@"{{# HTML.escape }}{{{ object }}}{{/ }}" error:NULL]; + id data = @{ @"object": object, + @"HTMLEscape": [GRMustache standardHTMLEscape] }; + NSString *rendering = [GRMustacheTemplate renderObject:data fromString:@"{{# HTMLEscape }}{{{ object }}}{{/ }}" error:NULL]; XCTAssertEqualObjects(rendering, @"<br>", @""); } } @@ -89,8 +81,9 @@ - (void)testStandardLibraryJavascriptEscapeDoesEscapeRenderingObjects id object = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { return @"\"double quotes\" and 'single quotes'"; }]; - id data = @{ @"object": object }; - NSString *rendering = [GRMustacheTemplate renderObject:data fromString:@"{{# javascript.escape }}{{ object }}{{/ }}" error:NULL]; + id data = @{ @"object": object, + @"javascriptEscape": [GRMustache standardJavascriptEscape] }; + NSString *rendering = [GRMustacheTemplate renderObject:data fromString:@"{{# javascriptEscape }}{{ object }}{{/ }}" error:NULL]; XCTAssertEqualObjects(rendering, @"\\u0022double quotes\\u0022 and \\u0027single quotes\\u0027", @""); } @@ -99,8 +92,9 @@ - (void)testStandardLibraryURLEscapeDoesEscapeRenderingObjects id object = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { return @"&"; }]; - id data = @{ @"object": object }; - NSString *rendering = [GRMustacheTemplate renderObject:data fromString:@"{{# URL.escape }}{{ object }}{{/ }}" error:NULL]; + id data = @{ @"object": object, + @"URLEscape": [GRMustache standardURLEscape] }; + NSString *rendering = [GRMustacheTemplate renderObject:data fromString:@"{{# URLEscape }}{{ object }}{{/ }}" error:NULL]; XCTAssertEqualObjects(rendering, @"%26", @""); } diff --git a/src/tests/Public/v7.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest.m b/GRMustacheTests/Public/v8.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest.m similarity index 90% rename from src/tests/Public/v7.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest.m index 5b774f74..a0bf305b 100644 --- a/src/tests/Public/v7.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest.m @@ -20,8 +20,9 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" +#import "GRMustacheTestingDelegate.h" @interface GRMustacheTagDelegateTest : GRMustachePublicAPITest @end @@ -463,12 +464,13 @@ - (void)testTagDescriptionContainsResourceBasedTemplatePath return object; }; - GRMustacheTemplate *template = [GRMustacheTemplate templateFromResource:@"GRMustacheTagDelegateTest" bundle:self.testBundle error:NULL]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromResource:@"GRMustacheTagDelegateTest" bundle:testBundle error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } { @@ -480,13 +482,14 @@ - (void)testTagDescriptionContainsResourceBasedTemplatePath return object; }; - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:self.testBundle]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:testBundle]; GRMustacheTemplate *template = [repository templateNamed:@"GRMustacheTagDelegateTest" error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } } @@ -502,12 +505,13 @@ - (void)testTagDescriptionContainsURLBasedTemplatePath return object; }; - GRMustacheTemplate *template = [GRMustacheTemplate templateFromContentsOfURL:[self.testBundle URLForResource:@"GRMustacheTagDelegateTest" withExtension:@"mustache"] error:NULL]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromContentsOfURL:[testBundle URLForResource:@"GRMustacheTagDelegateTest" withExtension:@"mustache"] error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } { @@ -519,13 +523,14 @@ - (void)testTagDescriptionContainsURLBasedTemplatePath return object; }; - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:[self.testBundle resourceURL]]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:[testBundle resourceURL]]; GRMustacheTemplate *template = [repository templateNamed:@"GRMustacheTagDelegateTest" error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } } @@ -541,12 +546,13 @@ - (void)testTagDescriptionContainsPathBasedTemplatePath return object; }; - GRMustacheTemplate *template = [GRMustacheTemplate templateFromContentsOfFile:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"] error:NULL]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromContentsOfFile:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"] error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } { @@ -558,13 +564,14 @@ - (void)testTagDescriptionContainsPathBasedTemplatePath return object; }; - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:[self.testBundle resourcePath]]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:[testBundle resourcePath]]; GRMustacheTemplate *template = [repository templateNamed:@"GRMustacheTagDelegateTest" error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } } @@ -580,12 +587,13 @@ - (void)testTagDescriptionContainsResourceBasedPartialPath return object; }; - GRMustacheTemplate *template = [GRMustacheTemplate templateFromResource:@"GRMustacheTagDelegateTest_wrapper" bundle:self.testBundle error:NULL]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromResource:@"GRMustacheTagDelegateTest_wrapper" bundle:testBundle error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } { @@ -597,13 +605,14 @@ - (void)testTagDescriptionContainsResourceBasedPartialPath return object; }; - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:self.testBundle]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:testBundle]; GRMustacheTemplate *template = [repository templateNamed:@"GRMustacheTagDelegateTest_wrapper" error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } { @@ -615,13 +624,14 @@ - (void)testTagDescriptionContainsResourceBasedPartialPath return object; }; - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:self.testBundle]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:testBundle]; GRMustacheTemplate *template = [repository templateFromString:@"{{>GRMustacheTagDelegateTest}}" error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } } @@ -637,12 +647,13 @@ - (void)testTagDescriptionContainsURLBasedPartialPath return object; }; - GRMustacheTemplate *template = [GRMustacheTemplate templateFromContentsOfURL:[self.testBundle URLForResource:@"GRMustacheTagDelegateTest_wrapper" withExtension:@"mustache"] error:NULL]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromContentsOfURL:[testBundle URLForResource:@"GRMustacheTagDelegateTest_wrapper" withExtension:@"mustache"] error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } { @@ -654,13 +665,14 @@ - (void)testTagDescriptionContainsURLBasedPartialPath return object; }; - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:[self.testBundle resourceURL]]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:[testBundle resourceURL]]; GRMustacheTemplate *template = [repository templateNamed:@"GRMustacheTagDelegateTest_wrapper" error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } { @@ -672,13 +684,14 @@ - (void)testTagDescriptionContainsURLBasedPartialPath return object; }; - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:[self.testBundle resourceURL]]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:[testBundle resourceURL]]; GRMustacheTemplate *template = [repository templateFromString:@"{{>GRMustacheTagDelegateTest}}" error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } } @@ -694,12 +707,13 @@ - (void)testTagDescriptionContainsPathBasedPartialPath return object; }; - GRMustacheTemplate *template = [GRMustacheTemplate templateFromContentsOfFile:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest_wrapper" ofType:@"mustache"] error:NULL]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplate *template = [GRMustacheTemplate templateFromContentsOfFile:[testBundle pathForResource:@"GRMustacheTagDelegateTest_wrapper" ofType:@"mustache"] error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } { @@ -711,13 +725,14 @@ - (void)testTagDescriptionContainsPathBasedPartialPath return object; }; - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:[self.testBundle resourcePath]]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:[testBundle resourcePath]]; GRMustacheTemplate *template = [repository templateNamed:@"GRMustacheTagDelegateTest_wrapper" error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } { @@ -729,13 +744,14 @@ - (void)testTagDescriptionContainsPathBasedPartialPath return object; }; - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:[self.testBundle resourcePath]]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:[testBundle resourcePath]]; GRMustacheTemplate *template = [repository templateFromString:@"{{>GRMustacheTagDelegateTest}}" error:NULL]; template.baseContext = [template.baseContext contextByAddingTagDelegate:delegate]; [template renderObject:nil error:NULL]; XCTAssertNotNil(description, @""); - NSRange range = [description rangeOfString:[self.testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; + NSRange range = [description rangeOfString:[testBundle pathForResource:@"GRMustacheTagDelegateTest" ofType:@"mustache"]]; XCTAssertTrue(range.location != NSNotFound, @""); } } diff --git a/src/tests/Public/v7.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest_wrapper.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest_wrapper.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest_wrapper.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTagDelegateTest/GRMustacheTagDelegateTest_wrapper.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryDataSourceTest.m b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryDataSourceTest.m similarity index 98% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryDataSourceTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryDataSourceTest.m index 848f92dd..87388090 100644 --- a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryDataSourceTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryDataSourceTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheTemplateRepositoryDataSourceTest : GRMustachePublicAPITest diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest.m b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest.m similarity index 98% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest.m index 077773f4..24a94037 100644 --- a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheTemplateRepositoryTest : GRMustachePublicAPITest diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest/base.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest/base.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest/base.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest/base.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest/partials/partial1.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest/partials/partial1.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest/partials/partial1.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest/partials/partial1.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest/partials/partial2.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest/partials/partial2.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest/partials/partial2.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest/partials/partial2.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file1 b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file1 similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file1 rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file1 diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file1.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file1.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file1.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file1.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file1.txt b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file1.txt similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file1.txt rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file1.txt diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file2 b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file2 similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file2 rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file2 diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file2.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file2.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file2.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file2.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file2.txt b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file2.txt similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file2.txt rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/dir/file2.txt diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file1 b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file1 similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file1 rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file1 diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file1.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file1.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file1.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file1.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file1.txt b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file1.txt similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file1.txt rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file1.txt diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file2 b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file2 similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file2 rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file2 diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file2.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file2.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file2.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file2.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file2.txt b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file2.txt similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file2.txt rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/dir/file2.txt diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file1 b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file1 similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file1 rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file1 diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file1.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file1.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file1.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file1.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file1.txt b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file1.txt similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file1.txt rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file1.txt diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file2 b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file2 similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file2 rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file2 diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file2.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file2.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file2.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file2.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file2.txt b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file2.txt similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file2.txt rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_ISOLatin1/file2.txt diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file1 b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file1 similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file1 rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file1 diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file1.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file1.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file1.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file1.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file1.txt b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file1.txt similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file1.txt rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file1.txt diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file2 b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file2 similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file2 rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file2 diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file2.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file2.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file2.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file2.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file2.txt b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file2.txt similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file2.txt rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/dir/file2.txt diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file1 b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file1 similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file1 rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file1 diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file1.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file1.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file1.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file1.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file1.txt b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file1.txt similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file1.txt rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file1.txt diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file2 b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file2 similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file2 rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file2 diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file2.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file2.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file2.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file2.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file2.txt b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file2.txt similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file2.txt rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/dir/file2.txt diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file1 b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file1 similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file1 rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file1 diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file1.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file1.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file1.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file1.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file1.txt b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file1.txt similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file1.txt rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file1.txt diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file2 b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file2 similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file2 rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file2 diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file2.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file2.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file2.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file2.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file2.txt b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file2.txt similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file2.txt rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryTest_UTF8/file2.txt diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBaseURLTest.m b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBaseURLTest.m similarity index 83% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBaseURLTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBaseURLTest.m index 042d8bc3..c11b0162 100644 --- a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBaseURLTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBaseURLTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheTemplateRepositoryWithBaseURL_Test : GRMustachePublicAPITest @@ -36,7 +36,8 @@ - (void)testTemplateRepositoryWithBaseURL NSString *result; NSError *error; - URL = [self.testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_UTF8" withExtension:nil]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + URL = [testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_UTF8" withExtension:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:URL]; template = [repository templateNamed:@"notFound" error:&error]; @@ -67,49 +68,51 @@ - (void)testTemplateRepositoryWithBaseURL_templateExtension_encoding GRMustacheTemplate *template; NSString *result; - URL = [self.testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_UTF8" withExtension:nil]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + + URL = [testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_UTF8" withExtension:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:URL templateExtension:@"mustache" encoding:NSUTF8StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1.mustache\ndir/é1.mustache\ndir/dir/é1.mustache\ndir/dir/é2.mustache\n\n\ndir/é2.mustache\n\n\né2.mustache\n\n", @""); - URL = [self.testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_UTF8" withExtension:nil]; + URL = [testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_UTF8" withExtension:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:URL templateExtension:@"txt" encoding:NSUTF8StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1.txt\ndir/é1.txt\ndir/dir/é1.txt\ndir/dir/é2.txt\n\n\ndir/é2.txt\n\n\né2.txt\n\n", @""); - URL = [self.testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_UTF8" withExtension:nil]; + URL = [testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_UTF8" withExtension:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:URL templateExtension:@"" encoding:NSUTF8StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1\ndir/é1\ndir/dir/é1\ndir/dir/é2\n\n\ndir/é2\n\n\né2\n\n", @""); - URL = [self.testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_UTF8" withExtension:nil]; + URL = [testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_UTF8" withExtension:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:URL templateExtension:nil encoding:NSUTF8StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1\ndir/é1\ndir/dir/é1\ndir/dir/é2\n\n\ndir/é2\n\n\né2\n\n", @""); - URL = [self.testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" withExtension:nil]; + URL = [testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" withExtension:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:URL templateExtension:@"mustache" encoding:NSISOLatin1StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1.mustache\ndir/é1.mustache\ndir/dir/é1.mustache\ndir/dir/é2.mustache\n\n\ndir/é2.mustache\n\n\né2.mustache\n\n", @""); - URL = [self.testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" withExtension:nil]; + URL = [testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" withExtension:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:URL templateExtension:@"txt" encoding:NSISOLatin1StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1.txt\ndir/é1.txt\ndir/dir/é1.txt\ndir/dir/é2.txt\n\n\ndir/é2.txt\n\n\né2.txt\n\n", @""); - URL = [self.testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" withExtension:nil]; + URL = [testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" withExtension:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:URL templateExtension:@"" encoding:NSISOLatin1StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1\ndir/é1\ndir/dir/é1\ndir/dir/é2\n\n\ndir/é2\n\n\né2\n\n", @""); - URL = [self.testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" withExtension:nil]; + URL = [testBundle URLForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" withExtension:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:URL templateExtension:nil encoding:NSISOLatin1StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; @@ -118,7 +121,9 @@ - (void)testTemplateRepositoryWithBaseURL_templateExtension_encoding - (void)testAbsolutePartialName { - NSURL *URL = [self.testBundle URLForResource:@"GRMustacheTemplateRepositoryTest" withExtension:nil]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + + NSURL *URL = [testBundle URLForResource:@"GRMustacheTemplateRepositoryTest" withExtension:nil]; GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:URL]; GRMustacheTemplate *template = [repository templateNamed:@"base" error:NULL]; NSString *rendering = [template renderObject:nil error:NULL]; diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.m b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.m similarity index 94% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.m index 2a776b7c..7d336414 100644 --- a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheTemplateRepositoryWithBundleTest : GRMustachePublicAPITest @@ -31,7 +31,7 @@ @implementation GRMustacheTemplateRepositoryWithBundleTest - (void)testTemplateRepositoryWithBundle { NSError *error; - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:self.testBundle]; + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:[NSBundle bundleForClass:[self class]]]; { GRMustacheTemplate *template = [repository templateNamed:@"notFound" error:&error]; @@ -59,7 +59,7 @@ - (void)testTemplateRepositoryWithBundle_templateExtension_encoding { NSError *error; { - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:self.testBundle + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:[NSBundle bundleForClass:[self class]] templateExtension:@"text" encoding:NSUTF8StringEncoding]; { @@ -79,7 +79,7 @@ - (void)testTemplateRepositoryWithBundle_templateExtension_encoding } } { - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:self.testBundle + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:[NSBundle bundleForClass:[self class]] templateExtension:@"" encoding:NSUTF8StringEncoding]; { @@ -99,7 +99,7 @@ - (void)testTemplateRepositoryWithBundle_templateExtension_encoding } } { - GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:self.testBundle + GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:[NSBundle bundleForClass:[self class]] templateExtension:nil encoding:NSUTF8StringEncoding]; { diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.text b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.text similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.text rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest.text diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTestResources/partial.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTestResources/partial.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTestResources/partial.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTestResources/partial.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTestResources/sibling.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTestResources/sibling.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTestResources/sibling.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTestResources/sibling.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest_partial b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest_partial similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest_partial rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest_partial diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest_partial.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest_partial.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest_partial.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest_partial.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest_partial.text b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest_partial.text similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest_partial.text rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithBundleTest_partial.text diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithDictionaryTest.m b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithDictionaryTest.m similarity index 98% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithDictionaryTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithDictionaryTest.m index d636bf12..fb50f9fc 100644 --- a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithDictionaryTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithDictionaryTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheTemplateRepositoryWithDictionaryTest : GRMustachePublicAPITest diff --git a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithDirectoryTest.m b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithDirectoryTest.m similarity index 82% rename from src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithDirectoryTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithDirectoryTest.m index 5d44e5e8..0021f264 100644 --- a/src/tests/Public/v7.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithDirectoryTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheTemplateRepositoryTest/GRMustacheTemplateRepositoryWithDirectoryTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheTemplateRepositoryWithDirectory_Test : GRMustachePublicAPITest @@ -36,7 +36,8 @@ - (void)testTemplateRepositoryWithDirectory NSString *result; NSError *error; - directoryPath = [self.testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_UTF8" ofType:nil]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + directoryPath = [testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_UTF8" ofType:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:directoryPath]; template = [repository templateNamed:@"notFound" error:&error]; @@ -63,49 +64,51 @@ - (void)testTemplateRepositoryWithDirectory_templateExtension_encoding GRMustacheTemplate *template; NSString *result; - directoryPath = [self.testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_UTF8" ofType:nil]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + + directoryPath = [testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_UTF8" ofType:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:directoryPath templateExtension:@"mustache" encoding:NSUTF8StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1.mustache\ndir/é1.mustache\ndir/dir/é1.mustache\ndir/dir/é2.mustache\n\n\ndir/é2.mustache\n\n\né2.mustache\n\n", @""); - directoryPath = [self.testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_UTF8" ofType:nil]; + directoryPath = [testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_UTF8" ofType:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:directoryPath templateExtension:@"txt" encoding:NSUTF8StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1.txt\ndir/é1.txt\ndir/dir/é1.txt\ndir/dir/é2.txt\n\n\ndir/é2.txt\n\n\né2.txt\n\n", @""); - directoryPath = [self.testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_UTF8" ofType:nil]; + directoryPath = [testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_UTF8" ofType:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:directoryPath templateExtension:@"" encoding:NSUTF8StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1\ndir/é1\ndir/dir/é1\ndir/dir/é2\n\n\ndir/é2\n\n\né2\n\n", @""); - directoryPath = [self.testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_UTF8" ofType:nil]; + directoryPath = [testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_UTF8" ofType:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:directoryPath templateExtension:nil encoding:NSUTF8StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1\ndir/é1\ndir/dir/é1\ndir/dir/é2\n\n\ndir/é2\n\n\né2\n\n", @""); - directoryPath = [self.testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" ofType:nil]; + directoryPath = [testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" ofType:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:directoryPath templateExtension:@"mustache" encoding:NSISOLatin1StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1.mustache\ndir/é1.mustache\ndir/dir/é1.mustache\ndir/dir/é2.mustache\n\n\ndir/é2.mustache\n\n\né2.mustache\n\n", @""); - directoryPath = [self.testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" ofType:nil]; + directoryPath = [testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" ofType:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:directoryPath templateExtension:@"txt" encoding:NSISOLatin1StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1.txt\ndir/é1.txt\ndir/dir/é1.txt\ndir/dir/é2.txt\n\n\ndir/é2.txt\n\n\né2.txt\n\n", @""); - directoryPath = [self.testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" ofType:nil]; + directoryPath = [testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" ofType:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:directoryPath templateExtension:@"" encoding:NSISOLatin1StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; XCTAssertEqualObjects(result, @"é1\ndir/é1\ndir/dir/é1\ndir/dir/é2\n\n\ndir/é2\n\n\né2\n\n", @""); - directoryPath = [self.testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" ofType:nil]; + directoryPath = [testBundle pathForResource:@"GRMustacheTemplateRepositoryTest_ISOLatin1" ofType:nil]; repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:directoryPath templateExtension:nil encoding:NSISOLatin1StringEncoding]; template = [repository templateNamed:@"file1" error:NULL]; result = [template renderObject:nil error:NULL]; @@ -114,7 +117,8 @@ - (void)testTemplateRepositoryWithDirectory_templateExtension_encoding - (void)testAbsolutePartialName { - NSString *directoryPath = [self.testBundle pathForResource:@"GRMustacheTemplateRepositoryTest" ofType:nil]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + NSString *directoryPath = [testBundle pathForResource:@"GRMustacheTemplateRepositoryTest" ofType:nil]; GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:directoryPath]; GRMustacheTemplate *template = [repository templateNamed:@"base" error:NULL]; NSString *rendering = [template renderObject:nil error:NULL]; diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateExtendBaseContextTest.m b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateExtendBaseContextTest.m similarity index 96% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateExtendBaseContextTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateExtendBaseContextTest.m index a17642e4..18c4e6f8 100644 --- a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateExtendBaseContextTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateExtendBaseContextTest.m @@ -20,8 +20,9 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" +#import "GRMustacheTestingDelegate.h" @interface GRMustacheTemplateExtendBaseContextTest : GRMustachePublicAPITest @end diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.json b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.json similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.json rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.json diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.m b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.m similarity index 94% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.m index f0017dd4..87b92e8c 100644 --- a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheTemplateFromMethodsTest : GRMustachePublicAPITest @@ -66,27 +66,27 @@ @interface GRMustacheTemplateFromMethodsTest() @implementation GRMustacheTemplateFromMethodsTest - (NSString *)templateName { return @"GRMustacheTemplateFromMethodsTest"; } -- (NSURL *)templateURL { return [self.testBundle URLForResource:self.templateName withExtension:@"mustache"]; } +- (NSURL *)templateURL { return [[NSBundle bundleForClass:[self class]] URLForResource:self.templateName withExtension:@"mustache"]; } - (NSString *)templatePath { return [self.templateURL path]; } - (NSString *)templateString { return [NSString stringWithContentsOfFile:self.templatePath encoding:NSUTF8StringEncoding error:NULL]; } - (NSString *)parserErrorTemplateName { return @"GRMustacheTemplateFromMethodsTest_parserError"; } -- (NSURL *)parserErrorTemplateURL { return [self.testBundle URLForResource:self.parserErrorTemplateName withExtension:@"mustache"]; } +- (NSURL *)parserErrorTemplateURL { return [[NSBundle bundleForClass:[self class]] URLForResource:self.parserErrorTemplateName withExtension:@"mustache"]; } - (NSString *)parserErrorTemplatePath { return [self.parserErrorTemplateURL path]; } - (NSString *)parserErrorTemplateString { return [NSString stringWithContentsOfFile:self.parserErrorTemplatePath encoding:NSUTF8StringEncoding error:NULL]; } - (NSString *)parserErrorTemplateWrapperName { return @"GRMustacheTemplateFromMethodsTest_parserErrorWrapper"; } -- (NSURL *)parserErrorTemplateWrapperURL { return [self.testBundle URLForResource:self.parserErrorTemplateWrapperName withExtension:@"mustache"]; } +- (NSURL *)parserErrorTemplateWrapperURL { return [[NSBundle bundleForClass:[self class]] URLForResource:self.parserErrorTemplateWrapperName withExtension:@"mustache"]; } - (NSString *)parserErrorTemplateWrapperPath { return [self.parserErrorTemplateWrapperURL path]; } - (NSString *)parserErrorTemplateWrapperString { return [NSString stringWithContentsOfFile:self.parserErrorTemplateWrapperPath encoding:NSUTF8StringEncoding error:NULL]; } - (NSString *)compilerErrorTemplateName { return @"GRMustacheTemplateFromMethodsTest_compilerError"; } -- (NSURL *)compilerErrorTemplateURL { return [self.testBundle URLForResource:self.compilerErrorTemplateName withExtension:@"mustache"]; } +- (NSURL *)compilerErrorTemplateURL { return [[NSBundle bundleForClass:[self class]] URLForResource:self.compilerErrorTemplateName withExtension:@"mustache"]; } - (NSString *)compilerErrorTemplatePath { return [self.compilerErrorTemplateURL path]; } - (NSString *)compilerErrorTemplateString { return [NSString stringWithContentsOfFile:self.compilerErrorTemplatePath encoding:NSUTF8StringEncoding error:NULL]; } - (NSString *)compilerErrorTemplateWrapperName { return @"GRMustacheTemplateFromMethodsTest_compilerErrorWrapper"; } -- (NSURL *)compilerErrorTemplateWrapperURL { return [self.testBundle URLForResource:self.compilerErrorTemplateWrapperName withExtension:@"mustache"]; } +- (NSURL *)compilerErrorTemplateWrapperURL { return [[NSBundle bundleForClass:[self class]] URLForResource:self.compilerErrorTemplateWrapperName withExtension:@"mustache"]; } - (NSString *)compilerErrorTemplateWrapperPath { return [self.compilerErrorTemplateWrapperURL path]; } - (NSString *)compilerErrorTemplateWrapperString { return [NSString stringWithContentsOfFile:self.compilerErrorTemplateWrapperPath encoding:NSUTF8StringEncoding error:NULL]; } @@ -177,7 +177,7 @@ - (void)test_templateFromContentsOfURL_error - (void)test_templateFromResource_bundle_error { GRMustacheTemplate *template = [GRMustacheTemplate templateFromResource:self.templateName - bundle:self.testBundle + bundle:[NSBundle bundleForClass:[self class]] error:NULL]; GRMustacheTemplateFromMethodsTestSupport *context = [[[GRMustacheTemplateFromMethodsTestSupport alloc] init] autorelease]; context.stringProperty = @"foo"; @@ -275,7 +275,7 @@ - (void)testParserError_templateFromResource_bundle_error { NSError *error; GRMustacheTemplate *template = [GRMustacheTemplate templateFromResource:self.parserErrorTemplateName - bundle:self.testBundle + bundle:[NSBundle bundleForClass:[self class]] error:&error]; XCTAssertNil(template, @""); XCTAssertNotNil(error, @""); @@ -292,7 +292,7 @@ - (void)testParserError_templateFromResource_bundle_error { NSError *error; GRMustacheTemplate *template = [GRMustacheTemplate templateFromResource:self.parserErrorTemplateWrapperName - bundle:self.testBundle + bundle:[NSBundle bundleForClass:[self class]] error:&error]; XCTAssertNil(template, @""); XCTAssertNotNil(error, @""); @@ -397,7 +397,7 @@ - (void)testCompilerError_templateFromResource_bundle_error { NSError *error; GRMustacheTemplate *template = [GRMustacheTemplate templateFromResource:self.compilerErrorTemplateName - bundle:self.testBundle + bundle:[NSBundle bundleForClass:[self class]] error:&error]; XCTAssertNil(template, @""); XCTAssertNotNil(error, @""); @@ -414,7 +414,7 @@ - (void)testCompilerError_templateFromResource_bundle_error { NSError *error; GRMustacheTemplate *template = [GRMustacheTemplate templateFromResource:self.compilerErrorTemplateWrapperName - bundle:self.testBundle + bundle:[NSBundle bundleForClass:[self class]] error:&error]; XCTAssertNil(template, @""); XCTAssertNotNil(error, @""); diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_compilerError.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_compilerError.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_compilerError.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_compilerError.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_compilerErrorWrapper.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_parserError.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_parserError.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_parserError.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_parserError.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateFromMethodsTest_parserErrorWrapper.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.json b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.json similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.json rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.json diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.m b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.m similarity index 97% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.m index b5075335..2ee57f2c 100644 --- a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheTemplateRenderMethodsTest : GRMustachePublicAPITest @@ -50,7 +50,7 @@ @implementation GRMustacheTemplateRenderMethodsTest - (NSURL *)templateURL { - return [self.testBundle URLForResource:self.templateName withExtension:@"mustache"]; + return [[NSBundle bundleForClass:[self class]] URLForResource:self.templateName withExtension:@"mustache"]; } - (NSString *)templatePath diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.mustache b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.mustache similarity index 100% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.mustache rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateRenderMethodsTest.mustache diff --git a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateTemplateRepositoryTest.m b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateTemplateRepositoryTest.m similarity index 97% rename from src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateTemplateRepositoryTest.m rename to GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateTemplateRepositoryTest.m index ba5a3eca..b8f0cdea 100644 --- a/src/tests/Public/v7.0/GRMustacheTemplateTest/GRMustacheTemplateTemplateRepositoryTest.m +++ b/GRMustacheTests/Public/v8.0/GRMustacheTemplateTest/GRMustacheTemplateTemplateRepositoryTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheTemplateTemplateRepositoryTest : GRMustachePublicAPITest diff --git a/GRMustacheTests/Public/v8.0/Suites/groue/GRMustache/GRMustacheSuitesTest.m b/GRMustacheTests/Public/v8.0/Suites/groue/GRMustache/GRMustacheSuitesTest.m new file mode 100644 index 00000000..6f13aff0 --- /dev/null +++ b/GRMustacheTests/Public/v8.0/Suites/groue/GRMustache/GRMustacheSuitesTest.m @@ -0,0 +1,74 @@ +// The MIT License +// +// Copyright (c) 2014 Gwendal Roué +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 +#import "GRMustachePublicAPITest.h" + +@interface GRMustacheSuitesTest : GRMustachePublicAPISuiteTest +@end + +@implementation GRMustacheSuitesTest + +- (void)testGRMustacheSuites +{ + // General + [self runTestsFromResource:@"comments.json" subdirectory:@"Tests/general"]; + [self runTestsFromResource:@"delimiters.json" subdirectory:@"Tests/general"]; + [self runTestsFromResource:@"general.json" subdirectory:@"Tests/general"]; + [self runTestsFromResource:@"partials.json" subdirectory:@"Tests/general"]; + [self runTestsFromResource:@"pragmas.json" subdirectory:@"Tests/general"]; + [self runTestsFromResource:@"sections.json" subdirectory:@"Tests/general"]; + [self runTestsFromResource:@"inverted_sections.json" subdirectory:@"Tests/general"]; + [self runTestsFromResource:@"text_rendering.json" subdirectory:@"Tests/general"]; + [self runTestsFromResource:@"variables.json" subdirectory:@"Tests/general"]; + + // Errors + [self runTestsFromResource:@"expression_parsing_errors.json" subdirectory:@"Tests/errors"]; + [self runTestsFromResource:@"tag_parsing_errors.json" subdirectory:@"Tests/errors"]; + + // Expressions + [self runTestsFromResource:@"compound_keys.json" subdirectory:@"Tests/expressions"]; + [self runTestsFromResource:@"filters.json" subdirectory:@"Tests/expressions"]; + [self runTestsFromResource:@"implicit_iterator.json" subdirectory:@"Tests/expressions"]; + + // Inheritance + [self runTestsFromResource:@"blocks.json" subdirectory:@"Tests/inheritance"]; + [self runTestsFromResource:@"partial_overrides.json" subdirectory:@"Tests/inheritance"]; + + // Standard library + [self runTestsFromResource:@"each.json" subdirectory:@"Tests/standard_library"]; + [self runTestsFromResource:@"HTMLEscape.json" subdirectory:@"Tests/standard_library"]; + [self runTestsFromResource:@"javascriptEscape.json" subdirectory:@"Tests/standard_library"]; + [self runTestsFromResource:@"URLEscape.json" subdirectory:@"Tests/standard_library"]; + [self runTestsFromResource:@"zip.json" subdirectory:@"Tests/standard_library"]; + + // Values + [self runTestsFromResource:@"array.json" subdirectory:@"Tests/values"]; + [self runTestsFromResource:@"bool.json" subdirectory:@"Tests/values"]; + [self runTestsFromResource:@"dictionary.json" subdirectory:@"Tests/values"]; + [self runTestsFromResource:@"missing_value.json" subdirectory:@"Tests/values"]; + [self runTestsFromResource:@"null.json" subdirectory:@"Tests/values"]; + [self runTestsFromResource:@"number.json" subdirectory:@"Tests/values"]; + [self runTestsFromResource:@"string.json" subdirectory:@"Tests/values"]; +} + +@end diff --git a/src/tests/Public/v7.0/Suites/mustache/spec/GRSpecificationSuitesTest.m b/GRMustacheTests/Public/v8.0/Suites/mustache/spec/GRSpecificationSuitesTest.m similarity index 81% rename from src/tests/Public/v7.0/Suites/mustache/spec/GRSpecificationSuitesTest.m rename to GRMustacheTests/Public/v8.0/Suites/mustache/spec/GRSpecificationSuitesTest.m index b28c7b2e..ab3310ca 100644 --- a/src/tests/Public/v7.0/Suites/mustache/spec/GRSpecificationSuitesTest.m +++ b/GRMustacheTests/Public/v8.0/Suites/mustache/spec/GRSpecificationSuitesTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRSpecificationSuitesTest : GRMustachePublicAPITest @@ -40,7 +40,8 @@ - (void)testSpecificationSuites - (void)runTestsFromResource:(NSString *)name subdirectory:(NSString *)subpath { - NSString *path = [[self.testBundle pathForResource:subpath ofType:nil] stringByAppendingPathComponent:name]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + NSString *path = [[testBundle pathForResource:subpath ofType:nil] stringByAppendingPathComponent:name]; NSError *error; NSData *testSuiteData = [NSData dataWithContentsOfFile:path]; @@ -61,8 +62,16 @@ - (void)runTestsFromResource:(NSString *)name subdirectory:(NSString *)subpath NSString *expected = [test objectForKey:@"expected"]; GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDictionary:partialsDictionary]; - GRMustacheTemplate *template = [repository templateFromString:templateString error:NULL]; - NSString *rendering = [template renderObject:data error:NULL]; + NSError *error; + GRMustacheTemplate *template = [repository templateFromString:templateString error:&error]; + if (template == nil && [test[@"desc"] isEqual:@"The empty string should be used when the named partial is not found."]) { + // Ignore this test: it makes sure missing partials don't render. + // In GRMustache, missing partials are an error. + continue; + } + XCTAssertNotNil(template, @"Could not load template %@: %@", templateString, error); + NSString *rendering = [template renderObject:data error:&error]; + XCTAssertNotNil(rendering, @"Could not render template %@: %@", templateString, error); // GRMustache doesn't care about white space rules of the Mustache specification. // Compare rendering and expected rendering, but ignoring white space. diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/box.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/box.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/box.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/box.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/client.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/client.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/client.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/client.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/client.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/client.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/client.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/client.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/div.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/div.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/div.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/div.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/follow.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/follow.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/follow.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/follow.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/follownomenu.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/follownomenu.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/follownomenu.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/follownomenu.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/follownomenu.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/follownomenu.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/follownomenu.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/follownomenu.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/main.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/main.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/main.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/main.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/method.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/method.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/method.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/method.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/multipleextensions.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/multipleextensions.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/multipleextensions.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/multipleextensions.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/multipleextensions.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/multipleextensions.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/multipleextensions.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/multipleextensions.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/nested_inheritance.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/nested_inheritance.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/nested_inheritance.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/nested_inheritance.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/nested_inheritance.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/nested_inheritance.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/nested_inheritance.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/nested_inheritance.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/parentreplace.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/parentreplace.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/parentreplace.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/parentreplace.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsub.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsub.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsub.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsub.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsubpartial.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsubpartial.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsubpartial.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsubpartial.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsubpartial.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsubpartial.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsubpartial.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsubpartial.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsuper.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsuper.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsuper.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/partialsuper.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recurse_base.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recurse_base.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recurse_base.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recurse_base.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial2.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial2.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial2.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial2.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial3.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial3.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial3.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial3.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial_inheritance.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial_inheritance.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial_inheritance.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial_inheritance.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial_inheritance.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial_inheritance.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial_inheritance.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/recursive_partial_inheritance.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/replace.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/replace.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/replace.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/replace.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/replace.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/replace.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/replace.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/replace.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/singlereplace.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/singlereplace.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/singlereplace.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/singlereplace.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/sub.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/sub.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/sub.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/sub.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/sub.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/sub.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/sub.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/sub.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild1.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild1.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild1.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild1.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild1.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild1.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild1.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild1.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild2.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild2.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild2.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild2.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild2.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild2.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild2.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblockchild2.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblocksuper.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblocksuper.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblocksuper.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subblocksuper.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsub.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsub.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsub.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsub.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsub.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsub.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsub.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsub.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild1.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild1.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild1.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild1.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild1.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild1.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild1.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild1.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild2.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild2.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild2.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild2.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild2.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild2.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild2.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild2.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild3.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild3.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild3.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild3.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild3.txt b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild3.txt similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild3.txt rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubchild3.txt diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubmiddle.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubmiddle.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubmiddle.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubmiddle.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubsuper.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubsuper.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubsuper.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/subsubsuper.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/super.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/super.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/super.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/super.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/template.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/template.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/template.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/template.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/tweetbox.html b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/tweetbox.html similarity index 100% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/tweetbox.html rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuites/tweetbox.html diff --git a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuitesTest.m b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuitesTest.m similarity index 96% rename from src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuitesTest.m rename to GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuitesTest.m index 797e56b5..6a35f5a5 100644 --- a/src/tests/Public/v7.0/Suites/spullara/mustache.java/GRMustacheJavaSuitesTest.m +++ b/GRMustacheTests/Public/v8.0/Suites/spullara/mustache.java/GRMustacheJavaSuitesTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRMustacheJavaSuitesTest : GRMustachePublicAPISuiteTest @@ -35,14 +35,16 @@ @implementation GRMustacheJavaSuitesTest - (GRMustacheTemplate *)templateNamed:(NSString *)name { - NSString *directory = [self.testBundle pathForResource:@"GRMustacheJavaSuites" ofType:nil]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + NSString *directory = [testBundle pathForResource:@"GRMustacheJavaSuites" ofType:nil]; GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepositoryWithDirectory:directory templateExtension:@"html" encoding:NSUTF8StringEncoding]; return [repo templateNamed:name error:NULL]; } - (NSString *)expectedRenderingNamed:(NSString *)name { - NSString *directory = [self.testBundle pathForResource:@"GRMustacheJavaSuites" ofType:nil]; + NSBundle *testBundle = [NSBundle bundleForClass:[self class]]; + NSString *directory = [testBundle pathForResource:@"GRMustacheJavaSuites" ofType:nil]; return [NSString stringWithContentsOfFile:[directory stringByAppendingPathComponent:name] encoding:NSUTF8StringEncoding error:NULL]; } diff --git a/src/tests/Public/v7.0/Suites/twitter/hogan.js/GRHoganSuites/inheritable_partials.json b/GRMustacheTests/Public/v8.0/Suites/twitter/hogan.js/GRHoganSuites/inheritable_partials.json similarity index 100% rename from src/tests/Public/v7.0/Suites/twitter/hogan.js/GRHoganSuites/inheritable_partials.json rename to GRMustacheTests/Public/v8.0/Suites/twitter/hogan.js/GRHoganSuites/inheritable_partials.json diff --git a/src/tests/Public/v7.0/Suites/twitter/hogan.js/GRHoganSuitesTest.m b/GRMustacheTests/Public/v8.0/Suites/twitter/hogan.js/GRHoganSuitesTest.m similarity index 98% rename from src/tests/Public/v7.0/Suites/twitter/hogan.js/GRHoganSuitesTest.m rename to GRMustacheTests/Public/v8.0/Suites/twitter/hogan.js/GRHoganSuitesTest.m index 35e8bad7..6890ad1e 100644 --- a/src/tests/Public/v7.0/Suites/twitter/hogan.js/GRHoganSuitesTest.m +++ b/GRMustacheTests/Public/v8.0/Suites/twitter/hogan.js/GRHoganSuitesTest.m @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 +#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_8_0 #import "GRMustachePublicAPITest.h" @interface GRHoganSuitesTest : GRMustachePublicAPISuiteTest diff --git a/src/tests/vendor/blach/NSJSONSerialization-Comments/LICENSE b/GRMustacheTests/vendor/blach/NSJSONSerialization-Comments/LICENSE similarity index 100% rename from src/tests/vendor/blach/NSJSONSerialization-Comments/LICENSE rename to GRMustacheTests/vendor/blach/NSJSONSerialization-Comments/LICENSE diff --git a/src/tests/vendor/blach/NSJSONSerialization-Comments/NSJSONSerialization+Comments.h b/GRMustacheTests/vendor/blach/NSJSONSerialization-Comments/NSJSONSerialization+Comments.h similarity index 100% rename from src/tests/vendor/blach/NSJSONSerialization-Comments/NSJSONSerialization+Comments.h rename to GRMustacheTests/vendor/blach/NSJSONSerialization-Comments/NSJSONSerialization+Comments.h diff --git a/src/tests/vendor/blach/NSJSONSerialization-Comments/NSJSONSerialization+Comments.m b/GRMustacheTests/vendor/blach/NSJSONSerialization-Comments/NSJSONSerialization+Comments.m similarity index 100% rename from src/tests/vendor/blach/NSJSONSerialization-Comments/NSJSONSerialization+Comments.m rename to GRMustacheTests/vendor/blach/NSJSONSerialization-Comments/NSJSONSerialization+Comments.m diff --git a/src/tests/vendor/blach/NSJSONSerialization-Comments/README.md b/GRMustacheTests/vendor/blach/NSJSONSerialization-Comments/README.md similarity index 100% rename from src/tests/vendor/blach/NSJSONSerialization-Comments/README.md rename to GRMustacheTests/vendor/blach/NSJSONSerialization-Comments/README.md diff --git a/GRMustacheTests/vendor/groue/GRMustacheSpec b/GRMustacheTests/vendor/groue/GRMustacheSpec new file mode 160000 index 00000000..18540f32 --- /dev/null +++ b/GRMustacheTests/vendor/groue/GRMustacheSpec @@ -0,0 +1 @@ +Subproject commit 18540f32b49b16e4248e49e80b434cbafcfc5db9 diff --git a/GRMustacheTests/vendor/mustache/spec b/GRMustacheTests/vendor/mustache/spec new file mode 160000 index 00000000..83b07216 --- /dev/null +++ b/GRMustacheTests/vendor/mustache/spec @@ -0,0 +1 @@ +Subproject commit 83b0721610a4e11832e83df19c73ace3289972b9 diff --git a/Guides/helpers.md b/Guides/helpers.md deleted file mode 100644 index c8fff6aa..00000000 --- a/Guides/helpers.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](rendering_objects.md). diff --git a/Guides/protected_contexts.md b/Guides/protected_contexts.md deleted file mode 100644 index 46929d22..00000000 --- a/Guides/protected_contexts.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](security.md#priority-keys). diff --git a/Guides/proxies.md b/Guides/proxies.md deleted file mode 100644 index c8fff6aa..00000000 --- a/Guides/proxies.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](rendering_objects.md). diff --git a/Guides/runtime/booleans.md b/Guides/runtime/booleans.md deleted file mode 100644 index 616abdec..00000000 --- a/Guides/runtime/booleans.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](../runtime.md). diff --git a/Guides/runtime/context_stack.md b/Guides/runtime/context_stack.md deleted file mode 100644 index 616abdec..00000000 --- a/Guides/runtime/context_stack.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](../runtime.md). diff --git a/Guides/runtime/loops.md b/Guides/runtime/loops.md deleted file mode 100644 index 616abdec..00000000 --- a/Guides/runtime/loops.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](../runtime.md). diff --git a/Guides/runtime_patterns.md b/Guides/runtime_patterns.md deleted file mode 100644 index 97de480f..00000000 --- a/Guides/runtime_patterns.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](view_model.md). diff --git a/Guides/sample_code/counters.md b/Guides/sample_code/counters.md deleted file mode 100644 index 51b583a1..00000000 --- a/Guides/sample_code/counters.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](../standard_library.md#each). diff --git a/Guides/sample_code/indexes.md b/Guides/sample_code/indexes.md deleted file mode 100644 index 51b583a1..00000000 --- a/Guides/sample_code/indexes.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](../standard_library.md#each). diff --git a/Guides/sample_code/localization.md b/Guides/sample_code/localization.md deleted file mode 100644 index 06d2fd9b..00000000 --- a/Guides/sample_code/localization.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](../standard_library.md#localize). diff --git a/Guides/sample_code/number_formatting.md b/Guides/sample_code/number_formatting.md deleted file mode 100644 index 45a4eec8..00000000 --- a/Guides/sample_code/number_formatting.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](../NSFormatter.md). diff --git a/Guides/section_helpers.md b/Guides/section_helpers.md deleted file mode 100644 index c8fff6aa..00000000 --- a/Guides/section_helpers.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](rendering_objects.md). diff --git a/Guides/section_tag_helpers.md b/Guides/section_tag_helpers.md deleted file mode 100644 index c8fff6aa..00000000 --- a/Guides/section_tag_helpers.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](rendering_objects.md). diff --git a/Guides/variable_helpers.md b/Guides/variable_helpers.md deleted file mode 100644 index c8fff6aa..00000000 --- a/Guides/variable_helpers.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](rendering_objects.md). diff --git a/Guides/variable_tag_helpers.md b/Guides/variable_tag_helpers.md deleted file mode 100644 index c8fff6aa..00000000 --- a/Guides/variable_tag_helpers.md +++ /dev/null @@ -1 +0,0 @@ -This document has been [superseded](rendering_objects.md). diff --git a/Makefile b/Makefile deleted file mode 100644 index e7ab79fe..00000000 --- a/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -all: lib/libGRMustache7-iOS.a lib/libGRMustache7-MacOS.a include/GRMustache.h Reference - -lib/libGRMustache7-iOS.a: build/GRMustache7-iOS/Release-iphoneos/libGRMustache7-iOS.a build/GRMustache7-iphonesimulator/Release-iphonesimulator/libGRMustache7-iOS.a build/GRMustache7-iphonesimulator-x86_64/Release-iphonesimulator/libGRMustache7-iOS.a - mkdir -p lib - lipo -create \ - "build/GRMustache7-iphonesimulator/Release-iphonesimulator/libGRMustache7-iOS.a" \ - "build/GRMustache7-iphonesimulator-x86_64/Release-iphonesimulator/libGRMustache7-iOS.a" \ - "build/GRMustache7-iOS/Release-iphoneos/libGRMustache7-iOS.a" \ - -output "lib/libGRMustache7-iOS.a" - -lib/libGRMustache7-MacOS.a: build/MacOS/Release/libGRMustache7-MacOS.a - mkdir -p lib - cp build/MacOS/Release/libGRMustache7-MacOS.a lib/libGRMustache7-MacOS.a - -build/GRMustache7-iOS/Release-iphoneos/libGRMustache7-iOS.a: - xcodebuild -project src/GRMustache.xcodeproj \ - -target GRMustache7-iOS \ - -configuration Release \ - build SYMROOT=../build/GRMustache7-iOS - -build/GRMustache7-iphonesimulator/Release-iphonesimulator/libGRMustache7-iOS.a: - xcodebuild -project src/GRMustache.xcodeproj \ - -target GRMustache7-iOS \ - -configuration Release \ - -sdk iphonesimulator \ - -arch "i386" \ - build SYMROOT=../build/GRMustache7-iphonesimulator - -build/GRMustache7-iphonesimulator-x86_64/Release-iphonesimulator/libGRMustache7-iOS.a: - xcodebuild -project src/GRMustache.xcodeproj \ - -target GRMustache7-iOS \ - -configuration Release \ - -sdk iphonesimulator \ - -arch "x86_64" \ - build SYMROOT=../build/GRMustache7-iphonesimulator-x86_64 - -build/MacOS/Release/libGRMustache7-MacOS.a: - xcodebuild -project src/GRMustache.xcodeproj \ - -target GRMustache7-MacOS \ - -configuration Release \ - build SYMROOT=../build/MacOS - -include/GRMustache.h: build/MacOS/Release/libGRMustache7-MacOS.a - cp -R build/MacOS/Release/include/GRMustache include - -Reference: include/GRMustache.h - # Appledoc does not parse availability macros: create a temporary directory - # with "cleaned" GRMustache headers. - rm -Rf /tmp/GRMustache_include - cp -Rf include /tmp/GRMustache_include - for f in /tmp/GRMustache_include/*; do \ - cat $${f} | sed "s/AVAILABLE_[A-Za-z0-9_]*//g" > $${f}.tmp; \ - mv -f $${f}.tmp $${f}; \ - done - # Generate documentation - mkdir Reference - appledoc --output Reference AppledocSettings.plist /tmp/GRMustache_include || true - # Cleanup - rm -Rf /tmp/GRMustache_include - -clean: - rm -rf build - rm -rf include - rm -rf lib - rm -rf Reference - diff --git a/README.md b/README.md index 38b0c36a..021da6f9 100644 --- a/README.md +++ b/README.md @@ -5,20 +5,950 @@ GRMustache is a [Mustache](http://mustache.github.io) template engine written in It ships with built-in goodies and extensibility hooks that let you avoid the strict minimalism of the genuine Mustache language when you need it. -**April 22, 2015: GRMustache 7.3.2 is out.** [Release notes](RELEASE_NOTES.md) +**April 22, 2015: GRMustache 7.3.2 is out.** [Release notes](CHANGELOG.md) Get release announcements and usage tips: follow [@GRMustache on Twitter](http://twitter.com/GRMustache). -System requirements -------------------- +Features +-------- -GRMustache targets iOS down to version 4.3, MacOS down to 10.6 Snow Leopard (without garbage collection), and only depends on the Foundation framework. +- Support for the full [Mustache syntax](http://mustache.github.io/mustache.5.html) +- Filters, as `{{ uppercase(name) }}` +- Template inheritance, as in [hogan.js](http://twitter.github.com/hogan.js/), [mustache.java](https://github.com/spullara/mustache.java) and [mustache.php](https://github.com/bobthecow/mustache.php). +- Built-in [goodies](Docs/Guides/goodies.md) + + +Requirements +------------ + +- iOS 7.0+ / OSX 10.9+ +- Xcode 7 + +See [GRMustache 7.3.2](https://github.com/groue/GRMustache/tree/v7.3.2) for older systems and Xcode versions. **Swift developers**: You can use GRMustache from Swift, with a limitation: you can only render Objective-C objects. Instead, consider using [GRMustache.swift](https://github.com/groue/GRMustache.swift), a pure Swift implementation of GRMustache. +Usage +----- + +`document.mustache`: + +```mustache +Hello {{name}} +Your beard trimmer will arrive on {{format(date)}}. +{{#late}} +Well, on {{format(realDate)}} because of a Martian attack. +{{/late}} +``` + +```objc +@import GRMustache; + +// Load the `document.mustache` resource of the main bundle +GRMustacheTemplate *template; +template = [GRMustacheTemplate templateFromResource:@"document" + bundle:nil + error:NULL]; + +// Let template format dates with `{{format(...)}}` +NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; +dateFormatter.dateStyle = NSDateFormatterMediumStyle; +[template extendBaseContextWithObject:@{ @"format": dateFormatter }]; + +// The rendered data +id data = @{ + @"name": @"Arthur", + @"date": [NSDate date], + @"realDate": [[NSDate date] dateByAddingTimeInterval:60*60*24*3], + @"late": @YES, +}; + +// The rendering: "Hello Arthur..." +NSString *rendering = [template renderObject:data error:NULL]; +``` + + +Installation +------------ + +### CocoaPods + +[CocoaPods](http://cocoapods.org/) is a dependency manager for Xcode projects. + +To use GRMustache with Cocoapods, specify in your Podfile: + +```ruby +source 'https://github.com/CocoaPods/Specs.git' +use_frameworks! + +pod 'GRMustache', '~> 8.0' +``` + + +### Carthage + +[Carthage](https://github.com/Carthage/Carthage) is another dependency manager for Xcode projects. + +To use GRMustache with Carthage, specify in your Cartfile: + +``` +github "groue/GRMustache" ~> 8.0 +``` + + +### Manually + +Download a copy of GRMustache, embed the `GRMustache.xcodeproj` project in your own project, and add the `GRMustacheOSX` or `GRMustacheiOS` target as a dependency of your own target. + + +Documentation +============= + +External links: + +- [The Mustache Language](http://mustache.github.io/mustache.5.html): the Mustache language itself. You should start here. +- [GRMustache Reference](http://cocoadocs.org/docsets/GRMustache/7.3.2/index.html) on cocoadocs.org + +Rendering templates: + +- [Loading Templates](#loading-templates) +- [Errors](#errors) +- [Mustache Tags Reference](#mustache-tags-reference) +- [The Context Stack and Expressions](#the-context-stack-and-expressions) + +Feeding templates: + +- [Standard Foundation Types Reference](#standard-foundation-types-reference) +- [Custom Types](#custom-types) +- [Lambdas](#lambdas) +- [Filters](#filters) +- [Advanced Boxes](#advanced-boxes) + +Misc: + +- [Built-in goodies](#built-in-goodies) + + +Loading Templates +----------------- + +Templates may come from various sources: + +- **Raw strings:** + + ```objc + GRMustacheTemplate *template; + template = [GRMustacheTemplate + templateFromString:@"Hello {{name}}" + error:NULL]; + ``` + +- **Bundle resources:** + + ```objc + // Loads the "document.mustache" resource of the main bundle: + template = [GRMustacheTemplate + templateFromResource:@"document" + bundle:nil + error:NULL]; + ``` + +- **Files and URLs:** + + ```objc + + template = [GRMustacheTemplate + templateFromContentsOfURL:templateURL + error:NULL]; + template = [GRMustacheTemplate + templateFromContentsOfFile:@"/path/document.mustache" + error:NULL]; + ``` + +- **Template Repositories:** + + Template repositories represent a group of templates. They can be configured independently, and provide neat features like template caching. For example: + + ```objc + // The repository of Bash templates, with extension ".sh": + GRMustacheTemplateRepository *repo; + repo = [GRMustacheTemplateRepository + templateRepositoryWithBundle:[NSBundle mainBundle] + templateExtension:@"sh" + encoding:NSUTF8StringEncoding]; + + // Disable HTML escaping for Bash scripts: + repo.configuration.contentType = GRMustacheContentTypeText; + + // Load the "script.sh" resource: + template = [repo templateNamed:@"script" error:NULL]; + ``` + +For more information, check: + +- [GRMustacheTemplate](http://cocoadocs.org/docsets/GRMustache/7.3.2/Classes/GRMustacheTemplate.html) +- [GRMustacheTemplateRepository](http://cocoadocs.org/docsets/GRMustache/7.3.2/Classes/GRMustacheTemplateRepository.html) + + +Errors +------ + +Not funny, but they happen. Standard NSErrors of domain NSCocoaErrorDomain, etc. may be thrown whenever the library needs to access the file system or other system resource. GRMustache itself can return errors are of domain `GRMustacheErrorDomain`: + +```objc +extern NSString * const GRMustacheRenderingException; +extern NSString * const GRMustacheErrorDomain; + +typedef enum { + GRMustacheErrorCodeParseError, // bad Mustache syntax + GRMustacheErrorCodeTemplateNotFound, // missing template + GRMustacheErrorCodeRenderingError, // bad food +} GRMustacheErrorCode; +``` + +Error handling follows [Cocoa conventions](https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ErrorHandlingCocoa/CreateCustomizeNSError/CreateCustomizeNSError.html). Especially: + +> Success or failure is indicated by the return value of the method. [...] **You should always check that the return value is nil or NO before attempting to do anything with the NSError object.** + +```objc +NSError *error; +GRMustacheTemplate *template; +NSString *rendering; +template = [GRMustacheTemplate templateFromResource:@"document" + bundle:nil + error:&error]; +rendering = [template renderObject:... error:&error] +if (!rendering) { + // Parse error at line 2 of template /path/to/template.mustache: + // Unclosed Mustache tag. + NSLog(@"%@", error); +} +``` + + +Mustache Tags Reference +----------------------- + +Mustache is based on tags: `{{name}}`, `{{#registered}}...{{/registered}}`, `{{>include}}`, etc. + +Each one of them performs its own little task: + +- [Variable Tags](#variable-tags) `{{name}}` render values. +- [Section Tags](#section-tags) `{{#items}}...{{/items}}` perform conditionals, loops, and object scoping. +- [Inverted Section Tags](#inverted-section-tags) `{{^items}}...{{/items}}` are sisters of regular section tags, and render when the other one does not. +- [Partial Tags](#partial-tags) `{{>partial}}` let you include a template in another one. +- [Partial Override Tags](#partial-override-tags) `{{=}}` let you change the tag delimiters. +- [Comment Tags](#comment-tags) let you comment: `{{! Wow. Such comment. }}` +- [Pragma Tags](#pragma-tags) trigger implementation-specific features. + + +### Variable Tags + +A *Variable tag* `{{value}}` renders the value associated with the key `value`, HTML-escaped. To avoid HTML-escaping, use triple mustache tags `{{{value}}}`: + +```objc +NSString *templateString = @"{{value}} - {{{value}}}"; +GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; + +// Mario & Luigi - Mario & Luigi +id data = @{ @"value": @"Mario & Luigi" }; +[template renderObject:data error:NULL]; +``` + + +### Section Tags + +A *Section tag* `{{#value}}...{{/value}}` is a common syntax for three different usages: + +- conditionally render a section. +- loop over a collection. +- dig inside an object. + +Those behaviors are triggered by the value associated with `value`: + + +#### Falsey values + +If the value is *falsey*, the section is not rendered. Falsey values are: + +- missing values +- false boolean +- zero numbers +- empty strings +- empty collections +- NSNull + +For example: + +```objc +NSString *templateString = @"<{{#value}}Truthy{{/value}}>"; +GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; + +// "" +[template renderObject:@{ @"value": @YES } error:NULL]; +// "<>" +[template renderObject:@{ } error:NULL]; // missing value +[template renderObject:@{ @"value": @NO } error:NULL]; // false boolean +``` + + +#### Collections + +If the value is a *collection*, the section is rendered as many times as there are elements in the collection, and inner tags have direct access to the keys of elements: + +Template: + +```mustache +{{# friends }} +- {{# name }} +{{/ friends }} +``` + +Data: + +```objc +@{ + @"friends": @[ + @{ @"name": @"Hulk Hogan" }, + @{ @"name": @"Albert Einstein" }, + @{ @"name": @"Tom Selleck" }, + ] +} +``` + +Rendering: + +``` +- Hulk Hogan +- Albert Einstein +- Tom Selleck +``` + +Collections can be NSArray, NSSet, and any object that conforms to NSFastEnumeration (but NSDictionary). + + +#### Other Values + +If the value is not falsey, and not a collection, then the section is rendered once, and inner tags have direct access to the value's keys: + +Template: + +```mustache +{{# user }} +- {{ name }} +- {{ score }} +{{/ user }} +``` + +Data: + +```objc +@{ + @"user": @{ + @"name": @"Mario" + @"score": @(1500) + } +} +``` + +Rendering: + +``` +- Mario +- 1500 +``` + + +### Inverted Section Tags + +An *Inverted section tag* `{{^value}}...{{/value}}` renders when a regular section `{{#value}}...{{/value}}` would not. You can think of it as the Mustache "else" or "unless". + +Template: + +``` +{{# persons }} +- {{name}} is {{#alive}}alive{{/alive}}{{^alive}}dead{{/alive}}. +{{/ persons }} +{{^ persons }} +Nobody +{{/ persons }} +``` + +Data: + +```objc +@{ + @"persons": @[] +} +``` + +Rendering: + +``` +Nobody +``` + +Data: + +```objc +@{ + @"persons": @[ + @{ @"name": @"Errol Flynn", @"alive": @NO }, + @{ @"name": @"Sacha Baron Cohen", @"alive": @YES }, + ] +} +``` + +Rendering: + +``` +- Errol Flynn is dead. +- Sacha Baron Cohen is alive. +``` + + +### Partial Tags + +A *Partial tag* `{{> partial }}` includes another template, identified by its name. The included template has access to the currently available data: + +`document.mustache`: + +```mustache +Guests: +{{# guests }} + {{> person }} +{{/ guests }} +``` + +`person.mustache`: + +```mustache +{{ name }} +``` + +Data: + +```objc +@{ + @"guests": @[ + @{ @"name": @"Frank Zappa" }, + @{ @"name": @"Lionel Richie" }, + ] +} +``` + +Rendering: + +``` +Guests: +- Frank Zappa +- Lionel Richie +``` + +Recursive partials are supported, but your data should avoid infinite loops. + +Partial lookup depends on the origin of the main template: + + +#### File system + +Partial names are **relative paths** when the template comes from the file system (via paths or URLs): + +```objc +GRMustacheTemplate *template; + +// Load /path/to/document.mustache +NSString *templatePath = @"/path/document.mustache"; +template = [GRMustacheTemplate templateFromContentsOfFile:templatePath error:NULL]; + +// {{> partial }} includes /path/partial.mustache. +// {{> shared/partial }} includes /path/shared/partial.mustache. +``` + +Partials have the same file extension as the main template. + +```objc +// Load /path/document.html +NSString *templatePath = @"/path/document.html"; +template = [GRMustacheTemplate templateFromContentsOfFile:templatePath error:NULL]; + +// {{> partial }} includes /path/partial.html. +``` + +When your templates are stored in a hierarchy of directories, you can use **absolute paths** to partials, with a leading slash. For that, you need a *template repository* which will define the root of absolute partial paths: + +```objc +GRMustacheTemplateRepository *repo; +GRMustacheTemplate *template; + +NSString *templatesPath = @"/path"; +repo = [GRMustacheTemplateRepository templateRepositoryWithDirectory:templatesPath]; +template = [repo templateNamed:... error:NULL]; + +// {{> /shared/partial }} includes /path/shared/partial.mustache. +``` + + +#### Bundle resources + +Partial names are interpreted as **resource names** when the template is a bundle resource: + +```objc +// Load the document.mustache resource from the main bundle +GRMustacheTemplate *template; +template = [GRMustacheTemplate templateFromResource:@"document" bundle:nil error:NULL]; + +// {{> partial }} includes the partial.mustache resource. +``` + + +#### General case + +Generally speaking, partial names are always interpreted by a **Template Repository**: + +- `+[GRMustacheTemplate templateFromResource:bundle:error:]` uses a bundle-based template repository: partial names are resource names. +- `+[GRMustacheTemplate templateFromContentsOfFile:error:]` uses a file-based template repository: partial names are relative paths. +- `+[GRMustacheTemplate templateFromContentsOfURL:error:]` uses a URL-based template repository: partial names are relative URLs. +- `+[GRMustacheTemplate templateFromString:error:]` uses a template repository that can’t load any partial. +- `-[GRMustacheTemplateRepository templateNamed:error:]` uses the partial loading mechanism of the template repository. + +Check [GRMustacheTemplateRepository](http://cocoadocs.org/docsets/GRMustache/7.3.2/Classes/GRMustacheTemplateRepository.html) for more information. + + +#### Dynamic partials + +A tag `{{> partial }}` includes a template, the one that is named "partial". One can say it is **statically** determined, since that partial has already been loaded before the template is rendered: + +```objc +GRMustacheTemplateRepository *repo; +GRMustacheTemplate *template; +repo = [GRMustacheTemplateRepository templateRepositoryWithBundle:nil]; +template = [repo templateFromString:@"{{#user}}{{>partial}}{{/user}}" error:NULL]; + +// Now the `partial.mustache` resource has been loaded. It will be used when +// the template is rendered. Nothing can change that. +``` + +You can also include **dynamic partials**. To do so, use a regular variable tag `{{ partial }}`, and provide the template of your choice for the key "partial" in your rendered data: + +```objc +// A template that delegates the rendering of a user to a partial. +// No partial has been loaded yet. +GRMustacheTemplate *template; +template = [GRMustacheTemplate templateFromString:@"{{#user}}{{partial}}{{/user}}" error:NULL]; + +// The user +id user = @{ @"firstName": @"Georges", @"lastName": @"Brassens", @"occupation": @"Singer" }; + +// Two different partials: +GRMustacheTemplate *partial1 = [GRMustacheTemplate templateFromString:@"{{firstName}} {{lastName}}" error:NULL]; +GRMustacheTemplate *partial2 = [GRMustacheTemplate templateFromString:@"{{occupation}}" error:NULL]; + +// Two different renderings of the same template: +// "Georges Brassens" +[template renderObject:@{ @"user": user, @"partial": partial1 } error:NULL]; +// "Singer" +[template renderObject:@{ @"user": user, @"partial": partial2 } error:NULL]; +``` + + +### Partial Override Tags + +GRMustache supports **Template Inheritance**, like [hogan.js](http://twitter.github.com/hogan.js/), [mustache.java](https://github.com/spullara/mustache.java) and [mustache.php](https://github.com/bobthecow/mustache.php). + +A *Partial Override Tag* `{{< layout }}...{{/ layout }}` includes another template inside the rendered template, just like a regular [partial tag](#partial-tags) `{{> partial}}`. + +However, this time, the included template can contain *blocks*, and the rendered template can override them. Blocks look like sections, but use a dollar sign: `{{$ overrideMe }}...{{/ overrideMe }}`. + +The included template `layout.mustache` below has `title` and `content` blocks that the rendered template can override: + +```mustache + + + {{$ title }}Default title{{/ title }} + + +

{{$ title }}Default title{{/ title }}

+ {{$ content }} + Default content + {{/ content }}} + + +``` + +The rendered template `article.mustache`: + +```mustache +{{< layout }} + + {{$ title }}{{ article.title }}{{/ title }} + + {{$ content }} + {{{ article.html_body }}} +

by {{ article.author }}

+ {{/ content }} + +{{/ layout }} +``` + +```objc +GRMustacheTemplate *template; +template = [GRMustacheTemplate templateFromResource:@"article" bundle:nil error:&error]; + +id data = @{ + @"article": @{ + @"title": @"The 10 most amazing handlebars", + @"html_body": @"

...

", + @"author": @"John Doe" + } +}; +NSString *rendering = [template renderObject:data error:NULL]; +``` + +The rendering is a full HTML page: + +```HTML + + + The 10 most amazing handlebars + + +

The 10 most amazing handlebars

+

...

+

by John Doe

+ + +``` + +A few things to know: + +- A block `{{$ title }}...{{/ title }}` is always rendered, and rendered once. There is no boolean checks, no collection iteration. The "title" identifier is a name that allows other templates to override the block, not a key in your rendered data. + +- A template can contain several partial override tags. + +- A template can override a partial which itself overrides another one. Recursion is possible, but your data should avoid infinite loops. + +- Generally speaking, any part of a template can be refactored with partials and partial override tags, without requiring any modification anywhere else (in other templates that depend on it, or in your code). + + +#### Dynamic partial overrides + +Like a regular partial tag, a partial override tag `{{< layout }}...{{/ layout }}` includes a statically determined template, the very one that is named "layout". + +To override a dynamic partial, use a regular section tag `{{# layout }}...{{/ layout }}`, and provide the template of your choice for the key "layout" in your rendered data. + + +### Set Delimiters Tags + +Mustache tags are generally enclosed by "mustaches" `{{` and `}}`. A *Set Delimiters Tag* can change that, right inside a template. + +``` +Default tags: {{ name }} +{{=<% %>=}} +ERB-styled tags: <% name %> +<%={{ }}=%> +Default tags again: {{ name }} +``` + +There are also APIs for setting those delimiters. Check `tagStartDelimiter` and `tagEndDelimiter` in [GRMustacheConfiguration](http://cocoadocs.org/docsets/GRMustache/7.3.2/Classes/GRMustacheConfiguration.html). + + +### Comment Tags + +`{{! Comment tags }}` are simply not rendered at all. + + +### Pragma Tags + +Several Mustache implementations use *Pragma tags*. They start with a percent `%` and are not rendered at all. Instead, they trigger implementation-specific features. + +GRMustache interprets two pragma tags that set the content type of the template: + +- `{{% CONTENT_TYPE:TEXT }}` +- `{{% CONTENT_TYPE:HTML }}` + +**HTML templates** is the default. They HTML-escape values rendered by variable tags `{{name}}`. + +In a **text template**, there is no HTML-escaping. Both `{{name}}` and `{{{name}}}` have the same rendering. Text templates are globally HTML-escaped when included in HTML templates. + +For a more complete discussion, see the documentation of `contentType` in [GRMustacheConfiguration](http://cocoadocs.org/docsets/GRMustache/7.3.2/Classes/GRMustacheConfiguration.html). + + +The Context Stack and Expressions +--------------------------------- + +### The Context Stack + +Variable and section tags fetch values in the data you feed your templates with: `{{name}}` looks for the key "name" in your input data, or, more precisely, in the *context stack*. + +That context stack grows as the rendering engine enters sections, and shrinks when it leaves. Its top value, pushed by the last entered section, is where a `{{name}}` tag starts looking for the "name" identifier. If this top value does not provide the key, the tag digs further down the stack, until it finds the name it looks for. + +For example, given the template: + +```mustache +{{#family}} +- {{firstName}} {{lastName}} +{{/family}} +``` + +Data: + +```objc +@{ + @"lastName": @"Johnson", + @"family": @[ + @{ @"firstName": @"Peter" }, + @{ @"firstName": @"Barbara" }, + @{ @"firstName": @"Emily", @"lastName": @"Scott" }, + ] +} +``` + +The rendering is: + +``` +- Peter Johnson +- Barbara Johnson +- Emily Scott +``` + +The context stack is usually initialized with the data you render your template with: + +```objc +// The rendering starts with a context stack containing `data` +[template renderObject:data error:NULL]; +``` + +Precisely speaking, a template has a *base context stack* on top of which the rendered data is added. This base context is always available whatever the rendered data. For example: + +```objc +// The base context contains `baseData` +[template extendBaseContextWithObject:baseData]; + +// The rendering starts with a context stack containing `baseData` and `data` +[template renderObject:data error:NULL]; +``` + +The base context is usually a good place to register [filters](#filters). + +See [GRMustacheTemplate](http://cocoadocs.org/docsets/GRMustache/7.3.2/Classes/GRMustacheTemplate.html). + + +### Expressions + +Variable and section tags contain *Expressions*. `name` is an expression, but also `article.title`, and `format(article.modificationDate)`. When a tag renders, it evaluates its expression, and renders the result. + +There are four kinds of expressions: + +- **The dot** `.` aka "Implicit Iterator" in the Mustache lingo: + + Implicit iterator evaluates to the top of the context stack, the value pushed by the last entered section. + + It lets you iterate over collection of strings, for example. `{{#items}}<{{.}}>{{/items}}` renders `<1><2><3>` when given [1,2,3]. + +- **Identifiers** like `name`: + + Evaluation of identifiers like `name` goes through the context stack until a value provides the `name` key. + + Identifiers can not contain white space, dots, parentheses and commas. They can not start with any of those characters: `{}&$#^/<>`. + +- **Compound expressions** like `article.title` and generally `.`: + + This time there is no going through the context stack: `article.title` evaluates to the title of the article, regardless of `title` keys defined by enclosing contexts. + + `.title` (with a leading dot) is a compound expression based on the implicit iterator: it looks for `title` at the top of the context stack. + + Compare these three templates: + + - `...{{# article }}{{ title }}{{/ article }}...` + - `...{{# article }}{{ .title }}{{/ article }}...` + - `...{{ article.title }}...` + + The first will look for `title` anywhere in the context stack, starting with the `article` object. + + The two others are identical: they ensure the `title` key comes from the very `article` object. + +- **Filter expressions** like `format(date)` and generally `(, ...)`: + + [Filters](#filters) are introduced below. + + +Standard Foundation Types Reference +----------------------------------- + +GRMustache comes with built-in support for the following standard Foundation types: + +- [NSArray](#nsarray) +- [NSDictionary](#nsdictionary) +- [NSFastEnumeration](#nsfastenumeration) +- [NSNull](#nsnull) +- [NSNumber](#nsnumber) +- [NSOrderedSet](#nsorderedset) +- [NSSet](#nsset) +- [NSString](#nsstring) + + +### NSArray + +- `{{array}}` renders the concatenation of the renderings of array elements. +- `{{#array}}...{{/array}}` renders as many times as there are elements in the array, pushing them on top of the [context stack](#the-context-stack). +- `{{^array}}...{{/array}}` renders if and only if the array is empty. + +Exposed keys: + +- `array.first`: the first element. +- `array.last`: the last element. +- `array.count`: the number of elements in the array. + + +### NSDictionary + +- `{{dictionary}}` renders the standard description of *dictionary* (not very useful). +- `{{#dictionary}}...{{/dictionary}}` renders once, pushing the dictionary on top of the [context stack](#the-context-stack). +- `{{^dictionary}}...{{/dictionary}}` does not render. + + +### NSFastEnumeration + +- `{{collection}}` renders the concatenation of the renderings of collection elements. +- `{{#collection}}...{{/collection}}` renders as many times as there are elements in the collection, pushing them on top of the [context stack](#the-context-stack). +- `{{^collection}}...{{/collection}}` renders if and only if the collection is empty. + +[NSArray](#nsarray), [NSDictionary](#nsdictionary), [NSOrderedSet](#nsorderedset), and [NSSet](#nsset) all conform to NSFastEnumeration, but have their own custom rendering. + + +### NSNull + +- `{{null}}` does not render. +- `{{#null}}...{{/null}}` does not render. +- `{{^null}}...{{/null}}` renders. + + +### NSNumber + +- `{{number}}` renders the standard description of *number*. +- `{{#number}}...{{/number}}` renders if and only if `[number boolValue]` is YES. +- `{{^number}}...{{/number}}` renders if and only if `[number boolValue]` is NO. + +To format numbers, use `NSNumberFormatter`: + +```objc +NSNumberFormatter *percentFormatter = [[NSNumberFormatter alloc] init]; +percentFormatter.numberStyle = NSNumberFormatterPercentStyle; + +GRMustacheTemplate *template; +NSString *templateString = @"{{ percent(x) }}"; +template = [GRMustacheTemplate templateFromString:templateString error:NULL]; + +// Rendering: 50% +id data = @{ @"x": @(0.5) }; +NSString *rendering = [template renderObject:data error:NULL]; +``` + +[More info on NSFormatter](Docs/Guides/goodies.md#nsformatter). + + +### NSOrderedSet + +- `{{orderedSet}}` renders the concatenation of the renderings of ordered set elements. +- `{{#orderedSet}}...{{/orderedSet}}` renders as many times as there are elements in the ordered set, pushing them on top of the [context stack](#the-context-stack). +- `{{^orderedSet}}...{{/orderedSet}}` renders if and only if the orderedSet is empty. + +Exposed keys: + +- `orderedSet.first`: the first element. +- `orderedSet.last`: the last element. +- `orderedSet.count`: the number of elements in the array. + + +### NSSet + +- `{{set}}` renders the concatenation of the renderings of set elements. +- `{{#set}}...{{/set}}` renders as many times as there are elements in the set, pushing them on top of the [context stack](#the-context-stack). +- `{{^set}}...{{/set}}` renders if and only if the set is empty. + +Exposed keys: + +- `set.first`: any element of the set. +- `set.count`: the number of elements in the set. + + +### NSString + +- `{{string}}` renders *string*, HTML-escaped. +- `{{{string}}}` renders *string*, not HTML-escaped. +- `{{#string}}...{{/string}}` renders if and only if *string* is not empty. +- `{{^string}}...{{/string}}` renders if and only if *string* is empty. + +Exposed keys: + +- `string.length`: the length of the string. + + +Custom Types +------------ + +When an object is not one of the specific ones decribed above, it renders as follows: + +- `{{object}}` renders the `description` method, HTML-escaped. +- `{{{object}}}` renders the `description` method, not HTML-escaped. +- `{{#object}}...{{/object}}` renders once, pushing the object on top of the [context stack](#the-context-stack). +- `{{^object}}...{{/object}}` does not render. + +Templates can access object's **safe keys**: `{{ user.name }}`. Safe keys are declared properties and NSManagedObject attributes. + +```objc +@interface Person : NSObject +@property (nonatomic, copy) NSString *name; +@end + +// Freddy Mercury has a mustache. +Person *person = [Person personWithName: @"Freddy Mercury"]; +NSString *templateString = @"{{name}} has a mustache."; +GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; +NSString *rendering = [template renderObject:person error:NULL]; +``` + +Lambdas +------- + +Mustache lambdas are functions that let you perform custom rendering. There are two kinds of lambdas: those that process section tags, and those that render variable tags. + +```swift +// `{{fullName}}` renders just as `{{firstName}} {{lastName}}.` +id fullName = [GRMustacheRendering lambda:^{ + return @"{{firstName}} {{lastName}}"; +}]; + +// `{{#wrapped}}...{{/wrapped}}` renders the content of the section, wrapped in +// a HTML tag. +id wrapped = [GRMustacheRendering sectionLambda:^(NSString *string) { + return [NSString stringWithFormat:@"%@", string]; +}]; + +// Frank Zappa is awesome. +NSString *templateString = @"{{#wrapped}}{{fullName}} is awesome.{{/wrapped}}"; +GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:templateString error:NULL]; +id data = @{ + @"firstName": @"Frank", + @"lastName": @"Zappa", + @"fullName": fullName, + @"wrapped": wrapped }; +NSString *rendering = [template renderObject:data error:NULL]; +``` + +Lambdas are a special case of custom rendering objects, implemented around the [GRMustacheRendering protocol](http://cocoadocs.org/docsets/GRMustache/7.3.2/Protocols/GRMustacheRendering.html), and [GRMustacheRendering factory methods](http://cocoadocs.org/docsets/GRMustache/7.3.2/Classes/GRMustacheRendering.html). Those give you extra flexibility when you need to perform custom rendering. + + +TO BE CONTINUED +-------------------------------------------------------------------------- + + + How To ------ diff --git a/src/bin/buildGRMustacheAvailabilityMacros b/Scripts/buildGRMustacheAvailabilityMacros similarity index 98% rename from src/bin/buildGRMustacheAvailabilityMacros rename to Scripts/buildGRMustacheAvailabilityMacros index 11404e1e..b6c0f1e5 100755 --- a/src/bin/buildGRMustacheAvailabilityMacros +++ b/Scripts/buildGRMustacheAvailabilityMacros @@ -5,10 +5,10 @@ # Whenever GRMustache major or minor version changes, update the MAJOR_VERSION # and MAX_MINOR_VERSION constants below, and run: # -# src/bin/buildGRMustacheAvailabilityMacros > src/classes/Shared/GRMustacheAvailabilityMacros.h +# Scripts/buildGRMustacheAvailabilityMacros > GRMustache/Shared/GRMustacheAvailabilityMacros.h -MAJOR_VERSION = 7 -MAX_MINOR_VERSION = 3 +MAJOR_VERSION = 8 +MAX_MINOR_VERSION = 0 puts <<-LICENSE // The MIT License diff --git a/TODO.md b/TODO.md index ef8d6cfc..22296f10 100644 --- a/TODO.md +++ b/TODO.md @@ -1,44 +1,29 @@ -## TODO - - -- [ ] a Mustache template linter that can run as a build phase - - warns of syntax errors - - warns of compatibility issues: `{{ a/b }}` syntax is deprecated, used `a.b` instead, etc. -- [ ] Document that errors are no longer logged. -- [X] check that {{^ [NSNull null]|@NO }}...{{.}}...{{/}} does not mess with the {{.}} -- [X] Consider replacing GRMustacheTemplate.partialNode with GRMustacheTemplate.templateAST -- [X] Rename `identifier` to `name` -- [X] Fix link to filters Guide from GRMustacheFilter.h -- [X] Document [GRMustacheTemplateRepository templateRepositoryWithDictionary:] changes (mutability of the dictionary) -- [X] Document [GRMustacheTemplateRepository reloadTemplates] in release notes. -- [X] Test [GRMustacheTemplateRepository reloadTemplates]. -- [X] have [GRMustacheTemplate templateFromString:error:] use current repository & content type, and deprecate GRMustacheTag.templateRepository -- [?] have GRMustacheTemplateRepository cache template from string (for faster rendering objects) -- [X] expose GRMustacheTemplate.templateRepository -- [X] document dropped support for garbage collection -- [X] pass http://twitter.github.com/hogan.js/ inheritable template tests -- [X] pass https://github.com/spullara/mustache.java inheritable template tests -- [X] Update the documentation to de-emphasize KVC exceptions. -- [X] Consistent use of the "template inheritance" wording. -- [X] Rewrite documentation for default values for any keys -- [X] Remove all GRMustacheContext subclassing documentation -- [X] Document secure key access to Foundation classes -- [ ] Document the drop of support for adding context into another context -- [X] Rename "protected context" to "Priority keys" -- [X] change version method -- [X] have overridable section use their own identifiers, not expressions. -- [X] Fetch inspiration from "faster mutable strings" in fotonauts/handlebars-objc (https://github.com/fotonauts/handlebars-objc/commit/f2cbde7e12b1fb594c2807a57bd2ecd2adb839b4) - - [X] for escaping methods - - [X] for rendering buffers -- [X] Remove GRMustacheContext subclasses. -- [X] safe property access (https://github.com/fotonauts/handlebars-objc/blob/master/doc/ContextObjects.md#why-does-handlebars-limit-access-to-some-attributes-that-are-normally-accessible-using-key-value-coding) - - [X] Add GRMustacheContext.allowsAllKeys - - [X] Rename validMustacheKeys to allowedMustacheKeys or something like that. Be consistent with GRMustacheContext.allowsAllKeys - - [X] Tests for secure key access -- [ ] examine dependencies using https://github.com/nst/objc_dep $ python objc_dep.py -x "(GRMustacheAvailabilityMacros)" ~/Documents/git/groue/GRMustache/src/classes/ > ~/Desktop/GRMustacheDeps.dot - -## Nice to have - -- [ ] document migration path from all previous versions to latest version -- [ ] > But they do allow Xcode to see the symbols when creating the final executable and allow the static library symbols to get included in the final DSYM file thereby allowing full symoblication of crash reports. (https://github.com/RestKit/RestKit/issues/1277) +- [ ] #97: In commit 65a6593229ae8bad1630a82ccebb327fb4a9f1e3, Daniel removes a few tests based on Core Data. Make sure that we still have tests for Core Data: attributes are safe keys, and they should be rendered. +- [X] See if dropping GRMustacheSafeKeyAccess and introducing GRMustacheObject could not solve two issues at the same time: + - [X] #66 + - [X] Compatibility with GRMustache.swift on Arrays, Sets, and other standard collections. + - [X] Drop GRMustacheSafeKeyAccess + - [X] Drop default support for objectForKeyedSubscript: + - [X] Add GRMustacheKeyValueCoding +- [X] Share JSON tests suite with GRMustache.swift. + - [X] Use submodule + - [X] Arrays should only have "count", "first" and "last" keys. + - [X] Sets should only have "count", and "first" keys. +- [X] Remove standard library from default context. +- [X] Drop +[GRMustache standardLibrary] +- [X] Drop deprecated items: + - [X] GRMustacheTagTypeInvertedSection + - [X] +[GRMustache renderingObjectForObject:] + - [X] +[GRMustache renderingObjectWithBlock:] + - [X] GRMustacheTag.templateRepository +- [X] Drop GRMustacheVersion and +[GRMustache libraryVersion] +- [X] Dynamic partial overrides `{{# partial }}...{{/ partial }}` +- [X] Check that {{ string.length }} is correctly implemented (NSObject+GRMustacheKeyValueCoding.m) and tested (https://github.com/groue/GRMustacheSpec). +- [X] Remove @synthesize and explicit ivars in headers +- [X] Turn -[GRMustacheKeyValueCoding valueForMustacheKey:] into -[GRMustacheKeyValueCoding hasValue:forMustacheKey:]. This prevents making NSNull a magic value. +- [X] Drop support for unsafe contexts. GRMustacheKeyValueCoding is there if one wants to escape default behavior. +- [?] Drop support for else `{{#a}}{{^a}}{{/a}}`. +- [?] Have Filter and renderingObject APIs closer from GRMustache.swift +- [?] Import "register" vocabulary from GRMustache.swift, instead of "protected objects". +- [?] ARC. Since GRMustache 8 is all about framework and targetting iOS8+ and OSX10.9+, there is no longer any reason for manual memory management. diff --git a/include/GRMustache.h b/include/GRMustache.h deleted file mode 100644 index df385a1e..00000000 --- a/include/GRMustache.h +++ /dev/null @@ -1,174 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" - -@protocol GRMustacheRendering; -@class GRMustacheTag; -@class GRMustacheContext; - -/** - * A C struct that hold GRMustache version information - * - * @since v1.0 - */ -typedef struct { - int major; /**< The major component of the version. */ - int minor; /**< The minor component of the version. */ - int patch; /**< The patch-level component of the version. */ -} GRMustacheVersion; - - -/** - * The GRMustache class provides with global-level information and configuration - * of the GRMustache library. - * - * @since v1.0 - */ -@interface GRMustache: NSObject - -//////////////////////////////////////////////////////////////////////////////// -/// @name Getting the GRMustache version -//////////////////////////////////////////////////////////////////////////////// - -/** - * @return The version of GRMustache as a GRMustacheVersion struct. - * - * @since v7.0 - */ -+ (GRMustacheVersion)libraryVersion AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Preventing NSUndefinedKeyException in Development configuration -//////////////////////////////////////////////////////////////////////////////// - -/** - * Have GRMustache avoid most `NSUndefinedKeyExceptions` when rendering - * templates. - * - * The rendering of a GRMustache template can lead to `NSUndefinedKeyExceptions` - * to be raised, because of the usage of the `valueForKey:` method. Those - * exceptions are nicely handled by GRMustache, and are part of the regular - * rendering of a template. - * - * Unfortunately, Objective-C exceptions have several drawbacks, particularly: - * - * 1. they play badly with autorelease pools, and are reputed to leak memory. - * 2. they usually stop your debugger when you are developping your application. - * - * The first point is indeed a matter of worry: Apple does not guarantee that - * exceptions raised by `valueForKey:` do not leak memory. However, I never had - * any evidence of such a leak from NSObject's implementation. - * - * Should you still worry, we recommend that you avoid the `valueForKey:` method - * altogether. Instead, implement the [keyed subscripting](http://clang.llvm.org/docs/ObjectiveCLiterals.html#dictionary-style-subscripting) - * `objectForKeyedSubscript:` method on objects that you provide to GRMustache. - * - * The second point is valid also: NSUndefinedKeyException raised by template - * rendering may become a real annoyance when you are debugging your project, - * because it's likely you've told your debugger to stop on every Objective-C - * exceptions. - * - * You can avoid them as well: make sure you invoke once, early in your - * application, the `preventNSUndefinedKeyExceptionAttack` method. - * - * Depending on the number of NSUndefinedKeyException that get prevented, you - * will experience a slight performance hit, or a performance improvement. - * - * Since the main use case for this method is to avoid Xcode breaks on rendering - * exceptions, the best practice is to conditionally invoke this method, using - * the [NS_BLOCK_ASSERTIONS](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html) - * that helps identifying the Debug configuration of your targets: - * - * ``` - * #if !defined(NS_BLOCK_ASSERTIONS) - * // Debug configuration: keep GRMustache quiet - * [GRMustache preventNSUndefinedKeyExceptionAttack]; - * #endif - * ``` - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/runtime.md - * - * @since v1.7 - */ -+ (void)preventNSUndefinedKeyExceptionAttack AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Standard Library -//////////////////////////////////////////////////////////////////////////////// - -/** - * @return The GRMustache standard library. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/standard_library.md - * - * @since v6.4 - */ -+ (NSObject *)standardLibrary AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Building rendering objects -//////////////////////////////////////////////////////////////////////////////// - -/** - * This method is deprecated. Use - * `+[GRMustacheRendering renderingObjectForObject:]` instead. - * - * @see GRMustacheRendering class - * - * @since v6.0 - * @deprecated v7.0 - */ -+ (id)renderingObjectForObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED; - -/** - * This method is deprecated. Use - * `+[GRMustacheRendering renderingObjectWithBlock:]` instead. - * - * @see GRMustacheRendering class - * - * @since v6.0 - * @deprecated v7.0 - */ -+ (id)renderingObjectWithBlock:(NSString *(^)(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error))block AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED; - -@end - -#import "GRMustacheTemplate.h" -#import "GRMustacheTagDelegate.h" -#import "GRMustacheTemplateRepository.h" -#import "GRMustacheFilter.h" -#import "GRMustacheError.h" -#import "GRMustacheVersion.h" -#import "GRMustacheContentType.h" -#import "GRMustacheContext.h" -#import "GRMustacheRendering.h" -#import "GRMustacheTag.h" -#import "GRMustacheConfiguration.h" -#import "GRMustacheLocalizer.h" -#import "GRMustacheSafeKeyAccess.h" -#import "NSValueTransformer+GRMustache.h" -#import "NSFormatter+GRMustache.h" diff --git a/include/GRMustacheAvailabilityMacros.h b/include/GRMustacheAvailabilityMacros.h deleted file mode 100644 index 9467640b..00000000 --- a/include/GRMustacheAvailabilityMacros.h +++ /dev/null @@ -1,291 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - - - - - - -/* - * Set up standard GRMustache versions - */ -#define GRMUSTACHE_VERSION_7_0 7000 -#define GRMUSTACHE_VERSION_7_1 7010 -#define GRMUSTACHE_VERSION_7_2 7020 -#define GRMUSTACHE_VERSION_7_3 7030 - - - - - - -/* - * If max GRMustacheVersion not specified, assume 7.3 - */ -#ifndef GRMUSTACHE_VERSION_MAX_ALLOWED -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_3 -#endif - -/* - * if min GRMustacheVersion not specified, assume max - */ -#ifndef GRMUSTACHE_VERSION_MIN_REQUIRED -#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_MAX_ALLOWED -#endif - -/* - * Error on bad values - */ -#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_MIN_REQUIRED -#error GRMUSTACHE_VERSION_MAX_ALLOWED must be >= GRMUSTACHE_VERSION_MIN_REQUIRED -#endif -#if GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_7_0 -#error GRMUSTACHE_VERSION_MIN_REQUIRED must be >= GRMUSTACHE_VERSION_7_0 -#endif - - - - - - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER - * - * Used on declarations introduced in GRMustache 7.0 - */ -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in GRMustache 7.0, - * and deprecated in GRMustache 7.0 - */ -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE - -/* - * DEPRECATED_IN_GRMUSTACHE_VERSION_7_0_AND_LATER - * - * Used on types deprecated in GRMustache 7.0 - */ -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_0_AND_LATER DEPRECATED_ATTRIBUTE - - - - - - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER - * - * Used on declarations introduced in GRMustache 7.1 - */ -#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_7_1 -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_7_1 -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in GRMustache 7.1, - * and deprecated in GRMustache 7.1 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_1 -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_1 - * - * Used on declarations introduced in GRMustache 7.0, - * but later deprecated in GRMustache 7.1 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_1 -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_1 DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_1 AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER -#endif - -/* - * DEPRECATED_IN_GRMUSTACHE_VERSION_7_1_AND_LATER - * - * Used on types deprecated in GRMustache 7.1 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_1 -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_1_AND_LATER DEPRECATED_ATTRIBUTE -#else -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_1_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER - * - * Used on declarations introduced in GRMustache 7.2 - */ -#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_7_2 -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_7_2 -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in GRMustache 7.2, - * and deprecated in GRMustache 7.2 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_2 -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 - * - * Used on declarations introduced in GRMustache 7.0, - * but later deprecated in GRMustache 7.2 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_2 -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 - * - * Used on declarations introduced in GRMustache 7.1, - * but later deprecated in GRMustache 7.2 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_2 -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER -#endif - -/* - * DEPRECATED_IN_GRMUSTACHE_VERSION_7_2_AND_LATER - * - * Used on types deprecated in GRMustache 7.2 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_2 -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_2_AND_LATER DEPRECATED_ATTRIBUTE -#else -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_2_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER - * - * Used on declarations introduced in GRMustache 7.3 - */ -#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_7_3 -#define AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_7_3 -#define AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in GRMustache 7.3, - * and deprecated in GRMustache 7.3 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_3 -#define AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 - * - * Used on declarations introduced in GRMustache 7.0, - * but later deprecated in GRMustache 7.3 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_3 -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 - * - * Used on declarations introduced in GRMustache 7.1, - * but later deprecated in GRMustache 7.3 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_3 -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 - * - * Used on declarations introduced in GRMustache 7.2, - * but later deprecated in GRMustache 7.3 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_3 -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER -#endif - -/* - * DEPRECATED_IN_GRMUSTACHE_VERSION_7_3_AND_LATER - * - * Used on types deprecated in GRMustache 7.3 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_3 -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_3_AND_LATER DEPRECATED_ATTRIBUTE -#else -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_3_AND_LATER -#endif - - - - - - diff --git a/include/GRMustacheContentType.h b/include/GRMustacheContentType.h deleted file mode 100644 index 712f9878..00000000 --- a/include/GRMustacheContentType.h +++ /dev/null @@ -1,53 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" - -/** - * The content type of strings rendered by templates. - * - * @see GRMustacheConfiguration - * @see GRMustacheTemplateRepository - * - * @since v6.2 - */ -typedef NS_ENUM(NSUInteger, GRMustacheContentType) { - /** - * The `GRMustacheContentTypeHTML` content type has templates render HTML. - * HTML template escape the input of variable tags such as `{{name}}`. Use - * triple mustache tags `{{{content}}}` in order to avoid the HTML-escaping. - * - * @since v6.2 - */ - GRMustacheContentTypeHTML AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, - - /** - * The `GRMustacheContentTypeText` content type has templates render text. - * They do not HTML-escape their input: `{{name}}` and `{{{name}}}` have - * identical renderings. - * - * @since v6.2 - */ - GRMustacheContentTypeText AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, -} AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - diff --git a/include/GRMustacheContext.h b/include/GRMustacheContext.h deleted file mode 100644 index e1419756..00000000 --- a/include/GRMustacheContext.h +++ /dev/null @@ -1,482 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" - -@protocol GRMustacheTagDelegate; - -/** - * The GRMustacheContext represents a Mustache rendering context: it internally - * maintains three stacks: - * - * - a *context stack*, that makes it able to provide the current context - * object, and to perform key lookup. - * - * - a *priority context stack*, whose objects define important keys that - * should not be overriden. - * - * - a *tag delegate stack*, so that tag delegates are notified when a Mustache - * tag is rendered. - * - * **Companion guides:** - * - * - https://github.com/groue/GRMustache/blob/master/Guides/view_model.md - * - https://github.com/groue/GRMustache/blob/master/Guides/delegate.md - * - https://github.com/groue/GRMustache/blob/master/Guides/rendering_objects.md - * - https://github.com/groue/GRMustache/blob/master/Guides/security.md - * - * @warning GRMustacheContext is not suitable for subclassing. - * - * @see GRMustacheRendering protocol - */ -@interface GRMustacheContext : NSObject { -@private -#define GRMUSTACHE_STACK_TOP_IVAR(stackName) _ ## stackName ## Object -#define GRMUSTACHE_STACK_PARENT_IVAR(stackName) _ ## stackName ## Parent -#define GRMUSTACHE_STACK_DECLARE_IVARS(stackName, type) \ - GRMustacheContext *GRMUSTACHE_STACK_PARENT_IVAR(stackName); \ - type GRMUSTACHE_STACK_TOP_IVAR(stackName) - - GRMUSTACHE_STACK_DECLARE_IVARS(contextStack, id); - GRMUSTACHE_STACK_DECLARE_IVARS(protectedContextStack, id); - GRMUSTACHE_STACK_DECLARE_IVARS(hiddenContextStack, id); - GRMUSTACHE_STACK_DECLARE_IVARS(tagDelegateStack, id); - GRMUSTACHE_STACK_DECLARE_IVARS(inheritablePartialNodeStack, id); - - BOOL _unsafeKeyAccess; -} - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Creating Rendering Contexts -//////////////////////////////////////////////////////////////////////////////// - -/** - * Returns an initialized empty rendering context. - * - * Empty contexts do not provide any value for any key. - * - * If you wish to use the services provided by the GRMustache standard library, - * you should create a context with the +[GRMustacheContext contextWithObject:] - * method, like this: - * - * ``` - * [GRMustacheContext contextWithObject:[GRMustache standardLibrary]] - * ``` - * - * @return A rendering context. - * - * @see +[GRMustache standardLibrary] - */ -- (instancetype)init; - -/** - * Returns an empty rendering context. - * - * Empty contexts do not provide any value for any key. - * - * If you wish to use the services provided by the GRMustache standard library, - * you should create a context with the +[GRMustacheContext contextWithObject:] - * method, like this: - * - * ``` - * [GRMustacheContext contextWithObject:[GRMustache standardLibrary]] - * ``` - * - * @return A rendering context. - * - * @see contextWithObject: - * @see +[GRMustache standardLibrary] - * - * @since v6.4 - */ -+ (instancetype)context AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a rendering context containing a single object. - * - * Keys defined by _object_ gets available for template rendering. - * - * ``` - * context = [GRMustacheContext contextWithObject:@{ @"name": @"Arthur" }]; - * [context valueForMustacheKey:@"name"]; // @"Arthur" - * ``` - * - * If _object_ conforms to the GRMustacheTemplateDelegate protocol, it is also - * made the top of the tag delegate stack. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/delegate.md - * - * @param object An object - * - * @return A rendering context. - * - * @see contextByAddingObject: - * - * @see GRMustacheTemplateDelegate - * - * @since v6.4 - */ -+ (instancetype)contextWithObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a context containing a single priority object. - * - * Keys defined by _object_ are given priority, which means that they can not be - * overriden by other objects that will eventually enter the context stack. - * - * ``` - * // Create a context with a priority `precious` key - * context = [GRMustacheContext contextWithProtectedObject:@{ @"precious": @"gold" }]; - * - * // Derive a new context by attempting to override the `precious` key: - * context = [context contextByAddingObject:@{ @"precious": @"lead" }]; - * - * // Priority keys can't be overriden - * [context valueForMustacheKey:@"precious"]; // @"gold" - * ``` - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/security.md#priority-keys - * - * @param object An object - * - * @return A rendering context. - * - * @see contextByAddingProtectedObject: - * - * @since v6.4 - */ -+ (instancetype)contextWithProtectedObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a context containing a single tag delegate. - * - * _tagDelegate_ will be notified of the rendering of all tags rendered from the - * receiver or from contexts derived from the receiver. - * - * Unlike contextWithObject: and contextWithProtectedObject:, _tagDelegate_ will - * not provide any key to the templates. It will only be notified of the - * rendering of tags. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/delegate.md - * - * @param tagDelegate A tag delegate - * - * @return A rendering context. - * - * @see GRMustacheTagDelegate - * - * @since v6.4 - */ -+ (instancetype)contextWithTagDelegate:(id)tagDelegate AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Deriving New Contexts -//////////////////////////////////////////////////////////////////////////////// - - -/** - * Returns a new rendering context that is the copy of the receiver, and the - * given object added at the top of the context stack. - * - * Keys defined by _object_ gets available for template rendering, and override - * the values defined by objects already contained in the context stack. Keys - * unknown to _object_ will be looked up deeper in the context stack. - * - * ``` - * context = [GRMustacheContext contextWithObject:@{ @"a": @"ignored", @"b": @"foo" }]; - * context = [context contextByAddingObject:@{ @"a": @"bar" }]; - * - * // `a` is overriden - * [context valueForMustacheKey:@"a"]; // @"bar" - * - * // `b` is inherited - * [context valueForMustacheKey:@"b"]; // @"foo" - * ``` - * - * _object_ can not override keys defined by the objects of the priority - * context stack, though. See contextWithProtectedObject: and - * contextByAddingProtectedObject:. - * - * If _object_ conforms to the GRMustacheTemplateDelegate protocol, it is also - * added at the top of the tag delegate stack. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/delegate.md - * - * @param object An object - * - * @return A new rendering context. - * - * @see GRMustacheTemplateDelegate - * - * @since v6.0 - */ -- (instancetype)contextByAddingObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a new rendering context that is the copy of the receiver, and the - * given object added at the top of the priority context stack. - * - * Keys defined by _object_ are given priority, which means that they can not be - * overriden by other objects that will eventually enter the context stack. - * - * ``` - * // Derive a context with a priority `precious` key - * context = [context contextByAddingProtectedObject:@{ @"precious": @"gold" }]; - * - * // Derive a new context by attempting to override the `precious` key: - * context = [context contextByAddingObject:@{ @"precious": @"lead" }]; - * - * // Priority keys can't be overriden - * [context valueForMustacheKey:@"precious"]; // @"gold" - * ``` - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/security.md#priority-keys - * - * @param object An object - * - * @return A new rendering context. - * - * @since v6.0 - */ -- (instancetype)contextByAddingProtectedObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a new rendering context that is the copy of the receiver, and the - * given object added at the top of the tag delegate stack. - * - * _tagDelegate_ will be notified of the rendering of all tags rendered from the - * receiver or from contexts derived from the receiver. - * - * Unlike contextByAddingObject: and contextByAddingProtectedObject:, - * _tagDelegate_ will not provide any key to the templates. It will only be - * notified of the rendering of tags. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/delegate.md - * - * @param tagDelegate A tag delegate - * - * @return A new rendering context. - * - * @see GRMustacheTagDelegate - * - * @since v6.0 - */ -- (instancetype)contextByAddingTagDelegate:(id)tagDelegate AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Fetching Values from the Context Stack -//////////////////////////////////////////////////////////////////////////////// - -/** - * Returns the object at the top of the receiver's context stack. - * - * The returned object is the same as the one that would be rendered by a - * `{{ . }}` tag. - * - * ``` - * user = ...; - * context = [GRMustacheContext contextWithObject:user]; - * context.topMustacheObject; // user - * ``` - * - * @return The object at the top of the receiver's context stack. - * - * @see contextWithObject: - * @see contextByAddingObject: - * - * @since v6.7 - */ -@property (nonatomic, readonly) id topMustacheObject AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns the value stored in the context stack for the given key. - * - * If you want the value for an full expression such as `user.name` or - * `uppercase(user.name)`, use the hasValue:forMustacheExpression:error: - * method. - * - * ### Search Pattern for valueForMustacheKey - * - * The Mustache value of any object for a given key is defined as: - * - * 1. If the object responds to the `objectForKeyedSubscript:` instance method, - * return the result of this method. - * - * 2. Otherwise, build the list of safe keys: - * a. If the object responds to the `safeMustacheKeys` class method defined - * by the `GRMustacheSafeKeyAccess` protocol, use this method. - * b. Otherwise, use the list of Objective-C properties declared with - * `@property`. - * c. If object is an instance of NSManagedObject, add all the attributes of - * its Core Data entity. - * - * 3. If the key belongs to the list of safe keys, return the result of the - * `valueForKey:` method, unless this method throws NSUndefinedKeyException. - * - * 4. Otherwise, return nil. - * - * Contexts with unsafe key access skip the key validation step. - * - * In this method, the following search pattern is used: - * - * 1. Searches the priority context stack for an object that has a non-nil - * Mustache value for the key. - * - * 2. Otherwise (irrelevant priority context stack), search the context stack - * for an object that has a non-nil Mustache value for the key. - * - * 3. If none of the above situations occurs, returns nil. - * - * **Companion guides:** https://github.com/groue/GRMustache/blob/master/Guides/runtime.md, - * https://github.com/groue/GRMustache/blob/master/Guides/view_model.md - * - * @param key a key such as @"name" - * - * @return The value found in the context stack for the given key. - * - * @see contextWithUnsafeKeyAccess - * @see hasValue:forMustacheExpression:error: - * - * @since v6.6 - */ -- (id)valueForMustacheKey:(NSString *)key AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Evaluates an expression such as `name`, or `uppercase(user.name)`. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/view_model.md - * - * @param value Upon return contains the value of the expression. - * @param expression An expression. - * @param error If there is an error computing the value, upon return - * contains an NSError object that describes the problem. - * - * @return YES if the value could be computed. - * - * @see valueForMustacheKey: - * - * @since v6.8 - */ -- (BOOL)hasValue:(id *)value forMustacheExpression:(NSString *)expression error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Unsafe Key Access -//////////////////////////////////////////////////////////////////////////////// - -/** - * Returns whether this context allows unsafe key access or not. - * - * @since v7.0 - */ -@property (nonatomic, readonly) BOOL unsafeKeyAccess AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a new context with unsafe key access. - * - * Unsafe key access allows this context, and all contexts derived from it, to - * access keys that are normally forbidden: keys that are not declared as - * Objective-C properties, or keys that do not belong to the result of the - * `safeMustacheKeys` method. - * - * Compare: - * - * ``` - * @interface DBRecord : NSObject - * - (void)deleteRecord; - * @end - * - * @implementation DBRecord - * - (void)deleteRecord - * { - *     NSLog(@"Oooops, your record was just deleted!"); - * } - * @end - * - * DBRecord *record = ...; - * NSString *templateString = @"{{ deleteRecord }}"; - * GRMustacheTemplate * template = [GRMustacheTemplate templateWithString:templateString error:NULL]; - * - * // Safe rendering of the dangerous template: record is not deleted. - * [template renderObject:record error:NULL]; - * - * // Unsafe rendering of the dangerous template: record is deleted. - * template.baseContext = [GRMustacheContext contextWithUnsafeKeyAccess]; - * [template renderObject:record error:NULL]; - * ``` - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/security.md - * - * @see GRMustacheSafeKeyAccess - * - * @since v7.0 - */ -+ (instancetype)contextWithUnsafeKeyAccess AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a new rendering context that is the copy of the receiver, with unsafe - * key access. - * - * Unsafe key access allows this context, and all contexts derived from it, to - * access keys that are normally forbidden: keys that are not declared as - * Objective-C properties, or keys that do not belong to the result of the - * `safeMustacheKeys` method. - * - * Compare: - * - * ``` - * @interface DBRecord : NSObject - * - (void)deleteRecord; - * @end - * - * @implementation DBRecord - * - (void)deleteRecord - * { - *     NSLog(@"Oooops, your record was just deleted!"); - * } - * @end - * - * DBRecord *record = ...; - * NSString *templateString = @"{{ deleteRecord }}"; - * GRMustacheTemplate * template = [GRMustacheTemplate templateWithString:templateString error:NULL]; - * - * // Safe rendering of the dangerous template: record is not deleted. - * [template renderObject:record error:NULL]; - * - * // Unsafe rendering of the dangerous template: record is deleted. - * template.baseContext = [template.baseContext contextWithUnsafeKeyAccess]; - * [template renderObject:record error:NULL]; - * ``` - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/security.md - * - * @see GRMustacheSafeKeyAccess - * - * @since v7.0 - */ -- (instancetype)contextWithUnsafeKeyAccess AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -@end diff --git a/include/GRMustacheError.h b/include/GRMustacheError.h deleted file mode 100644 index c988651b..00000000 --- a/include/GRMustacheError.h +++ /dev/null @@ -1,71 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" - - -/** - * The codes of a GRMustache-generated NSError - * - * @since v1.0 - */ -typedef NS_ENUM(NSInteger, GRMustacheErrorCode) { - /** - * The error code for parse errors. - * - * @since v1.0 - */ - GRMustacheErrorCodeParseError AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, - - /** - * The error code for not found templates and partials. - * - * @since v1.0 - */ - GRMustacheErrorCodeTemplateNotFound AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, - - /** - * The error code for not rendering errors. - * - * @since v6.3 - */ - GRMustacheErrorCodeRenderingError AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, - -} AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -/** - * The domain of a GRMustache-generated NSError - * - * @since v1.0 - */ -extern NSString *const GRMustacheErrorDomain AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -/** - * The name of exceptions raised by GRMustache when rendering a template. - * - * @since v5.1 - */ -extern NSString *const GRMustacheRenderingException AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - diff --git a/include/GRMustacheFilter.h b/include/GRMustacheFilter.h deleted file mode 100644 index b89e2eca..00000000 --- a/include/GRMustacheFilter.h +++ /dev/null @@ -1,125 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#ifndef GRMUSTACHE_FILTER -#define GRMUSTACHE_FILTER - -#import -#import "GRMustacheAvailabilityMacros.h" - - -// ============================================================================= -#pragma mark - - - -/** - * The protocol for implementing GRMustache filters. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/filters.md - * - * The responsability of a GRMustacheFilter is to transform a value into - * another. - * - * For example, the tag `{{ uppercase(name) }}` uses a filter object that - * returns the uppercase version of its input. - * - * @since v4.3 - */ -@protocol GRMustacheFilter -@required - -//////////////////////////////////////////////////////////////////////////////// -/// @name Transforming Values -//////////////////////////////////////////////////////////////////////////////// - -/** - * Applies some transformation to its input, and returns the transformed value. - * - * @param object An object to be processed by the filter. - * - * @return A transformed value. - * - * @since v4.3 - */ -- (id)transformedValue:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -@end - - - -// ============================================================================= -#pragma mark - GRMustacheFilter - -/** - * The GRMustacheFilter class helps building mustache filters without writing a - * custom class that conforms to the GRMustacheFilter protocol. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/filters.md - * - * @see GRMustacheFilter protocol - * - * @since v4.3 - */ -@interface GRMustacheFilter : NSObject - -//////////////////////////////////////////////////////////////////////////////// -/// @name Creating Filters -//////////////////////////////////////////////////////////////////////////////// - -/** - * Returns a GRMustacheFilter object that executes the provided block when - * tranforming a value. - * - * @param block The block that transforms its input. - * - * @return a GRMustacheFilter object. - * - * @since v4.3 - * - * @see variadicFilterWithBlock: - */ -+ (id)filterWithBlock:(id(^)(id value))block AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a GRMustacheFilter object that executes the provided block, given an - * array of arguments. - * - * Those filters can evaluate expressions like `{{ f(a,b) }}`. - * - * GRMustache will invoke the filter regardless of the number of arguments in - * the template: `{{ f(a) }}`, `{{ f(a,b) }}` and `{{ f(a,b,c) }}` will provide - * arrays of 1, 2, and 3 arguments respectively. It is your responsability to - * check that you are provided with as many arguments as you expect. - * - * @param block The block that transforms its input. - * - * @return a GRMustacheFilter object. - * - * @since v5.5 - * - * @see filterWithBlock: - */ -+ (id)variadicFilterWithBlock:(id(^)(NSArray *arguments))block AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -@end - -#endif diff --git a/include/GRMustacheSafeKeyAccess.h b/include/GRMustacheSafeKeyAccess.h deleted file mode 100644 index caca2275..00000000 --- a/include/GRMustacheSafeKeyAccess.h +++ /dev/null @@ -1,54 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" - - -/** - * Your data classes should conform to the GRMustacheSafeKeyAccess protocol - * to filter the keys that can be accessed by GRMustache templates. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/runtime/security.md - */ -@protocol GRMustacheSafeKeyAccess - -/** - * List the name of the keys GRMustache can access on this class using the - * `valueForKey:` method. - * - * When objects do not respond to this method, only declared properties can be - * accessed. All properties of Core Data NSManagedObjects are also accessible, - * even without property declaration. - * - * This method is not used for objects responding to `objectForKeyedSubscript:`. - * For those objects, all keys are accessible from templates. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/security.md - * - * @return The set of accessible keys on the class. - * - * @since v7.0 - */ -+ (NSSet *)safeMustacheKeys AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -@end diff --git a/include/GRMustacheTag.h b/include/GRMustacheTag.h deleted file mode 100644 index 64795082..00000000 --- a/include/GRMustacheTag.h +++ /dev/null @@ -1,151 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" - -@class GRMustacheTemplateRepository; -@class GRMustacheContext; - -/** - * The types of Mustache tags - * - * @since v6.0 - */ -typedef NS_ENUM(NSUInteger, GRMustacheTagType) { - /** - * The type for variable tags such as `{{name}}`. - * - * @since v6.0 - */ - GRMustacheTagTypeVariable = 1 << 1 AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, - - /** - * The type for regular and inverted section tags, such as - * `{{#name}}...{{/name}}` and `{{#name}}...{{/name}}`. - * - * @since v6.0 - */ - GRMustacheTagTypeSection = 1 << 2 AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER, - -} AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * The type for inverted section tags such as {{^ name }}...{{/}} - * - * This value is deprecated. - * - * @since v6.0 - * @deprecated v7.2 - */ -AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 static GRMustacheTagType const GRMustacheTagTypeInvertedSection = 1 << 3; - -/** - * GRMustacheTag instances represent Mustache tags that render values, such as - * a variable tag `{{ name }}`, or a section tag `{{# name }}...{{/ })`. - * - * **Companion guides:** - * - * - https://github.com/groue/GRMustache/blob/master/Guides/delegate.md - * - https://github.com/groue/GRMustache/blob/master/Guides/rendering_objects.md - */ -@interface GRMustacheTag: NSObject - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Tag Information -//////////////////////////////////////////////////////////////////////////////// - - -/** - * The type of the tag - */ -@property (nonatomic, readonly) GRMustacheTagType type AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns the literal and unprocessed inner content of the tag. - * - * A section tag such as `{{# name }}inner content{{/}}` returns `inner content`. - * - * Variable tags such as `{{ name }}` have no inner content: their inner - * template string is the empty string. - */ -@property (nonatomic, readonly) NSString *innerTemplateString AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns the description of the tag. - * - * For example: - * - * ``` - * - * ``` - */ -- (NSString *)description; - -//////////////////////////////////////////////////////////////////////////////// -/// @name Methods Dedicated to the GRMustacheRendering Protocol -//////////////////////////////////////////////////////////////////////////////// - -/** - * This method is deprecated. - * - * Replace `[tag.templateRepository templateFromString:... error:...]` with - * `[GRMustacheTemplate templateFromString:... error:...]`. - * - * Replace `[tag.templateRepository templateNamed:... error:...]` with explicit - * invocation of the targeted template repository. - * - * @since v6.0 - * @deprecated v7.0 - */ -@property (nonatomic, readonly) GRMustacheTemplateRepository *templateRepository AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED; - -/** - * Returns the rendering of the tag's inner content, rendering all inner - * Mustache tags with the rendering context argument. - * - * This method is intended for objects conforming to the GRMustacheRendering - * protocol. The following Guides show some use cases for this method: - * - * - https://github.com/groue/GRMustache/blob/master/Guides/delegate.md - * - https://github.com/groue/GRMustache/blob/master/Guides/rendering_objects.md - * - * Note that variable tags such as `{{ name }}` have no inner content, and - * return the empty string. - * - * @param context A context for rendering inner tags. - * @param HTMLSafe Upon return contains YES or NO, depending on the content - * type of the tag's template, as set by the configuration of - * the source template repository. HTML templates yield YES, - * text templates yield NO. - * @param error If there is an error rendering the tag, upon return contains - * an NSError object that describes the problem. - * - * @see GRMustacheRendering - * @see GRMustacheContext - * - * @return The rendering of the tag's inner content. - */ -- (NSString *)renderContentWithContext:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -@end diff --git a/include/GRMustacheTemplateRepository.h b/include/GRMustacheTemplateRepository.h deleted file mode 100644 index 31ab8ca6..00000000 --- a/include/GRMustacheTemplateRepository.h +++ /dev/null @@ -1,576 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" - -@class GRMustacheTemplate; -@class GRMustacheTemplateRepository; -@class GRMustacheConfiguration; - -/** - * The protocol for a GRMustacheTemplateRepository's dataSource. - * - * The dataSource's responsability is to provide Mustache template strings for - * template and partial names. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/template_repositories.md - * - * @see GRMustacheTemplateRepository - * - * @since v1.13 - */ -@protocol GRMustacheTemplateRepositoryDataSource -@required - -/** - * Returns a template ID, that is to say an object that uniquely identifies a - * template or a template partial. - * - * The class of this ID is opaque: your implementation of a - * GRMustacheTemplateRepositoryDataSource would define, for itself, what kind of - * object would identity a template or a partial. - * - * For example, a file-based data source may use NSString objects containing - * paths to the templates. - * - * You should try to choose "human-readable" template IDs, because template IDs - * are embedded in the description of errors that may happen during a template - * processing, in order to help the library user locate, and fix, the faulting - * template. - * - * Whenever relevant, template and partial hierarchies are supported via the - * _baseTemplateID_ parameter: it contains the template ID of the enclosing - * template, or nil when the data source is asked for a template ID for a - * partial that is referred from a raw template string (see - * [GRMustacheTemplateRepository templateFromString:error:]). - * - * Not all data sources have to implement hierarchies: they can simply ignore - * this parameter. - * - * Data sources that implement hierarchies have to implement their own support - * for absolute partial paths. - * - * The return value of this method can be nil: the library user would then - * eventually get an NSError of domain GRMustacheErrorDomain and code - * GRMustacheErrorCodeTemplateNotFound. - * - * @param templateRepository The GRMustacheTemplateRepository asking for a - * template ID. - * @param name The name of the template or template partial. - * @param baseTemplateID The template ID of the enclosing template, or nil. - * - * @return a template ID - * - * @since v1.13 - */ -- (id)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateIDForName:(NSString *)name relativeToTemplateID:(id)baseTemplateID AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Provided with a template ID that comes from - * templateRepository:templateIDForName:relativeToTemplateID:, - * returns a Mustache template string. - * - * For example, a file-based data source may interpret the template ID as a - * NSString object containing paths to the template, and return the file - * content. - * - * As usual, whenever this method returns nil, the _error_ parameter should - * point to a valid NSError. This NSError would eventually reach the library - * user. - * - * @param templateRepository The GRMustacheTemplateRepository asking for a - * Mustache template string. - * @param templateID The template ID of the template - * @param error If there is an error returning a template string, - * upon return contains nil, or an NSError object - * that describes the problem. - * - * @return a Mustache template string - * - * @since v1.13 - */ -- (NSString *)templateRepository:(GRMustacheTemplateRepository *)templateRepository templateStringForTemplateID:(id)templateID error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; -@end - - -/** - * Given a data source that provides Mustache template strings, a - * GRMustacheTemplateRepository's responsability is to provide - * GRMustacheTemplate instances. - * - * You may provide your own template string data source. However common cases - * such as loading templates from URLs, files, bundle resources, and - * dictionaries, are already implemented. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/template_repositories.md - * - * @see GRMustacheTemplate - * @see GRMustacheTemplateRepositoryDataSource - * - * @since v1.13 - */ -@interface GRMustacheTemplateRepository : NSObject { -@private - id _dataSource; - NSMutableDictionary *_templateASTForTemplateID; - GRMustacheConfiguration *_configuration; -} - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Creating Template Repositories -//////////////////////////////////////////////////////////////////////////////// - - -/** - * Returns a GRMustacheTemplateRepository. - * - * Until it is provided with a data source, it is unable to load template by - * names, and unable to process partial tags such as `{{>partial}}`: - * - * ``` - * GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepository]; - * NSError *error; - * - * // Returns nil, and sets error to an NSError of domain - * // GRMustacheErrorDomain, code GRMustacheErrorCodeTemplateNotFound. - * [repository templateNamed:@"foo" error:&error]; - * - * // Returns nil, and sets error to an NSError of domain GRMustacheErrorDomain, - * // code GRMustacheErrorCodeTemplateNotFound. - * [repository templateFromString:@"{{>partial}}" error:&error]; - * ``` - * - * It is, however, able to process Mustache template strings without any - * partial: - * - * ``` - * GRMustacheTemplate *template = [repository templateFromString:@"Hello {{name}}!" error:NULL]; - * ``` - * - * You will give it a data source conforming to the - * GRMustacheTemplateRepositoryDataSource protocol in order to load template and - * partials by name: - * - * ``` - * repository.dataSource = ...; - * - * // Returns a template built from the string provided by the dataSource. - * [repository templateNamed:@"foo" error:NULL]; - * ``` - * - * @return a GRMustacheTemplateRepository - * - * @see GRMustacheTemplateRepositoryDataSource - * - * @since v1.13 - */ -+ (instancetype)templateRepository AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a GRMustacheTemplateRepository that loads Mustache template strings - * from files of extension .mustache, encoded in UTF8, stored in the provided - * directory. - * - * For example: - * - * ``` - * // Creates a repository for templates stored in /path/to/templates - * GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:@"/path/to/templates"]; - * - * // Returns a template for the file stored in - * // /path/to/templates/profile.mustache - * GRMustacheTemplate *template = [repository templateNamed:@"profile" error:NULL]; - * ``` - * - * A partial tag `{{>partial}}` loads a partial template stored in a file named - * `partial.mustache`, located in the enclosing template's directory. - * - * You may use the slash `/`, and `..`, in order to navigate the hierarchical - * file system: `{{>partials/achievements}}` would load - * /path/to/templates/partials/achievements.mustache, if invoked from - * /path/to/templates/profile.mustache. - * - * When you ask the repository to parse a raw template string, partials are - * loaded from the base directory: - * - * ``` - * // The partial would be loaded from - * // /path/to/templates/partials/achievements.mustache - * GRMustacheTemplate *template = [repository templateFromString:@"{{>partials/achievements}}" error:NULL]; - * ``` - * - * @param path The path of the directory that stores templates. - * - * @return a GRMustacheTemplateRepository - * - * @since v1.13 - */ -+ (instancetype)templateRepositoryWithDirectory:(NSString *)path AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a GRMustacheTemplateRepository that loads Mustache template strings - * from files of provided extension, encoded in the provided encoding, stored in - * the provided directory. - * - * For example: - * - * ``` - * // Creates a repository for templates of extension `.txt` stored in - * // /path/to/templates, encoded with NSMacOSRomanStringEncoding: - * GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDirectory:@"/path/to/templates" - *                                                                                        templateExtension:@"txt" - *                                                                                                 encoding:NSMacOSRomanStringEncoding]; - * - * // Returns a template for the file stored in - * // /path/to/templates/profile.txt - * GRMustacheTemplate *template = [repository templateNamed:@"profile" error:NULL]; - * ``` - * - * A partial tag `{{>partial}}` loads a partial template stored in a file named - * `partial.txt`, located in the enclosing template's directory. - * - * You may use the slash `/`, and `..`, in order to navigate the hierarchical - * file system: `{{>partials/achievements}}` would load - * /path/to/templates/partials/achievements.txt, if invoked from - * /path/to/templates/profile.txt. - * - * When you ask the repository to parse a raw template string, partials are - * loaded from the base directory: - * - * ``` - * // The partial would be loaded from - * // /path/to/templates/partials/achievements.txt - * GRMustacheTemplate *template = [repository templateFromString:@"{{>partials/achievements}}" error:NULL]; - * ``` - * - * @param path The path of the directory that stores templates. - * @param ext The extension of template files. - * @param encoding The encoding of template files. - * - * @return a GRMustacheTemplateRepository - * - * @since v1.13 - */ -+ (instancetype)templateRepositoryWithDirectory:(NSString *)path templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a GRMustacheTemplateRepository that loads Mustache template strings - * from files of extension .mustache, encoded in UTF8, stored in the provided - * base URL. - * - * For example: - * - * ``` - * // Creates a repository for templates stored in /path/to/templates - * NSURL *baseURL = [NSURL fileURLWithPath:@"/path/to/templates"]; - * GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:baseURL]; - * - * // Returns a template for the file stored in - * // /path/to/templates/profile.mustache - * GRMustacheTemplate *template = [repository templateNamed:@"profile" error:NULL]; - * ``` - * - * A partial tag `{{>partial}}` loads a partial template stored in a file named - * `partial.mustache`, located in the enclosing template's directory. - * - * You may use the slash `/`, and `..`, in order to navigate the URL - * hierarchical system: `{{>partials/achievements}}` would load - * /path/to/templates/partials/achievements.mustache, if invoked from - * /path/to/templates/profile.mustache. - * - * When you ask the repository to parse a raw template string, partials are - * loaded from the base URL: - * - * ``` - * // The partial would be loaded from - * // /path/to/templates/partials/achievements.mustache - * GRMustacheTemplate *template = [repository templateFromString:@"{{>partials/achievements}}" error:NULL]; - * ``` - * - * @param URL the base URL where to look templates from. - * - * @return a GRMustacheTemplateRepository - * - * @since v1.13 - */ -+ (instancetype)templateRepositoryWithBaseURL:(NSURL *)URL AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a GRMustacheTemplateRepository that loads Mustache template strings - * from files of provided extension, encoded in the provided encoding, stored in - * the provided base URL. - * - * For example: - * - * ``` - * // Creates a repository for templates of extension `.txt` stored in - * // /path/to/templates, encoded with NSMacOSRomanStringEncoding: - * NSURL *baseURL = [NSURL fileURLWithPath:@"/path/to/templates"]; - * GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBaseURL:baseURL - *                                                                                      templateExtension:@"txt" - *                                                                                               encoding:NSMacOSRomanStringEncoding]; - * - * // Returns a template for the file stored in - * // /path/to/templates/profile.txt - * GRMustacheTemplate *template = [repository templateNamed:@"profile" error:NULL]; - * ``` - * - * A partial tag `{{>partial}}` loads a partial template stored in a file named - * `partial.txt`, located in the enclosing template's directory. - * - * You may use the slash `/`, and `..`, in order to navigate the URL - * hierarchical system: `{{>partials/achievements}}` would load - * /path/to/templates/partials/achievements.txt, if invoked from - * /path/to/templates/profile.txt. - * - * When you ask the repository to parse a raw template string, partials are - * loaded from the base URL: - * - * ``` - * // The partial would be loaded from - * // /path/to/templates/partials/achievements.txt - * GRMustacheTemplate *template = [repository templateFromString:@"{{>partials/achievements}}" error:NULL]; - * ``` - * - * @param URL The base URL where to look templates from. - * @param ext The extension of template files. - * @param encoding The encoding of template files. - * - * @return a GRMustacheTemplateRepository - * - * @since v1.13 - */ -+ (instancetype)templateRepositoryWithBaseURL:(NSURL *)URL templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a GRMustacheTemplateRepository that loads Mustache template strings - * from resources of extension .mustache, encoded in UTF8, stored in the - * provided bundle. - * - * For example: - * - * ``` - * // Creates a repository for templates stored in the main bundle: - * GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:[NSBundle mainBundle]]; - * - * // Returns a template for the resource profile.mustache - * GRMustacheTemplate *template = [repository templateNamed:@"profile" error:NULL]; - * ``` - * - * You may provide nil for the bundle parameter: the repository will use the - * main bundle. - * - * A partial tag `{{>partial}}` loads a partial template from the - * `partial.mustache` resource in the bundle. - * - * @param bundle The bundle that stores templates as resources. If nil, the - * main bundle is used. - * - * @return a GRMustacheTemplateRepository - * - * @since v1.13 - */ -+ (instancetype)templateRepositoryWithBundle:(NSBundle *)bundle AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a GRMustacheTemplateRepository that loads Mustache template strings - * from resources of provided extension, encoded in the provided encoding, - * stored in the provided bundle. - * - * For example: - * - * ``` - * // Creates a repository for templates of extension `.txt` stored in the - * // main bundle, encoded with NSMacOSRomanStringEncoding: - * GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithBundle:[NSBundle mainBundle] - *                                                                                     templateExtension:@"txt" - *                                                                                              encoding:NSMacOSRomanStringEncoding]; - * - * // Returns a template for the resource profile.txt - * GRMustacheTemplate *template = [repository templateNamed:@"profile" error:NULL]; - * ``` - * - * You may provide nil for the bundle parameter: the repository will use the - * main bundle. - * - * A partial tag `{{>partial}}` loads a partial template from the `partial.txt` - * resource in the bundle. - * - * @param bundle The bundle that stores templates as resources. - * @param ext The extension of template files. - * @param encoding The encoding of template files. - * - * @return a GRMustacheTemplateRepository - * - * @since v1.13 - */ -+ (instancetype)templateRepositoryWithBundle:(NSBundle *)bundle templateExtension:(NSString *)ext encoding:(NSStringEncoding)encoding AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a GRMustacheTemplateRepository that loads Mustache template strings - * from a dictionary whose keys are template names, and values template strings. - * - * For example: - * - * ``` - * NSDictionary *templates = @{ @"partial": @"It works." }; - * GRMustacheTemplateRepository *repository = [GRMustacheTemplateRepository templateRepositoryWithDictionary:templates]; - * - * // Two templates that render "It works." - * GRMustacheTemplate *template1 = [repository templateNamed:@"partial" error:NULL]; - * GRMustacheTemplate *template2 = [repository templateFromString:@"{{> partial }}" error:NULL]; - * ``` - * - * The dictionary is not copied, but retained: changes to the original - * dictionary may affect the loading of templates. - * - * You can stay immune to any change by providing a copy of the dictionary. - * - * Or you may embrace the changes, and invoke the `reloadTemplates` method - * whenever the changes should be applied. - * - * @param templates A dictionary whose keys are template names, and values - * Mustache template strings. - * - * @return a GRMustacheTemplateRepository - * - * @see reloadTemplates - * - * @since v1.13 - */ -+ (instancetype)templateRepositoryWithDictionary:(NSDictionary *)templates AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Configuring Template Repositories -//////////////////////////////////////////////////////////////////////////////// - -/** - * The configuration for all templates and partials built by the repository. - * - * It is initialized to a copy of [GRMustacheConfiguration defaultConfiguration]. - * - * You can alter the repository's configuration: - * - * ``` - * // All templates loaded from _repo_ will render text, - * // and will not HTML-escape their input. - * GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepositoryWithBundle:nil]; - * repo.configuration.contentType = GRMustacheContentTypeText; - * ``` - * - * You can also create a new configuration, and assign it to the repository: - * - * ``` - * // Create a configuration - * GRMustacheConfiguration *configuration = [GRMustacheConfiguration configuration]; - * configuration.... // setup - * - * GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepositoryWithBundle:nil]; - * repo.configuration = configuration; - * ``` - * - * @see GRMustacheConfiguration - * - * @since v6.2 - */ -@property (nonatomic, copy) GRMustacheConfiguration *configuration AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * The repository's data source. - * - * @see GRMustacheTemplateRepositoryDataSource - * - * @since v1.13 - */ -@property (nonatomic, assign) id dataSource AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Getting Templates out of a Repository -//////////////////////////////////////////////////////////////////////////////// - -/** - * Returns a template identified by its name. - * - * Depending on the way the repository has been created, the name identifies a - * URL, a file path, a key in a dictionary, or whatever is relevant to the - * repository's data source. - * - * @param name The template name - * @param error If there is an error loading or parsing template and - * partials, upon return contains an NSError object that - * describes the problem. - * - * @return a GRMustacheTemplate - * - * @since v1.13 - */ -- (GRMustacheTemplate *)templateNamed:(NSString *)name error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a template built from the provided Mustache template string. - * - * Depending on the way the repository has been created, partial tags such as - * `{{>partial}}` load partial templates from URLs, file paths, keys in a - * dictionary, or whatever is relevant to the repository's data source. - * - * @param templateString A Mustache template string - * @param error If there is an error loading or parsing template and - * partials, upon return contains an NSError object that - * describes the problem. - * - * @return a GRMustacheTemplate - * - * @since v1.13 - */ -- (GRMustacheTemplate *)templateFromString:(NSString *)templateString error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Have the template repository reload its templates. - * - * A template repository *caches* the parsing of its templates. This speeds up - * the loading of already parsed templates. - * - * However, changes to the underlying template strings won't be visible until - * you explicitely ask for a reloading: - * - * ``` - * // May reuse a cached parsing: - * template = [repository templateNamed:@"profile" error:NULL]; - * - * // Forces the template reloading: - * [repository reloadTemplates]; - * template = [repository templateNamed:@"profile" error:NULL]; - * ``` - * - * @warning Previously created instances of GRMustacheTemplate are not reloaded. - * - * @see dataSource - * - * @since v7.0 - */ -- (void)reloadTemplates AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -@end diff --git a/include/GRMustacheVersion.h b/include/GRMustacheVersion.h deleted file mode 100644 index 5d3d2494..00000000 --- a/include/GRMustacheVersion.h +++ /dev/null @@ -1,44 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - - -/** - * The major component of GRMustache version - * - * @since v1.0 - */ -#define GRMUSTACHE_MAJOR_VERSION 7 - -/** - * The minor component of GRMustache version - * - * @since v1.0 - */ -#define GRMUSTACHE_MINOR_VERSION 3 - -/** - * The patch-level component of GRMustache version - * - * @since v1.0 - */ -#define GRMUSTACHE_PATCH_VERSION 2 - diff --git a/lib/libGRMustache7-MacOS.a b/lib/libGRMustache7-MacOS.a deleted file mode 100644 index 3af5a0e2..00000000 Binary files a/lib/libGRMustache7-MacOS.a and /dev/null differ diff --git a/lib/libGRMustache7-iOS.a b/lib/libGRMustache7-iOS.a deleted file mode 100644 index ba4fc22a..00000000 Binary files a/lib/libGRMustache7-iOS.a and /dev/null differ diff --git a/src/classes/Configuration/GRMustacheConfiguration.h b/src/classes/Configuration/GRMustacheConfiguration.h deleted file mode 100644 index 2d061ae9..00000000 --- a/src/classes/Configuration/GRMustacheConfiguration.h +++ /dev/null @@ -1,296 +0,0 @@ -// The MIT License -// -// Copyright (c) 2013 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" -#import "GRMustacheContentType.h" - -@class GRMustacheContext; -@protocol GRMustacheTagDelegate; - -/** - * A GRMustacheConfiguration instance configures GRMustache rendering. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/configuration.md - * - * The default configuration [GRMustacheConfiguration defaultConfiguration] - * applies to all GRMustache rendering by default: - * - * ``` - * // Have GRMustache templates render text by default, - * // and do not HTML-escape their input. - * [GRMustacheConfiguration defaultConfiguration].contentType = GRMustacheContentTypeText; - * ``` - * - * You can also alter the configuration of a specific template repository: its - * configuration only applies to the templates built by this very template - * repository: - * - * ``` - * // All templates loaded from _repo_ will use [[ and ]] as tag delimiters. - * GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepositoryWithBundle:nil]; - * repo.configuration.tagStartDelimiter = @"[["; - * repo.configuration.tagEndDelimiter = @"]]"; - * ``` - * - * A third option is to create a new configuration, and assign it to the template: - * - * ``` - * // Create a configuration - * GRMustacheConfiguration *configuration = [GRMustacheConfiguration configuration]; - * configuration.... // setup - * - * GRMustacheTemplateRepository *repo = [GRMustacheTemplateRepository templateRepositoryWithBundle:nil]; - * repo.configuration = configuration; - * ``` - * - * The `contentType` option can be specified at the template level, so that your - * repositories can mix HTML and text templates: see the documentation of this - * property. - * - * The `tagStartDelimiter` and `tagEndDelimiter` options can also be specified - * at the template level, using a "Set Delimiters tag": see the documentation of - * these properties. - * - * @see GRMustacheTemplateRepository - * - * @since v6.2 - */ -@interface GRMustacheConfiguration : NSObject { -@private - GRMustacheContentType _contentType; - NSString *_tagStartDelimiter; - NSString *_tagEndDelimiter; - GRMustacheContext *_baseContext; - BOOL _locked; -} - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Default Configuration -//////////////////////////////////////////////////////////////////////////////// - - -/** - * The default configuration. - * - * All templates and template repositories use the default configuration unless - * you specify otherwise by setting the configuration of a template repository. - * - * The "default" defaultConfiguration has GRMustacheContentTypeHTML contentType, - * and {{ and }} as tag delimiters. - * - * @returns The default configuration. - * - * @since v6.2 - */ -+ (GRMustacheConfiguration *)defaultConfiguration AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Creating Configuration -//////////////////////////////////////////////////////////////////////////////// - - -/** - * @returns A new factory configuration. - * - * Its contentType is GRMustacheContentTypeHTML. - * Its tag delimiters are {{ and }}. - * - * @since v6.2 - */ -+ (GRMustacheConfiguration *)configuration AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Set Up Configuration -//////////////////////////////////////////////////////////////////////////////// - - -/** - * The base context for templates rendering. The default base context contains - * the GRMustache standard Library. - * - * @see GRMustacheTemplate - * - * @since v6.4 - */ -@property (nonatomic, retain) GRMustacheContext *baseContext AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Extends the base context of the receiver with the provided object, making its - * keys available for all renderings. - * - * For example: - * - * ``` - * GRMustacheConfiguration *configuration = [GRMustacheConfiguration defaultConfiguration]; - * - * // Have the `name` key defined for all template renderings: - * id object = @{ @"name": @"Arthur" }; - * [configuration extendBaseContextWithObject:object]; - * - * // Renders "Arthur" - * [GRMustacheTemplate renderObject:nil fromString:@"{{name}}" error:NULL]; - * ``` - * - * Keys defined by _object_ can be overriden by other objects that will - * eventually enter the context stack: - * - * ``` - * // Renders "Billy", not "Arthur" - * [GRMustacheTemplate renderObject:nil:@{ @"name": @"Billy" } fromString:@"{{name}}" error:NULL]; - * ``` - * - * This method is a shortcut. It is equivalent to the following line of code: - * - * ``` - * configuration.baseContext = [configuration.baseContext contextByAddingObject:object]; - * ``` - * - * @param object An object - * - * @see baseContext - * @see extendBaseContextWithProtectedObject: - * @see extendBaseContextWithTagDelegate: - * - * @since v6.8 - */ -- (void)extendBaseContextWithObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Extends the base context of the receiver with the provided object, making its - * keys available for all renderings. - * - * Keys defined by _object_ are given priority, which means that they can not be - * overriden by other objects that will eventually enter the context stack. - * - * For example: - * - * ``` - * GRMustacheConfiguration *configuration = [GRMustacheConfiguration defaultConfiguration]; - * - * // The `precious` key is given priority: - * [configuration extendBaseContextWithProtectedObject:@{ @"precious": @"gold" }]; - * - * // Renders "gold", not "lead". - * [GRMustacheTemplate renderObject:nil:@{ @"precious": @"lead" } fromString:@"{{precious}}" error:NULL]; - * ``` - * - * This method is a shortcut. It is equivalent to the following line of code: - * - * ``` - * configuration.baseContext = [configuration.baseContext contextByAddingProtectedObject:object]; - * ``` - * - * @param object An object - * - * @see baseContext - * @see extendBaseContextWithObject: - * @see extendBaseContextWithTagDelegate: - * - * @since v6.8 - */ -- (void)extendBaseContextWithProtectedObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER;; - -/** - * Extends the base context of the receiver with a tag delegate, making it aware - * of the rendering of all template tags. - * - * This method is a shortcut. It is equivalent to the following line of code: - * - * ``` - * configuration.baseContext = [configuration.baseContext contextByAddingTagDelegate:tagDelegate]; - * ``` - * - * @param tagDelegate A tag delegate - * - * @see baseContext - * @see extendBaseContextWithObject: - * @see extendBaseContextWithProtectedObject: - * - * @since v6.8 - */ -- (void)extendBaseContextWithTagDelegate:(id)tagDelegate AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER;; - -/** - * The content type of strings rendered by templates. - * - * This property affects the HTML-escaping of your data, and the inclusion - * of templates in other templates. - * - * The `GRMustacheContentTypeHTML` content type has templates render HTML. - * This is the default behavior. HTML template escape the input of variable tags - * such as `{{name}}`. Use triple mustache tags `{{{content}}}` in order to - * avoid the HTML-escaping. - * - * The `GRMustacheContentTypeText` content type has templates render text. - * They do not HTML-escape their input: `{{name}}` and `{{{name}}}` have - * identical renderings. - * - * GRMustache safely keeps track of the content type of templates: should a HTML - * template embed a text template, the content of the text template would be - * HTML-escaped. - * - * There is no API to specify the content type of individual templates. However, - * you can use pragma tags right in the content of your templates: - * - * - `{{% CONTENT_TYPE:TEXT }}` turns a template into a text template. - * - `{{% CONTENT_TYPE:HTML }}` turns a template into a HTML template. - * - * Insert those pragma tags early in your templates. For example: - * - * ``` - * {{! This template renders a bash script. }} - * {{% CONTENT_TYPE:TEXT }} - * export LANG={{ENV.LANG}} - * ... - * ``` - * - * Should two such pragmas be found in a template content, the last one wins. - * - * @since v6.2 - */ -@property (nonatomic) GRMustacheContentType contentType AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * The opening delimiter for Mustache tags. Its default value is `{{`. - * - * You can also change the delimiters right in your templates using a "Set - * Delimiter tag": {{=[[ ]]=}} changes start and end delimiters to [[ and ]]. - * - * @since v6.4 - */ -@property (nonatomic, copy) NSString *tagStartDelimiter AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * The closing delimiter for Mustache tags. Its default value is `}}`. - * - * You can also change the delimiters right in your templates using a "Set - * Delimiter tag": {{=[[ ]]=}} changes start and end delimiters to [[ and ]]. - * - * @since v6.4 - */ -@property (nonatomic, copy) NSString *tagEndDelimiter AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -@end diff --git a/src/classes/GRMustache.m b/src/classes/GRMustache.m deleted file mode 100644 index 66dce36f..00000000 --- a/src/classes/GRMustache.m +++ /dev/null @@ -1,114 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "GRMustache_private.h" -#import "GRMustacheKeyAccess_private.h" -#import "GRMustacheVersion.h" -#import "GRMustacheRendering_private.h" -#import "GRMustacheStandardLibrary_private.h" -#import "GRMustacheJavascriptLibrary_private.h" -#import "GRMustacheHTMLLibrary_private.h" -#import "GRMustacheURLLibrary_private.h" -#import "GRMustacheEachFilter_private.h" -#import "GRMustacheLocalizer.h" - -// ============================================================================= -#pragma mark - GRMustache - -@implementation GRMustache - -// ============================================================================= -#pragma mark - Global services - -+ (GRMustacheVersion)libraryVersion -{ - return (GRMustacheVersion){ - .major = GRMUSTACHE_MAJOR_VERSION, - .minor = GRMUSTACHE_MINOR_VERSION, - .patch = GRMUSTACHE_PATCH_VERSION }; -} - -+ (NSObject *)standardLibrary -{ - static NSObject *standardLibrary = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - standardLibrary = [[NSDictionary dictionaryWithObjectsAndKeys: - // {{ capitalized(value) }} - [[[GRMustacheCapitalizedFilter alloc] init] autorelease], @"capitalized", - - // {{ lowercase(value) }} - [[[GRMustacheLowercaseFilter alloc] init] autorelease], @"lowercase", - - // {{ uppercase(value) }} - [[[GRMustacheUppercaseFilter alloc] init] autorelease], @"uppercase", - - // {{# isBlank(value) }}...{{/}} - [[[GRMustacheBlankFilter alloc] init] autorelease], @"isBlank", - - // {{# isEmpty(value) }}...{{/}} - [[[GRMustacheEmptyFilter alloc] init] autorelease], @"isEmpty", - - // {{ localize(value) }} - // {{# localize }}...{{/}} - [[[GRMustacheLocalizer alloc] initWithBundle:nil tableName:nil] autorelease], @"localize", - - // {{# each(collection) }}...{{/}} - [[[GRMustacheEachFilter alloc] init] autorelease], @"each", - - [NSDictionary dictionaryWithObjectsAndKeys: - - // {{ HTML.escape(value) }} - // {{# HTML.escape }}...{{/}} - [[[GRMustacheHTMLEscapeFilter alloc] init] autorelease], @"escape", - nil], @"HTML", - - [NSDictionary dictionaryWithObjectsAndKeys: - - // {{ javascript.escape(value) }} - // {{# javascript.escape }}...{{/}} - [[[GRMustacheJavascriptEscaper alloc] init] autorelease], @"escape", - nil], @"javascript", - - [NSDictionary dictionaryWithObjectsAndKeys: - - // {{ URL.escape(value) }} - // {{# URL.escape }}...{{/}} - [[[GRMustacheURLEscapeFilter alloc] init] autorelease], @"escape", - nil], @"URL", - nil] retain]; - }); - - return standardLibrary; -} - -+ (id)renderingObjectForObject:(id)object -{ - return [GRMustacheRendering renderingObjectForObject:object]; -} - -+ (id)renderingObjectWithBlock:(NSString *(^)(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error))block -{ - return [GRMustacheRendering renderingObjectWithBlock:block]; -} - -@end diff --git a/src/classes/GRMustacheVersion.h b/src/classes/GRMustacheVersion.h deleted file mode 100644 index 5d3d2494..00000000 --- a/src/classes/GRMustacheVersion.h +++ /dev/null @@ -1,44 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - - -/** - * The major component of GRMustache version - * - * @since v1.0 - */ -#define GRMUSTACHE_MAJOR_VERSION 7 - -/** - * The minor component of GRMustache version - * - * @since v1.0 - */ -#define GRMUSTACHE_MINOR_VERSION 3 - -/** - * The patch-level component of GRMustache version - * - * @since v1.0 - */ -#define GRMUSTACHE_PATCH_VERSION 2 - diff --git a/src/classes/Rendering/GRMustacheKeyAccess.m b/src/classes/Rendering/GRMustacheKeyAccess.m deleted file mode 100644 index 07f2ec6c..00000000 --- a/src/classes/Rendering/GRMustacheKeyAccess.m +++ /dev/null @@ -1,589 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import -#import "GRMustacheKeyAccess_private.h" -#import "GRMustacheSafeKeyAccess.h" - -#if !defined(NS_BLOCK_ASSERTIONS) -// For testing purpose -BOOL GRMustacheKeyAccessDidCatchNSUndefinedKeyException; -#endif - - -// ============================================================================= -#pragma mark - Safe key access - -static pthread_key_t GRSafeKeysForClassKey; -void freeSafeKeysForClass(void *objects) { - CFRelease((CFMutableDictionaryRef)objects); -} -#define setupSafeKeysForClass() pthread_key_create(&GRSafeKeysForClassKey, freeSafeKeysForClass) -#define getCurrentThreadSafeKeysForClass() (CFMutableDictionaryRef)pthread_getspecific(GRSafeKeysForClassKey) -#define setCurrentThreadSafeKeysForClass(classes) pthread_setspecific(GRSafeKeysForClassKey, classes) - - -// ============================================================================= -#pragma mark - Foundation declarations - -static NSMutableSet *safeMustacheKeysForNSArray; -static NSMutableSet *safeMustacheKeysForNSAttributedString; -static NSMutableSet *safeMustacheKeysForNSData; -static NSMutableSet *safeMustacheKeysForNSDate; -static NSMutableSet *safeMustacheKeysForNSDateComponents; -static NSMutableSet *safeMustacheKeysForNSDecimalNumber; -static NSMutableSet *safeMustacheKeysForNSError; -static NSMutableSet *safeMustacheKeysForNSHashTable; -static NSMutableSet *safeMustacheKeysForNSIndexPath; -static NSMutableSet *safeMustacheKeysForNSIndexSet; -static NSMutableSet *safeMustacheKeysForNSMapTable; -static NSMutableSet *safeMustacheKeysForNSNotification; -static NSMutableSet *safeMustacheKeysForNSException; -static NSMutableSet *safeMustacheKeysForNSNumber; -static NSMutableSet *safeMustacheKeysForNSOrderedSet; -static NSMutableSet *safeMustacheKeysForNSPointerArray; -static NSMutableSet *safeMustacheKeysForNSSet; -static NSMutableSet *safeMustacheKeysForNSString; -static NSMutableSet *safeMustacheKeysForNSURL; -static NSMutableSet *safeMustacheKeysForNSValue; - -static NSSet *safeMustacheKeys_NSArray(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSAttributedString(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSData(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSDate(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSDateComponents(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSDecimalNumber(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSError(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSHashTable(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSIndexPath(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSIndexSet(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSMapTable(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSNotification(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSException(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSNumber(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSOrderedSet(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSPointerArray(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSSet(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSString(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSURL(id self, SEL _cmd); -static NSSet *safeMustacheKeys_NSValue(id self, SEL _cmd); - - -// ============================================================================= -#pragma mark - NSUndefinedKeyException prevention declarations - -@interface NSObject(GRMustacheKeyAccessPreventionOfNSUndefinedKeyException) -- (id)GRMustacheKeyAccessValueForUndefinedKey_NSObject:(NSString *)key; -- (id)GRMustacheKeyAccessValueForUndefinedKey_NSManagedObject:(NSString *)key; -@end; - - -// ============================================================================= -#pragma mark - GRMustacheKeyAccess - -static Class NSOrderedSetClass; -static Class NSManagedObjectClass; - -@interface NSObject(GRMustacheCoreDataMethods) -- (NSDictionary *)propertiesByName; -- (id)entity; -@end - -@implementation GRMustacheKeyAccess - -+ (void)initialize -{ - NSOrderedSetClass = NSClassFromString(@"NSOrderedSet"); - NSManagedObjectClass = NSClassFromString(@"NSManagedObject"); - [self setupSafeKeyAccessForFoundationClasses]; - setupSafeKeysForClass(); -} - -+ (id)valueForMustacheKey:(NSString *)key inObject:(id)object unsafeKeyAccess:(BOOL)unsafeKeyAccess -{ - if (object == nil) { - return nil; - } - - - // Try objectForKeyedSubscript: first (see https://github.com/groue/GRMustache/issues/66:) - - if ([object respondsToSelector:@selector(objectForKeyedSubscript:)]) { - return [object objectForKeyedSubscript:key]; - } - - - // Then try valueForKey: for safe keys - - if (!unsafeKeyAccess && ![self isSafeMustacheKey:key forObject:object]) { - return nil; - } - - - @try { - - // We don't want to use NSArray, NSSet and NSOrderedSet implementation - // of valueForKey:, because they return another collection: see issue - // #21 and "anchored key should not extract properties inside an array" - // test in src/tests/Public/v4.0/GRMustacheSuites/compound_keys.json - // - // Instead, we want the behavior of NSObject's implementation of valueForKey:. - - if ([self objectIsFoundationCollectionWhoseImplementationOfValueForKeyReturnsAnotherCollection:object]) { - return [self valueForMustacheKey:key inFoundationCollectionObject:object]; - } else { - return [object valueForKey:key]; - } - } - - @catch (NSException *exception) { - - // Swallow NSUndefinedKeyException only - - if (![[exception name] isEqualToString:NSUndefinedKeyException]) { - [exception raise]; - } - } - - return nil; -} - - -// ============================================================================= -#pragma mark - Foundation collections - -+ (BOOL)objectIsFoundationCollectionWhoseImplementationOfValueForKeyReturnsAnotherCollection:(id)object -{ - if ([object isKindOfClass:[NSArray class]]) { return YES; } - if ([object isKindOfClass:[NSSet class]]) { return YES; } - if (NSOrderedSetClass && [object isKindOfClass:NSOrderedSetClass]) { return YES; } - return NO; -} - -+ (id)valueForMustacheKey:(NSString *)key inFoundationCollectionObject:(id)object -{ - // Ideally, we would use NSObject's implementation for collections, so that - // we can access properties such as `count`, `anyObject`, etc. - // - // And so we did, until [issue #70](https://github.com/groue/GRMustache/issues/70) - // revealed that the direct use of NSObject's imp crashes on arm64: - // - // IMP imp = class_getMethodImplementation([NSObject class], @selector(valueForKey:)); - // return imp(object, @selector(valueForKey:), key); // crash on arm64 - // - // objc_msgSendSuper fails on arm64 as well: - // - // return objc_msgSendSuper( - // &(struct objc_super){ .receiver = object, .super_class = [NSObject class] }, - // @selector(valueForKey:), - // key); // crash on arm64 - // - // So we have to implement NSObject's valueForKey: ourselves. - // - // Quoting Apple documentation: - // https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/KeyValueCoding/Articles/SearchImplementation.html - // - // > Default Search Pattern for valueForKey: - // > - // > 1. Searches the class of the receiver for an accessor method whose - // > name matches the pattern get, , or is, in that order. - // - // The remaining of the search pattern goes into aggregates and ivars. Let's - // ignore aggregates (until someone has a need for it), and ivars (since - // they are private). - - NSString *keyWithUppercaseInitial = [NSString stringWithFormat:@"%@%@", - [[key substringToIndex:1] uppercaseString], - [key substringFromIndex:1]]; - NSArray *accessors = [NSArray arrayWithObjects: - [NSString stringWithFormat:@"get%@", keyWithUppercaseInitial], - key, - [NSString stringWithFormat:@"is%@", keyWithUppercaseInitial], - nil]; - - for (NSString *accessor in accessors) { - SEL selector = NSSelectorFromString(accessor); - if ([object respondsToSelector:selector]) { - - // Extract the raw value into a buffer - - NSMethodSignature *methodSignature = [object methodSignatureForSelector:selector]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:methodSignature]; - invocation.selector = selector; - [invocation invokeWithTarget:object]; - NSUInteger methodReturnLength = [methodSignature methodReturnLength]; - if (methodReturnLength == 0) { - // no value - return nil; - } else { - void *buffer = malloc(methodReturnLength); - if (buffer == NULL) { - // Allocation failed. - // - // This method is not supposed to allocate any object, so we - // can not behave like failing allocating methods and return - // nil. - // - // So let's raise an exception. - // - // NSMallocException is supposedly obsolete but there are - // evidences it is still used by Foundation: - // http://stackoverflow.com/search?q=NSMallocException - [NSException raise:NSMallocException format:@"Out of memory."]; - } - [invocation getReturnValue:buffer]; - - // Turn the raw value buffer into an object - - id result = nil; - const char *objCType = [methodSignature methodReturnType]; - switch(objCType[0]) { - case 'c': - result = [NSNumber numberWithChar:*(char *)buffer]; - break; - case 'i': - result = [NSNumber numberWithInt:*(int *)buffer]; - break; - case 's': - result = [NSNumber numberWithShort:*(short *)buffer]; - break; - case 'l': - result = [NSNumber numberWithLong:*(long *)buffer]; - break; - case 'q': - result = [NSNumber numberWithLongLong:*(long long *)buffer]; - break; - case 'C': - result = [NSNumber numberWithUnsignedChar:*(unsigned char *)buffer]; - break; - case 'I': - result = [NSNumber numberWithUnsignedInt:*(unsigned int *)buffer]; - break; - case 'S': - result = [NSNumber numberWithUnsignedShort:*(unsigned short *)buffer]; - break; - case 'L': - result = [NSNumber numberWithUnsignedLong:*(unsigned long *)buffer]; - break; - case 'Q': - result = [NSNumber numberWithUnsignedLongLong:*(unsigned long long *)buffer]; - break; - case 'B': - result = [NSNumber numberWithBool:*(_Bool *)buffer]; - break; - case 'f': - result = [NSNumber numberWithFloat:*(float *)buffer]; - break; - case 'd': - result = [NSNumber numberWithDouble:*(double *)buffer]; - break; - case '@': - case '#': - result = *(id *)buffer; - break; - default: - [NSException raise:NSInternalInconsistencyException format:@"Not implemented yet"]; - break; - } - - free(buffer); - return result; - } - } - } - - return nil; -} - - -// ============================================================================= -#pragma mark - Foundation - -+ (void)setupSafeKeyAccessForFoundationClasses -{ - // Safe key access prevents dangerous methods from being accessed by bad - // templates through `valueForKey:`. - // - // By default, only declared properties can be accessed, unless classes - // conform to the GRMustacheSafeKeyAccess protocol. - // - // We want to let users have a liberal use of KVC on Foundation classes: - // `{{# array.count }}`, `{{ dateComponents.year }}`, etc. Those classes - // do not always declare properties for those accessors. - // - // So let's setup safe keys for common Foundation classes, by allowing - // all their non-mutating methods, plus a few safe NSObject methods, - // minus dangerous NSObject methods. - - NSSet *safeMustacheNSObjectKeys = [NSSet setWithObjects: - @"class", - @"superclass", - @"self", - @"description", - @"debugDescription", - nil]; - NSSet *unsafeMustacheNSObjectKeys = [NSSet setWithObjects: - @"init", - @"dealloc", - @"finalize", - @"copy", - @"mutableCopy", - @"retain", - @"release", - @"autorelease", - nil]; - - SEL selector = @selector(safeMustacheKeys); - Protocol *protocol = @protocol(GRMustacheSafeKeyAccess); - struct objc_method_description methodDescription = protocol_getMethodDescription(protocol, selector, YES, NO); - -#define setupSafeKeyAccessForClass(klassName) do {\ -Class klass = NSClassFromString(@#klassName);\ -if (klass) {\ -Class metaKlass = object_getClass(klass);\ -safeMustacheKeysFor ## klassName = [[self allPublicKeysForClass:klass] retain];\ -[safeMustacheKeysFor ## klassName unionSet:safeMustacheNSObjectKeys];\ -[safeMustacheKeysFor ## klassName minusSet:unsafeMustacheNSObjectKeys];\ -class_addMethod(metaKlass, selector, (IMP)safeMustacheKeys_ ## klassName, methodDescription.types);\ -class_addProtocol(klass, protocol);\ -}\ -} while(0); - - setupSafeKeyAccessForClass(NSArray); - setupSafeKeyAccessForClass(NSAttributedString); - setupSafeKeyAccessForClass(NSData); - setupSafeKeyAccessForClass(NSDate); - setupSafeKeyAccessForClass(NSDateComponents); - setupSafeKeyAccessForClass(NSDecimalNumber); - setupSafeKeyAccessForClass(NSError); - setupSafeKeyAccessForClass(NSHashTable); - setupSafeKeyAccessForClass(NSIndexPath); - setupSafeKeyAccessForClass(NSIndexSet); - setupSafeKeyAccessForClass(NSMapTable); - setupSafeKeyAccessForClass(NSNotification); - setupSafeKeyAccessForClass(NSException); - setupSafeKeyAccessForClass(NSNumber); - setupSafeKeyAccessForClass(NSOrderedSet); - setupSafeKeyAccessForClass(NSPointerArray); - setupSafeKeyAccessForClass(NSSet); - setupSafeKeyAccessForClass(NSString); - setupSafeKeyAccessForClass(NSURL); - setupSafeKeyAccessForClass(NSValue); -} - -/** - * Return the set of methods without arguments, up to NSObject, non including NSObject. - */ -+ (NSMutableSet *)allPublicKeysForClass:(Class)klass -{ - NSMutableSet *keys = [NSMutableSet set]; - Class NSObjectClass = [NSObject class]; - while (klass && klass != NSObjectClass) { - unsigned int methodCount; - Method *methods = class_copyMethodList(klass, &methodCount); - for (unsigned int i = 0; i < methodCount; ++i) { - SEL selector = method_getName(methods[i]); - const char *selectorName = sel_getName(selector); - if (selectorName[0] != '_' && selectorName[strlen(selectorName) - 1] != '_' && strstr(selectorName, ":") == NULL) { - [keys addObject:NSStringFromSelector(selector)]; - } - } - free (methods); - klass = class_getSuperclass(klass); - } - - return keys; -} - - -// ============================================================================= -#pragma mark - Safe key access - -+ (BOOL)isSafeMustacheKey:(NSString *)key forObject:(id)object -{ - NSSet *safeKeys = nil; - { - CFMutableDictionaryRef safeKeysForClass = getCurrentThreadSafeKeysForClass(); - if (!safeKeysForClass) { - safeKeysForClass = CFDictionaryCreateMutable(NULL, 0, NULL, &kCFTypeDictionaryValueCallBacks); - setCurrentThreadSafeKeysForClass(safeKeysForClass); - } - - Class klass = [object class]; - safeKeys = (NSSet *)CFDictionaryGetValue(safeKeysForClass, klass); - if (safeKeys == nil) { - if ([klass respondsToSelector:@selector(safeMustacheKeys)]) { - safeKeys = [klass safeMustacheKeys] ?: [NSSet set]; - } else { - NSMutableSet *keys = [self propertyGettersForClass:klass]; - if (NSManagedObjectClass && [object isKindOfClass:NSManagedObjectClass]) { - [keys unionSet:[NSSet setWithArray:[[[object entity] propertiesByName] allKeys]]]; - } - safeKeys = keys; - } - CFDictionarySetValue(safeKeysForClass, klass, safeKeys); - } - } - - return [safeKeys containsObject:key]; -} - -+ (NSMutableSet *)propertyGettersForClass:(Class)klass -{ - NSMutableSet *safeKeys = [NSMutableSet set]; - while (klass) { - // Iterate properties - - unsigned int count; - objc_property_t *properties = class_copyPropertyList(klass, &count); - - for (unsigned int i=0; i -#import "GRMustacheAvailabilityMacros_private.h" - -/** - * GRMustacheKeyAccess implements all the GRMustache key-fetching logic. - */ -@interface GRMustacheKeyAccess : NSObject - -/** - * Sends the `objectForKeyedSubscript:` or `valueForKey:` message to object - * with the provided key, and returns the result. - * - * If object responds to `objectForKeyedSubscript:`, `valueForKey:` is not - * invoked. - * - * If `valueForKey:` raise an NSUndefinedKeyException, the method returns nil. - * - * @param key The searched key - * @param object The queried object - * @param unsafeKeyAccess If YES, the `valueForKey:` method will be used - * without any restriction. - * - * @return The value that should be handled by Mustache rendering for a given - * key. - */ -+ (id)valueForMustacheKey:(NSString *)key inObject:(id)object unsafeKeyAccess:(BOOL)unsafeKeyAccess GRMUSTACHE_API_INTERNAL; - -@end diff --git a/src/classes/Rendering/GRMustacheRendering.h b/src/classes/Rendering/GRMustacheRendering.h deleted file mode 100644 index f1b526a2..00000000 --- a/src/classes/Rendering/GRMustacheRendering.h +++ /dev/null @@ -1,130 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#ifndef GRMUSTACHE_RENDERING -#define GRMUSTACHE_RENDERING - -#import -#import "GRMustacheAvailabilityMacros.h" - -@class GRMustacheContext; -@class GRMustacheTag; - - -// ============================================================================= -#pragma mark - - - -/** - * The protocol for your own objects that perform custom rendering. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/rendering_objects.md - */ -@protocol GRMustacheRendering - -/** - * This method is invoked when the receiver should be rendered by a Mustache - * tag. - * - * It returns three values: the rendering itself, a boolean that says whether - * the rendering is HTML-safe or not, and an eventual error. - * - * Input values are the tag that should be rendered, and the context object that - * represents the current context stack. - * - * Depending on the content type of the currently rendered template, an output - * parameter _HTMLSafe_ set to NO will have the returned string HTML-escaped. - * - * @param tag The tag to be rendered - * @param context A context for rendering inner tags. - * @param HTMLSafe Upon return contains YES if the result is HTML-safe. - * @param error If there is an error performing the rendering, upon return - * contains an NSError object that describes the problem. - * - * @return The rendering of the receiver for the given tag, in the given - * context. - * - * @see GRMustacheTag - * @see GRMustacheContext - * @see GRMustacheContentType - * - * @since v6.0 - */ -- (NSString *)renderForMustacheTag:(GRMustacheTag *)tag - context:(GRMustacheContext *)context - HTMLSafe:(BOOL *)HTMLSafe - error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; -@end - - -// ============================================================================= -#pragma mark - GRMustacheRendering - -/** - * The GRMustacheRendering class helps building rendering objects without - * writing a custom class that conforms to the GRMustacheRendering protocol. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/rendering_objects.md - * - * @see GRMustacheRendering protocol - * - * @since v7.0 - */ -@interface GRMustacheRendering : NSObject - -//////////////////////////////////////////////////////////////////////////////// -/// @name Creating Rendering Objects -//////////////////////////////////////////////////////////////////////////////// - -/** - * Returns a rendering object that is able to render the argument _object_ for - * the various Mustache tags. - * - * @param object An object. - * - * @return A rendering object able to render the argument. - * - * @see GRMustacheRendering protocol - * - * @since v7.0 - */ -+ (id)renderingObjectForObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns a rendering object that renders with the provided block. - * - * @param renderingBlock A block that follows the semantics of the - * renderForMustacheTag:context:HTMLSafe:error: method - * defined by the GRMustacheRendering protocol. See the - * documentation of this method. - * - * @return A rendering object - * - * @see GRMustacheRendering protocol - * - * @since v7.0 - */ -+ (id)renderingObjectWithBlock:(NSString *(^)(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error))renderingBlock AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -@end - -#endif diff --git a/src/classes/Rendering/GRMustacheRenderingEngine_private.h b/src/classes/Rendering/GRMustacheRenderingEngine_private.h deleted file mode 100644 index 1b326c5c..00000000 --- a/src/classes/Rendering/GRMustacheRenderingEngine_private.h +++ /dev/null @@ -1,53 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros_private.h" -#import "GRMustacheContentType.h" -#import "GRMustacheBuffer_private.h" - -@class GRMustacheContext; -@class GRMustacheSectionTag; -@class GRMustacheExpressionInvocation; -@class GRMustacheTemplateAST; - -/** - * TODO - */ -@interface GRMustacheRenderingEngine : NSObject { -@private - GRMustacheBuffer _buffer; - GRMustacheContentType _contentType; - GRMustacheContext *_context; -} - -/** - * TODO - */ -- (NSString *)renderTemplateAST:(GRMustacheTemplateAST *)templateAST HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error GRMUSTACHE_API_INTERNAL; - -/** - * TODO - */ -+ (instancetype)renderingEngineWithContentType:(GRMustacheContentType)contentType context:(GRMustacheContext *)context GRMUSTACHE_API_INTERNAL; - -@end diff --git a/src/classes/Rendering/GRMustacheSafeKeyAccess.h b/src/classes/Rendering/GRMustacheSafeKeyAccess.h deleted file mode 100644 index caca2275..00000000 --- a/src/classes/Rendering/GRMustacheSafeKeyAccess.h +++ /dev/null @@ -1,54 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" - - -/** - * Your data classes should conform to the GRMustacheSafeKeyAccess protocol - * to filter the keys that can be accessed by GRMustache templates. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/runtime/security.md - */ -@protocol GRMustacheSafeKeyAccess - -/** - * List the name of the keys GRMustache can access on this class using the - * `valueForKey:` method. - * - * When objects do not respond to this method, only declared properties can be - * accessed. All properties of Core Data NSManagedObjects are also accessible, - * even without property declaration. - * - * This method is not used for objects responding to `objectForKeyedSubscript:`. - * For those objects, all keys are accessible from templates. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/security.md - * - * @return The set of accessible keys on the class. - * - * @since v7.0 - */ -+ (NSSet *)safeMustacheKeys AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -@end diff --git a/src/classes/Rendering/GRMustacheTagDelegate.h b/src/classes/Rendering/GRMustacheTagDelegate.h deleted file mode 100644 index 573410f3..00000000 --- a/src/classes/Rendering/GRMustacheTagDelegate.h +++ /dev/null @@ -1,84 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" - -@class GRMustacheTag; - -/** - * Objects conforming to the GRMustacheTagDelegate protocol can observe and - * alter, the rendering of Mustache tags. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/delegate.md - * - * @since v6.0 - */ -@protocol GRMustacheTagDelegate -@optional - -/** - * Sent before a Mustache tag renders. - * - * This method gives an opportunity to alter objects that are rendered. - * - * For example, it is implemented by the NSFormatter class, in templates like - * `{{# dateFormatter }}...{{ value }}...{{ value }}... {{/}}`. - * - * @param tag The Mustache tag about to render. - * @param object The object about to be rendered. - * - * @return The object that should be rendered. - * - * @see GRMustacheTag - * - * @since v6.0 - */ -- (id)mustacheTag:(GRMustacheTag *)tag willRenderObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Sent after a Mustache tag has rendered. - * - * @param tag The Mustache tag that has just rendered. - * @param object The rendered object. - * @param rendering The actual rendering - * - * @see GRMustacheTag - * - * @since v6.0 - */ -- (void)mustacheTag:(GRMustacheTag *)tag didRenderObject:(id)object as:(NSString *)rendering AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Sent right after a Mustache tag has failed rendering. - * - * @param tag The Mustache tag that has just failed rendering. - * @param object The rendered object. - * @param error The error. - * - * @see GRMustacheTag - * - * @since v6.0 - */ -- (void)mustacheTag:(GRMustacheTag *)tag didFailRenderingObject:(id)object withError:(NSError *)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -@end diff --git a/src/classes/Services/NSFormatter+GRMustache.h b/src/classes/Services/NSFormatter+GRMustache.h deleted file mode 100644 index b3ba1d55..00000000 --- a/src/classes/Services/NSFormatter+GRMustache.h +++ /dev/null @@ -1,70 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" -#import "GRMustacheRendering.h" -#import "GRMustacheFilter.h" -#import "GRMustacheTagDelegate.h" - -/** - * A category on NSFormatter that allows them to be directly used in GRMustache - * templates. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/NSFormatter.md - * - * All NSFormatter subclasses such as NSDateFormatter, NSNumberFormatter, and - * your custom subclasses are concerned. - * - * ## Filter facet - * - * A formatter can be used as a filter, as in `{{ percent(value) }}`. Just have - * your `percent` key evaluate to a formatter. - * - * ## Formatting all values in a section - * - * A formatter can be used to format all values in a section of a template: - * - * ``` - * {{# percent }}...{{ value1 }}...{{ value2 }}...{{/ percent }} - * ``` - * - * The formatting then applies to all inner variable tags that evaluate to a - * value that can be processed by the filter (see - * [NSFormatter stringForObjectValue:] documentation). - * - * Inner loops and boolean sections are unaffected. However their inner variable - * tags are: - * - * ``` - * {{# percent }} - *   {{ value1 }}      {{! format applies }} - *   {{# condition }}  {{! format does not apply }} - *     {{ value2 }}    {{! format applies }} - *   {{/ condition }} - * {{/ percent }} - * ``` - * - * @since v6.4 - */ -@interface NSFormatter (GRMustache) -@end diff --git a/src/classes/Services/StandardLibrary/GRMustacheLocalizer.h b/src/classes/Services/StandardLibrary/GRMustacheLocalizer.h deleted file mode 100644 index d8887db7..00000000 --- a/src/classes/Services/StandardLibrary/GRMustacheLocalizer.h +++ /dev/null @@ -1,107 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" -#import "GRMustacheRendering.h" -#import "GRMustacheFilter.h" - -/** - * GRMustacheLocalizer can localize the content of a Mustache section. - * It also has a filter facet that localizes your data. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/standard_library.md#localize - * - * The GRMustache standard library has a `localize` key which returns a - * GRMustacheLocalizer that localizes just like the NSLocalizableString macro - * does: with the Localizable.strings table of the main bundle. - * - * ### Localizing data: - * - * `{{ localize(greeting) }}` renders `NSLocalizedString(@"Hello", nil)`, - * assuming the `greeting` key resolves to the `Hello` string. - * - * ### Localizing sections: - * - * `{{#localize}}Hello{{/localize}}` renders `NSLocalizedString(@"Hello", nil)`. - * - * ### Localizing sections with arguments: - * - * `{{#localize}}Hello {{name}}{{/localize}}` builds the format string - * `Hello %@`, localizes it with NSLocalizedString, and finally - * injects the name with `[NSString stringWithFormat:]`. - * - * ### Localize sections with arguments and conditions: - * - * `{{#localize}}Good morning {{#title}}{{title}}{{/title}} {{name}}{{/localize}}` - * build the format string `Good morning %@" or @"Good morning %@ %@`, - * depending on the presence of the `title` key. It then injects the name, or - * both title and name, with `[NSString stringWithFormat:]`, to build the final - * rendering. - * - * ### Custom GRMustacheLocalizer - * - * You can build your own localizing helper with the initWithBundle:tableName: - * method. The helper would then localize using the specified table from the - * specified bundle. - * - * @since v6.4 - */ -@interface GRMustacheLocalizer : NSObject { -@private - NSBundle *_bundle; - NSString *_tableName; - NSMutableArray *_formatArguments; -} - -/** - * Returns an initialized localizing helper. - * - * @param bundle The bundle where to look for localized strings. If nil, the - * main bundle is used. - * @param tableName The table where to look for localized strings. If nil, the - * default Localizable.strings table would be searched. - * - * @return A newly initialized localizing helper. - * - * @since v6.4 - */ -- (instancetype)initWithBundle:(NSBundle *)bundle tableName:(NSString *)tableName AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * The bundle where to look for localized strings. - * - * @since v6.4 - */ -@property (nonatomic, retain, readonly) NSBundle *bundle AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * The table where to look for localized strings. - * - * If nil, the default Localizable.strings table would be searched. - * - * @since v6.4 - */ -@property (nonatomic, retain, readonly) NSString *tableName AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -@end - diff --git a/src/classes/Services/StandardLibrary/GRMustacheStandardLibrary.m b/src/classes/Services/StandardLibrary/GRMustacheStandardLibrary.m deleted file mode 100644 index 751f42c9..00000000 --- a/src/classes/Services/StandardLibrary/GRMustacheStandardLibrary.m +++ /dev/null @@ -1,149 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "GRMustacheStandardLibrary_private.h" - - -// ============================================================================= -#pragma mark - GRMustacheCapitalizedFilter - -@implementation GRMustacheCapitalizedFilter - -#pragma mark - -- (id)transformedValue:(id)object -{ - // Specific case for [NSNull null] - - if (object == [NSNull null]) { - return @""; - } - - // Turns other objects into strings, and transform - - NSString *string = [object description]; - return [string capitalizedString]; -} - -@end - - -// ============================================================================= -#pragma mark - GRMustacheLowercaseFilter - -@implementation GRMustacheLowercaseFilter - -#pragma mark - -- (id)transformedValue:(id)object -{ - // Specific case for [NSNull null] - - if (object == [NSNull null]) { - return @""; - } - - // Turns other objects into strings, and transform - - NSString *string = [object description]; - return [string lowercaseString]; -} - -@end - - -// ============================================================================= -#pragma mark - GRMustacheUppercaseFilter - -@implementation GRMustacheUppercaseFilter - -#pragma mark - -- (id)transformedValue:(id)object -{ - // Specific case for [NSNull null] - - if (object == [NSNull null]) { - return @""; - } - - // Turns other objects into strings, and transform - - NSString *string = [object description]; - return [string uppercaseString]; -} - -@end - - -// ============================================================================= -#pragma mark - GRMustacheBlankFilter - -@implementation GRMustacheBlankFilter - -#pragma mark - -- (id)transformedValue:(id)object -{ - if (object == nil || [object isKindOfClass:[NSNull class]]) { - return [NSNumber numberWithBool:YES]; - } - - if (![object isKindOfClass:[NSDictionary class]] && [object respondsToSelector:@selector(countByEnumeratingWithState:objects:count:)]) { - for (id _ __attribute__((unused)) in object) { - return [NSNumber numberWithBool:NO]; - } - return [NSNumber numberWithBool:YES]; - } - - NSString *trimmedDescription = [[object description] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - return [NSNumber numberWithBool:trimmedDescription.length == 0]; -} - -@end - - -// ============================================================================= -#pragma mark - GRMustacheEmptyFilter - -@implementation GRMustacheEmptyFilter - -#pragma mark - -- (id)transformedValue:(id)object -{ - if (object == nil || [object isKindOfClass:[NSNull class]]) { - return [NSNumber numberWithBool:YES]; - } - - if (![object isKindOfClass:[NSDictionary class]] && [object respondsToSelector:@selector(countByEnumeratingWithState:objects:count:)]) { - for (id _ __attribute__((unused)) in object) { - return [NSNumber numberWithBool:NO]; - } - return [NSNumber numberWithBool:YES]; - } - - NSString *description = [object description]; - return [NSNumber numberWithBool:description.length == 0]; -} - -@end diff --git a/src/classes/Services/StandardLibrary/GRMustacheStandardLibrary_private.h b/src/classes/Services/StandardLibrary/GRMustacheStandardLibrary_private.h deleted file mode 100644 index 9d1b3716..00000000 --- a/src/classes/Services/StandardLibrary/GRMustacheStandardLibrary_private.h +++ /dev/null @@ -1,60 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheFilter_private.h" - - -// ============================================================================= -#pragma mark - GRMustacheCapitalizedFilter - -@interface GRMustacheCapitalizedFilter: NSObject -@end - - -// ============================================================================= -#pragma mark - GRMustacheLowercaseFilter - -@interface GRMustacheLowercaseFilter: NSObject -@end - - -// ============================================================================= -#pragma mark - GRMustacheUppercaseFilter - -@interface GRMustacheUppercaseFilter: NSObject -@end - - -// ============================================================================= -#pragma mark - GRMustacheBlankFilter - -@interface GRMustacheBlankFilter: NSObject -@end - - -// ============================================================================= -#pragma mark - GRMustacheEmptyFilter - -@interface GRMustacheEmptyFilter: NSObject -@end - diff --git a/src/classes/Shared/GRMustacheAvailabilityMacros.h b/src/classes/Shared/GRMustacheAvailabilityMacros.h deleted file mode 100644 index 2c4126af..00000000 --- a/src/classes/Shared/GRMustacheAvailabilityMacros.h +++ /dev/null @@ -1,285 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - - - - - - -/* - * Set up standard GRMustache versions - */ -#define GRMUSTACHE_VERSION_7_0 7000 -#define GRMUSTACHE_VERSION_7_1 7010 -#define GRMUSTACHE_VERSION_7_2 7020 -#define GRMUSTACHE_VERSION_7_3 7030 - - - - - - -/* - * If max GRMustacheVersion not specified, assume 7.3 - */ -#ifndef GRMUSTACHE_VERSION_MAX_ALLOWED -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_3 -#endif - -/* - * if min GRMustacheVersion not specified, assume max - */ -#ifndef GRMUSTACHE_VERSION_MIN_REQUIRED -#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_MAX_ALLOWED -#endif - -/* - * Error on bad values - */ -#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_MIN_REQUIRED -#error GRMUSTACHE_VERSION_MAX_ALLOWED must be >= GRMUSTACHE_VERSION_MIN_REQUIRED -#endif -#if GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_7_0 -#error GRMUSTACHE_VERSION_MIN_REQUIRED must be >= GRMUSTACHE_VERSION_7_0 -#endif - - - - - - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER - * - * Used on declarations introduced in GRMustache 7.0 - */ -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in GRMustache 7.0, - * and deprecated in GRMustache 7.0 - */ -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE - -/* - * DEPRECATED_IN_GRMUSTACHE_VERSION_7_0_AND_LATER - * - * Used on types deprecated in GRMustache 7.0 - */ -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_0_AND_LATER DEPRECATED_ATTRIBUTE - - - - - - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER - * - * Used on declarations introduced in GRMustache 7.1 - */ -#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_7_1 -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_7_1 -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in GRMustache 7.1, - * and deprecated in GRMustache 7.1 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_1 -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_1 - * - * Used on declarations introduced in GRMustache 7.0, - * but later deprecated in GRMustache 7.1 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_1 -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_1 DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_1 AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER -#endif - -/* - * DEPRECATED_IN_GRMUSTACHE_VERSION_7_1_AND_LATER - * - * Used on types deprecated in GRMustache 7.1 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_1 -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_1_AND_LATER DEPRECATED_ATTRIBUTE -#else -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_1_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER - * - * Used on declarations introduced in GRMustache 7.2 - */ -#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_7_2 -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_7_2 -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in GRMustache 7.2, - * and deprecated in GRMustache 7.2 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_2 -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 - * - * Used on declarations introduced in GRMustache 7.0, - * but later deprecated in GRMustache 7.2 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_2 -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 - * - * Used on declarations introduced in GRMustache 7.1, - * but later deprecated in GRMustache 7.2 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_2 -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_2 AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER -#endif - -/* - * DEPRECATED_IN_GRMUSTACHE_VERSION_7_2_AND_LATER - * - * Used on types deprecated in GRMustache 7.2 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_2 -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_2_AND_LATER DEPRECATED_ATTRIBUTE -#else -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_2_AND_LATER -#endif - - - - - - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER - * - * Used on declarations introduced in GRMustache 7.3 - */ -#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_7_3 -#define AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER UNAVAILABLE_ATTRIBUTE -#elif GRMUSTACHE_VERSION_MIN_REQUIRED < GRMUSTACHE_VERSION_7_3 -#define AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER WEAK_IMPORT_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER_BUT_DEPRECATED - * - * Used on declarations introduced in GRMustache 7.3, - * and deprecated in GRMustache 7.3 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_3 -#define AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER_BUT_DEPRECATED AVAILABLE_GRMUSTACHE_VERSION_7_3_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 - * - * Used on declarations introduced in GRMustache 7.0, - * but later deprecated in GRMustache 7.3 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_3 -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 - * - * Used on declarations introduced in GRMustache 7.1, - * but later deprecated in GRMustache 7.3 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_3 -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 AVAILABLE_GRMUSTACHE_VERSION_7_1_AND_LATER -#endif - -/* - * AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 - * - * Used on declarations introduced in GRMustache 7.2, - * but later deprecated in GRMustache 7.3 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_3 -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 DEPRECATED_ATTRIBUTE -#else -#define AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_7_3 AVAILABLE_GRMUSTACHE_VERSION_7_2_AND_LATER -#endif - -/* - * DEPRECATED_IN_GRMUSTACHE_VERSION_7_3_AND_LATER - * - * Used on types deprecated in GRMustache 7.3 - */ -#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_7_3 -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_3_AND_LATER DEPRECATED_ATTRIBUTE -#else -#define DEPRECATED_IN_GRMUSTACHE_VERSION_7_3_AND_LATER -#endif diff --git a/src/classes/Templates/GRMustacheTemplate.h b/src/classes/Templates/GRMustacheTemplate.h deleted file mode 100644 index 19c499e5..00000000 --- a/src/classes/Templates/GRMustacheTemplate.h +++ /dev/null @@ -1,383 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "GRMustacheAvailabilityMacros.h" -#import "GRMustacheRendering.h" - -@class GRMustacheContext; -@class GRMustacheTemplateRepository; -@protocol GRMustacheTagDelegate; - -/** - * The GRMustacheTemplate class provides with Mustache template rendering - * services. - * - * **Companion guide:** https://github.com/groue/GRMustache/blob/master/Guides/templates.md - * - * @since v1.0 - */ -@interface GRMustacheTemplate: NSObject { -@private - GRMustacheTemplateRepository *_templateRepository; - id _templateAST; - GRMustacheContext *_baseContext; -} - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Creating Templates -//////////////////////////////////////////////////////////////////////////////// - -/** - * Parses a template string, and returns a compiled template. - * - * @param templateString The template string. - * @param error If there is an error loading or parsing template and - * partials, upon return contains an NSError object that - * describes the problem. - * - * @return A GRMustacheTemplate instance. - * - * @since v1.11 - */ -+ (instancetype)templateFromString:(NSString *)templateString error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Parses a template file, and returns a compiled template. - * - * The template at path must be encoded in UTF8. See the - * GRMustacheTemplateRepository class for more encoding options. - * - * @param path The path of the template. - * @param error If there is an error loading or parsing template and - * partials, upon return contains an NSError object that - * describes the problem. - * - * @return A GRMustacheTemplate instance. - * - * @see GRMustacheTemplateRepository - * - * @since v1.11 - */ -+ (instancetype)templateFromContentsOfFile:(NSString *)path error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Parses a template file, and returns a compiled template. - * - * The template at url must be encoded in UTF8. See the - * GRMustacheTemplateRepository class for more encoding options. - * - * @param url The URL of the template. - * @param error If there is an error loading or parsing template and - * partials, upon return contains an NSError object that - * describes the problem. - * - * @return A GRMustacheTemplate instance. - * - * @see GRMustacheTemplateRepository - * - * @since v1.11 - */ -+ (instancetype)templateFromContentsOfURL:(NSURL *)url error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Parses a bundle resource template, and returns a compiled template. - * - * If you provide nil as a bundle, the resource will be looked in the main - * bundle. - * - * The template resource must be encoded in UTF8. See the - * GRMustacheTemplateRepository class for more encoding options. - * - * @param name The name of a bundle resource of extension "mustache". - * @param bundle The bundle where to look for the template resource. If nil, - * the main bundle is used. - * @param error If there is an error loading or parsing template and - * partials, upon return contains an NSError object that - * describes the problem. - * - * @return A GRMustacheTemplate instance. - * - * @see GRMustacheTemplateRepository - * - * @since v1.11 - */ -+ (instancetype)templateFromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Configuring Templates -//////////////////////////////////////////////////////////////////////////////// - -/** - * The template's base context: all rendering start from this context. - * - * Its default value comes from the configuration of the source template - * repository. Unless specified, it contains the GRMustache standard library. - * - * @see GRMustacheContext - * @see GRMustacheConfiguration - * @see GRMustacheTemplateRepository - * @see [GRMustache standardLibrary] - * @see extendBaseContextWithObject: - * @see extendBaseContextWithProtectedObject: - * @see extendBaseContextWithTagDelegate: - * - * @since v6.0 - */ -@property (nonatomic, retain) GRMustacheContext *baseContext AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Extends the base context of the receiver with the provided object, making its - * keys available for all renderings. - * - * For example: - * - * ``` - * GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{name}}" error:NULL]; - * - * // Have the `name` key defined for all renderings of the template: - * id object = @{ @"name": @"Arthur" }; - * [template extendBaseContextWithObject:object]; - * - * // Renders "Arthur" - * ``` - * [template renderObject:nil error:NULL]; - * - * Keys defined by _object_ can be overriden by other objects that will - * eventually enter the context stack: - * - * ``` - * // Renders "Billy", not "Arthur" - * [template renderObject:@{ @"name": @"Billy" } error:NULL]; - * ``` - * - * This method is a shortcut. It is equivalent to the following line of code: - * - * ``` - * template.baseContext = [template.baseContext contextByAddingObject:object]; - * ``` - * - * @param object An object - * - * @see baseContext - * @see extendBaseContextWithProtectedObject: - * @see extendBaseContextWithTagDelegate: - * - * @since v6.8 - */ -- (void)extendBaseContextWithObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Extends the base context of the receiver with the provided object, making its - * keys available for all renderings. - * - * Keys defined by _object_ are given priority, which means that they can not be - * overriden by other objects that will eventually enter the context stack. - * - * For example: - * - * ``` - * GRMustacheTemplate *template = [GRMustacheTemplate templateFromString:@"{{precious}}" error:NULL]; - * - * // The `precious` key is given priority: - * id object = @{ @"precious": @"gold" }; - * [template extendBaseContextWithProtectedObject:object]; - * - * // Renders "gold", not "lead". - * [template renderObject:@{ @"precious": @"lead" } error:NULL]; - * ``` - * - * This method is a shortcut. It is equivalent to the following line of code: - * - * ``` - * template.baseContext = [template.baseContext contextByAddingProtectedObject:object]; - * ``` - * - * @param object An object - * - * @see baseContext - * @see extendBaseContextWithObject: - * @see extendBaseContextWithTagDelegate: - * - * @since v6.8 - */ -- (void)extendBaseContextWithProtectedObject:(id)object AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Extends the base context of the receiver with a tag delegate, making it aware - * of the rendering of all tags in the template. - * - * This method is a shortcut. It is equivalent to the following line of code: - * - * ``` - * template.baseContext = [template.baseContext contextByAddingTagDelegate:tagDelegate]; - * ``` - * - * @param tagDelegate A tag delegate - * - * @see baseContext - * @see extendBaseContextWithObject: - * @see extendBaseContextWithProtectedObject: - * - * @since v6.8 - */ -- (void)extendBaseContextWithTagDelegate:(id)tagDelegate AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER;; - - -//////////////////////////////////////////////////////////////////////////////// -/// @name Rendering Templates -//////////////////////////////////////////////////////////////////////////////// - - -/** - * Renders an object from a template string. - * - * @param object An object used for interpreting Mustache tags. - * @param templateString The template string. - * @param error If there is an error during rendering, upon return - * contains an NSError object that describes the problem. - * - * @return A string containing the rendered template. - * - * @since v1.0 - */ -+ (NSString *)renderObject:(id)object fromString:(NSString *)templateString error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Renders an object from a bundle resource template. - * - * If you provide nil as a bundle, the resource will be looked in the main - * bundle, with a "mustache" extension. - * - * The template resource must be encoded in UTF8. See the - * GRMustacheTemplateRepository class for more encoding options. - * - * @param object An object used for interpreting Mustache tags. - * @param name The name of a bundle resource of extension "mustache". - * @param bundle The bundle where to look for the template resource. If nil, - * the main bundle is used. - * @param error If there is an error during rendering, upon return contains an - * NSError object that describes the problem. - * - * @return A string containing the rendered template. - * - * @see GRMustacheTemplateRepository - * - * @since v1.0 - */ -+ (NSString *)renderObject:(id)object fromResource:(NSString *)name bundle:(NSBundle *)bundle error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Renders a template with a context stack initialized with the provided object - * on top of the base context. - * - * @param object An object used for interpreting Mustache tags. - * @param error If there is an error rendering the template and its - * partials, upon return contains an NSError object that - * describes the problem. - * - * @return A string containing the rendered template. - * - * @since v6.0 - */ -- (NSString *)renderObject:(id)object error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Renders a template with a context stack initialized with the provided objects - * on top of the base context. - * - * @param objects An array of context objects for interpreting Mustache tags. - * @param error If there is an error rendering the template and its - * partials, upon return contains an NSError object that - * describes the problem. - * - * @return A string containing the rendered template. - * - * @since v6.0 - */ -- (NSString *)renderObjectsFromArray:(NSArray *)objects error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -/** - * Returns the rendering of the receiver, given a rendering context. - * - * @param context A rendering context. - * @param HTMLSafe Upon return contains YES or NO, depending on the content - * type of the template, as set by the configuration of the - * source template repository. HTML templates yield YES, text - * templates yield NO. - * @param error If there is an error rendering the tag, upon return contains - * an NSError object that describes the problem. - * - * @return The rendering of the template. - * - * @see GRMustacheConfiguration - * @see GRMustacheContentType - * - * @since v6.0 - */ -- (NSString *)renderContentWithContext:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -//////////////////////////////////////////////////////////////////////////////// -/// @name Accessing Sibling Templates -//////////////////////////////////////////////////////////////////////////////// - -/** - * Returns the template repository that issued the receiver. - * - * All templates belong a template repository: - * - * - Templates returned by `+[GRMustacheTemplate templateFromString:error:]` - * have a template repository that loads templates and partials stored as - * resources in the main bundle, with extension ".mustache", encoded in UTF8. - * - * - Templates returned by `+[GRMustacheTemplate templateFromContentsOfFile:error:]` - * have a template repository that loads templates and partials stored in the - * directory of the receiver, with the same file extension ".mustache", - * encoded in UTF8. - * - * - Templates returned by `+[GRMustacheTemplate templateFromContentsOfURL:error:]` - * have a template repository that loads templates and partials stored in the - * directory of the receiver, with the same file extension ".mustache", - * encoded in UTF8. - * - * - Templates returned by `+[GRMustacheTemplate templateFromResource:bundle:error:]` - * have a template repository that loads templates and partials stored as - * resources in the specified bundle, with extension ".mustache", encoded in - * UTF8. - * - * - Templates returned by `-[GRMustacheTemplateRepository templateNamed:error:]` - * and `-[GRMustacheTemplateRepository templateFromString:error:]` belong to - * the invoked repository. - * - * @see GRMustacheTemplateRepository - * @see templateFromString:error: - * @see templateFromContentsOfFile:error: - * @see templateFromContentsOfURL:error: - * @see templateFromResource:bundle:error: - * - * @since v7.0 - */ -@property (nonatomic, retain, readonly) GRMustacheTemplateRepository *templateRepository AVAILABLE_GRMUSTACHE_VERSION_7_0_AND_LATER; - -@end diff --git a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextKeyAccessTest.m b/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextKeyAccessTest.m deleted file mode 100644 index 9450fceb..00000000 --- a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheContextKeyAccessTest.m +++ /dev/null @@ -1,242 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 -#import "GRMustachePublicAPITest.h" - - -// - -@interface GRMustacheContextKeyAccess_ClassWithObjectForKeyedSubscript : NSObject -@end - -@implementation GRMustacheContextKeyAccess_ClassWithObjectForKeyedSubscript - -+ (NSSet *)safeMustacheKeys -{ - return [NSSet setWithObjects:@"foo", @"bar", nil]; -} - -- (id)objectForKeyedSubscript:(id)key -{ - return key; -} - -- (id)valueForKey:(NSString *)key -{ - return [key uppercaseString]; -} - -@end - -// - -@interface GRMustacheContextKeyAccess_ClassWithProperties : NSObject -@property (nonatomic, readonly) NSString *property; -@end - -@implementation GRMustacheContextKeyAccess_ClassWithProperties - -- (NSString *)property -{ - return @"property"; -} - -- (NSString *)method -{ - return @"method"; -} - -@end - -// - -@interface GRMustacheContextKeyAccess_ClassWithCustomAllowedKeys : NSObject -@property (nonatomic, readonly) NSString *disallowedProperty; -@end - -@implementation GRMustacheContextKeyAccess_ClassWithCustomAllowedKeys - -+ (NSSet *)safeMustacheKeys -{ - return [NSSet setWithObjects:@"allowedMethod", nil]; -} - -- (NSString *)disallowedProperty -{ - return @"disallowedProperty"; -} - -- (NSString *)allowedMethod -{ - return @"allowedMethod"; -} - -@end - -// - -@interface GRMustacheContextKeyAccessTest : GRMustachePublicAPITest -@end - -@implementation GRMustacheContextKeyAccessTest - -- (void)testObjectForKeyedSubscriptReplacesValueForKey -{ - GRMustacheContextKeyAccess_ClassWithObjectForKeyedSubscript *object = [[[GRMustacheContextKeyAccess_ClassWithObjectForKeyedSubscript alloc] init] autorelease]; - - // test setup - XCTAssertTrue([[object class] respondsToSelector:@selector(safeMustacheKeys)], @""); - XCTAssertTrue([[[object class] safeMustacheKeys] containsObject:@"foo"], @""); - XCTAssertTrue([[[object class] safeMustacheKeys] containsObject:@"bar"], @""); - XCTAssertEqualObjects([object objectForKeyedSubscript:@"foo"], @"foo", @""); - XCTAssertEqualObjects([object objectForKeyedSubscript:@"bar"], @"bar", @""); - XCTAssertEqualObjects([object valueForKey:@"foo"], @"FOO", @""); - XCTAssertEqualObjects([object valueForKey:@"bar"], @"BAR", @""); - - // test context - GRMustacheContext *context = [GRMustacheContext contextWithObject:object]; - XCTAssertEqualObjects([context valueForMustacheKey:@"foo"], @"foo", @""); - XCTAssertEqualObjects([context valueForMustacheKey:@"bar"], @"bar", @""); -} - -- (void)testPropertiesAreAllowed -{ - GRMustacheContextKeyAccess_ClassWithProperties *object = [[[GRMustacheContextKeyAccess_ClassWithProperties alloc] init] autorelease]; - - // test setup - XCTAssertFalse([[object class] respondsToSelector:@selector(safeMustacheKeys)], @""); - XCTAssertFalse([object respondsToSelector:@selector(objectForKeyedSubscript:)], @""); - XCTAssertEqualObjects(object.property, @"property", @""); - XCTAssertEqualObjects([object valueForKey:@"property"], @"property", @""); - - // test context - GRMustacheContext *context = [GRMustacheContext contextWithObject:object]; - XCTAssertEqualObjects([context valueForMustacheKey:@"property"], @"property", @""); -} - -- (void)testMethodAreDisallowed -{ - GRMustacheContextKeyAccess_ClassWithProperties *object = [[[GRMustacheContextKeyAccess_ClassWithProperties alloc] init] autorelease]; - - // test setup - XCTAssertFalse([[object class] respondsToSelector:@selector(safeMustacheKeys)], @""); - XCTAssertFalse([object respondsToSelector:@selector(objectForKeyedSubscript:)], @""); - XCTAssertEqualObjects([object method], @"method", @""); - XCTAssertEqualObjects([object valueForKey:@"method"], @"method", @""); - - // test context - GRMustacheContext *context = [GRMustacheContext contextWithObject:object]; - XCTAssertNil([context valueForMustacheKey:@"method"], @""); -} - -- (void)testCustomSafeMustacheKeys -{ - GRMustacheContextKeyAccess_ClassWithCustomAllowedKeys *object = [[[GRMustacheContextKeyAccess_ClassWithCustomAllowedKeys alloc] init] autorelease]; - - // test setup - XCTAssertTrue([[object class] respondsToSelector:@selector(safeMustacheKeys)], @""); - XCTAssertTrue([[[object class] safeMustacheKeys] containsObject:@"allowedMethod"], @""); - XCTAssertFalse([[[object class] safeMustacheKeys] containsObject:@"disallowedProperty"], @""); - XCTAssertFalse([object respondsToSelector:@selector(objectForKeyedSubscript:)], @""); - XCTAssertEqualObjects(object.disallowedProperty, @"disallowedProperty", @""); - XCTAssertEqualObjects([object allowedMethod], @"allowedMethod", @""); - XCTAssertEqualObjects([object valueForKey:@"disallowedProperty"], @"disallowedProperty", @""); - XCTAssertEqualObjects([object valueForKey:@"allowedMethod"], @"allowedMethod", @""); - - // test context - GRMustacheContext *context = [GRMustacheContext contextWithObject:object]; - XCTAssertNil([context valueForMustacheKey:@"disallowedProperty"], @""); - XCTAssertEqualObjects([context valueForMustacheKey:@"allowedMethod"], @"allowedMethod", @""); -} - -- (void)testUnsafeKeyAccess -{ - GRMustacheContextKeyAccess_ClassWithCustomAllowedKeys *object = [[[GRMustacheContextKeyAccess_ClassWithCustomAllowedKeys alloc] init] autorelease]; - - // test setup - XCTAssertFalse([object respondsToSelector:@selector(objectForKeyedSubscript:)], @""); - XCTAssertEqualObjects(object.disallowedProperty, @"disallowedProperty", @""); - XCTAssertEqualObjects([object allowedMethod], @"allowedMethod", @""); - XCTAssertEqualObjects([object valueForKey:@"disallowedProperty"], @"disallowedProperty", @""); - XCTAssertEqualObjects([object valueForKey:@"allowedMethod"], @"allowedMethod", @""); - XCTAssertTrue([[[object class] safeMustacheKeys] containsObject:@"allowedMethod"], @""); - XCTAssertFalse([[[object class] safeMustacheKeys] containsObject:@"disallowedProperty"], @""); - - // test context - GRMustacheContext *context = [GRMustacheContext contextWithObject:object]; - context = [context contextWithUnsafeKeyAccess]; - XCTAssertEqualObjects([context valueForMustacheKey:@"disallowedProperty"], @"disallowedProperty", @""); - XCTAssertEqualObjects([context valueForMustacheKey:@"allowedMethod"], @"allowedMethod", @""); -} - -- (void)testUnsafeKeyAccessInDerivedContexts -{ - GRMustacheContextKeyAccess_ClassWithCustomAllowedKeys *object1 = [[[GRMustacheContextKeyAccess_ClassWithCustomAllowedKeys alloc] init] autorelease]; - GRMustacheContextKeyAccess_ClassWithProperties *object2 = [[[GRMustacheContextKeyAccess_ClassWithProperties alloc] init] autorelease]; - - // test setup - XCTAssertFalse([object1 respondsToSelector:@selector(objectForKeyedSubscript:)], @""); - XCTAssertEqualObjects(object1.disallowedProperty, @"disallowedProperty", @""); - XCTAssertEqualObjects([object1 allowedMethod], @"allowedMethod", @""); - XCTAssertEqualObjects([object1 valueForKey:@"disallowedProperty"], @"disallowedProperty", @""); - XCTAssertEqualObjects([object1 valueForKey:@"allowedMethod"], @"allowedMethod", @""); - XCTAssertTrue([[[object1 class] safeMustacheKeys] containsObject:@"allowedMethod"], @""); - XCTAssertFalse([[[object1 class] safeMustacheKeys] containsObject:@"disallowedProperty"], @""); - - XCTAssertFalse([[object2 class] respondsToSelector:@selector(safeMustacheKeys)], @""); - XCTAssertFalse([object2 respondsToSelector:@selector(objectForKeyedSubscript:)], @""); - XCTAssertEqualObjects(object2.property, @"property", @""); - XCTAssertEqualObjects([object2 valueForKey:@"property"], @"property", @""); - - // test context - { - // Context derived from unsafe context is unsafe. - - GRMustacheContext *context = [GRMustacheContext contextWithUnsafeKeyAccess]; - context = [context contextByAddingObject:object1]; - XCTAssertEqualObjects([context valueForMustacheKey:@"disallowedProperty"], @"disallowedProperty", @""); - XCTAssertEqualObjects([context valueForMustacheKey:@"allowedMethod"], @"allowedMethod", @""); - } - { - // Context derived from safe context is safe. - - GRMustacheContext *context = [GRMustacheContext context]; - context = [context contextByAddingObject:object1]; - XCTAssertNil([context valueForMustacheKey:@"disallowedProperty"], @""); - XCTAssertEqualObjects([context valueForMustacheKey:@"allowedMethod"], @"allowedMethod", @""); - } - { - // Derived unsafe context is fully unsafe - - GRMustacheContext *context = [GRMustacheContext contextWithObject:object1]; - XCTAssertNil([context valueForMustacheKey:@"disallowedProperty"], @""); - context = [context contextByAddingObject:object2]; - XCTAssertNil([context valueForMustacheKey:@"method"], @""); - XCTAssertNil([context valueForMustacheKey:@"disallowedProperty"], @""); - context = [context contextWithUnsafeKeyAccess]; - XCTAssertEqualObjects([context valueForMustacheKey:@"method"], @"method", @""); - XCTAssertEqualObjects([context valueForMustacheKey:@"disallowedProperty"], @"disallowedProperty", @""); - } -} - -@end diff --git a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheKeyedSubscriptingTest.m b/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheKeyedSubscriptingTest.m deleted file mode 100644 index a41a55d6..00000000 --- a/src/tests/Public/v7.0/GRMustacheContextTest/GRMustacheKeyedSubscriptingTest.m +++ /dev/null @@ -1,94 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 -#import "GRMustachePublicAPITest.h" - -@interface GRMustacheKeyedSubscriptingClass : NSObject { - NSMutableDictionary *_dictionary; -} -@property (nonatomic, retain) NSMutableDictionary *dictionary; -@end - -@implementation GRMustacheKeyedSubscriptingClass -@synthesize dictionary=_dictionary; - -- (void)dealloc -{ - self.dictionary = nil; - [super dealloc]; -} - -- (instancetype)init -{ - self = [super init]; - if (self) { - self.dictionary = [NSMutableDictionary dictionary]; - } - return self; -} - -- (id)valueForKey:(NSString *)key -{ - return @"value"; -} - -- (void)setObject:(id)object forKeyedSubscript:(id)key -{ - [self.dictionary setObject:object forKey:key]; -} - -- (id)objectForKeyedSubscript:(id)key -{ - return [self.dictionary objectForKey:key]; -} - -@end - -@interface GRMustacheKeyedSubscriptingTest : GRMustachePublicAPITest -@end - -@implementation GRMustacheKeyedSubscriptingTest - -- (void)testKeyedSubscripting -{ - GRMustacheKeyedSubscriptingClass *object = [[[GRMustacheKeyedSubscriptingClass alloc] init] autorelease]; - NSString *key = @"foo"; - NSString *value = @"value"; - [object setObject:value forKeyedSubscript:key]; - - XCTAssertEqualObjects([object objectForKeyedSubscript:key], value); - XCTAssertEqualObjects(([GRMustacheTemplate renderObject:object fromString:[NSString stringWithFormat:@"{{%@}}", key] error:NULL]), value); -} - -- (void)testKeyedSubscriptingOverridesValueForKey -{ - GRMustacheKeyedSubscriptingClass *object = [[[GRMustacheKeyedSubscriptingClass alloc] init] autorelease]; - NSString *key = @"foo"; - NSString *value = @"value"; - - // Empty rendering for key `foo` despite [object valueForKey:@"foo"] is not empty - XCTAssertEqualObjects([object valueForKey:key], value); - XCTAssertEqualObjects(([GRMustacheTemplate renderObject:object fromString:[NSString stringWithFormat:@"{{%@}}", key] error:NULL]), @""); -} - -@end diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/comments.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/comments.json deleted file mode 100644 index 84138089..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/comments.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "tests": [ - { - "name": "Single line comment block should be removed from the template.", - "data": { }, - "template": "<{{! Comment Block! }}>", - "expected": "<>" - }, - { - "name": "Multiline comment block should be removed from the template.", - "data": { }, - "template": "<{{!\nThis is a\nmulti-line comment...\n}}>", - "expected": "<>" - }, - - // Whitespace Sensitivity - - { - "name": "Single left outer whitespace should be honored.", - "data": { }, - "template": "< {{! Comment block}}>", - "expected": "< >" - }, - { - "name": "Single right outer whitespace should be honored.", - "data": { }, - "template": "<{{! Comment block}} >", - "expected": "< >" - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/compound_keys.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/compound_keys.json deleted file mode 100644 index b0e776e8..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/compound_keys.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "tests": [ - { - "name": "3rd assertion of test 'zeros' of handlebars.js (c54cadcf8f2a13607888fd78fc5505caceb4bdd2)", - "data": { "num1" : { "num2" : 0 }}, - "template": "num: {{num1.num2}}", - "expected": "num: 0" - }, - { - "name": "1st assertion of test 'nested paths' of handlebars.js (c54cadcf8f2a13607888fd78fc5505caceb4bdd2)", - "data": { "alan": { "expression": "beautiful" } }, - "template": "Goodbye {{alan.expression}} world!", - "expected": "Goodbye beautiful world!" - }, - { - "name": "1st assertion of test 'nested paths with empty string value' of handlebars.js (c54cadcf8f2a13607888fd78fc5505caceb4bdd2)", - "data": { "alan": { "expression": "" } }, - "template": "Goodbye {{alan.expression}} world!", - "expected": "Goodbye world!" - }, - { - "name": "1st assertion of test 'complex but empty paths' of handlebars.js (c54cadcf8f2a13607888fd78fc5505caceb4bdd2)", - "data": { "person": { "name": null } }, - "template": "{{person.name}}", - "expected": "" - }, - { - "name": "2nd assertion of test 'complex but empty paths' of handlebars.js (c54cadcf8f2a13607888fd78fc5505caceb4bdd2)", - "data": { "person": { } }, - "template": "{{person.name}}", - "expected": "" - }, - { - "name": "key lookup is anchored", - "data": { "b": "b", "a": { } }, - "template": "-{{#a}}{{b}}{{/a}}-{{a.b}}-", - "expected": "-b--" - }, - { - "name": "key lookup is anchored", - "data": { "c": "c", "b": { "c" : "cb" } }, - "template": "-{{a.b.c}}-", - "expected": "--" - }, - { - "name": "key lookup is anchored", - "data": { "c": "c", "b": { "c" : "cb" }, "a": { } }, - "template": "-{{a.b.c}}-", - "expected": "--" - }, - { - "name": "key lookup is anchored", - "data": { "c": "c", "b": { "c" : "cb" }, "a": { "b": { } } }, - "template": "-{{a.b.c}}-", - "expected": "--" - }, - { - "name": "key lookup is anchored", - "data": { "c": "c", "b": { "c" : "cb" }, "a": { "b": { "c": "ca" } } }, - "template": "-{{a.b.c}}-", - "expected": "-ca-" - }, - { - "name": "key lookup is anchored", - "data": { "b": "b", "a": { } }, - "template": "-{{#a}}{{b}}{{/a}}-{{#a}}{{.b}}{{/a}}-{{a.b}}-", - "expected": "-b---" - }, - { - "name": "key lookup is anchored", - "data": { "b": "b", "a": { "b": "ba"} }, - "template": "-{{#a}}{{b}}{{/a}}-{{#a}}{{.b}}{{/a}}-{{a.b}}-", - "expected": "-ba-ba-ba-" - }, - { - "name": "anchored key should not extract properties inside an array", - "data": { "persons": [ { "name": "Alice" }, { "name": "Bob" } ] }, - "template": "-{{#persons}}{{name}},{{/persons}}-{{#persons.name}}{{.}},{{/persons.name}}-", - "expected":"-Alice,Bob,--" - } - ] -} - diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/delimiters.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/delimiters.json deleted file mode 100644 index 6f79a659..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/delimiters.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "tests": [ - { - "name": "Non-symetric delimiters should be honored.", - "data": { "text": "---" }, - "template": "<{{=<% %>=}}<%text%>>", - "expected": "<--->" - }, - { - "name": "Symetric delimiters should be honored.", - "data": { "text": "---" }, - "template": "<{{=| |=}}|text|>", - "expected": "<--->" - }, - { - "name": "Delimiters changes should chain.", - "data": { "start": "1", "middle": [ { "item": "2" }, { "item": "3" } ], "final": "4" }, - "template": "<{{=<% %>=}}<% start %><%=| |=%>|# middle || item ||/ middle ||={{ }}=|{{ final }}>", - "expected": "<1234>" - }, - { - // Test for https://github.com/groue/GRMustache/issues/38 - "name": "Delimiters can be set to current delimiters", - "data": { "text": "---" }, - "template": "<{{={{ }}=}}{{text}}>{{=| |=}}<|=| |=||text|>|=<% %>=|<<%=<% %>=%><%text%>>", - "expected": "<---><---><--->" - }, - - // Whitespace Insensitivity - - { - "name": "Whitespace in tag should be ignored.", - "data": { "text": "---" }, - "template": "<{{= \r\n\t@ \r\n\t@ \r\n\t=}}@text@>", - "expected": "<--->" - }, - - // Whitespace Sensitivity - - { - "name": "Single left outer whitespace should be honored.", - "data": { }, - "template": "< {{=<% %>=}}>", - "expected": "< >" - }, - { - "name": "Single right outer whitespace should be honored.", - "data": { }, - "template": "<{{=<% %>=}} >", - "expected": "< >" - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/expression_parsing_errors.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/expression_parsing_errors.json deleted file mode 100644 index 3ea40eaf..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/expression_parsing_errors.json +++ /dev/null @@ -1,353 +0,0 @@ -{ - "tests": [ - - { - "name": "Expression can not end with a dot", - "data": null, - "template": "{{a.}}", - "expected_error": "Invalid expression" - }, - { - "name": "Expression can not be made of two dots", - "data": null, - "template": "{{..}}", - "expected_error": "Invalid expression" - }, - { - "name": "Expression can not be made of three dots", - "data": null, - "template": "{{...}}", - "expected_error": "Invalid expression" - }, - { - "name": "Expression can not be made of two indentifiers separated by a space", - "data": null, - "template": "{{a b}}", - "expected_error": "Invalid expression" - }, - { - "name": "White space can not follow the dot of a scoped expression", - "data": null, - "template": "{{a. b}}", - "expected_error": "Invalid expression" - }, - { - "name": "White space can not lead the dot of a scoped expression", - "data": null, - "template": "{{a .b}}", - "expected_error": "Invalid expression" - }, - { - "name": "Comma can not be found outside of filter arguments", - "data": null, - "template": "{{a,b}}", - "expected_error": "Invalid expression" - }, - { - "name": "Comma can not be found outside of filter arguments", - "data": null, - "template": "{{a,}}", - "expected_error": "Invalid expression" - }, - { - "name": "Comma can not be found outside of filter arguments", - "data": null, - "template": "{{,a}}", - "expected_error": "Invalid expression" - }, - { - "name": "Comma can not follow filter arguments", - "data": null, - "template": "{{a(b,)}}", - "expected_error": "Invalid expression" - }, - { - "name": "Comma can not lead filter arguments", - "data": null, - "template": "{{a(,b)}}", - "expected_error": "Invalid expression" - }, - { - "name": "Comma can not follow comma", - "data": null, - "template": "{{a(b,,c)}}", - "expected_error": "Invalid expression" - }, - { - "name": "Comma can not follow comma", - "data": null, - "template": "{{a(b, ,c)}}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not be `{`", - "data": null, - "template": "{{ { }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `{`", - "data": null, - "template": "{{ {a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `{` (in dot-prefixed expression)", - "data": null, - "template": "{{ .{a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `{` (in compound expression)", - "data": null, - "template": "{{ a.{a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `{` (as filter argument)", - "data": null, - "template": "{{ a({a) }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not be `}`", - "data": null, - "template": "{{ } }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `}`", - "data": null, - "template": "{{ }a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `}` (in dot-prefixed expression)", - "data": null, - "template": "{{ .}a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `}` (in compound expression)", - "data": null, - "template": "{{ a.}a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `}` (as filter argument)", - "data": null, - "template": "{{ a(}a) }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not be `<`", - "data": null, - "template": "{{ < }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `<`", - "data": null, - "template": "{{
`", - "data": null, - "template": "{{ > }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `>`", - "data": null, - "template": "{{ >a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `>` (in dot-prefixed expression)", - "data": null, - "template": "{{ .>a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `>` (in compound expression)", - "data": null, - "template": "{{ a.>a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `>` (as filter argument)", - "data": null, - "template": "{{ a(>a) }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not be `&`", - "data": null, - "template": "{{ & }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `&`", - "data": null, - "template": "{{ &a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `&` (in dot-prefixed expression)", - "data": null, - "template": "{{ .&a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `&` (in compound expression)", - "data": null, - "template": "{{ a.&a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `&` (as filter argument)", - "data": null, - "template": "{{ a(&a) }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not be `#`", - "data": null, - "template": "{{ # }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `#`", - "data": null, - "template": "{{ #a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `#` (in dot-prefixed expression)", - "data": null, - "template": "{{ .#a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `#` (in compound expression)", - "data": null, - "template": "{{ a.#a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `#` (as filter argument)", - "data": null, - "template": "{{ a(#a) }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not be `^`", - "data": null, - "template": "{{ ^ }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `^`", - "data": null, - "template": "{{ ^a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `^` (in dot-prefixed expression)", - "data": null, - "template": "{{ .^a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `^` (in compound expression)", - "data": null, - "template": "{{ a.^a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `^` (as filter argument)", - "data": null, - "template": "{{ a(^a) }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not be `$`", - "data": null, - "template": "{{ $ }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `$`", - "data": null, - "template": "{{ $a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `$` (in dot-prefixed expression)", - "data": null, - "template": "{{ .$a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `$` (in compound expression)", - "data": null, - "template": "{{ a.$a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `$` (as filter argument)", - "data": null, - "template": "{{ a($a) }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not be `/`", - "data": null, - "template": "{{ / }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `/`", - "data": null, - "template": "{{ /a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `/` (in dot-prefixed expression)", - "data": null, - "template": "{{ ./a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `/` (in compound expression)", - "data": null, - "template": "{{ a./a }}", - "expected_error": "Invalid expression" - }, - { - "name": "Identifier can not start with `/` (as filter argument)", - "data": null, - "template": "{{ a(/a) }}", - "expected_error": "Invalid expression" - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/filters.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/filters.json deleted file mode 100644 index 96e7e501..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/filters.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "tests": [ - { - "name": "Filter should render.", - "data": { "name": "EDGAR allan poE" }, - "template": "{{ capitalized(name) }}", - "expected": "Edgar Allan Poe" - }, - { - "name": "Implicit iterator can be filtered.", - "data": "EDGAR allan poE", - "template": "{{ capitalized(.) }}", - "expected": "Edgar Allan Poe" - }, - - // Whitespace Insensitivity - - { - "name": "Whitespace in filter expressions should be ignored.", - "data": { "name": "EDGAR allan poE" }, - "template": "{{ capitalized \r\n\t( \r\n\tname \r\n\t) }}", - "expected": "Edgar Allan Poe" - - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/general.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/general.json deleted file mode 100644 index f696a1fa..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/general.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "tests": [ - { - "name": "The empty template should be rendered as the empty string.", - "data": { }, - "template": "", - "expected": "" - }, - { - "name": "The single whitespace template should be rendered as a single whitespace.", - "data": { }, - "template": " ", - "expected": " " - }, - { - "name": "A word template should be rendered as is.", - "data": { }, - "template": "Hello", - "expected": "Hello" - }, - { - "name": "A multi-line template should be rendered as is.", - "data": { }, - "template": "\n\n \n Hello \n\n", - "expected": "\n\n \n Hello \n\n" - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/implicit_iterator.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/implicit_iterator.json deleted file mode 100644 index 94679458..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/implicit_iterator.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "tests": [ - { - "name": "The implicit iterator should render the root context.", - "data": "---", - "template": "<{{.}}>", - "expected": "<--->" - }, - { - "name": "The implicit iterator should render the current context.", - "data": { "subject": "---" }, - "template": "<{{#subject}}{{.}}{{/subject}}>", - "expected": "<--->" - }, - { - "name": "The implicit iterator should render the current list item.", - "data": { "list": [ "1", "2", "3" ] }, - "template": "<{{#list}}{{.}}{{/list}}>", - "expected": "<123>" - }, - { - "name": "Lists should be iterated.", - "data": [ "1", "2", "3" ], - "template": "<{{#.}}-{{/.}}>", - "expected": "<--->" - }, - { - "name": "List items should become the current context.", - "data": [ "1", "2", "3" ], - "template": "<{{#.}}{{.}}{{/.}}>", - "expected": "<123>" - }, - { - "name": "True should trigger the section rendering.", - "data": true, - "template": "<{{#.}}---{{/.}}>", - "expected": "<--->" - }, - { - "name": "Object should become the current context.", - "data": "---", - "template": "<{{#.}}{{.}}{{/.}}>", - "expected": "<--->" - } - ] -} \ No newline at end of file diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/inheritable_partials.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/inheritable_partials.json deleted file mode 100644 index 91fe5cb7..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/inheritable_partials.json +++ /dev/null @@ -1,217 +0,0 @@ -{ - "tests": [ - { - "name": "Template can embed an inherited partial", - "data": { }, - "template": "before {{partial1}} after1", - "partials": { - "partial1": "before2 {{partial2}} after2", - "partial2": "partial2" }, - "expected": "before1 before2 partial2 after2 after1" - }, - { - "name": "Templates can override top level inheritable sections in inherited partials", - "data": { }, - "template": "{{partial2}}{{$inheritable}}4{{/inheritable}}{{/partial1}}", - "partials": { - "partial1": "{{$inheritable}}ignored{{/inheritable}}", - "partial2": "{{$inheritable}}2{{/inheritable}}{{$inheritable}}3{{/inheritable}}" }, - "expected": "4" - }, - { - "name": "The content of the last inheritable sections in partials is rendered in the inherited section", - "data": { }, - "template": "{{partial2}}{{/partial1}}", - "partials": { - "partial1": "{{$inheritable}}ignored{{/inheritable}}", - "partial2": "{{$inheritable}}2{{/inheritable}}{{$inheritable}}3{{/inheritable}}" }, - "expected": "3" - }, - { - "name": "Inherited partials can override inheritable sections in their own inherited partials", - "data": { }, - "template": "{{partial1}}{{/partial2}}", - "partials": { - "partial1": "{{$inheritable}}partial1{{/inheritable}}", - "partial2": "{{$inheritable}}ignored{{/inheritable}}" }, - "expected": "partial1" - }, - { - "name": "Partials can override inheritable sections in their own inherited partials", - "data": { }, - "template": "{{>partial1}}", - "partials": { - "partial1": "{{partial1}}", - "partials": { - "partial1": "{{partial2}}", - "partial2": "{{$inheritable}}ignored{{/inheritable}}" }, - "expected": "inherited" - }, - { - "name": "Templates can override inheritable sections in inherited partials embedded in inherited partials", - "data": { }, - "template": "{{", - "partials": { - "node": "{{content}}<{{#nodes}}{{>node}}{{/nodes}}>" - }, - "expected": ">>" - }, - { - "name": "Templates can override inheritable sections in recursive partials", - "data": { "content": "X", "nodes": [ { "content": "Y", "nodes": [] } ] }, - "template": "<{{node}}{{/value}}{{/node}}>", - "partials": { "node": "{{content}}<{{#nodes}}{{$value}}overriden{{/value}}{{/nodes}}>" }, - "expected": ">>" - }, - { - "name": "Inheritable section context is cleaned after inherited partial rendering.", - "data": { }, - "template": "{{$section}}rendered{{/section}}|{{partial2}}{{/partial}}", - "partials": { - "partial": "{{$inheritable}}ignored{{/inheritable}}", - "partial2": "{{$inheritable}}inherited{{/inheritable}}" }, - "expected": "inherited" - }, - { - "name": "Two levels of inheritance: inherited partial with overriding content containing another inherited partial", - "data": { }, - "template": "{{", - "expected": "" - }, - { - "name": "Inheritable sections are not tied to rendered data: they render for empty lists.", - "data": { "inheritable": [] }, - "template": "<{{$inheritable}}rendered{{/inheritable}}>", - "expected": "" - }, - { - "name": "Inheritable sections are not tied to rendered data: they do not open new contexts.", - "data": { "subject": "rendered", "inheritable": { "subject": "ignored" } }, - "template": "<{{$inheritable}}{{subject}}{{/inheritable}}>", - "expected": "" - }, - { - "name": "Inheritable sections are not tied to rendered data: they do not render multiple times.", - "data": { "inheritable": [0,1,2,3] }, - "template": "<{{$inheritable}}rendered{{/inheritable}}>", - "expected": "" - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/inverted_sections.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/inverted_sections.json deleted file mode 100644 index b39294b4..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/inverted_sections.json +++ /dev/null @@ -1,309 +0,0 @@ -{ - "tests": [ - { - "name": "Multiple inverted sections per template should be permitted.", - "data": { "t": false, "two": "2" }, - "template": "<{{^t}}1{{/t}}{{two}}{{^t}}3{{/t}}>", - "expected": "<123>" - }, - - // Boolean interpretation - - { - "name": "Missing key should trigger the inverted section rendering.", - "data": { }, - "template": "<{{^subject}}---{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Missing key should trigger the inverted section rendering without altering the top of the context stack.", - "data": { "object": "---" }, - "template": "<{{#object}}{{^subject}}{{.}}{{/subject}}{{/object}}>", - "expected": "<--->" - }, - { - "name": "Null should trigger the inverted section rendering.", - "data": { "subject": null }, - "template": "<{{^subject}}---{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Null should trigger the inverted section rendering without altering the top of the context stack.", - "data": { "subject": null, "object": "---" }, - "template": "<{{#object}}{{^subject}}{{.}}{{/subject}}{{/object}}>", - "expected": "<--->" - }, - { - "name": "False should trigger the inverted section rendering.", - "data": { "subject": false }, - "template": "<{{^subject}}---{{/subject}}>", - "expected": "<--->" - }, - { - "name": "False should trigger the inverted section rendering without altering the top of the context stack.", - "data": { "subject": false, "object": "---" }, - "template": "<{{#object}}{{^subject}}{{.}}{{/subject}}{{/object}}>", - "expected": "<--->" - }, - { - "name": "Empty string should trigger the inverted section rendering.", - "data": { "subject": "" }, - "template": "<{{^subject}}---{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Empty string should trigger the inverted section rendering without altering the top of the context stack.", - "data": { "subject": "", "object": "---" }, - "template": "<{{#object}}{{^subject}}{{.}}{{/subject}}{{/object}}>", - "expected": "<--->" - }, - { - "name": "Empty list should trigger the inverted section rendering.", - "data": { "subject": [] }, - "template": "<{{^subject}}---{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Empty list should trigger the inverted section rendering without altering the top of the context stack.", - "data": { "subject": [], "object": "---" }, - "template": "<{{#object}}{{^subject}}{{.}}{{/subject}}{{/object}}>", - "expected": "<--->" - }, - { - "name": "Zero should trigger the inverted section rendering.", - "data": { "subject": 0 }, - "template": "<{{^subject}}---{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Zero should trigger the inverted section rendering without altering the top of the context stack.", - "data": { "subject": 0, "object": "---" }, - "template": "<{{#object}}{{^subject}}{{.}}{{/subject}}{{/object}}>", - "expected": "<--->" - }, - { - "name": "True should trigger the inverted section omission.", - "data": { "subject": true }, - "template": "<{{^subject}}---{{/subject}}>", - "expected": "<>" - }, - { - "name": "Object should trigger the inverted section omission.", - "data": { "subject": { } }, - "template": "<{{^subject}}---{{/subject}}>", - "expected": "<>" - }, - { - "name": "Non-empty string should trigger the inverted section omission.", - "data": { "subject": "---" }, - "template": "<{{^subject}}---{{/subject}}>", - "expected": "<>" - }, - { - "name": "Non-empty blank string should trigger the inverted section omission.", - "data": { "subject": " " }, - "template": "<{{^subject}}---{{/subject}}>", - "expected": "<>" - }, - { - "name": "Non-empty list should trigger the inverted section omission.", - "data": { "subject": [ { "n": 1 }, { "n": 2 }, { "n": 3 } ] }, - "template": "<{{^subject}}---{{/subject}}>", - "expected": "<>" - }, - { - "name": "List made of an empty list should trigger the section omission.", - "data": { "subject": [[]] }, - "template": "<{{^subject}}---{{/subject}}>", - "expected": "<>" - }, - - // 'else' sections - - { - "name": "Missing key should trigger the inverted section rendering, and the omission of the 'else' section.", - "data": { }, - "template": "<{{^subject}}---{{#subject}}+++{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Null should trigger the inverted section rendering, and the omission of the 'else' section.", - "data": { "subject": null }, - "template": "<{{^subject}}---{{#subject}}+++{{/subject}}>", - "expected": "<--->" - }, - { - "name": "False should trigger the inverted section rendering, and the omission of the 'else' section.", - "data": { "subject": false }, - "template": "<{{^subject}}---{{#subject}}+++{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Empty string should trigger the inverted section rendering, and the omission of the 'else' section.", - "data": { "subject": "" }, - "template": "<{{^subject}}---{{#subject}}+++{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Empty list should trigger the inverted section rendering, and the omission of the 'else' section.", - "data": { "subject": [] }, - "template": "<{{^subject}}---{{#subject}}+++{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Zero should trigger the inverted section rendering, and the omission of the 'else' section.", - "data": { "subject": 0 }, - "template": "<{{^subject}}---{{#subject}}+++{{/subject}}>", - "expected": "<--->" - }, - { - "name": "True should trigger the inverted section omission, and the rendering of the 'else' section.", - "data": { "subject": true }, - "template": "<{{^subject}}---{{#subject}}+++{{/subject}}>", - "expected": "<+++>" - }, - { - "name": "Object should trigger the inverted section omission, and the rendering of the 'else' section.", - "data": { "subject": { } }, - "template": "<{{^subject}}---{{#subject}}+++{{/subject}}>", - "expected": "<+++>" - }, - { - "name": "Non-empty string should trigger the inverted section omission, and the rendering of the 'else' section.", - "data": { "subject": "---" }, - "template": "<{{^subject}}---{{#subject}}+++{{/subject}}>", - "expected": "<+++>" - }, - { - "name": "Non-empty blank string should trigger the inverted section omission, and the rendering of the 'else' section.", - "data": { "subject": " " }, - "template": "<{{^subject}}---{{#subject}}+++{{/subject}}>", - "expected": "<+++>" - }, - { - "name": "Non-empty list should trigger the inverted section omission, and the rendering of the 'else' section.", - "data": { "subject": [ { "n": 1 }, { "n": 2 }, { "n": 3 } ] }, - "template": "<{{^subject}}---{{#subject}}{{n}}{{/subject}}>", - "expected": "<123>" - }, - { - "name": "List made of an empty list should trigger the section omission, and the rendering of the 'else' section.", - "data": { "subject": [[]] }, - "template": "<{{^subject}}---{{#subject}}+++{{/subject}}>", - "expected": "<+++>" - }, - - // Empty 'else' and closing tags - - { - "name": "Closing tag may be empty.", - "data": { "subject": false }, - "template": "<{{^subject}}---{{/}}>", - "expected": "<--->" - }, - - { - "name": "Closing tag may be blank.", - "data": { "subject": false }, - "template": "<{{^subject}}---{{/ }}>", - "expected": "<--->" - }, - - { - "name": "Closing tag after 'else' tag may be empty.", - "data": { "subject": true }, - "template": "<{{^subject}}---{{#subject}}+++{{/}}>", - "expected": "<+++>" - }, - - { - "name": "Closing tag after 'else' tag may be blank.", - "data": { "subject": true }, - "template": "<{{^subject}}---{{#subject}}+++{{/ }}>", - "expected": "<+++>" - }, - - { - "name": "'Else' tag may be empty.", - "data": { "subject": true }, - "template": "<{{^subject}}---{{#}}+++{{/subject}}>", - "expected": "<+++>" - }, - - { - "name": "'Else' tag may be blank.", - "data": { "subject": true }, - "template": "<{{^subject}}---{{# }}+++{{/subject}}>", - "expected": "<+++>" - }, - - { - "name": "Both 'else' and closing tags may be empty.", - "data": { "subject": true }, - "template": "<{{^subject}}---{{#}}+++{{/}}>", - "expected": "<+++>" - }, - - { - "name": "Both 'else' and closing tags may be blank.", - "data": { "subject": true }, - "template": "<{{^subject}}---{{# }}+++{{/ }}>", - "expected": "<+++>" - }, - - { - "name": "Empty 'else' and closing tags can be nested.", - "data": { "subject1": true, "subject2": true }, - "template": "<{{^subject1}}{{^foo}}---{{# }}+++{{/ }}{{# }}{{^subject2}}---{{# }}+++{{/ }}{{/ }}>", - "expected": "<+++>" - }, - - // Whitespace Insensitivity - - { - "name": "Whitespace in tag should be ignored.", - "data": { "subject": false }, - "template": "<{{^ \r\n\tsubject \r\n\t}}---{{/ \r\n\tsubject \r\n\t}}>", - "expected": "<--->" - }, - - // Whitespace Sensitivity - - { - "name": "Single left outer whitespace should be honored when inverted section is rendered.", - "data": { }, - "template": "< {{^subject}}---{{/subject}}>", - "expected": "< --->" - }, - { - "name": "Single right outer whitespace should be honored when inverted section is rendered.", - "data": { }, - "template": "<{{^subject}}---{{/subject}} >", - "expected": "<--- >" - }, - { - "name": "Single left inner whitespace should be honored when inverted section is rendered.", - "data": { }, - "template": "<{{^subject}} ---{{/subject}}>", - "expected": "< --->" - }, - { - "name": "Single right inner whitespace should be honored when inverted section is rendered.", - "data": { }, - "template": "<{{^subject}}--- {{/subject}}>", - "expected": "<--- >" - }, - { - "name": "Single left outer whitespace should be honored when inverted section is omitted.", - "data": { "subject": true }, - "template": "< {{^subject}}---{{/subject}}--->", - "expected": "< --->" - }, - { - "name": "Single right outer whitespace should be honored when inverted section is omitted.", - "data": { "subject": true }, - "template": "<---{{^subject}}---{{/subject}} >", - "expected": "<--- >" - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/partials.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/partials.json deleted file mode 100644 index 5fd9be1a..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/partials.json +++ /dev/null @@ -1,397 +0,0 @@ -{ - "tests": [ - { - "name": "Partial should be rendered.", - "data": { }, - "template": "<{{>text}}>", - "partials": { "text": "from partial" }, - "expected": "" - }, - { - "name": "Partial should be rendered in the current context.", - "data": { "text": "content" }, - "template": "<{{>partial}}>", - "partials": { "partial": "*{{text}}*" }, - "expected": "<*content*>" - }, - { - "name": "Recursive partials should be rendered.", - "data": { "content": "X", "nodes": [ { "content": "Y", "nodes": [] } ] }, - "template": "<{{>node}}>", - "partials": { "node": "{{content}}<{{#nodes}}{{>node}}{{/nodes}}>" }, - "expected": ">>" - }, - { - "name": "Partial names can contain dots.", - "data": null, - "template": "<{{>partial.html}}>", - "partials": { "partial.html": "---" }, - "expected": "<--->" - }, - - // File system - - { - "name": "Partials loaded from a template with .mustache extension should have the extension .mustache", - "data": { }, - "template_name": "template.mustache", - "partials": { - "template.mustache": "<{{>partial}}>", - "partial": "partial", - "partial.html": "partial.html", - "partial.html.txt": "partial.html.txt", - "partial.html.mustache": "partial.html.mustache", - "partial.mustache": "partial.mustache", - "partial.mustache.txt": "partial.mustache.txt", - "partial.mustache.mustache": "partial.mustache.mustache", - "partial.txt": "partial.txt", - "partial.txt.txt": "partial.txt.txt", - "partial.txt.mustache": "partial.txt.mustache" - }, - "expected": "" - }, - { - "name": "Partials loaded from a template with .mustache extension should have the extension .mustache", - "data": { }, - "template_name": "template.mustache", - "partials": { - "template.mustache": "<{{>partial.mustache}}>", - "partial": "partial", - "partial.html": "partial.html", - "partial.html.txt": "partial.html.txt", - "partial.html.mustache": "partial.html.mustache", - "partial.mustache": "partial.mustache", - "partial.mustache.txt": "partial.mustache.txt", - "partial.mustache.mustache": "partial.mustache.mustache", - "partial.txt": "partial.txt", - "partial.txt.txt": "partial.txt.txt", - "partial.txt.mustache": "partial.txt.mustache" - }, - "expected": "" - }, - { - "name": "Partials loaded from a template with .mustache extension should have the extension .mustache", - "data": { }, - "template_name": "template.mustache", - "partials": { - "template.mustache": "<{{>partial.html}}>", - "partial": "partial", - "partial.html": "partial.html", - "partial.html.txt": "partial.html.txt", - "partial.html.mustache": "partial.html.mustache", - "partial.mustache": "partial.mustache", - "partial.mustache.txt": "partial.mustache.txt", - "partial.mustache.mustache": "partial.mustache.mustache", - "partial.txt": "partial.txt", - "partial.txt.txt": "partial.txt.txt", - "partial.txt.mustache": "partial.txt.mustache" - }, - "expected": "" - }, - { - "name": "Partials loaded from a template with .txt extension should have the extension .txt", - "data": { }, - "template_name": "template.txt", - "partials": { - "template.txt": "<{{>partial}}>", - "partial": "partial", - "partial.html": "partial.html", - "partial.html.txt": "partial.html.txt", - "partial.html.mustache": "partial.html.mustache", - "partial.mustache": "partial.mustache", - "partial.mustache.txt": "partial.mustache.txt", - "partial.mustache.mustache": "partial.mustache.mustache", - "partial.txt": "partial.txt", - "partial.txt.txt": "partial.txt.txt", - "partial.txt.mustache": "partial.txt.mustache" - }, - "expected": "" - }, - { - "name": "Partials loaded from a template with .txt extension should have the extension .txt", - "data": { }, - "template_name": "template.txt", - "partials": { - "template.txt": "<{{>partial.txt}}>", - "partial": "partial", - "partial.html": "partial.html", - "partial.html.txt": "partial.html.txt", - "partial.html.mustache": "partial.html.mustache", - "partial.mustache": "partial.mustache", - "partial.mustache.txt": "partial.mustache.txt", - "partial.mustache.mustache": "partial.mustache.mustache", - "partial.txt": "partial.txt", - "partial.txt.txt": "partial.txt.txt", - "partial.txt.mustache": "partial.txt.mustache" - }, - "expected": "" - }, - { - "name": "Partials loaded from a template with .txt extension should have the extension .txt", - "data": { }, - "template_name": "template.txt", - "partials": { - "template.txt": "<{{>partial.html}}>", - "partial": "partial", - "partial.html": "partial.html", - "partial.html.txt": "partial.html.txt", - "partial.html.mustache": "partial.html.mustache", - "partial.mustache": "partial.mustache", - "partial.mustache.txt": "partial.mustache.txt", - "partial.mustache.mustache": "partial.mustache.mustache", - "partial.txt": "partial.txt", - "partial.txt.txt": "partial.txt.txt", - "partial.txt.mustache": "partial.txt.mustache" - }, - "expected": "" - }, - { - "name": "Partials loaded from a template without extension should have no extension", - "data": { }, - "template_name": "template", - "partials": { - "template": "<{{>partial}}>", - "partial": "partial", - "partial.html": "partial.html", - "partial.html.txt": "partial.html.txt", - "partial.html.mustache": "partial.html.mustache", - "partial.mustache": "partial.mustache", - "partial.mustache.txt": "partial.mustache.txt", - "partial.mustache.mustache": "partial.mustache.mustache", - "partial.txt": "partial.txt", - "partial.txt.txt": "partial.txt.txt", - "partial.txt.mustache": "partial.txt.mustache" - }, - "expected": "" - }, - { - "name": "Partials loaded from a template without extension should have no extension", - "data": { }, - "template_name": "template", - "partials": { - "template": "<{{>partial.html}}>", - "partial": "partial", - "partial.html": "partial.html", - "partial.html.txt": "partial.html.txt", - "partial.html.mustache": "partial.html.mustache", - "partial.mustache": "partial.mustache", - "partial.mustache.txt": "partial.mustache.txt", - "partial.mustache.mustache": "partial.mustache.mustache", - "partial.txt": "partial.txt", - "partial.txt.txt": "partial.txt.txt", - "partial.txt.mustache": "partial.txt.mustache" - }, - "expected": "" - }, - { - "name": "Deep partials loaded from a template with .mustache extension should have the extension .mustache", - "data": { }, - "template_name": "template.mustache", - "partials": { - "template.mustache": "<{{>partial}}>", - "partial": "{{>deep_partial}}", - "partial.mustache": "{{>deep_partial}}", - "partial.txt": "{{>deep_partial}}", - "deep_partial": "none", - "deep_partial.mustache": "mustache", - "deep_partial.txt": "text" - }, - "expected": "" - }, - { - "name": "Deep partials loaded from a template with .txt extension should have the extension .txt", - "data": { }, - "template_name": "template.txt", - "partials": { - "template.txt": "<{{>partial}}>", - "partial": "{{>deep_partial}}", - "partial.mustache": "{{>deep_partial}}", - "partial.txt": "{{>deep_partial}}", - "deep_partial": "none", - "deep_partial.mustache": "mustache", - "deep_partial.txt": "text" - }, - "expected": "" - }, - { - "name": "Deep partials loaded from a template without extension should have no extension", - "data": { }, - "template_name": "template", - "partials": { - "template": "<{{>partial}}>", - "partial": "{{>deep_partial}}", - "partial.mustache": "{{>deep_partial}}", - "partial.txt": "{{>deep_partial}}", - "deep_partial": "none", - "deep_partial.mustache": "mustache", - "deep_partial.txt": "text" - }, - "expected": "" - }, - { - "name": "Posix relative path should navigate the file system", - "data": { }, - "template_name": "template.mustache", - "partials": { - "template.mustache": "<{{>partials/partial}}>", - "partials/partial.mustache": "---" - }, - "expected": "<--->" - }, - { - "name": "Posix relative path should navigate the file system", - "data": { }, - "template_name": "template.mustache", - "partials": { - "template.mustache": "<{{>partials/partial}}>", - "partials/partial.mustache": "{{>deep_partial}}", - "partials/deep_partial.mustache": "---" - }, - "expected": "<--->" - }, - { - "name": "Posix relative path should navigate the file system", - "data": { }, - "template_name": "template.mustache", - "partials": { - "template.mustache": "<{{>partials/partial}}>", - "partials/partial.mustache": "{{>../other_partials/deep_partial}}", - "other_partials/deep_partial.mustache": "---" - }, - "expected": "<--->" - }, - { - "name": "Posix relative path should navigate the file system", - "data": { }, - "template_name": "partials/template.mustache", - "partials": { - "partials/template.mustache": "<{{>partial}}>", - "partials/partial.mustache": "{{>../other_partials/deep_partial}}", - "other_partials/deep_partial.mustache": "---" - }, - "expected": "<--->" - }, - { - "name": "Posix relative path should navigate the file system", - "data": { }, - "template_name": "file1", - "partials": { - "file1": "file1 {{>dir/file1}}{{>file2}}", - "file1.mustache": "file1.mustache {{>dir/file1}}{{>file2}}", - "file1.txt": "file1.txt {{>dir/file1}}{{>file2}}", - "file2": "file2 ", - "file2.mustache": "file2.mustache ", - "file2.txt": "file2.txt ", - "dir/file1": "dir/file1 {{>dir/file1}}{{>file2}}", - "dir/file1.mustache": "dir/file1.mustache {{>dir/file1}}{{>file2}}", - "dir/file1.txt": "dir/file1.txt {{>dir/file1}}{{>file2}}", - "dir/file2": "dir/file2 ", - "dir/file2.mustache": "dir/file2.mustache ", - "dir/file2.txt": "dir/file2.txt ", - "dir/dir/file2.txt": "dir/dir/file2.txt ", - "dir/dir/file1": "dir/dir/file1 {{>file2}}", - "dir/dir/file1.mustache": "dir/dir/file1.mustache {{>file2}}", - "dir/dir/file1.txt": "dir/dir/file1.txt {{>file2}}", - "dir/dir/file2": "dir/dir/file2 ", - "dir/dir/file2.mustache": "dir/dir/file2.mustache ", - "dir/dir/file2.txt": "dir/dir/file2.txt " - }, - "expected": "file1 dir/file1 dir/dir/file1 dir/dir/file2 dir/file2 file2 " - }, - { - "name": "Posix relative path should navigate the file system", - "data": { }, - "template_name": "file1.mustache", - "partials": { - "file1": "file1 {{>dir/file1}}{{>file2}}", - "file1.mustache": "file1.mustache {{>dir/file1}}{{>file2}}", - "file1.txt": "file1.txt {{>dir/file1}}{{>file2}}", - "file2": "file2 ", - "file2.mustache": "file2.mustache ", - "file2.txt": "file2.txt ", - "dir/file1": "dir/file1 {{>dir/file1}}{{>file2}}", - "dir/file1.mustache": "dir/file1.mustache {{>dir/file1}}{{>file2}}", - "dir/file1.txt": "dir/file1.txt {{>dir/file1}}{{>file2}}", - "dir/file2": "dir/file2 ", - "dir/file2.mustache": "dir/file2.mustache ", - "dir/file2.txt": "dir/file2.txt ", - "dir/dir/file2.txt": "dir/dir/file2.txt ", - "dir/dir/file1": "dir/dir/file1 {{>file2}}", - "dir/dir/file1.mustache": "dir/dir/file1.mustache {{>file2}}", - "dir/dir/file1.txt": "dir/dir/file1.txt {{>file2}}", - "dir/dir/file2": "dir/dir/file2 ", - "dir/dir/file2.mustache": "dir/dir/file2.mustache ", - "dir/dir/file2.txt": "dir/dir/file2.txt " - }, - "expected": "file1.mustache dir/file1.mustache dir/dir/file1.mustache dir/dir/file2.mustache dir/file2.mustache file2.mustache " - }, - { - "name": "Posix relative path should navigate the file system", - "data": { }, - "template_name": "file1.txt", - "partials": { - "file1": "file1 {{>dir/file1}}{{>file2}}", - "file1.mustache": "file1.mustache {{>dir/file1}}{{>file2}}", - "file1.txt": "file1.txt {{>dir/file1}}{{>file2}}", - "file2": "file2 ", - "file2.mustache": "file2.mustache ", - "file2.txt": "file2.txt ", - "dir/file1": "dir/file1 {{>dir/file1}}{{>file2}}", - "dir/file1.mustache": "dir/file1.mustache {{>dir/file1}}{{>file2}}", - "dir/file1.txt": "dir/file1.txt {{>dir/file1}}{{>file2}}", - "dir/file2": "dir/file2 ", - "dir/file2.mustache": "dir/file2.mustache ", - "dir/file2.txt": "dir/file2.txt ", - "dir/dir/file2.txt": "dir/dir/file2.txt ", - "dir/dir/file1": "dir/dir/file1 {{>file2}}", - "dir/dir/file1.mustache": "dir/dir/file1.mustache {{>file2}}", - "dir/dir/file1.txt": "dir/dir/file1.txt {{>file2}}", - "dir/dir/file2": "dir/dir/file2 ", - "dir/dir/file2.mustache": "dir/dir/file2.mustache ", - "dir/dir/file2.txt": "dir/dir/file2.txt " - }, - "expected": "file1.txt dir/file1.txt dir/dir/file1.txt dir/dir/file2.txt dir/file2.txt file2.txt " - }, - - // Whitespace Insensitivity - - { - "name": "Whitespace in tag should be ignored.", - "data": { "boolean": true }, - "template": "<{{> \r\n\tpartial \r\n\t}}>", - "partials": { "partial": "=" }, - "expected": "<=>" - }, - - // Whitespace Sensitivity - - { - "name": "Single left outer whitespace should be honored.", - "data": { "subject": "---" }, - "template": "< {{>partial}}>", - "partials": { "partial": "---" }, - "expected": "< --->" - }, - { - "name": "Single right outer whitespace should be honored.", - "data": { "subject": "---" }, - "template": "<{{>partial}} >", - "partials": { "partial": "---" }, - "expected": "<--- >" - }, - { - "name": "Single left inner whitespace should be honored.", - "data": { "subject": "---" }, - "template": "<{{>partial}}>", - "partials": { "partial": " ---" }, - "expected": "< --->" - }, - { - "name": "Single right inner whitespace should be honored.", - "data": { "subject": "---" }, - "template": "<{{>partial}}>", - "partials": { "partial": "--- " }, - "expected": "<--- >" - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/pragmas.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/pragmas.json deleted file mode 100644 index 9032616d..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/pragmas.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "tests": [ - { - "name": "Pragmas tags are not rendered.", - "data": { }, - "template": "<{{% PRAGMA }}>", - "expected": "<>" - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/sections.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/sections.json deleted file mode 100644 index 24f40ff0..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/sections.json +++ /dev/null @@ -1,384 +0,0 @@ -{ - "tests": [ - { - "name": "Multiple sections per template should be permitted.", - "data": { "t": true, "two": "2" }, - "template": "<{{#t}}1{{/t}}{{two}}{{#t}}3{{/t}}>", - "expected": "<123>" - }, - - // Boolean interpretation - - { - "name": "Missing key should trigger the section omission.", - "data": { }, - "template": "<{{#subject}}---{{/subject}}>", - "expected": "<>" - }, - { - "name": "Null should trigger the section omission.", - "data": { "subject": null }, - "template": "<{{#subject}}---{{/subject}}>", - "expected": "<>" - }, - { - "name": "False should trigger the section omission.", - "data": { "subject": false }, - "template": "<{{#subject}}---{{/subject}}>", - "expected": "<>" - }, - { - "name": "Empty string should trigger the section omission.", - "data": { "subject": "" }, - "template": "<{{#subject}}---{{/subject}}>", - "expected": "<>" - }, - { - "name": "Empty list should trigger the section omission.", - "data": { "subject": [] }, - "template": "<{{#subject}}---{{/subject}}>", - "expected": "<>" - }, - { - "name": "Zero should trigger the section omission.", - "data": { "subject": 0 }, - "template": "<{{#subject}}---{{/subject}}>", - "expected": "<>" - }, - { - "name": "True should trigger the section rendering.", - "data": { "subject": true }, - "template": "<{{#subject}}---{{/subject}}>", - "expected": "<--->" - }, - { - // Regression test for https://github.com/groue/GRMustache/issues/83 - "name": "True should trigger the section rendering without altering the top of the context stack.", - "data": { "subject": true, "object": "---" }, - "template": "<{{#object}}{{#subject}}{{.}}{{/subject}}{{/object}}>", - "expected": "<--->" - }, - { - "name": "Non-zero number should trigger the section rendering.", - "data": { "subject": 1 }, - "template": "<{{#subject}}---{{/subject}}>", - "expected": "<--->" - }, - { - // Regression test for https://github.com/groue/GRMustache/issues/83 - "name": "Non-zero number should trigger the section rendering without altering the top of the context stack.", - "data": { "subject": 1, "object": "---" }, - "template": "<{{#object}}{{#subject}}{{.}}{{/subject}}{{/object}}>", - "expected": "<--->" - }, - { - "name": "Object should trigger the section rendering.", - "data": { "subject": { } }, - "template": "<{{#subject}}---{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Object should trigger the section rendering and enter the top of the context stack.", - "data": { "subject": { "object": "---" } }, - "template": "<{{#subject}}{{object}}{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Non-empty string should trigger the section rendering.", - "data": { "subject": "---" }, - "template": "<{{#subject}}---{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Non-empty string should trigger the section rendering and enter the top of the context stack.", - "data": { "subject": "---" }, - "template": "<{{#subject}}{{.}}{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Non-empty blank string should trigger the section rendering.", - "data": { "subject": " " }, - "template": "<{{#subject}}---{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Non-empty blank string should trigger the section rendering and enter the top of the context stack.", - "data": { "subject": " " }, - "template": "<{{#subject}}{{.}}{{/subject}}>", - "expected": "< >" - }, - { - "name": "List made of an empty list should trigger the section rendering.", - "data": { "subject": [[]] }, - "template": "<{{#subject}}---{{/subject}}>", - "expected": "<--->" - }, - { - "name": "List made of lists should render each of them independently.", - "data": { "subject": [["a", "b"], [], [0, 1]] }, - "template": "<{{#subject}}({{#.}}{{.}}{{^}}-{{/}}){{/subject}}>", - "expected": "<(ab)(-)(01)>" - }, - - // Context stack - - { - "name": "Object should become the current context.", - "data": { "context": { "subject": "---" } }, - "template": "<{{#context}}{{subject}}{{/context}}>", - "expected": "<--->" - }, - { - "name": "A key miss should look in including context.", - "data": { "subject": "---", "context": { } }, - "template": "<{{#context}}{{subject}}{{/context}}>", - "expected": "<--->" - }, - { - "name": "Nested sections with same name should be isolated.", - "data": { "context": { "subject": "1", "context": { "subject": "a" }}}, - "template": "<{{#context}}{{subject}}{{#context}}{{subject}}{{/context}}{{/context}}>", - "expected": "<1a>" - }, - - // Lists - - { - "name": "Lists should be iterated.", - "data": { "list": [ 1, 2, 3 ] }, - "template": "<{{#list}}-{{/list}}>", - "expected": "<--->" - }, - { - "name": "List items should become the current context.", - "data": { "list": [ { "n": 1 }, { "n": 2 }, { "n": 3 } ] }, - "template": "<{{#list}}{{n}}{{/list}}>", - "expected": "<123>" - }, - { - "name": "A key miss should look in including context.", - "data": { "subject": "---", "list": [ { "n": 1 }, { "n": 2 }, { "n": 3 } ] }, - "template": "<{{#list}}{{subject}}{{n}}{{/list}}>", - "expected": "<---1---2---3>" - }, - { - "name": "Nested sections with same name should be isolated.", - "data": { "context": [ { "subject": "1", "context": [ { "subject": "a" }, { "subject": "b" }, { "subject": "c" } ] } ] }, - "template": "<{{#context}}{{subject}}{{#context}}{{subject}}{{/context}}{{/context}}>", - "expected": "<1abc>" - }, - - // 'else' sections - - { - "name": "Missing key should trigger the section omission, and the rendering of the 'else' section.", - "data": { }, - "template": "<{{#subject}}---{{^subject}}+++{{/subject}}>", - "expected": "<+++>" - }, - { - "name": "Null should trigger the section omission, and the rendering of the 'else' section.", - "data": { "subject": null }, - "template": "<{{#subject}}---{{^subject}}+++{{/subject}}>", - "expected": "<+++>" - }, - { - "name": "False should trigger the section omission, and the rendering of the 'else' section.", - "data": { "subject": false }, - "template": "<{{#subject}}---{{^subject}}+++{{/subject}}>", - "expected": "<+++>" - }, - { - "name": "Empty string should trigger the section omission, and the rendering of the 'else' section.", - "data": { "subject": "" }, - "template": "<{{#subject}}---{{^subject}}+++{{/subject}}>", - "expected": "<+++>" - }, - { - "name": "Empty list should trigger the section omission, and the rendering of the 'else' section.", - "data": { "subject": [] }, - "template": "<{{#subject}}---{{^subject}}+++{{/subject}}>", - "expected": "<+++>" - }, - { - "name": "Zero should trigger the section omission, and the rendering of the 'else' section.", - "data": { "subject": 0 }, - "template": "<{{#subject}}---{{^subject}}+++{{/subject}}>", - "expected": "<+++>" - }, - { - "name": "True should trigger the section rendering, and the omission of the 'else' section.", - "data": { "subject": true }, - "template": "<{{#subject}}---{{^subject}}+++{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Object should trigger the section rendering, and the omission of the 'else' section.", - "data": { "subject": { } }, - "template": "<{{#subject}}---{{^subject}}+++{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Non-empty string should trigger the section rendering, and the omission of the 'else' section.", - "data": { "subject": "---" }, - "template": "<{{#subject}}---{{^subject}}+++{{/subject}}>", - "expected": "<--->" - }, - { - "name": "Non-empty blank string should trigger the section rendering, and the omission of the 'else' section.", - "data": { "subject": " " }, - "template": "<{{#subject}}---{{^subject}}+++{{/subject}}>", - "expected": "<--->" - }, - { - "name": "List made of an empty list should trigger the section rendering, and the omission of the 'else' section.", - "data": { "subject": [[]] }, - "template": "<{{#subject}}---{{^subject}}+++{{/subject}}>", - "expected": "<--->" - }, - - { - "name": "Non-empty lists should be iterated and the 'else' section omitted", - "data": { "list": [ 1, 2, 3 ] }, - "template": "<{{#list}}-{{^list}}+{{/list}}>", - "expected": "<--->" - }, - - // Empty 'else' and closing tags - - { - "name": "Closing tag may be empty.", - "data": { "subject": true }, - "template": "<{{#subject}}---{{/}}>", - "expected": "<--->" - }, - - { - "name": "Closing tag may be blank.", - "data": { "subject": true }, - "template": "<{{#subject}}---{{/ }}>", - "expected": "<--->" - }, - - { - "name": "Closing tag after 'else' tag may be empty.", - "data": { "subject": false }, - "template": "<{{#subject}}---{{^subject}}+++{{/}}>", - "expected": "<+++>" - }, - - { - "name": "Closing tag after 'else' tag may be blank.", - "data": { "subject": false }, - "template": "<{{#subject}}---{{^subject}}+++{{/ }}>", - "expected": "<+++>" - }, - - { - "name": "'Else' tag may be empty.", - "data": { "subject": false }, - "template": "<{{#subject}}---{{^}}+++{{/subject}}>", - "expected": "<+++>" - }, - - { - "name": "'Else' tag may be blank.", - "data": { "subject": false }, - "template": "<{{#subject}}---{{^ }}+++{{/subject}}>", - "expected": "<+++>" - }, - - { - "name": "Both 'else' and closing tags may be empty.", - "data": { "subject": false }, - "template": "<{{#subject}}---{{^}}+++{{/}}>", - "expected": "<+++>" - }, - - { - "name": "Both 'else' and closing tags may be blank.", - "data": { "subject": false }, - "template": "<{{#subject}}---{{^ }}+++{{/ }}>", - "expected": "<+++>" - }, - - { - "name": "Empty 'else' and closing tags can be nested.", - "data": { "subject1": false, "subject2": false }, - "template": "<{{#subject1}}{{#foo}}---{{^ }}+++{{/ }}{{^ }}{{#subject2}}---{{^ }}+++{{/ }}{{/ }}>", - "expected": "<+++>" - }, - - // Whitespace Insensitivity - - { - "name": "Whitespace in tag should be ignored.", - "data": { "subject": true }, - "template": "<{{# \r\n\tsubject \r\n\t}}---{{/ \r\n\tsubject \r\n\t}}>", - "expected": "<--->" - }, - - // Whitespace Sensitivity - - { - "name": "Single left outer whitespace should be honored when section is rendered.", - "data": { "subject": true }, - "template": "< {{#subject}}---{{/subject}}>", - "expected": "< --->" - }, - { - "name": "Single right outer whitespace should be honored when section is rendered.", - "data": { "subject": true }, - "template": "<{{#subject}}---{{/subject}} >", - "expected": "<--- >" - }, - { - "name": "Single left inner whitespace should be honored when section is rendered.", - "data": { "subject": true }, - "template": "<{{#subject}} ---{{/subject}}>", - "expected": "< --->" - }, - { - "name": "Single right inner whitespace should be honored when section is rendered.", - "data": { "subject": true }, - "template": "<{{#subject}}--- {{/subject}}>", - "expected": "<--- >" - }, - { - "name": "Single left outer whitespace should be honored.", - "data": { "list": [ 1, 2, 3 ] }, - "template": "< {{#list}}-{{/list}}>", - "expected": "< --->" - }, - { - "name": "Single right outer whitespace should be honored.", - "data": { "list": [ 1, 2, 3] }, - "template": "<{{#list}}-{{/list}} >", - "expected": "<--- >" - }, - { - "name": "Single left inner whitespace should be honored.", - "data": { "list": [ 1, 2, 3 ] }, - "template": "<{{#list}} -{{/list}}>", - "expected": "< - - ->" - }, - { - "name": "Single right inner whitespace should be honored.", - "data": { "list": [ 1, 2, 3] }, - "template": "<{{#list}}- {{/list}}>", - "expected": "<- - - >" - }, - { - "name": "Single left outer whitespace should be honored when section is omitted.", - "data": { }, - "template": "< {{#subject}}---{{/subject}}--->", - "expected": "< --->" - }, - { - "name": "Single right outer whitespace should be honored when section is omitted.", - "data": { }, - "template": "<---{{#subject}}---{{/subject}} >", - "expected": "<--- >" - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/standard_library.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/standard_library.json deleted file mode 100644 index 11288fa8..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/standard_library.json +++ /dev/null @@ -1,343 +0,0 @@ -{ - "tests": [ - // capitalized - { - "name": "`capitalized` filter should change the first character from each word to its corresponding uppercase value, and all remaining characters to their corresponding lowercase values.", - "data": "EDGAR allan poE", - "template": "{{ capitalized(.) }}", - "expected": "Edgar Allan Poe" - }, - { - "name": "`capitalized` filter should not mess with HTML escaping.", - "data": "<&lT;>", - "template": "{{ capitalized(.) }}", - "expected": "<&Lt;>" - }, - { - "name": "`capitalized` filter should be unicode-aware.", - "data": "éÉ πΠ ßß fifi œŒ ΣΣ ıI", - "template": "{{ capitalized(.) }}", - "expected": "Éé Ππ Ssß Fifi Œœ Σς Ii" - }, - - // lowercase - { - "name": "`lowercase` filter should change the all characters to their corresponding lowercase values.", - "data": "EDGAR allan poE", - "template": "{{ lowercase(.) }}", - "expected": "edgar allan poe" - }, - { - "name": "`lowercase` filter should not mess with HTML escaping.", - "data": "<&lT;>", - "template": "{{ lowercase(.) }}", - "expected": "<&lt;>" - }, - { - "name": "`lowercase` filter should be unicode-aware.", - "data": "ΣÉΠŒIΣ", - "template": "{{ lowercase(.) }}", - "expected": "σéπœiς" - }, - - // uppercase - { - "name": "`uppercase` filter should change the all characters to their corresponding lowercase values.", - "data": "EDGAR allan poE", - "template": "{{ uppercase(.) }}", - "expected": "EDGAR ALLAN POE" - }, - { - "name": "`uppercase` filter should not mess with HTML escaping.", - "data": "<&lT;>", - "template": "{{ uppercase(.) }}", - "expected": "<&LT;>" - }, - { - "name": "`uppercase` filter should be unicode-aware.", - "data": "σéπßfiœıς", - "template": "{{ uppercase(.) }}", - "expected": "ΣÉΠSSFIŒIΣ" - }, - - // isBlank - { - "name": "`isBlank` filter should match missing keys.", - "data": {}, - "template": "{{# isBlank(object) }}success{{/ isBlank(object) }}", - "expected": "success" - }, - { - "name": "`isBlank` filter should match null.", - "data": { "object": null }, - "template": "{{# isBlank(object) }}success{{/ isBlank(object) }}", - "expected": "success" - }, - { - "name": "`isBlank` filter should match empty string.", - "data": { "object": "" }, - "template": "{{# isBlank(object) }}success{{/ isBlank(object) }}", - "expected": "success" - }, - { - "name": "`isBlank` filter should match string containing only white spaces, tabs and new lines.", - "data": { "object": " \t\n" }, - "template": "{{# isBlank(object) }}success{{/ isBlank(object) }}", - "expected": "success" - }, - { - "name": "`isBlank` filter should match empty list.", - "data": { "object": [] }, - "template": "{{# isBlank(object) }}success{{/ isBlank(object) }}", - "expected": "success" - }, - { - "name": "`isBlank` filter should not match string containing non space character.", - "data": { "object": " \t\nX \t\n" }, - "template": "{{^ isBlank(object) }}success{{/ isBlank(object) }}", - "expected": "success" - }, - { - "name": "`isBlank` filter should not match non-empty list.", - "data": { "object": [0,1,2,3] }, - "template": "{{^ isBlank(object) }}success{{/ isBlank(object) }}", - "expected": "success" - }, - { - "name": "`isBlank` filter should not match non-empty list, even lists made of false values.", - "data": { "object": [null] }, - "template": "{{^ isBlank(object) }}success{{/ isBlank(object) }}", - "expected": "success" - }, - { - "name": "`isBlank` filter should not match any object.", - "data": { "object": { "foo": "bar" } }, - "template": "{{^ isBlank(object) }}success{{/ isBlank(object) }}", - "expected": "success" - }, - { - "name": "`isBlank` filter should not match any object, even objects without any key.", - "data": { "object": {} }, - "template": "{{^ isBlank(object) }}success{{/ isBlank(object) }}", - "expected": "success" - }, - - // isEmpty - { - "name": "`isEmpty` filter should match missing keys.", - "data": {}, - "template": "{{# isEmpty(object) }}success{{/ isEmpty(object) }}", - "expected": "success" - }, - { - "name": "`isEmpty` filter should match null.", - "data": { "object": null }, - "template": "{{# isEmpty(object) }}success{{/ isEmpty(object) }}", - "expected": "success" - }, - { - "name": "`isEmpty` filter should match empty string.", - "data": { "object": "" }, - "template": "{{# isEmpty(object) }}success{{/ isEmpty(object) }}", - "expected": "success" - }, - { - "name": "`isEmpty` filter should match empty list.", - "data": { "object": [] }, - "template": "{{# isEmpty(object) }}success{{/ isEmpty(object) }}", - "expected": "success" - }, - { - "name": "`isEmpty` filter should not match string containing only white spaces, tabs and new lines.", - "data": { "object": " \t\n" }, - "template": "{{^ isEmpty(object) }}success{{/ isEmpty(object) }}", - "expected": "success" - }, - { - "name": "`isEmpty` filter should not match string containing non space character.", - "data": { "object": " \t\nX \t\n" }, - "template": "{{^ isEmpty(object) }}success{{/ isEmpty(object) }}", - "expected": "success" - }, - { - "name": "`isEmpty` filter should not match non-empty list.", - "data": { "object": [0,1,2,3] }, - "template": "{{^ isEmpty(object) }}success{{/ isEmpty(object) }}", - "expected": "success" - }, - { - "name": "`isEmpty` filter should not match non-empty list, even lists made of false values.", - "data": { "object": [null] }, - "template": "{{^ isEmpty(object) }}success{{/ isEmpty(object) }}", - "expected": "success" - }, - { - "name": "`isEmpty` filter should not match any object.", - "data": { "object": { "foo": "bar" } }, - "template": "{{^ isEmpty(object) }}success{{/ isEmpty(object) }}", - "expected": "success" - }, - { - "name": "`isEmpty` filter should not match any object, even objects without any key.", - "data": { "object": {} }, - "template": "{{^ isEmpty(object) }}success{{/ isEmpty(object) }}", - "expected": "success" - }, - - // HTML.escape - { - "name": "`HTML.escape` escapes nil as empty string.", - "data": {}, - "template": "<{{HTML.escape(missing)}}>", - "expected": "<>" - }, - { - "name": "`HTML.escape` escapes null as empty string.", - "data": { "null": null }, - "template": "<{{HTML.escape(null)}}>", - "expected": "<>" - }, - { - "name": "`HTML.escape` escapes any value, including numbers.", - "data": 1, - "template": "<{{HTML.escape(.)}}>", - "expected": "<1>" - }, - { - "name": "`HTML.escape` escapes HTML characters of strings.", - "data": "foo&\"'<>", - "template": "{{{.}}} {{{HTML.escape(.)}}} {{HTML.escape(.)}}", - "expected": "foo&\"'<> foo&"'<> foo&amp;&quot;&apos;&lt;&gt;" - }, - { - "name": "`HTML.escape` escapes all inner variable tags in a section.", - "data": { "subject1": "<", "subject2": ">" }, - "template": "{{#HTML.escape}}{{subject1}}{{subject2}}{{{subject1}}}{{{subject2}}}{{/HTML.escape}}", - "expected": "&lt;&gt;<>" - }, - { - "name": "`HTML.escape` does not escape inner section tags.", - "data": { "subject1": "<" }, - "template": "{{#HTML.escape}}{{#subject1}}{{{subject1}}}{{/subject1}}{{^subject1}}-{{/subject1}}{{#subject2}}{{{subject2}}}{{/subject2}}{{^subject2}}-{{/subject2}}{{/HTML.escape}}", - "expected": "<-" - }, - - // javascript.escape - { - "name": "`javascript.escape` escapes nil as empty string.", - "data": {}, - "template": "<{{javascript.escape(missing)}}>", - "expected": "<>" - }, - { - "name": "`javascript.escape` escapes null as empty string.", - "data": { "null": null }, - "template": "<{{javascript.escape(null)}}>", - "expected": "<>" - }, - { - "name": "`javascript.escape` escapes any value, including numbers.", - "data": 1, - "template": "<{{javascript.escape(.)}}>", - "expected": "<1>" - }, - { - // Inspired by https://github.com/django/django/blob/master/tests/regressiontests/defaultfilters/tests.py - "name": "`javascript.escape` escapes any value", - "data": "\"double quotes\" and 'single quotes'", - "template": "{{javascript.escape(.)}}", - "expected": "\\u0022double quotes\\u0022 and \\u0027single quotes\\u0027" - }, - { - // Inspired by https://github.com/django/django/blob/master/tests/regressiontests/defaultfilters/tests.py - "name": "`javascript.escape` escapes double and single quotes", - "data": "\"double quotes\" and 'single quotes'", - "template": "{{javascript.escape(.)}}", - "expected": "\\u0022double quotes\\u0022 and \\u0027single quotes\\u0027" - }, - { - // Inspired by https://github.com/django/django/blob/master/tests/regressiontests/defaultfilters/tests.py - "name": "`javascript.escape` escapes backslashes", - "data": "\\ : backslashes, too", - "template": "{{javascript.escape(.)}}", - "expected": "\\u005C : backslashes, too" - }, - { - // Inspired by https://github.com/django/django/blob/master/tests/regressiontests/defaultfilters/tests.py - "name": "`javascript.escape` escapes control characters", - "data": "and lots of whitespace: \r\n\t\f\b", - "template": "{{javascript.escape(.)}}", - "expected": "and lots of whitespace: \\u000D\\u000A\\u0009\\u000C\\u0008" - }, - { - // Inspired by https://github.com/django/django/blob/master/tests/regressiontests/defaultfilters/tests.py - "name": "`javascript.escape` escapes HTML tags", - "data": "", - "template": "{{javascript.escape(.)}}", - "expected": "\\u003Cscript\\u003Eand this\\u003C/script\\u003E" - }, - { - // Inspired by https://github.com/django/django/blob/master/tests/regressiontests/defaultfilters/tests.py - "name": "`javascript.escape` escapes PARAGRAPH SEPARATOR U+2029 and LINE SEPARATOR U+2028", - "data": "paragraph separator:\u2029and line separator:\u2028", - "template": "{{javascript.escape(.)}}", - "expected": "paragraph separator:\\u2029and line separator:\\u2028" - }, - { - "name": "`javascript.escape` escapes all inner variable tags in a section.", - "data": { "subject1": "'subject1'", "subject2": "'subject2'" }, - "template": "{{#javascript.escape}}{\"subject1\":\"{{subject1}}\",\"subject2\":\"{{subject2}}\"}{{/javascript.escape}}", - "expected": "{\"subject1\":\"\\u0027subject1\\u0027\",\"subject2\":\"\\u0027subject2\\u0027\"}" - }, - { - "name": "`javascript.escape` does not escape inner section tags.", - "data": { "subject1": "'subject1'" }, - "template": "{{#javascript.escape}}{\"subject1\":{{#subject1}}\"{{subject1}}\"{{/subject1}}{{^subject1}}null{{/subject1}},\"subject2\":{{#subject2}}\"{{subject2}}\"{{/subject2}}{{^subject2}}null{{/subject2}}}{{/javascript.escape}}", - "expected": "{\"subject1\":\"\\u0027subject1\\u0027\",\"subject2\":null}" - }, - - // URL.escape - { - "name": "`URL.escape` escapes nil as empty string.", - "data": {}, - "template": "<{{URL.escape(missing)}}>", - "expected": "<>" - }, - { - "name": "`URL.escape` escapes null as empty string.", - "data": { "null": null }, - "template": "<{{URL.escape(null)}}>", - "expected": "<>" - }, - { - "name": "`URL.escape` escapes any value, including numbers.", - "data": 1, - "template": "<{{URL.escape(.)}}>", - "expected": "<1>" - }, - { - "name": "`URL.escape` escapes strings with UTF8 encoding.", - "data": "?&=\r\n\t\f\b<>\"[]{}", - "template": "{{URL.escape(.)}}", - "expected": "%3F%26%3D%0D%0A%09%0C%08%3C%3E%22%5B%5D%7B%7D" - }, - { - "name": "`URL.escape` escapes unicode strings with UTF8 encoding.", - "data": "éı\ud83d\ude04", - "template": "{{URL.escape(.)}}", - "expected": "%C3%A9%C4%B1%F0%9F%98%84" - }, - { - "name": "`URL.escape` escapes all inner variable tags in a section.", - "data": { "subject1": " ", "subject2": "&" }, - "template": "{{#URL.escape}}subject1={{subject1}}&subject2={{subject2}}{{/URL.escape}}", - "expected": "subject1=%20&subject2=%26" - }, - { - "name": "`URL.escape` does not escape inner section tags.", - "data": { "subject1": " " }, - "template": "{{#URL.escape}}subject1={{subject1}}&subject2={{#subject2}}{{subject2}}{{/subject2}}{{^subject2}}0{{/subject2}}{{/URL.escape}}", - "expected": "subject1=%20&subject2=0" - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/tag_parsing_errors.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/tag_parsing_errors.json deleted file mode 100644 index 31c9dc1c..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/tag_parsing_errors.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "tests": [ - { - "name": "Variable tags must be closed.", - "data": null, - "template": "\n{{\n", - "expected_error": "Parse error.*line 2\\b.*Unclosed Mustache tag" - }, - { - // Regression test: parser used to choke on '}' at the end of the - // template string. - "name": "Variable tags must be closed.", - "data": null, - "template": "\n{{\n}", - "expected_error": "Parse error.*line 2\\b.*Unclosed Mustache tag" - }, - { - "name": "Triple mustache tags must be closed.", - "data": null, - "template": "\n{{{#\n", - "expected_error": "Parse error.*line 2\\b.*Unclosed Mustache tag" - }, - { - "name": "Unescaped variable tags must be closed.", - "data": null, - "template": "\n{{&\n", - "expected_error": "Parse error.*line 2\\b.*Unclosed Mustache tag" - }, - { - "name": "Section tags must be closed.", - "data": null, - "template": "\n{{#\n", - "expected_error": "Parse error.*line 2\\b.*Unclosed Mustache tag" - }, - { - "name": "Inverted section tags must be closed.", - "data": null, - "template": "\n{{^\n", - "expected_error": "Parse error.*line 2\\b.*Unclosed Mustache tag" - }, - { - "name": "Inheritable section tags must be closed.", - "data": null, - "template": "\n{{$\n", - "expected_error": "Parse error.*line 2\\b.*Unclosed Mustache tag" - }, - { - "name": "Partial tags must be closed.", - "data": null, - "template": "\n{{>\n", - "expected_error": "Parse error.*line 2\\b.*Unclosed Mustache tag" - }, - { - "name": "Comment tags must be closed.", - "data": null, - "template": "\n{{!\n", - "expected_error": "Parse error.*line 2\\b.*Unclosed Mustache tag" - }, - { - "name": "Set delimiter tags must be closed.", - "data": null, - "template": "\n{{=\n", - "expected_error": "Parse error.*line 2\\b.*Unclosed Mustache tag" - }, - { - "name": "Pragma tags must be closed.", - "data": null, - "template": "\n{{%\n", - "expected_error": "Parse error.*line 2\\b.*Unclosed Mustache tag" - }, - { - "name": "Variable tags can not be empty.", - "data": null, - "template": "\n{{}}", - "expected_error": "Parse error.*line 2\\b.*Missing expression" - }, - { - "name": "Variable tags can not be blank.", - "data": null, - "template": "\n{{ \n\t}}", - "expected_error": "Parse error.*line 2\\b.*Missing expression" - }, - { - "name": "Triple mustache tags can not be empty.", - "data": null, - "template": "\n{{{}}}", - "expected_error": "Parse error.*line 2\\b.*Missing expression" - }, - { - "name": "Triple mustache tags can not be blank.", - "data": null, - "template": "\n{{{ \n\t}}}", - "expected_error": "Parse error.*line 2\\b.*Missing expression" - }, - { - "name": "Unescaped variable tags can not be empty.", - "data": null, - "template": "\n{{&}}", - "expected_error": "Parse error.*line 2\\b.*Missing expression" - }, - { - "name": "Unescaped variable tags can not be blank.", - "data": null, - "template": "\n{{& \n\t}}", - "expected_error": "Parse error.*line 2\\b.*Missing expression" - }, - { - "name": "Section tags can not be empty.", - "data": null, - "template": "\n{{#}}\n{{/}}", - "expected_error": "Parse error.*line 2\\b.*Missing expression" - }, - { - "name": "Section tags can not be blank.", - "data": null, - "template": "\n{{# \n\t}}\n{{/ \n\t}}", - "expected_error": "Parse error.*line 2\\b.*Missing expression" - }, - { - "name": "Inverted section tags can not be empty.", - "data": null, - "template": "\n{{^}}\n{{/}}", - "expected_error": "Parse error.*line 2\\b.*Missing expression" - }, - { - "name": "Inverted section can not be blank.", - "data": null, - "template": "\n{{^ \n\t}}\n{{/ \n\t}}", - "expected_error": "Parse error.*line 2\\b.*Missing expression" - }, - { - "name": "Inheritable section names can not be empty.", - "data": null, - "template": "\n{{$}}\n{{/}}", - "expected_error": "Parse error.*line 2\\b.*Missing inheritable section name" - }, - { - "name": "Inheritable section names can not contain white space.", - "data": null, - "template": "\n{{$ a b }}\n{{/ a b }}", - "expected_error": "Parse error.*line 2\\b.*Invalid inheritable section name" - }, - { - "name": "Inheritable section names can not be blank.", - "data": null, - "template": "\n{{$ \n\t}}\n{{/ \n\t}}", - "expected_error": "Parse error.*line 2\\b.*Missing inheritable section name" - }, - { - "name": "Partial tags can not be empty.", - "data": null, - "template": "\n{{>}}", - "expected_error": "Parse error.*line 2\\b.*Missing template name" - }, - { - "name": "Partial can not be blank.", - "data": null, - "template": "\n{{> \n\t}}", - "expected_error": "Parse error.*line 2\\b.*Missing template name" - }, - { - "name": "Quadruple mustaches yield a parse error.", - "data": null, - "template": "\n{{{{foo}}}}", - "expected_error": "Parse error.*line 2\\b" - }, - { - "name": "Section tag must be closed.", - "data": null, - "template": "\n{{#a}}", - "expected_error": "Parse error.*line 2\\b" - }, - { - "name": "Closing section tag which contain an expression must match the opening tag.", - "data": null, - "template": "\n{{#a}}\n{{/b}}", - "expected_error": "Parse error.*line 3\\b" - }, - { - "name": "Closing section tag which contain an expression must match the opening tag.", - "data": null, - "template": "\n{{#a(b)}}\n{{/a}}", - "expected_error": "Parse error.*line 3\\b" - }, - { - "name": "Closing section tag which contain an expression must match the opening tag.", - "data": null, - "template": "\n{{#a}}\n{{/a(b)}}", - "expected_error": "Parse error.*line 3\\b" - }, - { - "name": "Closing section tag which contain an expression must match the opening tag.", - "data": null, - "template": "\n{{#a.b}}\n{{/a}}", - "expected_error": "Parse error.*line 3\\b" - }, - { - "name": "Closing section tag which contain an expression must match the opening tag.", - "data": null, - "template": "\n{{#a}}\n{{/a.b}}", - "expected_error": "Parse error.*line 3\\b" - }, - { - "name": "Partial name must not contain any white space character.", - "data": null, - "template": "{{> a b }}", - "expected_error": "Parse error.*line 1\\b" - }, - { - "name": "Partial name must not contain any white space character.", - "data": null, - "template": "{{> a\rb }}", - "expected_error": "Parse error.*line 1\\b" - }, - { - "name": "Partial name must not contain any white space character.", - "data": null, - "template": "{{> a\nb }}", - "expected_error": "Parse error.*line 1\\b" - }, - { - "name": "Partial name must not contain any white space character.", - "data": null, - "template": "{{> a\tb }}", - "expected_error": "Parse error.*line 1\\b" - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/text_rendering.json b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/text_rendering.json deleted file mode 100644 index 9dabbe57..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuites/text_rendering.json +++ /dev/null @@ -1,144 +0,0 @@ -{ - "tests": [ - { - "name": "CONTENT_TYPE:HTML pragma has no particular effect", - "data": { "subject" : "&" }, - "template": "{{% CONTENT_TYPE:HTML }}[{{subject}}{{{subject}}}]", - "expected": "[&&]" - }, - { - "name": "CONTENT_TYPE:TEXT pragma disables HTML-escaping", - "data": { "subject" : "&" }, - "template": "{{% CONTENT_TYPE:TEXT }}[{{subject}}{{{subject}}}]", - "expected": "[&&]" - }, - { - "name": "CONTENT_TYPE:HTML pragma following CONTENT_TYPE:TEXT pragma enables HTML-escaping", - "data": { "subject" : "&" }, - "template": "{{% CONTENT_TYPE:TEXT }}{{% CONTENT_TYPE:HTML }}[{{subject}}{{{subject}}}]", - "expected": "[&&]" - }, - { - "name": "CONTENT_TYPE:TEXT pragma following CONTENT_TYPE:HTML pragma disables HTML-escaping", - "data": { "subject" : "&" }, - "template": "{{% CONTENT_TYPE:HTML }}{{% CONTENT_TYPE:TEXT }}[{{subject}}{{{subject}}}]", - "expected": "[&&]" - }, - { - "name": "CONTENT_TYPE:TEXT pragma can follow text", - "data": { "subject" : "&" }, - "template": "hey {{% CONTENT_TYPE:TEXT }}[{{subject}}{{{subject}}}]", - "expected": "hey [&&]" - }, - { - "name": "CONTENT_TYPE:TEXT pragma can follow comment", - "data": { "subject" : "&" }, - "template": "{{! a text template }}{{% CONTENT_TYPE:TEXT }}[{{subject}}{{{subject}}}]", - "expected": "[&&]" - }, - { - "name": "CONTENT_TYPE:TEXT pragma can follow set delimiters tag", - "data": { "subject" : "&" }, - "template": "{{=< >=}}<% CONTENT_TYPE:TEXT >[<&subject>]", - "expected": "[&&]" - }, - { - "name": "CONTENT_TYPE:TEXT pragma can not follow variable tag.", - "data": null, - "template": "{{subject}}{{% CONTENT_TYPE:TEXT }}", - "expected_error": "Parse error" - }, - { - "name": "CONTENT_TYPE:TEXT pragma can not follow section tag.", - "data": null, - "template": "{{#foo}}{{/foo}}{{% CONTENT_TYPE:TEXT }}", - "expected_error": "Parse error" - }, - { - "name": "CONTENT_TYPE:TEXT pragma can not follow inverted section tag.", - "data": null, - "template": "{{^foo}}{{/foo}}{{% CONTENT_TYPE:TEXT }}", - "expected_error": "Parse error" - }, - { - "name": "CONTENT_TYPE:TEXT pragma can not follow inheritable section tag.", - "data": null, - "template": "{{$foo}}{{/foo}}{{% CONTENT_TYPE:TEXT }}", - "expected_error": "Parse error" - }, - { - "name": "CONTENT_TYPE:TEXT pragma can not enter section tag.", - "data": null, - "template": "{{#foo}}{{% CONTENT_TYPE:TEXT }}{{/foo}}", - "expected_error": "Parse error" - }, - { - "name": "CONTENT_TYPE:TEXT pragma can not enter inverted section tag.", - "data": null, - "template": "{{^foo}}{{% CONTENT_TYPE:TEXT }}{{/foo}}", - "expected_error": "Parse error" - }, - { - "name": "CONTENT_TYPE:TEXT pragma can not enter inheritable section tag.", - "data": null, - "template": "{{$foo}}{{% CONTENT_TYPE:TEXT }}{{/foo}}", - "expected_error": "Parse error" - }, - { - "name": "CONTENT_TYPE:TEXT pragma can not follow partial tag.", - "data": null, - "template": "{{>partial}}{{% CONTENT_TYPE:TEXT }}", - "partials": { "partial": "" }, - "expected_error": "Parse error" - }, - { - "name": "CONTENT_TYPE:TEXT pragma can not enter inherited partial tag.", - "data": null, - "template": "{{partial}}", - "partials": { "partial": "{{% CONTENT_TYPE:TEXT }}[{{subject}}{{{subject}}}]" }, - "expected": "[&&]" - }, - { - "name": "Template containing CONTENT_TYPE:TEXT pragma does not process HTML partials.", - "data": { "subject" : "&" }, - "template": "{{% CONTENT_TYPE:TEXT }}{{>partial}}", - "partials": { "partial": "[{{subject}}{{{subject}}}]" }, - "expected": "[&&]" - }, - { - "name": "HTML template can override HTML template", - "data": { "subject" : "&" }, - "template": "{{", - "expected": "<--->" - }, - { - "name": "Integers should be rendered in their natural fashion.", - "data": { "subject": 123 }, - "template": "<{{subject}}>", - "expected": "<123>" - }, - { - "name": "Zero should be rendered in its natural fashion.", - "data": { "subject": 0 }, - "template": "<{{subject}}>", - "expected": "<0>" - }, - { - "name": "Basic interpolation should be HTML escaped.", - "data": { "forbidden": "& \" < >" }, - "template": "<{{forbidden}}>", - "expected": "<& " < >>" - }, - { - "name": "Triple mustaches should interpolate without HTML escaping.", - "data": { "forbidden": "& \" < >" }, - "template": "<{{{forbidden}}}>", - "expected": "<& \" < >>" - }, - { - "name": "Ampersand should interpolate without HTML escaping.", - "data": { "forbidden": "& \" < >" }, - "template": "<{{&forbidden}}>", - "expected": "<& \" < >>" - }, - { - "name": "Liberal tag names should be accepted.", - "data": { "first-subject": "1", "middle_subject!": "2", "lastSubject?": "3" }, - "template": "<{{first-subject}}{{middle_subject!}}{{lastSubject?}}>", - "expected": "<123>" - }, - { - "name": "Enumeration is rendered as the concatenation of the rendering of items.", - "data": { "subject": ["&","\"","<",">",0,1,2] }, - "template": "<{{subject}}>", - "expected": "<&"<>012>" - }, - { - "name": "Triple mustaches should interpolate enumerations without HTML escaping", - "data": { "subject": ["&","\"","<",">",0,1,2] }, - "template": "<{{{subject}}}>", - "expected": "<&\"<>012>" - }, - - // Boolean interpretation - - { - "name": "Missing key should not be rendered.", - "data": { }, - "template": "<{{subject}}>", - "expected": "<>" - }, - { - "name": "Null should not be rendered.", - "data": { "subject": null }, - "template": "<{{subject}}>", - "expected": "<>" - }, - - // Whitespace Insensitivity - - { - "name": "Whitespace in double mustache tag should be ignored.", - "data": { "subject": "---" }, - "template": "<{{ \r\n\tsubject \r\n\t}}>", - "expected": "<--->" - }, - { - "name": "Whitespace in triple mustache tag should be ignored.", - "data": { "subject": "---" }, - "template": "<{{{ \r\n\tsubject \r\n\t}}}>", - "expected": "<--->" - }, - { - "name": "Whitespace in ampersand tag should be ignored.", - "data": { "subject": "---" }, - "template": "<{{& \r\n\tsubject \r\n\t}}>", - "expected": "<--->" - }, - - // Whitespace Sensitivity - - { - "name": "Single left outer whitespace should be honored.", - "data": { "subject": "---" }, - "template": "< {{subject}}>", - "expected": "< --->" - }, - { - "name": "Single right outer whitespace should be honored.", - "data": { "subject": "---" }, - "template": "<{{subject}} >", - "expected": "<--- >" - }, - { - "name": "Single left inner whitespace should be honored.", - "data": { "subject": " ---" }, - "template": "<{{subject}}>", - "expected": "< --->" - }, - { - "name": "Single right inner whitespace should be honored.", - "data": { "subject": "--- " }, - "template": "<{{subject}}>", - "expected": "<--- >" - } - ] -} diff --git a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuitesTest.m b/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuitesTest.m deleted file mode 100644 index e44953d2..00000000 --- a/src/tests/Public/v7.0/Suites/groue/GRMustache/GRMustacheSuitesTest.m +++ /dev/null @@ -1,52 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_0 -#import "GRMustachePublicAPITest.h" - -@interface GRMustacheSuitesTest : GRMustachePublicAPISuiteTest -@end - -@implementation GRMustacheSuitesTest - -- (void)testGRMustacheSuites -{ - [self runTestsFromResource:@"comments.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"compound_keys.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"delimiters.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"filters.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"standard_library.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"general.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"implicit_iterator.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"inverted_sections.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"inheritable_partials.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"inheritable_sections.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"partials.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"sections.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"variables.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"pragmas.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"text_rendering.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"tag_parsing_errors.json" subdirectory:@"GRMustacheSuites"]; - [self runTestsFromResource:@"expression_parsing_errors.json" subdirectory:@"GRMustacheSuites"]; -} - -@end diff --git a/src/tests/Public/v7.2/GRMustacheRenderingObject_7_2_Test.m b/src/tests/Public/v7.2/GRMustacheRenderingObject_7_2_Test.m deleted file mode 100644 index 94c424e6..00000000 --- a/src/tests/Public/v7.2/GRMustacheRenderingObject_7_2_Test.m +++ /dev/null @@ -1,134 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_2 -#import "GRMustachePublicAPITest.h" - - -// ============================================================================= -#pragma mark - GRMustacheImplicitTrueRenderingObject - -@interface GRMustacheImplicitTrueRenderingObject : NSObject -@end - -@implementation GRMustacheImplicitTrueRenderingObject - -- (NSString *)renderForMustacheTag:(GRMustacheTag *)tag context:(GRMustacheContext *)context HTMLSafe:(BOOL *)HTMLSafe error:(NSError **)error -{ - switch (tag.type) { - case GRMustacheTagTypeVariable: - return @"variable"; - break; - - case GRMustacheTagTypeSection: - return @"section"; - break; - } -} - -@end - - -// ============================================================================= -#pragma mark - GRMustacheRenderingObject_7_2_Test - -@interface GRMustacheRenderingObject_7_2_Test : GRMustachePublicAPITest - -@end - -@implementation GRMustacheRenderingObject_7_2_Test - -- (void)testImplicitTrueRenderingObjects -{ - id object = [[[GRMustacheImplicitTrueRenderingObject alloc] init] autorelease]; - - { - NSString *rendering = [GRMustacheTemplate renderObject:@{ @"object": object } - fromString:@"<{{ object }}>" - error:NULL]; - XCTAssertEqualObjects(rendering, @""); - } - { - NSString *rendering = [GRMustacheTemplate renderObject:@{ @"object": object } - fromString:@"<{{# object }}...{{/ }}>" - error:NULL]; - XCTAssertEqualObjects(rendering, @"
"); - } - { - NSString *rendering = [GRMustacheTemplate renderObject:@{ @"object": object } - fromString:@"<{{^ object }}...{{/ }}>" - error:NULL]; - XCTAssertEqualObjects(rendering, @"<>"); - } -} - -- (void)testImplicitTrueRenderingObjectsWithBlocks -{ - id object = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { - switch (tag.type) { - case GRMustacheTagTypeVariable: - return @"variable"; - break; - - case GRMustacheTagTypeSection: - return @"section"; - break; - } - }]; - - { - NSString *rendering = [GRMustacheTemplate renderObject:@{ @"object": object } - fromString:@"<{{ object }}>" - error:NULL]; - XCTAssertEqualObjects(rendering, @""); - } - { - NSString *rendering = [GRMustacheTemplate renderObject:@{ @"object": object } - fromString:@"<{{# object }}...{{/ }}>" - error:NULL]; - XCTAssertEqualObjects(rendering, @"
"); - } - { - NSString *rendering = [GRMustacheTemplate renderObject:@{ @"object": object } - fromString:@"<{{^ object }}...{{/ }}>" - error:NULL]; - XCTAssertEqualObjects(rendering, @"<>"); - } -} - -- (void)testArrayOfRenderingObjectsInSectionTagDoesNotNeedExplicitInvocation -{ - id object1 = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { - NSString *tagRendering = [tag renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; - return [NSString stringWithFormat:@"[1:%@]", tagRendering]; - }]; - id object2 = [GRMustacheRendering renderingObjectWithBlock:^NSString *(GRMustacheTag *tag, GRMustacheContext *context, BOOL *HTMLSafe, NSError **error) { - NSString *tagRendering = [tag renderContentWithContext:context HTMLSafe:HTMLSafe error:error]; - return [NSString stringWithFormat:@"[2:%@]", tagRendering]; - }]; - - id items = @{@"items": @[object1, object2, @YES, @NO] }; - NSString *rendering = [[GRMustacheTemplate templateFromString:@"{{#items}}---{{/items}},{{#items}}{{#.}}---{{/.}}{{/items}}" error:NULL] renderObject:items error:NULL]; - XCTAssertEqualObjects(rendering, @"[1:---][2:---]------,[1:---][2:---]---", @""); -} - -@end diff --git a/src/tests/Public/v7.2/Suites/groue/GRMustache/GRMustacheSuites_7_2/standard_library.json b/src/tests/Public/v7.2/Suites/groue/GRMustache/GRMustacheSuites_7_2/standard_library.json deleted file mode 100644 index 573fe5bc..00000000 --- a/src/tests/Public/v7.2/Suites/groue/GRMustache/GRMustacheSuites_7_2/standard_library.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "tests": [ - - // each(array) - - { - "name": "`each` filter iterates its array argument and makes the `@first`, `@last` keys available for rendering.", - "data": { - "array": ["a", "b", "c", "d"] - }, - "template": "{{# each(array) }}{{^ @first }}{{# @last }} and {{^}}, {{/}}{{/}}{{.}}{{/}}", - "expected": "a, b, c and d" - }, - { - "name": "`each` filter iterates its array argument and makes the `@index` key available for rendering.", - "data": { - "array": ["a", "b", "c", "d"] - }, - "template": "{{# each(array) }}{{ @index }}{{/}}", - "expected": "0123" - }, - { - "name": "`each` filter iterates its array argument and makes the `@indexPlusOne` key available for rendering.", - "data": { - "array": ["a", "b", "c", "d"] - }, - "template": "{{# each(array) }}{{ @indexPlusOne }}{{/}}", - "expected": "1234" - }, - { - "name": "`each` filter iterates its array argument and makes the `@indexIsEven` key available for rendering.", - "data": { - "array": ["a", "b", "c", "d"] - }, - "template": "{{# each(array) }}{{# @indexIsEven }}e{{^}}o{{/}}{{/}}", - "expected": "eoeo" - }, - { - "name": "`each` filter does not render for empty arrays.", - "data": { - "array": [] - }, - "template": "{{# each(array) }}---{{^}}+++{{/}}", - "expected": "+++" - }, - { - "name": "`each` filter does not alter context access.", - "data": { "array": [{ "name": "foo" }, { "name": "bar" }] }, - "template": "{{# each(array) }}<{{@index}}:{{name}}>{{/}}", - "expected": "<0:foo><1:bar>" - }, - { - "name": "`each` filter should render independently all lists of an array.", - "data": { "array": [["a", "b"], [], [0, 1]] }, - "template": "<{{# each(array) }}{{@index}}:({{#.}}{{.}}{{^}}-{{/}}){{/}}>", - "expected": "<0:(ab)1:(-)2:(01)>" - }, - - // each(dictionary) - - { - "name": "`each` filter iterates its dictionary argument and make the `@key` key available for rendering.", - "data": { - // Because dictionaries are fundamentally unordered, we can render only a single key. - "dictionary": { "key": "value" } - }, - "template": "{{# each(dictionary) }}{{ @key }}:{{.}}{{/}}", - "expected": "key:value" - }, - { - "name": "`each` filter iterates its dictionary argument and make the `@first`, `@last` keys available for rendering.", - "data": { - // Because dictionaries are fundamentally unordered, we can only render a single unique value. - "dictionary": { "key1": "value", "key2": "value", "key3": "value" } - }, - "template": "{{# each(dictionary) }}{{^ @first }}{{# @last }} and {{^}}, {{/}}{{/}}{{.}}{{/}}", - "expected": "value, value and value" - }, - { - "name": "`each` filter iterates its dictionary argument and makes the `@index` key available for rendering.", - "data": { - "dictionary": { "key1": "value1", "key2": "value2", "key3": "value3" } - }, - "template": "{{# each(dictionary) }}{{ @indexPlusOne }}{{/}}", - "expected": "123" - }, - { - "name": "`each` filter iterates its dictionary argument and makes the `@indexPlusOne` key available for rendering.", - "data": { - "dictionary": { "key1": "value1", "key2": "value2", "key3": "value3" } - }, - "template": "{{# each(dictionary) }}{{ @indexPlusOne }}{{/}}", - "expected": "123" - }, - { - "name": "`each` filter iterates its dictionary argument and makes the `@indexIsEven` key available for rendering.", - "data": { - "dictionary": { "key1": "value", "key2": "value", "key3": "value" } - }, - "template": "{{# each(dictionary) }}{{# @indexIsEven }}e{{^}}o{{/}}{{/}}", - "expected": "eoe" - }, - { - "name": "`each` filter does not render for empty dictionaries.", - "data": { - "dictionary": {} - }, - "template": "{{# each(dictionary) }}---{{^}}+++{{/}}", - "expected": "+++" - }, - { - "name": "`each` filter does not alter context access.", - "data": { "dictionary": { "key": { "name": "foo" } } }, - "template": "{{# each(dictionary) }}<{{@key}}:{{name}}>{{/}}", - "expected": "" - }, - { - "name": "`each` filter should render independently all lists of a dictionary.", - "data": { "dictionary": { "key": [ "a", "b" ] } }, - "template": "{{# each(dictionary) }}{{ @key }}:{{#.}}{{.}}{{/}}{{/}}", - "expected": "key:ab" - } - ] -} diff --git a/src/tests/Public/v7.2/Suites/groue/GRMustache/GRMustacheSuites_7_2_Test.m b/src/tests/Public/v7.2/Suites/groue/GRMustache/GRMustacheSuites_7_2_Test.m deleted file mode 100644 index 17bf4cc0..00000000 --- a/src/tests/Public/v7.2/Suites/groue/GRMustache/GRMustacheSuites_7_2_Test.m +++ /dev/null @@ -1,36 +0,0 @@ -// The MIT License -// -// Copyright (c) 2014 Gwendal Roué -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_7_2 -#import "GRMustachePublicAPITest.h" - -@interface GRMustacheSuites_7_2_Test : GRMustachePublicAPISuiteTest -@end - -@implementation GRMustacheSuites_7_2_Test - -- (void)testGRMustacheSuites -{ - [self runTestsFromResource:@"standard_library.json" subdirectory:@"GRMustacheSuites_7_2"]; -} - -@end diff --git a/src/tests/vendor/mustache/spec b/src/tests/vendor/mustache/spec deleted file mode 160000 index bf6288ed..00000000 --- a/src/tests/vendor/mustache/spec +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bf6288ed6bd0ce8ccea6f1dac070b3d779132c3b