therubyracer 0.9.9 → 0.9.10

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.

@@ -0,0 +1,9 @@
1
+ rvm:
2
+ - 1.9.2
3
+ - 1.9.3
4
+ - 1.8.7
5
+ notifications:
6
+ recipients:
7
+ - cowboyd@thefrontside.net
8
+ script: bundle exec rake compile spec
9
+ before_install: git submodule update --init
data/README.md CHANGED
@@ -48,7 +48,7 @@ embed a ruby object into your scope and access its properties/methods from javas
48
48
  lhs + rhs
49
49
  end
50
50
  end
51
-
51
+
52
52
  cxt['math'] = MyMath.new
53
53
  cxt.eval("math.plus(20,22)") #=> 42
54
54
 
@@ -59,7 +59,7 @@ make a ruby object *be* your global javascript scope.
59
59
  cxt.eval("plus(20,22)") #=> 42
60
60
  end
61
61
 
62
- you can do the same thing with Object#eval_js
62
+ you can do the same thing with Object#eval_js
63
63
 
64
64
  math.eval_js("plus(20,22)")
65
65
 
@@ -96,14 +96,14 @@ exposed by default. E.g.
96
96
  super
97
97
  end
98
98
  end
99
-
99
+
100
100
  class B < A
101
101
  def b
102
102
  "b"
103
103
  end
104
104
  end
105
-
106
-
105
+
106
+
107
107
  V8::Context.new do |cxt|
108
108
  cxt['a'] = A.new
109
109
  cxt['b'] = B.new
@@ -138,6 +138,9 @@ To use the ruby racer in rails, or any application using Bundler to manage gems,
138
138
  bundle install
139
139
  rake compile
140
140
 
