smparkes-johnson 1.1.2.5 → 1.1.2.6
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/ext/tracemonkey/runtime.cc +1 -1
- data/lib/johnson.rb +1 -1
- data/lib/johnson/runtime.rb +22 -12
- metadata +3 -3
data/ext/tracemonkey/runtime.cc
CHANGED
|
@@ -348,7 +348,7 @@ initialize_native(VALUE self, VALUE UNUSED(options))
|
|
|
348
348
|
JohnsonRuntime* runtime;
|
|
349
349
|
Data_Get_Struct(self, JohnsonRuntime, runtime);
|
|
350
350
|
|
|
351
|
-
if ((runtime->js = JS_NewRuntime(
|
|
351
|
+
if ((runtime->js = JS_NewRuntime(0x4000000))
|
|
352
352
|
&& (runtime->jsids = create_id_hash())
|
|
353
353
|
&& (runtime->rbids = create_id_hash()))
|
|
354
354
|
{
|
data/lib/johnson.rb
CHANGED
data/lib/johnson/runtime.rb
CHANGED
|
@@ -24,20 +24,26 @@ module Johnson
|
|
|
24
24
|
# engine's runtime directly.
|
|
25
25
|
#
|
|
26
26
|
# :call-seq:
|
|
27
|
-
# new(runtime_class=nil)
|
|
27
|
+
# new(runtime_class=nil,options={})
|
|
28
28
|
#
|
|
29
29
|
def self.new(*args)
|
|
30
30
|
return super if self < Johnson::Runtime
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
runtime = args.shift
|
|
32
|
+
options = {}
|
|
33
|
+
if runtime
|
|
34
|
+
if runtime.is_a? Hash
|
|
35
|
+
options = runtime
|
|
36
|
+
runtime = nil
|
|
37
|
+
else
|
|
38
|
+
options = args.shift
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
if runtime.is_a? Class
|
|
42
|
+
runtime = runtime.new( options )
|
|
43
|
+
elsif runtime
|
|
44
|
+
runtime
|
|
45
|
+
else
|
|
46
|
+
default.new( options )
|
|
41
47
|
end
|
|
42
48
|
end
|
|
43
49
|
|
|
@@ -126,7 +132,11 @@ module Johnson
|
|
|
126
132
|
|
|
127
133
|
def default
|
|
128
134
|
if @runtimes.empty?
|
|
129
|
-
|
|
135
|
+
if rt = ENV["JOHNSON_RUNTIME"]
|
|
136
|
+
require "johnson/"+rt
|
|
137
|
+
else
|
|
138
|
+
require "johnson/spidermonkey"
|
|
139
|
+
end
|
|
130
140
|
end
|
|
131
141
|
@runtimes[0]
|
|
132
142
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smparkes-johnson
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.2.
|
|
4
|
+
version: 1.1.2.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Barnette
|
|
@@ -12,7 +12,7 @@ autorequire:
|
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
14
|
|
|
15
|
-
date:
|
|
15
|
+
date: 2010-01-22 00:00:00 -08:00
|
|
16
16
|
default_executable:
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
|
@@ -33,7 +33,7 @@ dependencies:
|
|
|
33
33
|
requirements:
|
|
34
34
|
- - ">="
|
|
35
35
|
- !ruby/object:Gem::Version
|
|
36
|
-
version: 2.
|
|
36
|
+
version: 2.4.0
|
|
37
37
|
version:
|
|
38
38
|
description: |-
|
|
39
39
|
Johnson wraps JavaScript in a loving Ruby embrace. It embeds the
|