From 42a028f597171e3ef9eacad8be5b79099c048c75 Mon Sep 17 00:00:00 2001 From: noah morrison Date: Mon, 17 Nov 2014 22:22:13 -0500 Subject: [PATCH] Renamed from entei to chevron Possible future dialog nintendo uses legal battle ... It's very effective And I don't feel like dying :) --- README.md | 14 +++++++------- entei.py => chevron.py | 0 test_spec.py | 18 +++++++++--------- 3 files changed, 16 insertions(+), 16 deletions(-) rename entei.py => chevron.py (100%) diff --git a/README.md b/README.md index 5584e42..7254151 100644 --- a/README.md +++ b/README.md @@ -2,27 +2,27 @@ A python implementation of the [mustache templating language](http://mustache.gi Commandline usage: ``` - ./entei.py [data file] [template file] + ./chevron.py [data file] [template file] ``` Python usage with strings ``` -import entei +import chevron -entei.render('Hello, {{ mustache }}!', {'mustache': 'World'}) +chevron.render('Hello, {{ mustache }}!', {'mustache': 'World'}) ``` Python usage with file ``` -import entei +import chevron with open('file.mustache', 'r') as f: - entei.render(f, {'mustache': 'World'}) + chevron.render(f, {'mustache': 'World'}) ``` Python usage with unpacking ``` -import entei +import chevron args = { template: 'Hello, {{ mustache }}!', @@ -32,7 +32,7 @@ args = { } } -entei.render(**args) +chevron.render(**args) ``` diff --git a/entei.py b/chevron.py similarity index 100% rename from entei.py rename to chevron.py diff --git a/test_spec.py b/test_spec.py index 33a0907..0584185 100755 --- a/test_spec.py +++ b/test_spec.py @@ -5,11 +5,11 @@ import unittest import os import json -import entei +import chevron SPECS_PATH = os.path.join('spec', 'specs') SPECS = [path for path in os.listdir(SPECS_PATH) if path.endswith('.json')] -STACHE = entei.render +STACHE = chevron.render def _test_case_from_path(json_path): @@ -60,15 +60,15 @@ class ExpandedCoverage(unittest.TestCase): 'template': '{{# section }} end of file' } - self.assertRaises(entei.UnclosedSection, entei.render, **test1) - self.assertRaises(entei.UnclosedSection, entei.render, **test2) + self.assertRaises(chevron.UnclosedSection, chevron.render, **test1) + self.assertRaises(chevron.UnclosedSection, chevron.render, **test2) def test_unicode_basic(self): args = { 'template': '(╯°□°)╯︵ ┻━┻' } - result = entei.render(**args) + result = chevron.render(**args) expected = '(╯°□°)╯︵ ┻━┻' self.assertEqual(result, expected) @@ -79,7 +79,7 @@ class ExpandedCoverage(unittest.TestCase): 'data': {'table_flip': '(╯°□°)╯︵ ┻━┻'} } - result = entei.render(**args) + result = chevron.render(**args) expected = '(╯°□°)╯︵ ┻━┻' self.assertEqual(result, expected) @@ -90,7 +90,7 @@ class ExpandedCoverage(unittest.TestCase): 'partials_dict': {'table_flip': '(╯°□°)╯︵ ┻━┻'} } - result = entei.render(**args) + result = chevron.render(**args) expected = '(╯°□°)╯︵ ┻━┻' self.assertEqual(result, expected) @@ -101,13 +101,13 @@ class ExpandedCoverage(unittest.TestCase): 'data': [1, 2, 3, 4, 5] } - result = entei.render(**args) + result = chevron.render(**args) expected = '(1)(2)(3)(4)(5)' self.assertEqual(result, expected) def test_main(self): - result = entei.main('tests/data.json', 'tests/test.mustache', + result = chevron.main('tests/data.json', 'tests/test.mustache', partials_path='tests') with open('tests/test.rendered', 'r') as f: -- 2.47.3