ernicorn 1.0.0 → 1.0.1
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.
- data/ernicorn.gemspec +1 -1
- data/lib/ernicorn.rb +2 -14
- metadata +2 -2
data/ernicorn.gemspec
CHANGED
data/lib/ernicorn.rb
CHANGED
|
@@ -6,7 +6,6 @@ module Ernicorn
|
|
|
6
6
|
|
|
7
7
|
class << self
|
|
8
8
|
attr_accessor :mods, :current_mod, :log
|
|
9
|
-
attr_accessor :auto_start
|
|
10
9
|
attr_accessor :count, :virgin_procline
|
|
11
10
|
end
|
|
12
11
|
|
|
@@ -16,7 +15,6 @@ module Ernicorn
|
|
|
16
15
|
self.current_mod = nil
|
|
17
16
|
self.log = Logger.new(STDOUT)
|
|
18
17
|
self.log.level = Logger::FATAL
|
|
19
|
-
self.auto_start = true
|
|
20
18
|
|
|
21
19
|
# Record a module.
|
|
22
20
|
# +name+ is the module Symbol
|
|
@@ -158,15 +156,9 @@ module Ernicorn
|
|
|
158
156
|
def self.process(input, output)
|
|
159
157
|
self.procline('waiting')
|
|
160
158
|
iruby = self.read_berp(input)
|
|
161
|
-
|
|
159
|
+
return nil if iruby.nil?
|
|
162
160
|
|
|
163
|
-
|
|
164
|
-
puts "Could not read BERP length header. Ernicorn server may have gone away. Exiting now."
|
|
165
|
-
if self.log.level <= Logger::INFO
|
|
166
|
-
self.log.info("(#{Process.pid}) Could not read BERP length header. Ernicorn server may have gone away. Exiting now.")
|
|
167
|
-
end
|
|
168
|
-
exit!
|
|
169
|
-
end
|
|
161
|
+
self.count += 1
|
|
170
162
|
|
|
171
163
|
if iruby.size == 4 && iruby[0] == :call
|
|
172
164
|
mod, fun, args = iruby[1..3]
|
|
@@ -246,7 +238,3 @@ end
|
|
|
246
238
|
def loglevel(level)
|
|
247
239
|
Ernicorn.loglevel(level)
|
|
248
240
|
end
|
|
249
|
-
|
|
250
|
-
at_exit do
|
|
251
|
-
Ernicorn.start if Ernicorn.auto_start && !defined?(Ernicorn)
|
|
252
|
-
end
|