sass-twitter-bootstrap 0.1.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (245) hide show
  1. data/lib/{sass-twitter-bootstrap.rb → sass/twitter/bootstrap.rb} +1 -1
  2. data/lib/sass/twitter/bootstrap/rails.rb +1 -5
  3. data/lib/sass/twitter/bootstrap/rails/engine.rb +12 -0
  4. data/lib/sass/twitter/bootstrap/version.rb +1 -1
  5. data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
  6. data/vendor/assets/images/glyphicons-halflings.png +0 -0
  7. data/vendor/assets/javascripts/twitter/bootstrap-alert.js +32 -28
  8. data/vendor/assets/javascripts/twitter/bootstrap-button.js +33 -29
  9. data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +21 -33
  10. data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +26 -47
  11. data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +10 -18
  12. data/vendor/assets/javascripts/twitter/bootstrap-modal.js +17 -25
  13. data/vendor/assets/javascripts/twitter/bootstrap-popover.js +10 -13
  14. data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +18 -44
  15. data/vendor/assets/javascripts/twitter/bootstrap-tab.js +7 -12
  16. data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +35 -40
  17. data/vendor/assets/javascripts/twitter/bootstrap-transition.js +20 -30
  18. data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +15 -29
  19. data/vendor/assets/stylesheets/tests/buttons.html +139 -0
  20. data/vendor/assets/stylesheets/tests/css-tests.css +99 -1
  21. data/vendor/assets/stylesheets/tests/css-tests.html +519 -37
  22. data/vendor/assets/stylesheets/tests/forms-responsive.html +71 -0
  23. data/vendor/assets/stylesheets/tests/navbar-fixed-top.html +104 -0
  24. data/vendor/assets/stylesheets/tests/navbar-static-top.html +107 -0
  25. data/vendor/assets/stylesheets/tests/navbar.html +38 -39
  26. data/vendor/assets/stylesheets/twitter/_accordion.scss +0 -5
  27. data/vendor/assets/stylesheets/twitter/_alerts.scss +15 -3
  28. data/vendor/assets/stylesheets/twitter/_breadcrumbs.scss +0 -2
  29. data/vendor/assets/stylesheets/twitter/_button-groups.scss +32 -76
  30. data/vendor/assets/stylesheets/twitter/_buttons.scss +25 -33
  31. data/vendor/assets/stylesheets/twitter/_close.scss +1 -12
  32. data/vendor/assets/stylesheets/twitter/_code.scss +8 -8
  33. data/vendor/assets/stylesheets/twitter/_component-animations.scss +7 -9
  34. data/vendor/assets/stylesheets/twitter/_dropdowns.scss +45 -58
  35. data/vendor/assets/stylesheets/twitter/_forms.scss +146 -206
  36. data/vendor/assets/stylesheets/twitter/_grid.scss +5 -2
  37. data/vendor/assets/stylesheets/twitter/_hero-unit.scss +1 -3
  38. data/vendor/assets/stylesheets/twitter/_labels.scss +32 -0
  39. data/vendor/assets/stylesheets/twitter/_layouts.scss +2 -2
  40. data/vendor/assets/stylesheets/twitter/_mixins.scss +208 -273
  41. data/vendor/assets/stylesheets/twitter/_modals.scss +8 -14
  42. data/vendor/assets/stylesheets/twitter/_navbar.scss +73 -132
  43. data/vendor/assets/stylesheets/twitter/_navs.scss +43 -53
  44. data/vendor/assets/stylesheets/twitter/_pager.scss +0 -6
  45. data/vendor/assets/stylesheets/twitter/_pagination.scss +0 -1
  46. data/vendor/assets/stylesheets/twitter/_progress-bars.scss +6 -28
  47. data/vendor/assets/stylesheets/twitter/_reset.scss +4 -9
  48. data/vendor/assets/stylesheets/twitter/_scaffolding.scss +8 -4
  49. data/vendor/assets/stylesheets/twitter/_sprites.scss +7 -40
  50. data/vendor/assets/stylesheets/twitter/_tables.scss +33 -38
  51. data/vendor/assets/stylesheets/twitter/_thumbnails.scss +2 -14
  52. data/vendor/assets/stylesheets/twitter/_tooltip.scss +1 -1
  53. data/vendor/assets/stylesheets/twitter/_type.scss +14 -28
  54. data/vendor/assets/stylesheets/twitter/_variables.scss +19 -116
  55. data/vendor/assets/stylesheets/twitter/_wells.scss +0 -10
  56. data/vendor/assets/stylesheets/twitter/bootstrap.scss +7 -3
  57. data/vendor/assets/stylesheets/twitter/responsive.scss +301 -15
  58. metadata +25 -190
  59. data/.gitignore +0 -4
  60. data/Gemfile +0 -3
  61. data/Gemfile.lock +0 -14
  62. data/LICENSE +0 -176
  63. data/Makefile +0 -94
  64. data/README.md +0 -217
  65. data/Rakefile +0 -52
  66. data/bootstrap-2.0.4.css +0 -4661
  67. data/bootstrap-2.0.4.min.css +0 -9
  68. data/bootstrap-responsive-2.0.4.css +0 -932
  69. data/bootstrap-responsive-2.0.4.min.css +0 -9
  70. data/docs/assets/css/bootstrap-responsive.css +0 -932
  71. data/docs/assets/css/bootstrap.css +0 -4661
  72. data/docs/assets/css/docs.css +0 -846
  73. data/docs/assets/ico/apple-touch-icon-114-precomposed.png +0 -0
  74. data/docs/assets/ico/apple-touch-icon-144-precomposed.png +0 -0
  75. data/docs/assets/ico/apple-touch-icon-57-precomposed.png +0 -0
  76. data/docs/assets/ico/apple-touch-icon-72-precomposed.png +0 -0
  77. data/docs/assets/ico/favicon.ico +0 -0
  78. data/docs/assets/img/bird.png +0 -0
  79. data/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg +0 -0
  80. data/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg +0 -0
  81. data/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg +0 -0
  82. data/docs/assets/img/browsers.png +0 -0
  83. data/docs/assets/img/example-sites/fleetio.png +0 -0
  84. data/docs/assets/img/example-sites/jshint.png +0 -0
  85. data/docs/assets/img/example-sites/kippt.png +0 -0
  86. data/docs/assets/img/example-sites/soundready.png +0 -0
  87. data/docs/assets/img/examples/bootstrap-example-fluid.jpg +0 -0
  88. data/docs/assets/img/examples/bootstrap-example-hero.jpg +0 -0
  89. data/docs/assets/img/examples/bootstrap-example-starter.jpg +0 -0
  90. data/docs/assets/img/github-16px.png +0 -0
  91. data/docs/assets/img/glyphicons-halflings-white.png +0 -0
  92. data/docs/assets/img/glyphicons-halflings.png +0 -0
  93. data/docs/assets/img/glyphicons/glyphicons_009_magic.png +0 -0
  94. data/docs/assets/img/glyphicons/glyphicons_042_group.png +0 -0
  95. data/docs/assets/img/glyphicons/glyphicons_079_podium.png +0 -0
  96. data/docs/assets/img/glyphicons/glyphicons_082_roundabout.png +0 -0
  97. data/docs/assets/img/glyphicons/glyphicons_155_show_thumbnails.png +0 -0
  98. data/docs/assets/img/glyphicons/glyphicons_163_iphone.png +0 -0
  99. data/docs/assets/img/glyphicons/glyphicons_214_resize_small.png +0 -0
  100. data/docs/assets/img/glyphicons/glyphicons_266_book_open.png +0 -0
  101. data/docs/assets/img/grid-18px-masked.png +0 -0
  102. data/docs/assets/img/icon-css3.png +0 -0
  103. data/docs/assets/img/icon-github.png +0 -0
  104. data/docs/assets/img/icon-html5.png +0 -0
  105. data/docs/assets/img/icon-twitter.png +0 -0
  106. data/docs/assets/img/less-logo-large.png +0 -0
  107. data/docs/assets/img/less-small.png +0 -0
  108. data/docs/assets/img/responsive-illustrations.png +0 -0
  109. data/docs/assets/js/README.md +0 -106
  110. data/docs/assets/js/application.js +0 -184
  111. data/docs/assets/js/bootstrap-alert.js +0 -90
  112. data/docs/assets/js/bootstrap-button.js +0 -96
  113. data/docs/assets/js/bootstrap-carousel.js +0 -169
  114. data/docs/assets/js/bootstrap-collapse.js +0 -157
  115. data/docs/assets/js/bootstrap-dropdown.js +0 -100
  116. data/docs/assets/js/bootstrap-modal.js +0 -218
  117. data/docs/assets/js/bootstrap-popover.js +0 -98
  118. data/docs/assets/js/bootstrap-scrollspy.js +0 -151
  119. data/docs/assets/js/bootstrap-tab.js +0 -135
  120. data/docs/assets/js/bootstrap-tooltip.js +0 -275
  121. data/docs/assets/js/bootstrap-transition.js +0 -61
  122. data/docs/assets/js/bootstrap-typeahead.js +0 -285
  123. data/docs/assets/js/bootstrap.js +0 -1825
  124. data/docs/assets/js/bootstrap.min.js +0 -6
  125. data/docs/assets/js/google-code-prettify/prettify.css +0 -30
  126. data/docs/assets/js/google-code-prettify/prettify.js +0 -28
  127. data/docs/assets/js/jquery.js +0 -9252
  128. data/docs/base-css.html +0 -1710
  129. data/docs/build/index.js +0 -44
  130. data/docs/build/node_modules/.bin/hulk +0 -93
  131. data/docs/build/node_modules/hogan.js/.git_ignore +0 -1
  132. data/docs/build/node_modules/hogan.js/.gitmodules +0 -3
  133. data/docs/build/node_modules/hogan.js/LICENSE +0 -177
  134. data/docs/build/node_modules/hogan.js/Makefile +0 -62
  135. data/docs/build/node_modules/hogan.js/README.md +0 -93
  136. data/docs/build/node_modules/hogan.js/bin/hulk +0 -93
  137. data/docs/build/node_modules/hogan.js/lib/compiler.js +0 -348
  138. data/docs/build/node_modules/hogan.js/lib/hogan.js +0 -20
  139. data/docs/build/node_modules/hogan.js/lib/template.js +0 -233
  140. data/docs/build/node_modules/hogan.js/package.json +0 -20
  141. data/docs/build/node_modules/hogan.js/test/html/list.html +0 -8
  142. data/docs/build/node_modules/hogan.js/test/index.html +0 -13
  143. data/docs/build/node_modules/hogan.js/test/index.js +0 -848
  144. data/docs/build/node_modules/hogan.js/test/mustache.js +0 -90
  145. data/docs/build/node_modules/hogan.js/test/spec.js +0 -77
  146. data/docs/build/node_modules/hogan.js/test/spec/Changes +0 -31
  147. data/docs/build/node_modules/hogan.js/test/spec/README.md +0 -65
  148. data/docs/build/node_modules/hogan.js/test/spec/Rakefile +0 -27
  149. data/docs/build/node_modules/hogan.js/test/spec/TESTING.md +0 -46
  150. data/docs/build/node_modules/hogan.js/test/spec/specs/comments.json +0 -1
  151. data/docs/build/node_modules/hogan.js/test/spec/specs/comments.yml +0 -103
  152. data/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.json +0 -1
  153. data/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.yml +0 -158
  154. data/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.json +0 -1
  155. data/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.yml +0 -230
  156. data/docs/build/node_modules/hogan.js/test/spec/specs/inverted.json +0 -1
  157. data/docs/build/node_modules/hogan.js/test/spec/specs/inverted.yml +0 -193
  158. data/docs/build/node_modules/hogan.js/test/spec/specs/partials.json +0 -1
  159. data/docs/build/node_modules/hogan.js/test/spec/specs/partials.yml +0 -109
  160. data/docs/build/node_modules/hogan.js/test/spec/specs/sections.json +0 -1
  161. data/docs/build/node_modules/hogan.js/test/spec/specs/sections.yml +0 -256
  162. data/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.json +0 -1
  163. data/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.yml +0 -149
  164. data/docs/build/node_modules/hogan.js/test/templates/list.mustache +0 -8
  165. data/docs/build/node_modules/hogan.js/tools/release.js +0 -74
  166. data/docs/build/node_modules/hogan.js/tools/web_templates.js +0 -32
  167. data/docs/build/node_modules/hogan.js/web/1.0.0/hogan.js +0 -500
  168. data/docs/build/node_modules/hogan.js/web/1.0.0/hogan.min.js +0 -14
  169. data/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.js +0 -500
  170. data/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.min.js +0 -14
  171. data/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.js +0 -545
  172. data/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.min.js +0 -5
  173. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.amd.js +0 -576
  174. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.common.js +0 -576
  175. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.js +0 -572
  176. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.amd.js +0 -5
  177. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.common.js +0 -5
  178. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.js +0 -5
  179. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.mustache.js +0 -5
  180. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.mustache.js +0 -619
  181. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.js +0 -233
  182. data/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.min.js +0 -5
  183. data/docs/build/node_modules/hogan.js/web/favicon.ico +0 -0
  184. data/docs/build/node_modules/hogan.js/web/images/logo.png +0 -0
  185. data/docs/build/node_modules/hogan.js/web/images/noise.png +0 -0
  186. data/docs/build/node_modules/hogan.js/web/images/small-hogan-icon.png +0 -0
  187. data/docs/build/node_modules/hogan.js/web/images/stripes.png +0 -0
  188. data/docs/build/node_modules/hogan.js/web/index.html.mustache +0 -139
  189. data/docs/build/node_modules/hogan.js/web/stylesheets/layout.css +0 -206
  190. data/docs/build/node_modules/hogan.js/web/stylesheets/skeleton.css +0 -236
  191. data/docs/build/node_modules/hogan.js/wrappers/amd.js.mustache +0 -21
  192. data/docs/build/node_modules/hogan.js/wrappers/common.js.mustache +0 -21
  193. data/docs/build/node_modules/hogan.js/wrappers/js.mustache +0 -17
  194. data/docs/build/node_modules/hogan.js/wrappers/mustache.js.mustache +0 -64
  195. data/docs/build/package.json +0 -6
  196. data/docs/components.html +0 -1931
  197. data/docs/download.html +0 -454
  198. data/docs/examples.html +0 -147
  199. data/docs/examples/fluid.html +0 -162
  200. data/docs/examples/hero.html +0 -109
  201. data/docs/examples/starter-template.html +0 -79
  202. data/docs/index.html +0 -259
  203. data/docs/javascript.html +0 -1520
  204. data/docs/less.html +0 -1060
  205. data/docs/scaffolding.html +0 -671
  206. data/docs/templates/layout.mustache +0 -146
  207. data/docs/templates/pages/base-css.mustache +0 -1594
  208. data/docs/templates/pages/components.mustache +0 -1815
  209. data/docs/templates/pages/download.mustache +0 -338
  210. data/docs/templates/pages/examples.mustache +0 -31
  211. data/docs/templates/pages/index.mustache +0 -144
  212. data/docs/templates/pages/javascript.mustache +0 -1405
  213. data/docs/templates/pages/less.mustache +0 -944
  214. data/docs/templates/pages/scaffolding.mustache +0 -555
  215. data/docs/templates/pages/upgrading.mustache +0 -194
  216. data/docs/upgrading.html +0 -310
  217. data/js/tests/index.html +0 -54
  218. data/js/tests/phantom.js +0 -63
  219. data/js/tests/server.js +0 -14
  220. data/js/tests/unit/bootstrap-alert.js +0 -56
  221. data/js/tests/unit/bootstrap-button.js +0 -77
  222. data/js/tests/unit/bootstrap-carousel.js +0 -28
  223. data/js/tests/unit/bootstrap-collapse.js +0 -54
  224. data/js/tests/unit/bootstrap-dropdown.js +0 -87
  225. data/js/tests/unit/bootstrap-modal.js +0 -114
  226. data/js/tests/unit/bootstrap-phantom.js +0 -21
  227. data/js/tests/unit/bootstrap-popover.js +0 -93
  228. data/js/tests/unit/bootstrap-scrollspy.js +0 -31
  229. data/js/tests/unit/bootstrap-tab.js +0 -61
  230. data/js/tests/unit/bootstrap-tooltip.js +0 -155
  231. data/js/tests/unit/bootstrap-transition.js +0 -13
  232. data/js/tests/unit/bootstrap-typeahead.js +0 -148
  233. data/js/tests/vendor/jquery.js +0 -9252
  234. data/js/tests/vendor/qunit.css +0 -232
  235. data/js/tests/vendor/qunit.js +0 -1510
  236. data/package.json +0 -25
  237. data/sass-twitter-bootstrap.gemspec +0 -19
  238. data/vendor/assets/javascripts/README.md +0 -112
  239. data/vendor/assets/javascripts/twitter/bootstrap.js +0 -12
  240. data/vendor/assets/stylesheets/twitter/_labels-badges.scss +0 -52
  241. data/vendor/assets/stylesheets/twitter/_responsive-1200px-min.scss +0 -26
  242. data/vendor/assets/stylesheets/twitter/_responsive-767px-max.scss +0 -149
  243. data/vendor/assets/stylesheets/twitter/_responsive-768px-979px.scss +0 -17
  244. data/vendor/assets/stylesheets/twitter/_responsive-navbar.scss +0 -153
  245. data/vendor/assets/stylesheets/twitter/_responsive-utilities.scss +0 -41
