execjs 1.2.13 → 1.3.0

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.
@@ -0,0 +1,23 @@
1
+ module ExecJS
2
+ class DisabledRuntime
3
+ def name
4
+ "Disabled"
5
+ end
6
+
7
+ def exec(source)
8
+ raise Error, "ExecJS disabled"
9
+ end
10
+
11
+ def eval(source)
12
+ raise Error, "ExecJS disabled"
13
+ end
14
+
15
+ def compile(source)
16
+ raise Error, "ExecJS disabled"
17
+ end
18
+
19
+ def available?
20
+ true
21
+ end
22
+ end
23
+ end
@@ -1,4 +1,5 @@
1
1
  require "execjs/module"
2
+ require "execjs/disabled_runtime"
2
3
  require "execjs/external_runtime"
3
4
  require "execjs/johnson_runtime"
4
5
  require "execjs/mustang_runtime"
@@ -7,6 +8,8 @@ require "execjs/ruby_rhino_runtime"
7
8
 
8
9
  module ExecJS
9
10
  module Runtimes
11
+ Disabled = DisabledRuntime.new
12
+
10
13
  RubyRacer = RubyRacerRuntime.new
11
14
 
12
15
  RubyRhino = RubyRhinoRuntime.new
@@ -1,3 +1,3 @@
1
1
  module ExecJS
2
- VERSION = "1.2.13"
2
+ VERSION = "1.3.0"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: execjs
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 2
9
- - 13
10
- version: 1.2.13
8
+ - 3
9
+ - 0
10
+ version: 1.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sam Stephenson
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-12-19 00:00:00 -06:00
19
+ date: 2012-01-19 00:00:00 -08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -117,6 +117,7 @@ extra_rdoc_files: []
117
117
  files:
118
118
  - README.md
119
119
  - LICENSE
120
+ - lib/execjs/disabled_runtime.rb
120
121
  - lib/execjs/external_runtime.rb
121
122
  - lib/execjs/johnson_runtime.rb
122
123
  - lib/execjs/module.rb