Permalink
Browse files

Vendoring envjs

Locking version (built from source) until proper gem release
  • Loading branch information...
mynyml committed Feb 10, 2010
1 parent f2be084 commit c2b552e4c815025d287c3017d5ab3660fc9e8fcd
Showing with 36,237 additions and 3 deletions.
  1. +104 −0 Manifest
  2. +1 −2 harmony.gemspec
  3. +1 −1 lib/harmony/page.rb
  4. +1 −0 vendor/README
  5. +36 −0 vendor/envjs/README
  6. +255 −0 vendor/envjs/bin/envjsrb
  7. +33 −0 vendor/envjs/bin/jquery-1.2.6-test.js
  8. +33 −0 vendor/envjs/bin/jquery-1.3.1-test.js
  9. +106 −0 vendor/envjs/bin/jquery-1.3.2-test.js
  10. +82 −0 vendor/envjs/bin/prototype-1.6.0.3-test.js
  11. +27 −0 vendor/envjs/bin/prototype_1.6.0.3_tmpl.txt
  12. +58 −0 vendor/envjs/bin/test-jquery.sh
  13. +54 −0 vendor/envjs/bin/test-prototype.sh
  14. BIN vendor/envjs/bin/tidy
  15. +23 −0 vendor/envjs/lib/envjs.rb
  16. +21,665 −0 vendor/envjs/lib/envjs/env.js
  17. +3 −0 vendor/envjs/lib/envjs/net.rb
  18. +94 −0 vendor/envjs/lib/envjs/net/cgi.rb
  19. +75 −0 vendor/envjs/lib/envjs/net/file.rb
  20. +11 −0 vendor/envjs/lib/envjs/options.rb
  21. +351 −0 vendor/envjs/lib/envjs/runtime.rb
  22. +24 −0 vendor/envjs/lib/envjs/tempfile.rb
  23. +80 −0 vendor/envjs/test/base64.js
  24. +15 −0 vendor/envjs/test/call-load-test.js
  25. +45 −0 vendor/envjs/test/data.js
  26. +53 −0 vendor/envjs/test/debug.js
  27. BIN vendor/envjs/test/firebug/errorIcon.png
  28. +209 −0 vendor/envjs/test/firebug/firebug.css
  29. +23 −0 vendor/envjs/test/firebug/firebug.html
  30. +672 −0 vendor/envjs/test/firebug/firebug.js
  31. +10 −0 vendor/envjs/test/firebug/firebugx.js
  32. BIN vendor/envjs/test/firebug/infoIcon.png
  33. BIN vendor/envjs/test/firebug/warningIcon.png
  34. +171 −0 vendor/envjs/test/fixtures/html/events.html
  35. +46 −0 vendor/envjs/test/fixtures/html/iframe1.html
  36. +46 −0 vendor/envjs/test/fixtures/html/iframe1a.html
  37. +45 −0 vendor/envjs/test/fixtures/html/iframe2.html
  38. +28 −0 vendor/envjs/test/fixtures/html/iframe3.html
  39. +57 −0 vendor/envjs/test/fixtures/html/iframeN.html
  40. +181 −0 vendor/envjs/test/fixtures/html/malformed.html
  41. +81 −0 vendor/envjs/test/fixtures/html/scope.html
  42. +19 −0 vendor/envjs/test/fixtures/html/trivial.html
  43. +26 −0 vendor/envjs/test/fixtures/html/with_js.html
  44. BIN vendor/envjs/test/fixtures/images/icon-blue.png
  45. +1 −0 vendor/envjs/test/fixtures/js/external_script.js
  46. +1 −0 vendor/envjs/test/fixtures/js/script.js
  47. +2 −0 vendor/envjs/test/fixtures/js/script_error.js
  48. +171 −0 vendor/envjs/test/html/events.html
  49. +46 −0 vendor/envjs/test/html/iframe1.html
  50. +46 −0 vendor/envjs/test/html/iframe1a.html
  51. +45 −0 vendor/envjs/test/html/iframe2.html
  52. +30 −0 vendor/envjs/test/html/iframe3.html
  53. +57 −0 vendor/envjs/test/html/iframeN.html
  54. +181 −0 vendor/envjs/test/html/malformed.html
  55. +87 −0 vendor/envjs/test/html/scope.html
  56. +1 −0 vendor/envjs/test/html/script.js
  57. +19 −0 vendor/envjs/test/html/trivial.html
  58. +26 −0 vendor/envjs/test/html/with_js.html
  59. +328 −0 vendor/envjs/test/index.html
  60. +9 −0 vendor/envjs/test/java-prototype.js
  61. +24 −0 vendor/envjs/test/primary-tests.js
  62. +13 −0 vendor/envjs/test/prototype-test.js
  63. +61 −0 vendor/envjs/test/qunit.js
  64. +17 −0 vendor/envjs/test/qunit/qunit/qunit.css
  65. +997 −0 vendor/envjs/test/qunit/qunit/qunit.js
  66. +25 −0 vendor/envjs/test/scope.rb
  67. +1,534 −0 vendor/envjs/test/specs/dist/env.spec.js
  68. +46 −0 vendor/envjs/test/specs/envjs.spec.css
  69. +31 −0 vendor/envjs/test/specs/parser/html.js
  70. +40 −0 vendor/envjs/test/specs/parser/spec.html
  71. +31 −0 vendor/envjs/test/specs/parser/xml.js
  72. +210 −0 vendor/envjs/test/specs/qunit.bdd.js
  73. +17 −0 vendor/envjs/test/specs/qunit.css
  74. +997 −0 vendor/envjs/test/specs/qunit.js
  75. +31 −0 vendor/envjs/test/specs/template/spec-0.js
  76. +31 −0 vendor/envjs/test/specs/template/spec-1.js
  77. +40 −0 vendor/envjs/test/specs/template/spec.html
  78. +23 −0 vendor/envjs/test/specs/window/css.js
  79. +25 −0 vendor/envjs/test/specs/window/dialog.js
  80. +23 −0 vendor/envjs/test/specs/window/document.js
  81. +25 −0 vendor/envjs/test/specs/window/event.js
  82. +34 −0 vendor/envjs/test/specs/window/history.js
  83. +34 −0 vendor/envjs/test/specs/window/location.js
  84. +71 −0 vendor/envjs/test/specs/window/navigator.js
  85. +42 −0 vendor/envjs/test/specs/window/screen.js
  86. +48 −0 vendor/envjs/test/specs/window/spec.html
  87. +26 −0 vendor/envjs/test/specs/window/timer.js
  88. +53 −0 vendor/envjs/test/specs/window/window.js
  89. +47 −0 vendor/envjs/test/specs/xhr/spec.html
  90. +31 −0 vendor/envjs/test/specs/xhr/xhr.js
  91. +10 −0 vendor/envjs/test/test.js
  92. +44 −0 vendor/envjs/test/unit/dom.js
  93. +60 −0 vendor/envjs/test/unit/elementmembers.js
  94. +195 −0 vendor/envjs/test/unit/events.js
  95. +1 −0 vendor/envjs/test/unit/fixtures/external_script.js
  96. +234 −0 vendor/envjs/test/unit/iframe.js
  97. +212 −0 vendor/envjs/test/unit/multi-window.js
  98. +34 −0 vendor/envjs/test/unit/nu.validator.js
  99. +90 −0 vendor/envjs/test/unit/onload.js
  100. +121 −0 vendor/envjs/test/unit/parser.js
  101. +22 −0 vendor/envjs/test/unit/prototypecompat.js
  102. +6 −0 vendor/envjs/test/unit/proxy.js
  103. +209 −0 vendor/envjs/test/unit/scope.js
  104. +115 −0 vendor/envjs/test/unit/timer.js
  105. +41 −0 vendor/envjs/test/unit/window.js
  106. +2 −0 vendor/envjs/test/vendor/jQuery/README
  107. +4,320 −0 vendor/envjs/test/vendor/prototype-1.6.0.3.js
