envjs 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +113 -0
- data/bin/envjsrb +239 -0
- data/bin/jquery-1.2.6-test.js +33 -0
- data/bin/jquery-1.3.1-test.js +33 -0
- data/bin/jquery-1.3.2-test.js +106 -0
- data/bin/prototype-1.6.0.3-test.js +82 -0
- data/bin/prototype_1.6.0.3_tmpl.txt +27 -0
- data/bin/test-jquery.sh +58 -0
- data/bin/test-prototype.sh +54 -0
- data/bin/tidy +0 -0
- data/lib/envjs/env.js +21549 -0
- data/lib/envjs/net/cgi.rb +94 -0
- data/lib/envjs/net/file.rb +75 -0
- data/lib/envjs/net.rb +3 -0
- data/lib/envjs/options.rb +11 -0
- data/lib/envjs/runtime.rb +280 -0
- data/lib/envjs/tempfile.rb +24 -0
- data/lib/envjs.rb +23 -0
- data/test/call-load-test.js +15 -0
- data/test/debug.js +53 -0
- data/test/firebug/errorIcon.png +0 -0
- data/test/firebug/firebug.css +209 -0
- data/test/firebug/firebug.html +23 -0
- data/test/firebug/firebug.js +672 -0
- data/test/firebug/firebugx.js +10 -0
- data/test/firebug/infoIcon.png +0 -0
- data/test/firebug/warningIcon.png +0 -0
- data/test/fixtures/html/events.html +171 -0
- data/test/fixtures/html/iframe1.html +46 -0
- data/test/fixtures/html/iframe1a.html +46 -0
- data/test/fixtures/html/iframe2.html +45 -0
- data/test/fixtures/html/iframe3.html +28 -0
- data/test/fixtures/html/iframeN.html +57 -0
- data/test/fixtures/html/malformed.html +181 -0
- data/test/fixtures/html/scope.html +81 -0
- data/test/fixtures/html/trivial.html +19 -0
- data/test/fixtures/html/with_js.html +26 -0
- data/test/fixtures/images/icon-blue.png +0 -0
- data/test/fixtures/js/external_script.js +1 -0
- data/test/fixtures/js/script.js +1 -0
- data/test/fixtures/js/script_error.js +2 -0
- data/test/html/events.html +171 -0
- data/test/html/iframe1.html +46 -0
- data/test/html/iframe1a.html +46 -0
- data/test/html/iframe2.html +45 -0
- data/test/html/iframe3.html +30 -0
- data/test/html/iframeN.html +57 -0
- data/test/html/malformed.html +181 -0
- data/test/html/scope.html +87 -0
- data/test/html/script.js +1 -0
- data/test/html/trivial.html +19 -0
- data/test/html/with_js.html +26 -0
- data/test/index.html +328 -0
- data/test/java-prototype.js +9 -0
- data/test/primary-tests.js +24 -0
- data/test/prototype-test.js +13 -0
- data/test/qunit/qunit/qunit.css +17 -0
- data/test/qunit/qunit/qunit.js +997 -0
- data/test/qunit.js +61 -0
- data/test/specs/dist/env.spec.js +1534 -0
- data/test/specs/envjs.spec.css +46 -0
- data/test/specs/parser/html.js +31 -0
- data/test/specs/parser/spec.html +40 -0
- data/test/specs/parser/xml.js +31 -0
- data/test/specs/qunit.bdd.js +210 -0
- data/test/specs/qunit.css +17 -0
- data/test/specs/qunit.js +997 -0
- data/test/specs/template/spec-0.js +31 -0
- data/test/specs/template/spec-1.js +31 -0
- data/test/specs/template/spec.html +40 -0
- data/test/specs/window/css.js +23 -0
- data/test/specs/window/dialog.js +25 -0
- data/test/specs/window/document.js +23 -0
- data/test/specs/window/event.js +25 -0
- data/test/specs/window/history.js +34 -0
- data/test/specs/window/location.js +34 -0
- data/test/specs/window/navigator.js +71 -0
- data/test/specs/window/screen.js +42 -0
- data/test/specs/window/spec.html +48 -0
- data/test/specs/window/timer.js +26 -0
- data/test/specs/window/window.js +53 -0
- data/test/specs/xhr/spec.html +47 -0
- data/test/specs/xhr/xhr.js +31 -0
- data/test/test.js +10 -0
- data/test/unit/dom.js +44 -0
- data/test/unit/elementmembers.js +60 -0
- data/test/unit/events.js +195 -0
- data/test/unit/fixtures/external_script.js +1 -0
- data/test/unit/iframe.js +234 -0
- data/test/unit/multi-window.js +212 -0
- data/test/unit/nu.validator.js +34 -0
- data/test/unit/onload.js +90 -0
- data/test/unit/parser.js +121 -0
- data/test/unit/prototypecompat.js +22 -0
- data/test/unit/proxy.js +6 -0
- data/test/unit/scope.js +209 -0
- data/test/unit/timer.js +115 -0
- data/test/unit/window.js +41 -0
- data/test/vendor/jQuery/README +2 -0
- data/test/vendor/prototype-1.6.0.3.js +4320 -0
- 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
|