therubyracer 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of therubyracer might be problematic. Click here for more details.

@@ -45,6 +45,7 @@ spec/ext/cxt_spec.rb
45
45
  spec/ext/obj_spec.rb
46
46
  spec/redjs/README.txt
47
47
  spec/redjs/jsapi_spec.rb
48
+ spec/redjs/tap.rb
48
49
  spec/redjs_helper.rb
49
50
  spec/spec.opts
50
51
  spec/spec_helper.rb
@@ -124,8 +124,10 @@ exposed by default. E.g.
124
124
  * libv8 >= 0.4.0
125
125
 
126
126
  == INSTALL:
127
- * download, build and install V8: http://code.google.com/apis/v8/build.html
128
- * sudo gem install therubyracer
127
+ * download and build V8: http://code.google.com/apis/v8/build.html
128
+ * Be sure to build it as a static library and with the same architecture as your ruby executable. e.g.
129
+ * scons library=static arch=x64
130
+ * sudo gem install therubyracer --with-v8-include=/path/to/v8/source/include --with-v8-lib=/path/to/v8/source
129
131
 
130
132
  == LICENSE:
131
133
 
data/Rakefile CHANGED
@@ -27,6 +27,8 @@ end
27
27
  Rake::ExtensionTask.new("v8", $hoe.spec) do |ext|
28
28
  ext.lib_dir = "lib/v8"
29
29
  ext.source_pattern = "*.{cpp,h}"
30
+ ext.config_options << "--with-v8-include=#{ENV['V8_HOME']}/include"
31
+ ext.config_options << "--with-v8-lib=#{ENV['V8_HOME']}"
30
32
  end
31
33
 
32
34
  require 'newgem/tasks'
@@ -28,8 +28,8 @@ namespace {
28
28
  return converted;
29
29
  }
30
30
 