View
104 Manifest
@@ -11,3 +11,107 @@ specs.watchr
test/harmony_test.rb
test/page_test.rb
test/test_helper.rb
+vendor/README
+vendor/envjs/README
+vendor/envjs/bin/envjsrb
+vendor/envjs/bin/jquery-1.2.6-test.js
+vendor/envjs/bin/jquery-1.3.1-test.js
+vendor/envjs/bin/jquery-1.3.2-test.js
+vendor/envjs/bin/prototype-1.6.0.3-test.js
+vendor/envjs/bin/prototype_1.6.0.3_tmpl.txt
+vendor/envjs/bin/test-jquery.sh
+vendor/envjs/bin/test-prototype.sh
+vendor/envjs/bin/tidy
+vendor/envjs/lib/envjs.rb
+vendor/envjs/lib/envjs/env.js
+vendor/envjs/lib/envjs/net.rb
+vendor/envjs/lib/envjs/net/cgi.rb
+vendor/envjs/lib/envjs/net/file.rb
+vendor/envjs/lib/envjs/options.rb
+vendor/envjs/lib/envjs/runtime.rb
+vendor/envjs/lib/envjs/tempfile.rb
+vendor/envjs/test/base64.js
+vendor/envjs/test/call-load-test.js
+vendor/envjs/test/data.js
+vendor/envjs/test/debug.js
+vendor/envjs/test/firebug/errorIcon.png
+vendor/envjs/test/firebug/firebug.css
+vendor/envjs/test/firebug/firebug.html
+vendor/envjs/test/firebug/firebug.js
+vendor/envjs/test/firebug/firebugx.js
+vendor/envjs/test/firebug/infoIcon.png
+vendor/envjs/test/firebug/warningIcon.png
+vendor/envjs/test/fixtures/html/events.html
+vendor/envjs/test/fixtures/html/iframe1.html
+vendor/envjs/test/fixtures/html/iframe1a.html
+vendor/envjs/test/fixtures/html/iframe2.html
+vendor/envjs/test/fixtures/html/iframe3.html
+vendor/envjs/test/fixtures/html/iframeN.html
+vendor/envjs/test/fixtures/html/malformed.html
+vendor/envjs/test/fixtures/html/scope.html
+vendor/envjs/test/fixtures/html/trivial.html
+vendor/envjs/test/fixtures/html/with_js.html
+vendor/envjs/test/fixtures/images/icon-blue.png
+vendor/envjs/test/fixtures/js/external_script.js
+vendor/envjs/test/fixtures/js/script.js
+vendor/envjs/test/fixtures/js/script_error.js
+vendor/envjs/test/html/events.html
+vendor/envjs/test/html/iframe1.html
+vendor/envjs/test/html/iframe1a.html
+vendor/envjs/test/html/iframe2.html
+vendor/envjs/test/html/iframe3.html
+vendor/envjs/test/html/iframeN.html
+vendor/envjs/test/html/malformed.html
+vendor/envjs/test/html/scope.html
+vendor/envjs/test/html/script.js
+vendor/envjs/test/html/trivial.html
+vendor/envjs/test/html/with_js.html
+vendor/envjs/test/index.html
+vendor/envjs/test/java-prototype.js
+vendor/envjs/test/primary-tests.js
+vendor/envjs/test/prototype-test.js
+vendor/envjs/test/qunit.js
+vendor/envjs/test/qunit/qunit/qunit.css
+vendor/envjs/test/qunit/qunit/qunit.js
+vendor/envjs/test/scope.rb
+vendor/envjs/test/specs/dist/env.spec.js
+vendor/envjs/test/specs/envjs.spec.css
+vendor/envjs/test/specs/parser/html.js
+vendor/envjs/test/specs/parser/spec.html
+vendor/envjs/test/specs/parser/xml.js
+vendor/envjs/test/specs/qunit.bdd.js
+vendor/envjs/test/specs/qunit.css
+vendor/envjs/test/specs/qunit.js
+vendor/envjs/test/specs/template/spec-0.js
+vendor/envjs/test/specs/template/spec-1.js
+vendor/envjs/test/specs/template/spec.html
+vendor/envjs/test/specs/window/css.js
+vendor/envjs/test/specs/window/dialog.js
+vendor/envjs/test/specs/window/document.js
+vendor/envjs/test/specs/window/event.js
+vendor/envjs/test/specs/window/history.js
+vendor/envjs/test/specs/window/location.js
+vendor/envjs/test/specs/window/navigator.js
+vendor/envjs/test/specs/window/screen.js
+vendor/envjs/test/specs/window/spec.html
+vendor/envjs/test/specs/window/timer.js
+vendor/envjs/test/specs/window/window.js
+vendor/envjs/test/specs/xhr/spec.html
+vendor/envjs/test/specs/xhr/xhr.js
+vendor/envjs/test/test.js
+vendor/envjs/test/unit/dom.js
+vendor/envjs/test/unit/elementmembers.js
+vendor/envjs/test/unit/events.js
+vendor/envjs/test/unit/fixtures/external_script.js
+vendor/envjs/test/unit/iframe.js
+vendor/envjs/test/unit/multi-window.js
+vendor/envjs/test/unit/nu.validator.js
+vendor/envjs/test/unit/onload.js
+vendor/envjs/test/unit/parser.js
+vendor/envjs/test/unit/prototypecompat.js
+vendor/envjs/test/unit/proxy.js
+vendor/envjs/test/unit/scope.js
+vendor/envjs/test/unit/timer.js
+vendor/envjs/test/unit/window.js
+vendor/envjs/test/vendor/jQuery/README
+vendor/envjs/test/vendor/prototype-1.6.0.3.js
View
@@ -12,8 +12,7 @@ Gem::Specification.new do |s|
s.version = Harmony::VERSION
s.files = File.read("Manifest").strip.split("\n")
- s.add_dependency 'johnson', '>= 2.0.0.pre0'
+ s.add_dependency 'johnson', '2.0.0.pre0'
s.add_dependency 'stackdeck' #johnson dependency
- s.add_dependency 'envjs'
s.add_development_dependency 'minitest'
end
View
@@ -2,7 +2,7 @@
require 'tempfile'
require 'johnson/tracemonkey'
-require 'envjs/runtime'
+require Pathname(__FILE__).dirname.parent.parent + 'vendor/envjs/lib/envjs/runtime'
module Harmony
class Page
View
@@ -0,0 +1 @@
+vendoring specific envjs version (built from source) until changes are released
View
@@ -0,0 +1,36 @@
+This is a fork of the env.js project (http://github.com/thatcher/env-js/). See that link for env.js details.
+
+This fork is based on the Johnson Ruby gem (http://github.com/jbarnette/johnson) and will become obsolete when the Johnson support has been reintegrated into the master repo.
+
+For now, you can install the envjs gem by installing Johnson:
+
+ gem install johnson --prerelease
+
+(You'll need to manually install any prerequisites it asks for) and then installing the envjs gem with
+
+ gem install envjs
+
+The envjs gem provides the envjsrb command, which functions as an extended version of the Johnson javascript shell. For example:
+
+mbp:env-js smparkes$ envjsrb
+js> this
+=> [object Window 0]
+js> window.location
+=> about:blank
+js> document.innerHTML
+=> "<html><head><title></title></head><body></body></html>"
+js>
+
+It's also possible to embed the envjs interpreter similar to the way it's done in Johnson, e.g.,
+
+require 'rubygems' # if necessary
+require 'johnson/tramonkey'
+require 'envjs/runtime'
+
+envjs = Johnson::Runtime.new
+envjs.extend Envjs::Runtime
+window = envjs.evaluate("")
+puts window.location.to_s # == "about:blank"
+puts window.document.innerHTML # == "<html><head><title></title></head><body></body></html>"
+
+Comments to http://groups.google.com/group/envjs or #envjs on freenode.
Oops, something went wrong.

0 comments on commit c2b552e

Please sign in to comment.