141
+ ## Sponsored by
142
+ <a href="http://thefrontside.net">![The Frontside](http://github.com/cowboyd/therubyracer/raw/master/thefrontside.png)</a>
143
+
141
144
  ## LICENSE:
142
145
 
143
146
  (The MIT License)
@@ -18,8 +18,8 @@ $CPPFLAGS += " -Wall" unless $CPPFLAGS.split.include? "-Wall"
18
18
  $CPPFLAGS += " -g" unless $CPPFLAGS.split.include? "-g"
19
19
  $CPPFLAGS += " -rdynamic" unless $CPPFLAGS.split.include? "-rdynamic"
20
20
 
21
- $DEFLIBPATH.unshift(Libv8.library_path)
22
- $LIBS << ' -lv8 -lpthread'
21
+ $LDFLAGS.insert 0, "#{Libv8.library_path}/libv8.#{$LIBEXT} "
22
+ $LIBS << ' -lpthread'
23
23
 
24
24
  CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/
25
25
 
@@ -3,7 +3,7 @@ require 'ostruct'
3
3
 
4
4
  module V8
5
5
  module CLI
6
- def self.run(exename = 'v8', args = [])
6
+ def self.run(exename = 'v8', args = [])
7
7
  options = OpenStruct.new
8
8
  options.libs = []
9
9
  options.libdirs = []
@@ -30,12 +30,12 @@ module V8
30
30
  puts "V8 Version #{Libv8::V8_VERSION}"
31
31
  exit
32
32
  elsif options.selftest
33
- self.test
33
+ self.test
34
34
  end
35
35
  Context.new(:with => Shell.new) do |cxt|
36
36
  for libfile in options.libs do
37
37
  load(cxt,libfile)
38
- end
38
+ end
39
39
  if options.interactive
40
40
  repl(cxt, exename)
41
41
  elsif options.execute
@@ -60,35 +60,36 @@ module V8
60
60
  puts e
61
61
  end
62
62
  end
63
-
63
+
64
64
  def self.test
65
65
  begin
66
- require 'rubygems'
67
66
  require 'rspec'
67
+ specs = File.expand_path('../../../spec', __FILE__)
68
+ $:.unshift specs
68
69
  ARGV.clear
69
- ARGV << File.dirname(__FILE__) + '/../../spec/'
70
+ ARGV << specs
70
71
  ::RSpec::Core::Runner.autorun
71
72
  exit(0)
72
73
  rescue LoadError => e
73
74
  puts "selftest requires rspec to be installed (gem install rspec)"
74
75
  exit(1)
75
76
  end
76
-
77
+
77
78
  end
78
79
 
79
80
  def self.repl(cxt, exename)
80
81
  require 'readline'
81
82
  puts "help() for help. quit() to quit."
82
83
  puts "The Ruby Racer #{V8::VERSION}"
83
- puts "Vroom Vroom!"
84
+ puts "Vroom Vroom!"
84
85
  trap("SIGINT") do
85
86
  puts "^C"
86
- end
87
+ end
87
88
  loop do
88
89
  line = Readline.readline("#{exename}> ", true)
89
90
  begin
90
91
  result = cxt.eval(line, '<shell>')
91
- puts(result) unless result.nil?
92
+ puts(result) unless result.nil?
92
93
  rescue V8::JSError => e
93
94
  puts e.message
94
95
  puts e.backtrace(:javascript)
@@ -96,9 +97,9 @@ module V8
96
97
  puts e
97
98
  puts e.backtrace.join("\n")
98
99
  end
99
- end
100
- end
101
-
100
+ end
101
+ end
102
+
102
103
  class Shell
103
104
  def to_s
104
105
  "[object Shell]"
@@ -111,18 +112,18 @@ module V8
111
112
  def exit(status = 0)
112
113
  Kernel.exit(status)
113
114
  end
114
-
115
+
115
116
  alias_method :quit, :exit
116
-
117
+
117
118
  def help(*args)
118
119
  <<-HELP
119
120
  print(msg)
120
- print msg to STDOUT
121
-
121
+ print msg to STDOUT
122
+
122
123
  exit(status = 0)
123
124
  exit the shell
124
125
  also: quit()
125
-
126
+
126
127
  evalrb(source)
127
128
  evaluate some ruby source
128
129
  HELP
@@ -1,3 +1,3 @@
1
1
  module V8
2
- VERSION = "0.9.9"
2
+ VERSION = "0.9.10"
3
3
  end
Binary file
metadata CHANGED
@@ -1,73 +1,96 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: therubyracer
3
- version: !ruby/object:Gem::Version
4
- version: 0.9.9
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ hash: 47
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 9
9
+ - 10
10
+ version: 0.9.10
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Charles Lowell
9
14
  - Bill Robertson
10
15
  autorequire:
11
16
  bindir: bin
12
17
  cert_chain: []
13
- date: 2011-11-08 00:00:00.000000000Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: libv8
17
- requirement: &2152907640 !ruby/object:Gem::Requirement
18
+
19
+ date: 2012-02-17 00:00:00 -06:00
20
+ default_executable:
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
23
+ requirement: &id001 !ruby/object:Gem::Requirement
18
24
  none: false
19
- requirements:
25
+ requirements:
20
26
  - - ~>
21
- - !ruby/object:Gem::Version
27
+ - !ruby/object:Gem::Version
28
+ hash: 31
29
+ segments:
30
+ - 3
31
+ - 3
32
+ - 10
22
33
  version: 3.3.10
23
34
  type: :runtime
24
35
  prerelease: false
25
- version_requirements: *2152907640
26
- - !ruby/object:Gem::Dependency
27
- name: rake
28
- requirement: &2152906840 !ruby/object:Gem::Requirement
36
+ name: libv8
37
+ version_requirements: *id001
38
+ - !ruby/object:Gem::Dependency
39
+ requirement: &id002 !ruby/object:Gem::Requirement
29
40
  none: false
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 3
45
+ segments:
46
+ - 0
47
+ version: "0"
34
48
  type: :development
35
49
  prerelease: false
36
- version_requirements: *2152906840
37
- - !ruby/object:Gem::Dependency
38
- name: rspec
39
- requirement: &2152905900 !ruby/object:Gem::Requirement
50
+ name: rake
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ requirement: &id003 !ruby/object:Gem::Requirement
40
54
  none: false
41
- requirements:
55
+ requirements:
42
56
  - - ~>
43
- - !ruby/object:Gem::Version
44
- version: '2.0'
57
+ - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 2
61
+ - 0
62
+ version: "2.0"
45
63
  type: :development
46
64
  prerelease: false
47
- version_requirements: *2152905900
48
- - !ruby/object:Gem::Dependency
49
- name: rake-compiler
50
- requirement: &2152904360 !ruby/object:Gem::Requirement
65
+ name: rspec
66
+ version_requirements: *id003
67
+ - !ruby/object:Gem::Dependency
68
+ requirement: &id004 !ruby/object:Gem::Requirement
51
69
  none: false
52
- requirements:
53
- - - ! '>='
54
- - !ruby/object:Gem::Version
55
- version: '0'
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ hash: 3
74
+ segments:
75
+ - 0
76
+ version: "0"
56
77
  type: :development
57
78
  prerelease: false
58
- version_requirements: *2152904360
59
- description: Call javascript code and manipulate javascript objects from ruby. Call
60
- ruby code and manipulate ruby objects from javascript.
79
+ name: rake-compiler
80
+ version_requirements: *id004
81
+ description: Call javascript code and manipulate javascript objects from ruby. Call ruby code and manipulate ruby objects from javascript.
61
82
  email: cowboyd@thefrontside.net
62
- executables:
83
+ executables:
63
84
  - therubyracer
64
- extensions:
85
+ extensions:
65
86
  - ext/v8/extconf.rb
66
87
  extra_rdoc_files: []
67
- files:
88
+
89
+ files:
68
90
  - .gitignore
69
91
  - .gitmodules
70
92
  - .rspec
93
+ - .travis.yml
71
94
  - .yardopts
72
95
  - Changelog.md
73
96
  - Gemfile
@@ -152,40 +175,46 @@ files:
152
175
  - specmem/spec_helper.rb
153
176
  - specthread/spec_helper.rb
154
177
  - specthread/threading_spec.rb
178
+ - thefrontside.png
155
179
  - therubyracer.gemspec
156
180
  - spec/redjs/.gitignore
157
181
  - spec/redjs/README.txt
158
182
  - spec/redjs/jsapi_spec.rb
159
183
  - spec/redjs/loadme.js
184
+ has_rdoc: true
160
185
  homepage: http://github.com/cowboyd/therubyracer
161
186
  licenses: []
187
+
162
188
  post_install_message:
163
189
  rdoc_options: []
164
- require_paths:
190
+
191
+ require_paths:
165
192
  - lib
166
193
  - ext
167
- required_ruby_version: !ruby/object:Gem::Requirement
194
+ required_ruby_version: !ruby/object:Gem::Requirement
168
195
  none: false
169
- requirements:
170
- - - ! '>='
171
- - !ruby/object:Gem::Version
172
- version: '0'
173
- segments:
196
+ requirements:
197
+ - - ">="
198
+ - !ruby/object:Gem::Version
199
+ hash: 3
200
+ segments:
174
201
  - 0
175
- hash: 1116440455134102197
176
- required_rubygems_version: !ruby/object:Gem::Requirement
202
+ version: "0"
203
+ required_rubygems_version: !ruby/object:Gem::Requirement
177
204
  none: false
178
- requirements:
179
- - - ! '>='
180
- - !ruby/object:Gem::Version
181
- version: '0'
182
- segments:
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ hash: 3
209
+ segments:
183
210
  - 0
184
- hash: 1116440455134102197
211
+ version: "0"
185
212
  requirements: []
213
+
186
214
  rubyforge_project: therubyracer
187
- rubygems_version: 1.8.10
215
+ rubygems_version: 1.3.7
188
216
  signing_key:
189
217
  specification_version: 3
190
218
  summary: Embed the V8 Javascript interpreter into Ruby
191
219
  test_files: []
220
+