mruby_sandbox 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8e4d8ce7149994aadf565e6b59c41e514118ecb
4
- data.tar.gz: 75bec2f5d01e11278e258a40c1cce46737adbc20
3
+ metadata.gz: cf8384a1767aebd3373b0641b8674289a4c284b7
4
+ data.tar.gz: 59d253b60cbeab72e643c38245b91af2c42e0079
5
5
  SHA512:
6
- metadata.gz: 774e280cbdf6a5fa3f9fc9f8250b9312e03aa2edc2c3b25afdd8dd28bdbb584cef797804d79008dbfa7c17de7098e7bd164a52e6a3c83943be050d21f1a65e57
7
- data.tar.gz: def511bc9e2cc5db86f8c4e34fe01504bb1a03462400664138ea2a30773b2a2596262491fae9d84fb8d8e48849322b756c2d3d607f2d83eb07e3c4bdfe0b6140
6
+ metadata.gz: c5b18ee348bddf4d8be4cf8702957c1a87d5ba2f6d7fdf47e79023c6b05b1d2246f2673f68d44789e7a05ec0c766d197abff5848ee2da8666b286bf5ecd9f96e
7
+ data.tar.gz: 0467935068eb112040ae260aff772d6bbbbc4cedfc168d5127aa24732e77afd7d7165875f03b4248e74297c48d728f742e068d3cd87547d6c62c6f7f10e61ead
data/Gemfile.lock CHANGED
@@ -1,35 +1,35 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mruby_sandbox (0.5.0)
5
- pipe_rpc (~> 1.1)
4
+ mruby_sandbox (0.5.2)
5
+ pipe_rpc (~> 2.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  diff-lcs (1.2.5)
11
- json (1.8.3)
12
- pipe_rpc (1.1.1)
13
- json
14
- rspec (3.4.0)
15
- rspec-core (~> 3.4.0)
16
- rspec-expectations (~> 3.4.0)
17
- rspec-mocks (~> 3.4.0)
18
- rspec-core (3.4.4)
19
- rspec-support (~> 3.4.0)
20
- rspec-expectations (3.4.0)
11
+ msgpack (1.0.0)
12
+ pipe_rpc (2.0.0)
13
+ msgpack (~> 1.0)
14
+ rspec (3.5.0)
15
+ rspec-core (~> 3.5.0)
16
+ rspec-expectations (~> 3.5.0)
17
+ rspec-mocks (~> 3.5.0)
18
+ rspec-core (3.5.1)
19
+ rspec-support (~> 3.5.0)
20
+ rspec-expectations (3.5.0)
21
21
  diff-lcs (>= 1.2.0, < 2.0)
22
- rspec-support (~> 3.4.0)
22
+ rspec-support (~> 3.5.0)
23
23
  rspec-its (1.2.0)
24
24
  rspec-core (>= 3.0.0)
25
25
  rspec-expectations (>= 3.0.0)
26
- rspec-mocks (3.4.1)
26
+ rspec-mocks (3.5.0)
27
27
  diff-lcs (>= 1.2.0, < 2.0)
28
- rspec-support (~> 3.4.0)
28
+ rspec-support (~> 3.5.0)
29
29
  rspec-mocks-matchers-send_message (0.3.1)
30
30
  rspec (~> 3.0)
31
31
  rspec-mocks (~> 3.0)
32
- rspec-support (3.4.1)
32
+ rspec-support (3.5.0)
33
33
 
34
34
  PLATFORMS
35
35
  ruby
@@ -42,4 +42,4 @@ DEPENDENCIES
42
42
  rspec-mocks-matchers-send_message (~> 0.2)
43
43
 
44
44
  BUNDLED WITH
45
- 1.11.2
45
+ 1.12.0
@@ -1,3 +1,3 @@
1
1
  module MrubySandbox
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
@@ -10,11 +10,11 @@ class Sandbox < PipeRpc::Gateway
10
10
 
11
11
  sandbox = self
12
12
 
13
- main.define_singleton_method :add_server do |*args|
13
+ Object.define_method :add_server do |*args|
14
14
  sandbox.servers.add(*args)
15
15
  end
16
16
 
17
- main.define_singleton_method :client_for do |server|
17
+ Object.define_method :client_for do |server|
18
18
  sandbox.clients[server]
19
19
  end
20
20
 
@@ -25,14 +25,12 @@ class Sandbox < PipeRpc::Gateway
25
25
  end
26
26
 
27
27
  # Interface for untrusted code to communicate with the outside
28
- class << self
29
- def eval(code, file = '', lineno = 0)
30
- instance_eval(code, file, lineno)
31
- end
28
+ def eval(code, file = '', lineno = 0)
29
+ super(code, nil, file, lineno)
30
+ end
32
31
 
33
- def client
34
- clients[:default]
35
- end
32
+ def client
33
+ client_for(:default)
36
34
  end
37
35
 
38
36
  # Remove constants from global namespace so untrusted code cannot mess around with it.
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = ["build_mruby_sandbox"]
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_runtime_dependency "pipe_rpc", "~> 1.1"
24
+ spec.add_runtime_dependency "pipe_rpc", "~> 2.0.0"
25
25
  spec.add_development_dependency "bundler", "~> 1.8"
26
26
  spec.add_development_dependency "rspec", "~> 3.4"
27
27
  spec.add_development_dependency "rspec-its"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mruby_sandbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Aue
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-15 00:00:00.000000000 Z
11
+ date: 2016-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pipe_rpc
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.1'
19
+ version: 2.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.1'
26
+ version: 2.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -125,8 +125,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.4.5.1
128
+ rubygems_version: 2.5.1
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: A mruby sandbox for ruby
132
132
  test_files: []
133
+ has_rdoc: