distil 0.13.6 → 0.14.0.b

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/Rakefile +1 -0
  2. data/VERSION +1 -1
  3. data/assets/distil.js +9 -7
  4. data/bin/distil +36 -60
  5. data/distil.gemspec +17 -32
  6. data/distil.tmproj +46 -15
  7. data/lib/distil/browser.rb +30 -26
  8. data/lib/distil/configurable.rb +64 -153
  9. data/lib/distil/error-reporter.rb +22 -20
  10. data/lib/distil/file-vendor.rb +29 -0
  11. data/lib/distil/hash-additions.rb +45 -0
  12. data/lib/distil/javascript-code.rb +12 -0
  13. data/lib/distil/{task/validate-js-task.rb → javascript-file-validator.rb} +19 -23
  14. data/lib/distil/library.rb +243 -0
  15. data/lib/distil/product/cache-manifest-product.rb +21 -0
  16. data/lib/distil/product/css-product.rb +41 -23
  17. data/lib/distil/product/html-product.rb +20 -0
  18. data/lib/distil/product/javascript-product.rb +122 -111
  19. data/lib/distil/product.rb +90 -76
  20. data/lib/distil/project.rb +370 -104
  21. data/lib/distil/recursive-http-fetcher.rb +72 -0
  22. data/lib/distil/server.rb +43 -0
  23. data/lib/distil/source-file/css-file.rb +56 -3
  24. data/lib/distil/source-file/html-file.rb +5 -6
  25. data/lib/distil/source-file/javascript-file.rb +96 -8
  26. data/lib/distil/source-file/json-file.rb +2 -4
  27. data/lib/distil/source-file/yui-minifiable-file.rb +19 -0
  28. data/lib/distil/source-file.rb +50 -92
  29. data/lib/distil/subclass-tracker.rb +13 -0
  30. data/lib/distil.rb +21 -37
  31. metadata +40 -39
  32. data/assets/mime.types +0 -1240
  33. data/lib/distil/configurable/file-set.rb +0 -85
  34. data/lib/distil/configurable/interpolated.rb +0 -36
  35. data/lib/distil/configurable/output-path.rb +0 -25
  36. data/lib/distil/configurable/project-path.rb +0 -25
  37. data/lib/distil/product/concatenated.rb +0 -83
  38. data/lib/distil/product/debug.rb +0 -32
  39. data/lib/distil/product/javascript-base-product.rb +0 -35
  40. data/lib/distil/product/javascript-doc-product.rb +0 -61
  41. data/lib/distil/product/minified.rb +0 -41
  42. data/lib/distil/product/page-product.rb +0 -27
  43. data/lib/distil/product/pdoc-product.rb +0 -42
  44. data/lib/distil/project/distil-project.rb +0 -157
  45. data/lib/distil/project/external-project.rb +0 -58
  46. data/lib/distil/project/remote-project.rb +0 -43
  47. data/lib/distil/target.rb +0 -251
  48. data/lib/distil/task/css-dependency-task.rb +0 -64
  49. data/lib/distil/task/jsl-dependency-task.rb +0 -50
  50. data/lib/distil/task/nib-task.rb +0 -72
  51. data/lib/distil/task.rb +0 -50
  52. data/lib/jsdoc.conf +0 -18
  53. data/lib/test/HtmlTestReporter.js +0 -127
  54. data/lib/test/Test.js +0 -248
  55. data/lib/test/TestReporter.js +0 -79
  56. data/lib/test/TestRunner.js +0 -132
  57. data/lib/test/browser.rb +0 -97
  58. data/lib/test/scriptwrapper.html +0 -10
  59. data/lib/test/unittest.html +0 -127
@@ -1,127 +0,0 @@
1
- <!DOCTYPE HTML>
2
- <html>
3
- <head>
4
- <title>Unit Tests</title>
5
- <script src="/lib/test/Test.js" type="text/javascript" charset="utf-8"></script>
6
- <script src="/lib/test/HtmlTestReporter.js" type="text/javascript" charset="utf-8"></script>
7
- <script src="/lib/test/TestRunner.js" type="text/javascript" charset="utf-8"></script>
8
- <script>
9
- var __failures= [];
10
- function onfailure(m)
11
- {
12
- __failures.push(m);
13
- }
14
- function oncomplete()
15
- {
16
- var testForm= document.getElementById('testForm');
17
- var elements= testForm.elements;
18
- var statistics= TestReporter.statistics();
19
- statistics.failures= __failures.join('~!~');
20
- var p;
21
- for (p in statistics)
22
- elements[p].value= statistics[p];
23
- Test.reset();
24
- testForm.submit();
25
- __failures= [];
26
- }
27
- function iframeLoaded()
28
- {
29
- var testFrame= document.getElementById('testFrame');
30
- if ('about:blank'===testFrame.src)
31
- return;
32
-
33
- var h1= document.getElementsByTagName('h1')[0];
34
- h1.innerHTML="";
35
-
36
- if (!Test.numberOfRegisteredTests)
37
- {
38
- h1.appendChild(document.createTextNode("Unit Tests Complete"));
39
- return;
40
- }
41
-
42
- h1.appendChild(document.createTextNode(testFrame.contentDocument.title));
43
- TestReporter.onfailure= onfailure;
44
- TestRunner.oncomplete= oncomplete;
45
- TestRunner.runAll(TestReporter);
46
- }
47
-
48
- function loaded()
49
- {
50
- var testFrame= document.getElementById('testFrame');
51
- var file="?first_file";
52
- Test._tests= {};
53
- function go()
54
- {
55
- testFrame.onload= iframeLoaded;
56
- testFrame.src= file;
57
- }
58
- window.setTimeout(go, 250);
59
- }
60
- </script>
61
- <style>
62
- body
63
- {
64
- font-family: helvetica, arial, "sans serif";
65
- }
66
- h1
67
- {
68
- font-size: 20px;
69
- padding: 0 5px;
70
- }
71
- p.test-results
72
- {
73
- padding: 0 5px;
74
- }
75
-
76
- ul.test-report-items
77
- {
78
- list-style: none;
79
- padding: 0;
80
- margin: 0;
81
- }
82
- ul.test-report-items li
83
- {
84
- padding: 2px 5px;
85
- }
86
- ul.test-report-items li.test-report-item-failure
87
- {
88
- background-color: #a22;
89
- color: white;
90
- }
91
- ul.test-report-items li.test-report-item-skip
92
- {
93
- background-color: #cc0;
94
- color: black;
95
- }
96
-
97
- ul.test-report-items li a
98
- {
99
- text-decoration: none;
100
- color: #03c;
101
- }
102
-
103
- ul.test-report-items li.test-report-item-failure a
104
- {
105
- color: #f66;
106
- }
107
-
108
- </style>
109
- </head>
110
- <body onload="loaded()">
111
- <h1></h1>
112
- <div id="report">
113
- </div>
114
- <script>
115
- TestReporter.setup('report');
116
- </script>
117
- <iframe id="testFrame" name="testFrame" style="border:none;width:1px;height:1px;" src="about:blank"></iframe>
118
- <form id="testForm" method="POST" target="testFrame">
119
- <input type="hidden" name="testIndex" value="@testIndex@">
120
- <input type="hidden" name="failures" value="">
121
- <input type="hidden" name="numberOfTests" value="">
122
- <input type="hidden" name="numberOfPasses" value="">
123
- <input type="hidden" name="numberOfFailures" value="">
124
- <input type="hidden" name="numberOfSkipped" value="">
125
- </form>
126
- </body>
127
- </html>