shikashi 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG +2 -0
  2. data/Rakefile +2 -2
  3. data/lib/shikashi/sandbox.rb +7 -1
  4. metadata +7 -7
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ 0.5.3 Allowing method_missing calls
2
+
1
3
  0.5.2 Fix release (get_source_encoding)
2
4
 
3
5
  0.5.1 Fixed read of encoding of source files (encoding optional parameter or encoding header)
data/Rakefile CHANGED
@@ -6,13 +6,13 @@ require 'rake/testtask'
6
6
 
7
7
  spec = Gem::Specification.new do |s|
8
8
  s.name = 'shikashi'
9
- s.version = '0.5.2'
9
+ s.version = '0.5.3'
10
10
  s.author = 'Dario Seminara'
11
11
  s.email = 'robertodarioseminara@gmail.com'
12
12
  s.platform = Gem::Platform::RUBY
13
13
  s.summary = 'shikashi is a ruby sandbox that permits the execution of "unprivileged" scripts by defining the permitted methods and constants the scripts can invoke with a white list logic'
14
14
  s.homepage = "http://github.com/tario/shikashi"
15
- s.add_dependency "evalhook", ">= 0.5.0"
15
+ s.add_dependency "evalhook", ">= 0.5.5"
16
16
  s.add_dependency "getsource", ">= 0.1.0"
17
17
  s.has_rdoc = true
18
18
  s.extra_rdoc_files = [ 'README' ]
@@ -217,7 +217,13 @@ module Shikashi
217
217
  if method_name
218
218
 
219
219
  source = self.get_caller
220
- dest_source = klass.instance_method(method_name).body.file
220
+ m = begin
221
+ klass.instance_method(method_name)
222
+ rescue
223
+ method_name = :method_missing
224
+ klass.instance_method(:method_missing)
225
+ end
226
+ dest_source = m.body.file
221
227
 
222
228
  privileges = nil
223
229
  if source != dest_source then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shikashi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-18 00:00:00.000000000 Z
12
+ date: 2013-09-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: evalhook
16
- requirement: &81487280 !ruby/object:Gem::Requirement
16
+ requirement: &72120880 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.5.0
21
+ version: 0.5.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *81487280
24
+ version_requirements: *72120880
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: getsource
27
- requirement: &81486810 !ruby/object:Gem::Requirement
27
+ requirement: &72120240 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 0.1.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *81486810
35
+ version_requirements: *72120240
36
36
  description:
37
37
  email: robertodarioseminara@gmail.com
38
38
  executables: []