loghandler 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,10 @@
1
1
  require 'csv'
2
+ require 'mongo_mapper'
3
+
2
4
  class Loghandler::Server < EM::Connection
3
5
 
4
6
  include MongoMapper
5
7
 
6
- MongoMapper.connection = Mongo::Connection.new()
7
- MongoMapper.database = "loghandler"
8
8
 
9
9
  def post_init
10
10
  @rules=Loghandler::Rules.constants.select {|c| Class === Loghandler::Rules.const_get(c)}
@@ -55,6 +55,9 @@ class Loghandler::Server < EM::Connection
55
55
  end
56
56
 
57
57
  def self.run(options)
58
+ MongoMapper.connection = Mongo::Connection.new()
59
+ MongoMapper.database = "loghandler"
60
+
58
61
  EM.run do
59
62
  @@ws_channel = EventMachine::Channel.new
60
63
 
@@ -1,3 +1,3 @@
1
1
  module Loghandler
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/loghandler.rb CHANGED
@@ -3,7 +3,6 @@ require 'em-websocket'
3
3
  require 'eventmachine-tail'
4
4
  require 'socket'
5
5
  require 'json'
6
- require 'mongo_mapper'
7
6
 
8
7
  require "loghandler/version"
9
8
  require "loghandler/tailer"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loghandler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: