execjs 2.10.1 → 2.10.2
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.
- checksums.yaml +4 -4
- data/lib/execjs/external_runtime.rb +4 -4
- data/lib/execjs/ruby_rhino_runtime.rb +1 -1
- data/lib/execjs/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f6e05992f3cc1d487fbc9e03029d29a39f4d29545ade82f97e711912f39ef81
|
|
4
|
+
data.tar.gz: ecb4fc7e228a0eb455f1a61f07a24248b3fd686d262af530fbff906984be444f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2c314d400e9d28048869025f7e0aa340ad5b1505b77b403fe844904aad0a726ecb6e71c8a013b933c9feed4a91a35afc3c31eaa28832755839c1d9562548caa
|
|
7
|
+
data.tar.gz: 562f4646d4d1d10b729bccf989a38444dfc72a4f4b8de21273254bc25174b9f34d3f9f6d2cdbf623a3ccaef0e2b098b42c4809e4b9b78175f2f3315efda92bc2
|
|
@@ -19,7 +19,7 @@ module ExecJS
|
|
|
19
19
|
source = source.encode(Encoding::UTF_8)
|
|
20
20
|
|
|
21
21
|
if /\S/ =~ source
|
|
22
|
-
exec("return eval(#{::JSON.generate("(#{source})"
|
|
22
|
+
exec("return eval(#{::JSON.generate("(#{source})")})")
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -59,14 +59,14 @@ module ExecJS
|
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
def write_to_tempfile(contents)
|
|
62
|
-
tmpfile = create_tempfile(['execjs', 'js'])
|
|
62
|
+
tmpfile = create_tempfile(['execjs', '.js'])
|
|
63
63
|
tmpfile.write(contents)
|
|
64
64
|
tmpfile.close
|
|
65
65
|
tmpfile
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
def extract_result(output, filename)
|
|
69
|
-
status, value, stack = output.empty? ? [] : ::JSON.parse(output
|
|
69
|
+
status, value, stack = output.empty? ? [] : ::JSON.parse(output)
|
|
70
70
|
if status == "ok"
|
|
71
71
|
value
|
|
72
72
|
else
|
|
@@ -156,7 +156,7 @@ module ExecJS
|
|
|
156
156
|
|
|
157
157
|
def encode_source(source)
|
|
158
158
|
encoded_source = encode_unicode_codepoints(source)
|
|
159
|
-
::JSON.generate("(function(){ #{encoded_source} })()"
|
|
159
|
+
::JSON.generate("(function(){ #{encoded_source} })()")
|
|
160
160
|
end
|
|
161
161
|
|
|
162
162
|
def encode_unicode_codepoints(str)
|
|
@@ -35,7 +35,7 @@ module ExecJS
|
|
|
35
35
|
def call(properties, *args)
|
|
36
36
|
# Might no longer be necessary if therubyrhino handles Symbols directly:
|
|
37
37
|
# https://github.com/rubyjs/therubyrhino/issues/43
|
|
38
|
-
converted_args = JSON.parse(JSON.generate(args)
|
|
38
|
+
converted_args = JSON.parse(JSON.generate(args))
|
|
39
39
|
|
|
40
40
|
unbox @rhino_context.eval(properties).call(*converted_args)
|
|
41
41
|
rescue Exception => e
|
data/lib/execjs/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: execjs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.10.
|
|
4
|
+
version: 2.10.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sam Stephenson
|
|
@@ -24,6 +24,20 @@ dependencies:
|
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: json
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '2'
|
|
34
|
+
type: :runtime
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '2'
|
|
27
41
|
description: ExecJS lets you run JavaScript code from Ruby.
|
|
28
42
|
email:
|
|
29
43
|
- sstephenson@gmail.com
|
|
@@ -70,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
70
84
|
- !ruby/object:Gem::Version
|
|
71
85
|
version: '0'
|
|
72
86
|
requirements: []
|
|
73
|
-
rubygems_version: 4.0.
|
|
87
|
+
rubygems_version: 4.0.16
|
|
74
88
|
specification_version: 4
|
|
75
89
|
summary: Run JavaScript code from Ruby
|
|
76
90
|
test_files: []
|