envjs 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. data/README +113 -0
  2. data/bin/envjsrb +239 -0
  3. data/bin/jquery-1.2.6-test.js +33 -0
  4. data/bin/jquery-1.3.1-test.js +33 -0
  5. data/bin/jquery-1.3.2-test.js +106 -0
  6. data/bin/prototype-1.6.0.3-test.js +82 -0
  7. data/bin/prototype_1.6.0.3_tmpl.txt +27 -0
  8. data/bin/test-jquery.sh +58 -0
  9. data/bin/test-prototype.sh +54 -0
  10. data/bin/tidy +0 -0
  11. data/lib/envjs/env.js +21549 -0
  12. data/lib/envjs/net/cgi.rb +94 -0
  13. data/lib/envjs/net/file.rb +75 -0
  14. data/lib/envjs/net.rb +3 -0
  15. data/lib/envjs/options.rb +11 -0
  16. data/lib/envjs/runtime.rb +280 -0
  17. data/lib/envjs/tempfile.rb +24 -0
  18. data/lib/envjs.rb +23 -0
  19. data/test/call-load-test.js +15 -0
  20. data/test/debug.js +53 -0
  21. data/test/firebug/errorIcon.png +0 -0
  22. data/test/firebug/firebug.css +209 -0
  23. data/test/firebug/firebug.html +23 -0
  24. data/test/firebug/firebug.js +672 -0
  25. data/test/firebug/firebugx.js +10 -0
  26. data/test/firebug/infoIcon.png +0 -0
  27. data/test/firebug/warningIcon.png +0 -0
  28. data/test/fixtures/html/events.html +171 -0
  29. data/test/fixtures/html/iframe1.html +46 -0
  30. data/test/fixtures/html/iframe1a.html +46 -0
  31. data/test/fixtures/html/iframe2.html +45 -0
  32. data/test/fixtures/html/iframe3.html +28 -0
  33. data/test/fixtures/html/iframeN.html +57 -0
  34. data/test/fixtures/html/malformed.html +181 -0
  35. data/test/fixtures/html/scope.html +81 -0
  36. data/test/fixtures/html/trivial.html +19 -0
  37. data/test/fixtures/html/with_js.html +26 -0
  38. data/test/fixtures/images/icon-blue.png +0 -0
  39. data/test/fixtures/js/external_script.js +1 -0
  40. data/test/fixtures/js/script.js +1 -0
  41. data/test/fixtures/js/script_error.js +2 -0
  42. data/test/html/events.html +171 -0
  43. data/test/html/iframe1.html +46 -0
  44. data/test/html/iframe1a.html +46 -0
  45. data/test/html/iframe2.html +45 -0
  46. data/test/html/iframe3.html +30 -0
  47. data/test/html/iframeN.html +57 -0
  48. data/test/html/malformed.html +181 -0
  49. data/test/html/scope.html +87 -0
  50. data/test/html/script.js +1 -0
  51. data/test/html/trivial.html +19 -0
  52. data/test/html/with_js.html +26 -0
  53. data/test/index.html +328 -0
  54. data/test/java-prototype.js +9 -0
  55. data/test/primary-tests.js +24 -0
  56. data/test/prototype-test.js +13 -0
  57. data/test/qunit/qunit/qunit.css +17 -0
  58. data/test/qunit/qunit/qunit.js +997 -0
  59. data/test/qunit.js +61 -0
  60. data/test/specs/dist/env.spec.js +1534 -0
  61. data/test/specs/envjs.spec.css +46 -0
  62. data/test/specs/parser/html.js +31 -0
  63. data/test/specs/parser/spec.html +40 -0
  64. data/test/specs/parser/xml.js +31 -0
  65. data/test/specs/qunit.bdd.js +210 -0
  66. data/test/specs/qunit.css +17 -0
  67. data/test/specs/qunit.js +997 -0
  68. data/test/specs/template/spec-0.js +31 -0
  69. data/test/specs/template/spec-1.js +31 -0
  70. data/test/specs/template/spec.html +40 -0
  71. data/test/specs/window/css.js +23 -0
  72. data/test/specs/window/dialog.js +25 -0
  73. data/test/specs/window/document.js +23 -0
  74. data/test/specs/window/event.js +25 -0
  75. data/test/specs/window/history.js +34 -0
  76. data/test/specs/window/location.js +34 -0
  77. data/test/specs/window/navigator.js +71 -0
  78. data/test/specs/window/screen.js +42 -0
  79. data/test/specs/window/spec.html +48 -0
  80. data/test/specs/window/timer.js +26 -0
  81. data/test/specs/window/window.js +53 -0
  82. data/test/specs/xhr/spec.html +47 -0
  83. data/test/specs/xhr/xhr.js +31 -0
  84. data/test/test.js +10 -0
  85. data/test/unit/dom.js +44 -0
  86. data/test/unit/elementmembers.js +60 -0
  87. data/test/unit/events.js +195 -0
  88. data/test/unit/fixtures/external_script.js +1 -0
  89. data/test/unit/iframe.js +234 -0
  90. data/test/unit/multi-window.js +212 -0
  91. data/test/unit/nu.validator.js +34 -0
  92. data/test/unit/onload.js +90 -0
  93. data/test/unit/parser.js +121 -0
  94. data/test/unit/prototypecompat.js +22 -0
  95. data/test/unit/proxy.js +6 -0
  96. data/test/unit/scope.js +209 -0
  97. data/test/unit/timer.js +115 -0
  98. data/test/unit/window.js +41 -0
  99. data/test/vendor/jQuery/README +2 -0
  100. data/test/vendor/prototype-1.6.0.3.js +4320 -0
  101. metadata +164 -0
