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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddccb975cd4137ced9c16858feba42614f81bcf5
4
- data.tar.gz: 2e61ef3174a99ea5b024d4debf8fc31011a2c475
3
+ metadata.gz: f44eb8bcb0b4df5e9385488600479df50211defa
4
+ data.tar.gz: 970f5b67eeec07cab11bbd92c1b721aaa5da8b4e
5
5
  SHA512:
6
- metadata.gz: 09ae7052192a4bdfc4726dc810db41ba2f97c5d710652fdd7b6bf8fb33719d4d5386a607238a726fc3d3c4fb17270f48bab3509a3148e36e0f81084615349a22
7
- data.tar.gz: 427c10dae0acd687425c51c49d5a9f749ef55b74cc7b2a700444caf1d90aa42bfcf27bccef1054027b03468bd5e51bcd5562734dfa0d30cb19bcb2f2fcfcef7a
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 = EM::Nodes::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:
@@ -0,0 +1,7 @@
1
+ module EventMachine
2
+ class << self
3
+ def pool_size
4
+ @threadqueue ? @threadqueue.size : 0
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,6 @@
1
+ module EventMachine
2
+ end
3
+
4
+ module EventMachine::Nodes
5
+ VERSION = "0.2.1"
6
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'rubygems'
2
2
  require 'bundler/setup'
3
+ Bundler.require
3
4
 
4
5
  EM::Nodes.logger = Logger.new(File.dirname(__FILE__) + "/spec.log")
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: '0.2'
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-23 00:00:00.000000000 Z
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