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.
Files changed (3) hide show
  1. data/ernicorn.gemspec +1 -1
  2. data/lib/ernicorn.rb +2 -14
  3. metadata +2 -2
data/ernicorn.gemspec CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.6'
5
5
 
6
6
  s.name = 'ernicorn'
7
- s.version = '1.0.0'
7
+ s.version = '1.0.1'
8
8
  s.date = '2012-06-23'
9
9
 
10
10
  s.summary = "Ernicorn is a BERT-RPC server implementation based on unicorn."
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
- self.count += 1
159
+ return nil if iruby.nil?
162
160
 
163
- unless iruby
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
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 0
9
- version: 1.0.0
8
+ - 1
9
+ version: 1.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Tom Preston-Werner