@@ -0,0 +1,54 @@
1
+ #!/bin/sh
2
+
3
+ # Usage: test-prototype.sh [version]
4
+ # Currently supported versions: 1.6.0.3
5
+ #
6
+ # This script will check out the Prototype development tree from Github if necessary,
7
+ # massage the testing scripts as necessary, copy our latest version of env.js into place,
8
+ # and then run the test scripts.
9
+
10
+
11
+ if [ -n "$2" ]; then
12
+ echo 'debug'
13
+ if [ -n "$2" ]; then VERSION="$2"; else VERSION="1.6.0.3"; fi
14
+ DEBUG=1
15
+ else
16
+ echo 'jquery'
17
+ if [ -n "$1" ]; then VERSION="$1"; else VERSION="1.6.0.3"; fi
18
+ DEBUG=0
19
+ fi
20
+
21
+ PROTOTYPE_DIR="test/vendor/Prototype/$VERSION";
22
+
23
+ ant concat
24
+
25
+ if [ ! -d "$PROTOTYPE_DIR" ]; then
26
+ git clone git://github.com/sstephenson/prototype.git $PROTOTYPE_DIR
27
+ # - prepares tests - #
28
+ cd $PROTOTYPE_DIR
29
+ git submodule init #allow prototype to discover test framework dependencies
30
+ git submodule update #load the dicovered dependencies
31
+ cd -
32
+ fi
33
+
34
+ #replace thier test html template erb (malformed html on purpose..really???)
35
+ cat bin/prototype_1.6.0.3_tmpl.txt > $PROTOTYPE_DIR/test/unit/templates/default.erb
36
+ sed 's/runner\.run/ /g' $PROTOTYPE_DIR/Rakefile > $PROTOTYPE_DIR/Rakefile
37
+ cd $PROTOTYPE_DIR
38
+ rake test
39
+ cd -
40
+
41
+ cp dist/env.rhino.js $PROTOTYPE_DIR/test/unit/tmp/env.js
42
+ cp dist/env-js.jar $PROTOTYPE_DIR/test/unit/tmp/env-js.jar
43
+ cp bin/prototype-$VERSION-test.js $PROTOTYPE_DIR/test/unit/tmp/test.js
44
+
45
+
46
+ cd $PROTOTYPE_DIR/test/unit/tmp
47
+ if [ $DEBUG -eq 1 ]; then
48
+ echo 'running with rhino debugger'
49
+ java -cp env-js.jar org.mozilla.javascript.tools.envjs.Main test.js;
50
+ else
51
+ echo 'running with rhino'
52
+ java -cp env-js.jar org.mozilla.javascript.tools.envjs.Main test.js;
53
+ fi
54
+
data/bin/tidy ADDED
Binary file