bullring 0.8 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -111,7 +111,6 @@ module Bullring
111
111
 
112
112
  # First starts up a server if needed then blocks until it is available and returns it
113
113
  def lease_server!
114
- debugger
115
114
  begin
116
115
  if num_current_generation_servers < MAX_SERVERS_PER_GENERATION && registry_open?
117
116
  start_a_server
@@ -119,9 +118,9 @@ module Bullring
119
118
 
120
119
  lease_server
121
120
  rescue ServerOffline => e
122
- Bullring.logger.debug {"Lost connection with a server, retrying..."}
123
- retry
124
- end
121
+ Bullring.logger.debug {"Lost connection with a server, retrying..."}
122
+ retry
123
+ end
125
124
  end
126
125
 
127
126
  # Blocks until a server is available, then returns it
@@ -1,3 +1,3 @@
1
1
  module Bullring
2
- VERSION = "0.8"
2
+ VERSION = "0.8.1"
3
3
  end
@@ -57,7 +57,7 @@ module Bullring
57
57
 
58
58
  def self.prepare_source(source)
59
59
  # escape javascript characters (similar to Rails escape_javascript)
60
- source.gsub!(/(\\|\r\n|[\n\r"'])/u) {|match| ESCAPE_MAP[match] }
60
+ (source ||= '').gsub!(/(\\|\r\n|[\n\r"'])/u) {|match| ESCAPE_MAP[match] }
61
61
  source
62
62
  end
63
63
 
@@ -165,4 +165,11 @@ class BullringTest < Test::Unit::TestCase
165
165
  assert_equal er['key2'], 'there'
166
166
  end
167
167
 
168
+ test 'can check nil and blank code' do
169
+ assert_nothing_raised do
170
+ Bullring.check(nil)
171
+ Bullring.check('')
172
+ end
173
+ end
174
+
168
175
  end
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.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-06-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: uglifier
16
- requirement: &2164603660 !ruby/object:Gem::Requirement
16
+ requirement: &2156834780 !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: *2164603660
24
+ version_requirements: *2156834780
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: execjs
27
- requirement: &2164602220 !ruby/object:Gem::Requirement
27
+ requirement: &2156833480 !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: *2164602220
35
+ version_requirements: *2156833480
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: therubyracer
38
- requirement: &2164600820 !ruby/object:Gem::Requirement
38
+ requirement: &2156832140 !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: *2164600820
46
+ version_requirements: *2156832140
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: therubyrhino
49
- requirement: &2164599600 !ruby/object:Gem::Requirement
49
+ requirement: &2156828760 !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: *2164599600
57
+ version_requirements: *2156828760
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: sqlite3
60
- requirement: &2164598740 !ruby/object:Gem::Requirement
60
+ requirement: &2156827440 !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: *2164598740
68
+ version_requirements: *2156827440
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rails
71
- requirement: &2164597580 !ruby/object:Gem::Requirement
71
+ requirement: &2156826580 !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: *2164597580
79
+ version_requirements: *2156826580
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: test-unit
82
- requirement: &2164596700 !ruby/object:Gem::Requirement
82
+ requirement: &2156825400 !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: *2164596700
90
+ version_requirements: *2156825400
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: ruby-debug19
93
- requirement: &2164595620 !ruby/object:Gem::Requirement
93
+ requirement: &2156824380 !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: *2164595620
101
+ version_requirements: *2156824380
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: -1121246813312791925
184
+ hash: -27531878232646041
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: -1121246813312791925
193
+ hash: -27531878232646041
194
194
  requirements: []
195
195
  rubyforge_project:
196
196
  rubygems_version: 1.8.6