@@ -1,90 +0,0 @@
1
- /*
2
- * Copyright 2011 Twitter, Inc.
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License.
5
- * You may obtain a copy of the License at
6
- *
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software
10
- * distributed under the License is distributed on an "AS IS" BASIS,
11
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- * See the License for the specific language governing permissions and
13
- * limitations under the License.
14
- */
15
-
16
- var doc = this['document'];
17
- var fs = require('fs');
18
-
19
- var passed = 0;
20
- var failed = 0;
21
-
22
- if (!this['output']) {
23
- var output = function (string) {
24
- return doc ? doc.write(string + '<br/>') : console.log(string);
25
- };
26
- }
27
-
28
- var Hogan = require(__dirname + '/../lib/hogan');
29
- var template = fs.readFileSync(__dirname + '/../lib/template.js').toString();
30
- var compiler = fs.readFileSync(__dirname + '/../lib/compiler.js').toString();
31
- var mustache_wrapper = fs.readFileSync(__dirname + '/../wrappers/mustache.js.mustache').toString();
32
-
33
- // Create a Mustache.js emulator from the distribution template
34
- var engines = (new Function(Hogan.compile(mustache_wrapper).render({template: template, compiler: compiler}) +
35
- '; return {Hogan: Hogan, Mustache: Mustache};'))();
36
-
37
- var Mustache = engines.Mustache;
38
- var Hogan2 = engines.Hogan;
39
-
40
-
41
- // sanity check
42
- is(Mustache.hasOwnProperty('to_html'), true, 'Mustache has to_html method.');
43
-
44
- // Check for Mustache.js partial resolution behavior.
45
- var context = {
46
- foo: 'bar',
47
- mypartial: {
48
- baz: 'qux'
49
- }
50
- }
51
- var text = 'abc {{foo}} def {{>mypartial}} ghi';
52
- var partialText = '{{baz}}';
53
- var s = Mustache.to_html(text, context, {'mypartial': partialText});
54
- is(s, 'abc bar def qux ghi', 'Correct emulation of Mustache.js partial-name-in-context resolution.');
55
-
56
- // Now check to see that the Hogan resolution is unaffected.
57
- var t = Hogan2.compile(text);
58
- s = t.render(context, {'mypartial': partialText});
59
- is(s, 'abc bar def ghi', 'Hogan behavior not changed by Mustache.js emulation.');
60
-
61
- // Check for sendFun behavior
62
- var buf = "";
63
- function send(s) {
64
- buf += "-FOO " + s + " FOO-";
65
- }
66
- var s = Mustache.to_html(text, context, {'mypartial': partialText}, send);
67
- is(buf, '-FOO abc bar def qux ghi FOO-', 'Correct emulation of Mustache.js sendFun.');
68
-
69
-
70
- function is(got, expected, msg) {
71
- if (got === expected) {
72
- output("OK: " + msg);
73
- ++passed;
74
- } else {
75
- output("FAIL: " + msg);
76
- output("Expected |" + expected + "|");
77
- output(" Got |" + got + "|");
78
- ++failed;
79
- }
80
- }
81
-
82
- function complete() {
83
- output("\nTests Complete");
84
- output("--------------");
85
- output("Passed: " + passed);
86
- output("Failed: " + failed);
87
- output("\n");
88
- }
89
-
90
- complete();
@@ -1,77 +0,0 @@
1
- /*
2
- * Copyright 2011 Twitter, Inc.
3
- * Licensed under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License.
5
- * You may obtain a copy of the License at
6
- *
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- *
9
- * Unless required by applicable law or agreed to in writing, software
10
- * distributed under the License is distributed on an "AS IS" BASIS,
11
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- * See the License for the specific language governing permissions and
13
- * limitations under the License.
14
- */
15
-
16
- var Hogan = Hogan || require('../lib/hogan');
17
- var doc = this["document"];
18
- var fs = require('fs');
19
-
20
- var passed = 0;
21
- var failed = 0;
22
-
23
- if (!this["output"]) {
24
- var output = function (string) {
25
- return doc ? doc.write(string + '<br/>') : console.log(string);
26
- };
27
- }
28
-
29
- function runTest(tests) {
30
- tests.forEach(function(test) {
31
- var partials = {};
32
- for (var i in test.partials) {
33
- partials[i] = Hogan.compile(test.partials[i]);
34
- }
35
- var t = Hogan.compile(test.template);
36
-
37
- if (test.data.lambda) {
38
- var func = (new Function ('return ' + test.data.lambda.js)());
39
- test.data.lambda = function() { return func; };
40
- }
41
-
42
- var s = t.render(test.data, partials);
43
- is(s, test.expected, test.name + ': ' + test.desc);
44
- });
45
- }
46
-
47
- var testDir = './test/spec/specs';
48
- var files = fs.readdirSync(testDir)
49
- .filter(function(f) { return f.indexOf('.json') > 0; })
50
- .map(function(f) { return testDir + '/' + f});
51
-
52
- for (var i = 0; i < files.length; i++) {
53
- var test = JSON.parse(fs.readFileSync(files[i]).toString());
54
- runTest(test.tests);
55
- }
56
-
57
- function is(got, expected, msg) {
58
- if (got === expected) {
59
- output("OK: " + msg);
60
- ++passed;
61
- } else {
62
- output("FAIL: " + msg);
63
- output("Expected |" + expected + "|");
64
- output(" Got |" + got + "|");
65
- ++failed;
66
- }
67
- }
68
-
69
- function complete() {
70
- output("\nTests Complete");
71
- output("--------------");
72
- output("Passed: " + passed);
73
- output("Failed: " + failed);
74
- output("\n");
75
- }
76
-
77
- complete();
@@ -1,31 +0,0 @@
1
- 2011-03-20: v1.1.2
2
- Added tests for standalone tags at string boundaries.
3
- Added tests for rendering lambda returns after delimiter changes.
4
-
5
- 2011-03-20: v1.0.3
6
- Added tests for standalone tags at string boundaries.
7
- Added tests for rendering lambda returns after delimiter changes.
8
-
9
- 2011-03-05: v1.1.1
10
- Added tests for indented inline sections.
11
- Added tests for Windows-style newlines.
12
-
13
- 2011-03-05: v1.0.2
14
- Added tests for indented inline sections.
15
- Added tests for Windows-style newlines.
16
-
17
- 2011-03-04: v1.1.0
18
- Implicit iterators.
19
- A single period (`.`) may now be used as a name in Interpolation tags,
20
- which represents the top of stack (cast as a String).
21
- Dotted names.
22
- Names containing one or more periods should be resolved as chained
23
- properties; naïvely, this is like nesting section tags, but with some
24
- built-in scoping protections.
25
-
26
- 2011-03-02: v1.0.1
27
- Clarifying a point in the README about version compliance.
28
- Adding high-level documentation to each spec file.
29
-
30
- 2011-02-28: v1.0.0
31
- Initial Release
@@ -1,65 +0,0 @@
1
- The repository at https://github.com/mustache/spec is the formal standard for
2
- Mustache. It defines both normal usage and edge-case behavior for libraries
3
- parsing the Mustache templating language (or a superset thereof).
4
-
5
- The specification is developed as a series of YAML files, under the `specs`
6
- directory.
7
-
8
- Versioning
9
- ----------
10
- This specification is being [semantically versioned](http://semver.org).
11
- Roughly described, major version changes will always represent backwards
12
- incompatible changes, minor version changes will always represent new language
13
- features and will be backwards compatible, and patch ('tiny') version changes
14
- will always be bug fixes. For the purposes of semantic versioning, the public
15
- API is the contents of the `specs` directory and the algorithm for testing
16
- against it.
17
-
18
- Mustache implementations SHOULD report the most recent version of the spec
19
- (major and minor version numbers). If an implementation has support for any
20
- optional modules, they SHOULD indicate so with a remark attached to the
21
- version number (e.g. "vX.Y, including lambdas" or "v.X.Y+λ"). It is
22
- RECOMMENDED that implementations not supporting at least v1.0.0 of this spec
23
- refer to themselves as "Mustache-like", or "Mustache-inspired".
24
-
25
- Alternate Formats
26
- -----------------
27
-
28
- Since YAML is a reasonably complex format that not every language has good
29
- tools for working with, we also provide JSON versions of the specs on a
30
- best-effort basis.
31
-
32
- These should be identical to the YAML specifications, but if you find the need
33
- to regenerate them, they can be trivially rebuilt by invoking `rake build`.
34
-
35
- It is also worth noting that some specifications (notably, the lambda module)
36
- rely on YAML "tags" to denote special types of data (e.g. source code). Since
37
- JSON offers no way to denote this, a special key ("`__tag__`") is injected
38
- with the name of the tag as its value. See `TESTING.md` for more information
39
- about handling tagged data.
40
-
41
- Optional Modules
42
- ----------------
43
-
44
- Specification files beginning with a tilde (`~`) describe optional modules.
45
- At present, the only module being described as optional is regarding support
46
- for lambdas. As a guideline, a module may be a candidate for optionality
47
- when:
48
-
49
- * It does not affect the core syntax of the language.
50
- * It does not significantly affect the output of rendered templates.
51
- * It concerns implementation language features or data types that are not
52
- common to or core in every targeted language.
53
- * The lack of support by an implementation does not diminish the usage of
54
- Mustache in the target language.
55
-
56
- As an example, the lambda module is primarily concerned with the handling of a
57
- particular data type (code). This is a type of data that may be difficult to
58
- support in some languages, and users of those languages will not see the lack
59
- as an 'inconsistency' between implementations.
60
-
61
- Support for specific pragmas or syntax extensions, however, are best managed
62
- outside this core specification, as adjunct specifications.
63
-
64
- Implementors are strongly encouraged to support any and all modules they are
65
- reasonably capable of supporting.
@@ -1,27 +0,0 @@
1
- require 'json'
2
- require 'yaml'
3
-
4
- # Our custom YAML tags must retain their magic.
5
- %w[ code ].each do |tag|
6
- YAML::add_builtin_type(tag) { |_,val| val.merge(:__tag__ => tag) }
7
- end
8
-
9
- desc 'Build all alternate versions of the specs.'
10
- multitask :build => [ 'build:json' ]
11
-
12
- namespace :build do
13
- note = 'Do not edit this file; changes belong in the appropriate YAML file.'
14
-
15
- desc 'Build JSON versions of the specs.'
16
- task :json do
17
- rm(Dir['specs/*.json'], :verbose => false)
18
- Dir.glob('specs/*.yml').each do |filename|
19
- json_file = filename.gsub('.yml', '.json')
20
-
21
- File.open(json_file, 'w') do |file|
22
- doc = YAML.load_file(filename)
23
- file << doc.merge(:__ATTN__ => note).to_json()
24
- end
25
- end
26
- end
27
- end
@@ -1,46 +0,0 @@
1
- Testing your Mustache implementation against this specification should be
2
- relatively simple. If you have a readily available testing framework on your
3
- platform, your task may be even simpler.
4
-
5
- In general, the process for each `.yml` file is as follows:
6
-
7
- 1. Use a YAML parser to load the file.
8
-
9
- 2. For each test in the 'tests' array:
10
-
11
- 1. Ensure that each element of the 'partials' hash (if it exists) is
12
- stored in a place where the interpreter will look for it.
13
-
14
- 2. If your implementation will not support lambdas, feel free to skip over
15
- the optional '~lambdas.yml' file.
16
-
17
- 2.1. If your implementation will support lambdas, ensure that each member of
18
- 'data' tagged with '!code' is properly processed into a language-
19
- specific lambda reference.
20
-
21
- * e.g. Given this YAML data hash:
22
-
23
- `{ x: !code { ruby: 'proc { "x" }', perl: 'sub { "x" }' } }`
24
-
25
- a Ruby-based Mustache implementation would process it such that it
26
- was equivalent to this Ruby hash:
27
-
28
- `{ 'x' => proc { "x" } }`
29
-
30
- * If your implementation language does not currently have lambda
31
- examples in the spec, feel free to implement them and send a pull
32
- request.
33
-
34
- * The JSON version of the spec represents these tagged values as a hash
35
- with a '`__tag__`' key of 'code'.
36
-
37
- 3. Render the template (stored in the 'template' key) with the given 'data'
38
- hash.
39
-
40
- 4. Compare the results of your rendering against the 'expected' value; any
41
- differences should be reported, along with any useful debugging
42
- information.
43
-
44
- * Of note, the 'desc' key contains a rough one-line description of the
45
- behavior being tested -- this is most useful in conjunction with the
46
- file name and test 'name'.
@@ -1 +0,0 @@
1
- {"__ATTN__":"Do not edit this file; changes belong in the appropriate YAML file.","overview":"Comment tags represent content that should never appear in the resulting\noutput.\n\nThe tag's content may contain any substring (including newlines) EXCEPT the\nclosing delimiter.\n\nComment tags SHOULD be treated as standalone when appropriate.\n","tests":[{"name":"Inline","data":{},"expected":"1234567890","template":"12345{{! Comment Block! }}67890","desc":"Comment blocks should be removed from the template."},{"name":"Multiline","data":{},"expected":"1234567890\n","template":"12345{{!\n This is a\n multi-line comment...\n}}67890\n","desc":"Multiline comments should be permitted."},{"name":"Standalone","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n{{! Comment Block! }}\nEnd.\n","desc":"All standalone comment lines should be removed."},{"name":"Indented Standalone","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n {{! Indented Comment Block! }}\nEnd.\n","desc":"All standalone comment lines should be removed."},{"name":"Standalone Line Endings","data":{},"expected":"|\r\n|","template":"|\r\n{{! Standalone Comment }}\r\n|","desc":"\"\\r\\n\" should be considered a newline for standalone tags."},{"name":"Standalone Without Previous Line","data":{},"expected":"!","template":" {{! I'm Still Standalone }}\n!","desc":"Standalone tags should not require a newline to precede them."},{"name":"Standalone Without Newline","data":{},"expected":"!\n","template":"!\n {{! I'm Still Standalone }}","desc":"Standalone tags should not require a newline to follow them."},{"name":"Multiline Standalone","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n{{!\nSomething's going on here...\n}}\nEnd.\n","desc":"All standalone comment lines should be removed."},{"name":"Indented Multiline Standalone","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n {{!\n Something's going on here...\n }}\nEnd.\n","desc":"All standalone comment lines should be removed."},{"name":"Indented Inline","data":{},"expected":" 12 \n","template":" 12 {{! 34 }}\n","desc":"Inline comments should not strip whitespace"},{"name":"Surrounding Whitespace","data":{},"expected":"12345 67890","template":"12345 {{! Comment Block! }} 67890","desc":"Comment removal should preserve surrounding whitespace."}]}
@@ -1,103 +0,0 @@
1
- overview: |
2
- Comment tags represent content that should never appear in the resulting
3
- output.
4
-
5
- The tag's content may contain any substring (including newlines) EXCEPT the
6
- closing delimiter.
7
-
8
- Comment tags SHOULD be treated as standalone when appropriate.
9
- tests:
10
- - name: Inline
11
- desc: Comment blocks should be removed from the template.
12
- data: { }
13
- template: '12345{{! Comment Block! }}67890'
14
- expected: '1234567890'
15
-
16
- - name: Multiline
17
- desc: Multiline comments should be permitted.
18
- data: { }
19
- template: |
20
- 12345{{!
21
- This is a
22
- multi-line comment...
23
- }}67890
24
- expected: |
25
- 1234567890
26
-
27
- - name: Standalone
28
- desc: All standalone comment lines should be removed.
29
- data: { }
30
- template: |
31
- Begin.
32
- {{! Comment Block! }}
33
- End.
34
- expected: |
35
- Begin.
36
- End.
37
-
38
- - name: Indented Standalone
39
- desc: All standalone comment lines should be removed.
40
- data: { }
41
- template: |
42
- Begin.
43
- {{! Indented Comment Block! }}
44
- End.
45
- expected: |
46
- Begin.
47
- End.
48
-
49
- - name: Standalone Line Endings
50
- desc: '"\r\n" should be considered a newline for standalone tags.'
51
- data: { }
52
- template: "|\r\n{{! Standalone Comment }}\r\n|"
53
- expected: "|\r\n|"
54
-
55
- - name: Standalone Without Previous Line
56
- desc: Standalone tags should not require a newline to precede them.
57
- data: { }
58
- template: " {{! I'm Still Standalone }}\n!"
59
- expected: "!"
60
-
61
- - name: Standalone Without Newline
62
- desc: Standalone tags should not require a newline to follow them.
63
- data: { }
64
- template: "!\n {{! I'm Still Standalone }}"
65
- expected: "!\n"
66
-
67
- - name: Multiline Standalone
68
- desc: All standalone comment lines should be removed.
69
- data: { }
70
- template: |
71
- Begin.
72
- {{!
73
- Something's going on here...
74
- }}
75
- End.
76
- expected: |
77
- Begin.
78
- End.
79
-
80
- - name: Indented Multiline Standalone
81
- desc: All standalone comment lines should be removed.
82
- data: { }
83
- template: |
84
- Begin.
85
- {{!
86
- Something's going on here...
87
- }}
88
- End.
89
- expected: |
90
- Begin.
91
- End.
92
-
93
- - name: Indented Inline
94
- desc: Inline comments should not strip whitespace
95
- data: { }
96
- template: " 12 {{! 34 }}\n"
97
- expected: " 12 \n"
98
-
99
- - name: Surrounding Whitespace
100
- desc: Comment removal should preserve surrounding whitespace.
101
- data: { }
102
- template: '12345 {{! Comment Block! }} 67890'
103
- expected: '12345 67890'