bullring 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bullring.rb +8 -3
- data/lib/bullring/version.rb +1 -1
- metadata +20 -20
data/lib/bullring.rb
CHANGED
@@ -18,29 +18,32 @@ module Bullring
|
|
18
18
|
|
19
19
|
# Order is important (and relative to calls to add_library_script)
|
20
20
|
def add_library(name, script)
|
21
|
+
return if configuration.disabled
|
21
22
|
script = Uglifier.compile(script, :copyright => false) if configuration.minify_libraries
|
22
23
|
worker.add_library(name, script)
|
23
24
|
end
|
24
25
|
|
25
26
|
def check(script, options = {})
|
27
|
+
return [] if configuration.disabled
|
26
28
|
worker.check(script, options)
|
27
29
|
end
|
28
30
|
|
29
31
|
def run(script, options = {})
|
32
|
+
return {} if configuration.disabled
|
30
33
|
worker.run(script, options)
|
31
34
|
end
|
32
35
|
|
33
36
|
def alive?
|
34
|
-
worker.alive?
|
37
|
+
configuration.disabled ? true : worker.alive?
|
35
38
|
end
|
36
39
|
|
37
40
|
# Really only useful in development
|
38
41
|
def discard
|
39
|
-
worker.discard
|
42
|
+
worker.discard if !configuration.disabled
|
40
43
|
end
|
41
44
|
|
42
45
|
def refresh
|
43
|
-
worker.refresh
|
46
|
+
worker.refresh if !configuration.disabled
|
44
47
|
end
|
45
48
|
|
46
49
|
def root
|
@@ -79,6 +82,7 @@ module Bullring
|
|
79
82
|
attr_accessor :minify_libraries
|
80
83
|
attr_accessor :server_max_bringup_time
|
81
84
|
attr_accessor :use_rhino
|
85
|
+
attr_accessor :disabled
|
82
86
|
|
83
87
|
def initialize
|
84
88
|
@execution_timeout_secs = 0.5
|
@@ -91,6 +95,7 @@ module Bullring
|
|
91
95
|
@minify_libraries = true
|
92
96
|
@server_max_bringup_time = 20 #seconds
|
93
97
|
@use_rhino = true
|
98
|
+
@disabled = false
|
94
99
|
super
|
95
100
|
end
|
96
101
|
end
|
data/lib/bullring/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullring
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-01 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: uglifier
|
16
|
-
requirement: &
|
16
|
+
requirement: &2152873180 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2152873180
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: execjs
|
27
|
-
requirement: &
|
27
|
+
requirement: &2152872200 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2152872200
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: therubyracer
|
38
|
-
requirement: &
|
38
|
+
requirement: &2152870980 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2152870980
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: therubyrhino
|
49
|
-
requirement: &
|
49
|
+
requirement: &2152869500 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2152869500
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: sqlite3
|
60
|
-
requirement: &
|
60
|
+
requirement: &2152868800 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2152868800
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rails
|
71
|
-
requirement: &
|
71
|
+
requirement: &2152867520 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 3.2.2
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2152867520
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: test-unit
|
82
|
-
requirement: &
|
82
|
+
requirement: &2152866600 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2152866600
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: ruby-debug19
|
93
|
-
requirement: &
|
93
|
+
requirement: &2152865620 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2152865620
|
102
102
|
description: Safely run untrusted Javascript from Ruby
|
103
103
|
email:
|
104
104
|
- jps@kindlinglabs.com
|
@@ -181,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
segments:
|
183
183
|
- 0
|
184
|
-
hash:
|
184
|
+
hash: -2013802338732165517
|
185
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
186
|
none: false
|
187
187
|
requirements:
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '0'
|
191
191
|
segments:
|
192
192
|
- 0
|
193
|
-
hash:
|
193
|
+
hash: -2013802338732165517
|
194
194
|
requirements: []
|
195
195
|
rubyforge_project:
|
196
196
|
rubygems_version: 1.8.6
|