em-nodes 0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/em-nodes.gemspec +2 -2
- data/lib/em-nodes.rb +3 -2
- data/lib/em-nodes/adapter.rb +18 -0
- data/lib/em-nodes/em_hacks.rb +7 -0
- data/lib/em-nodes/version.rb +6 -0
- data/spec/spec_helper.rb +1 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f44eb8bcb0b4df5e9385488600479df50211defa
|
4
|
+
data.tar.gz: 970f5b67eeec07cab11bbd92c1b721aaa5da8b4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57aef1af5d9b0b1e80cf94f91c44b8a1a5b49a114a3503845ef09ee1e4c40ce06d52497f6886e413c6b4933c03ad67d279743e444576fc34afccfbe73ca29d41
|
7
|
+
data.tar.gz: 5dd5839b494bd6c450bd6abb0af71fcbe208bf6b88cd109ffa863fee8cee56eafb436c9751c84df4eacaced9d01e47f6e2bfee95bbb103eb6848aaa7da98c9c6
|
data/em-nodes.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'em-nodes'
|
4
|
+
require 'em-nodes/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "em-nodes"
|
8
|
-
spec.version =
|
8
|
+
spec.version = EventMachine::Nodes::VERSION
|
9
9
|
spec.authors = ["'Konstantin Makarchev'"]
|
10
10
|
spec.email = ["'kostya27@gmail.com'"]
|
11
11
|
spec.summary = %q{Simple EM client server, and some stuffs}
|
data/lib/em-nodes.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
require 'eventmachine'
|
2
2
|
require 'logger'
|
3
|
+
require 'em-nodes/em_hacks'
|
3
4
|
|
4
5
|
module EM::Nodes
|
5
|
-
VERSION = "0.2"
|
6
|
-
|
7
6
|
class << self
|
8
7
|
def logger=(logger)
|
9
8
|
@_logger = logger
|
@@ -23,3 +22,5 @@ module EM::Nodes
|
|
23
22
|
autoload :Commands, 'em-nodes/commands'
|
24
23
|
autoload :AbstractCommand, 'em-nodes/abstract_command'
|
25
24
|
end
|
25
|
+
|
26
|
+
require 'em-nodes/adapter'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# try to autodetect ruby-app application
|
2
|
+
|
3
|
+
if defined?(Application) && Application.respond_to?(:logger)
|
4
|
+
EM::Nodes.logger = Application.logger
|
5
|
+
end
|
6
|
+
|
7
|
+
if defined?(ErrorMailer)
|
8
|
+
module EM::Nodes
|
9
|
+
class << self
|
10
|
+
def exception(ex)
|
11
|
+
ErrorMailer.exception(ex)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
# try to autodetect rails application
|
18
|
+
# todo:
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: em-nodes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- '''Konstantin Makarchev'''
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -86,13 +86,16 @@ files:
|
|
86
86
|
- examples/chat_client.rb
|
87
87
|
- examples/chat_server.rb
|
88
88
|
- lib/em-nodes.rb
|
89
|
+
- lib/em-nodes/adapter.rb
|
89
90
|
- lib/em-nodes/client.rb
|
90
91
|
- lib/em-nodes/client/hello.rb
|
91
92
|
- lib/em-nodes/client/task.rb
|
92
93
|
- lib/em-nodes/commands.rb
|
94
|
+
- lib/em-nodes/em_hacks.rb
|
93
95
|
- lib/em-nodes/server.rb
|
94
96
|
- lib/em-nodes/server/hello.rb
|
95
97
|
- lib/em-nodes/server/task.rb
|
98
|
+
- lib/em-nodes/version.rb
|
96
99
|
- spec/base_spec.rb
|
97
100
|
- spec/hello_spec.rb
|
98
101
|
- spec/simple2_spec.rb
|