1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

remove contrib/jasmine which uses an ancient version of jasmine.

This commit is contained in:
Charles Lowell 2011-01-17 12:11:55 -06:00
parent 11c5f0885e
commit 7c002eaaad
6 changed files with 0 additions and 2433 deletions

View file

@ -1,22 +0,0 @@
require 'v8'
require 'v8/jasmine/context'
module V8
module Jasmine
FILENAME = File.join(File.dirname(__FILE__), "jasmine",Dir.new(File.join(File.dirname(__FILE__), "jasmine")).find {|f| f =~ /(\d+.\d+\.\d+)\.js$/})
VERSION = $1
SOURCE = File.read(FILENAME)
class << self
def included(mod)
raise ScriptError, "#{self} cannot be included. Use cxt.extend(V8::Jasmine)"
end
def extended(cxt)
raise ScriptError, "#{self} can only extend a V8::Context" unless cxt.kind_of?(V8::Context)
cxt.load(File.join(File.dirname(__FILE__), "jasmine", "window.js"))
cxt.load(FILENAME)
end
end
end
end

View file

@ -1,13 +0,0 @@
module V8
module Jasmine
class Context < V8::Context
def initialize(*args)
super(*args) do
self.extend V8::Jasmine
yield(self) if block_given?
end
end
end
end
end

File diff suppressed because it is too large Load diff

View file

@ -1,11 +0,0 @@
//needed to get around
(function(noop){
window = {
setInterval: noop,
clearInterval: noop,
setTimeout: function(callback, delay) {
callback()
},
clearTimeout: noop
}
})(function() {})

View file

@ -1,18 +0,0 @@
Short list of types that a receiver should handle:
type expected method
-------------------------------
<null> pushNull
boolean pushBool
int64 pushInt (overloaded on 64-bit int)
double pushDouble
const std::string& pushString
??? pushUndefined
int32 pushInt (overloaded on 32-bit int)
for lack of any better ideas have these functions return true on
success and false on error
--
should add more later.

View file

@ -1,38 +0,0 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require 'v8/jasmine'
describe V8::Jasmine do
it "cannot be included" do
lambda {
Class.new.send(:include, V8::Jasmine)
}.should raise_error(ScriptError)
end
it "can only be used to extend V8::Context objecs" do
lambda {
V8::Context.new.extend(V8::Jasmine)
}.should_not raise_error
lambda {
Object.new.extend(V8::Jasmine)
}.should raise_error(ScriptError)
end
it "extends a bare context with the jasmine runtime" do
V8::Context.new do |cxt|
cxt.extend V8::Jasmine
cxt['jasmine'].getEnv().should_not be_nil
end
end
end
describe V8::Jasmine::Context do
it "comes pre-bundled with jasmine" do
V8::Jasmine::Context.new do |cxt|
cxt['jasmine'].should_not be_nil
end
end
end