31
- Local<Value> Racer_Access_Ruby_Property(VALUE object, VALUE name) {
32
- VALUE method = rb_obj_method(object, name);
31
+ Local<Value> Racer_Access_Ruby_Property(VALUE object, VALUE name) {
32
+ VALUE method = rb_funcall(object, rb_intern("method"), 1, name);
33
33
  if (FIX2INT(rb_funcall(method, rb_intern("arity"), 0)) == 0) {
34
34
  return Racer_Call_Ruby_Method(object, name, Array::New(0));
35
35
  } else {
data/lib/v8.rb CHANGED
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module V8
5
- VERSION = '0.4.5'
5
+ VERSION = '0.4.6'
6
6
  require 'v8/v8' #native glue
7
7
  require 'v8/to'
8
8
  require 'v8/context'
@@ -1,3 +1,4 @@
1
+ require "#{File.dirname(__FILE__)}/tap.rb"
1
2
  require "#{File.dirname(__FILE__)}/../redjs_helper.rb"
2
3
 
3
4
  describe "Ruby Javascript API" do
@@ -0,0 +1,8 @@
1
+
2
+ unless Object.method_defined?(:tap)
3
+ class Object
4
+ def tap
5
+ yield self
6
+ end
7
+ end
8
+ end
@@ -2,16 +2,16 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{therubyracer}
5
- s.version = "0.4.5"
5
+ s.version = "0.4.6"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Charles Lowell", "Bill Robertson"]
9
- s.date = %q{2010-01-18}
9
+ s.date = %q{2010-01-26}
10
10
  s.description = %q{Embed the V8 Javascript interpreter into Ruby.}
11
11
  s.email = ["cowboyd@thefrontside.net", "billrobertson42@gmail.com"]
12
12
  s.extensions = ["ext/v8/extconf.rb"]
13
13
  s.extra_rdoc_files = ["History.txt", "Manifest.txt", "docs/data_conversion.txt"]
14
- s.files = ["Doxyfile", "History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "docs/data_conversion.txt", "ext/v8/callbacks.cpp", "ext/v8/callbacks.h", "ext/v8/convert_ruby.cpp", "ext/v8/convert_ruby.h", "ext/v8/convert_string.cpp", "ext/v8/convert_string.h", "ext/v8/convert_v8.cpp", "ext/v8/convert_v8.h", "ext/v8/converters.cpp", "ext/v8/converters.h", "ext/v8/extconf.rb", "ext/v8/v8.cpp", "ext/v8/v8_cxt.cpp", "ext/v8/v8_cxt.h", "ext/v8/v8_func.cpp", "ext/v8/v8_func.h", "ext/v8/v8_msg.cpp", "ext/v8/v8_msg.h", "ext/v8/v8_obj.cpp", "ext/v8/v8_obj.h", "ext/v8/v8_ref.cpp", "ext/v8/v8_ref.h", "ext/v8/v8_script.cpp", "ext/v8/v8_script.h", "ext/v8/v8_standalone.cpp", "ext/v8/v8_standalone.h", "ext/v8/v8_str.cpp", "ext/v8/v8_str.h", "ext/v8/v8_template.cpp", "ext/v8/v8_template.h", "lib/v8.rb", "lib/v8/context.rb", "lib/v8/object.rb", "lib/v8/to.rb", "script/console", "script/destroy", "script/generate", "spec/ext/cxt_spec.rb", "spec/ext/obj_spec.rb", "spec/redjs/README.txt", "spec/redjs/jsapi_spec.rb", "spec/redjs_helper.rb", "spec/spec.opts", "spec/spec_helper.rb", "tasks/rspec.rake", "therubyracer.gemspec"]
14
+ s.files = ["Doxyfile", "History.txt", "Manifest.txt", "README.rdoc", "Rakefile", "docs/data_conversion.txt", "ext/v8/callbacks.cpp", "ext/v8/callbacks.h", "ext/v8/convert_ruby.cpp", "ext/v8/convert_ruby.h", "ext/v8/convert_string.cpp", "ext/v8/convert_string.h", "ext/v8/convert_v8.cpp", "ext/v8/convert_v8.h", "ext/v8/converters.cpp", "ext/v8/converters.h", "ext/v8/extconf.rb", "ext/v8/v8.cpp", "ext/v8/v8_cxt.cpp", "ext/v8/v8_cxt.h", "ext/v8/v8_func.cpp", "ext/v8/v8_func.h", "ext/v8/v8_msg.cpp", "ext/v8/v8_msg.h", "ext/v8/v8_obj.cpp", "ext/v8/v8_obj.h", "ext/v8/v8_ref.cpp", "ext/v8/v8_ref.h", "ext/v8/v8_script.cpp", "ext/v8/v8_script.h", "ext/v8/v8_standalone.cpp", "ext/v8/v8_standalone.h", "ext/v8/v8_str.cpp", "ext/v8/v8_str.h", "ext/v8/v8_template.cpp", "ext/v8/v8_template.h", "lib/v8.rb", "lib/v8/context.rb", "lib/v8/object.rb", "lib/v8/to.rb", "script/console", "script/destroy", "script/generate", "spec/ext/cxt_spec.rb", "spec/ext/obj_spec.rb", "spec/redjs/README.txt", "spec/redjs/jsapi_spec.rb", "spec/redjs_helper.rb", "spec/spec.opts", "spec/spec_helper.rb", "spec/v8/to_spec.rb", "tasks/rspec.rake", "therubyracer.gemspec"]
15
15
  s.homepage = %q{http://github.com/cowboyd/therubyracer}
16
16
  s.rdoc_options = ["--main", "README.rdoc"]
17
17
  s.require_paths = ["lib", "ext"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: therubyracer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Lowell
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-01-18 00:00:00 +02:00
13
+ date: 2010-01-26 00:00:00 -06:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -83,6 +83,7 @@ files:
83
83
  - spec/ext/obj_spec.rb
84
84
  - spec/redjs/README.txt
85
85
  - spec/redjs/jsapi_spec.rb
86
+ - spec/redjs/tap.rb
86
87
  - spec/redjs_helper.rb
87
88
  - spec/spec.opts
88
89
  - spec/spec_helper.rb