em-ruby-irc 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/em-ruby-irc/IRC.rb +8 -8
  2. data/lib/em-ruby-irc.rb +1 -1
  3. metadata +43 -17
@@ -27,27 +27,27 @@ module IRC
27
27
 
28
28
  def connect
29
29
  begin
30
- if defined?(EventMachine::fork_reactor)
31
- logger.warn("Event machine supports forking, attempting to fork.")
32
- pid = EventMachine::fork_reactor {
30
+ if not defined?(EventMachine::fork_reactor) or ENV["FORK"] == false
31
+ logger.warn("WARNING: Version of eventmachine does not support forking or you used 'FORK=false'. If you specified multiple connections you will only connect to one.")
32
+ EventMachine::run {
33
33
  begin
34
34
  self.connection = EventMachine::connect(config["server_address"], config["server_port"].to_i, IRC::Connection, :setup => self)
35
35
  rescue => err
36
36
  log_error(err)
37
37
  end
38
38
  }
39
-
40
- File.open("#{self.name}.pid", 'w') {|f| f << pid}
41
- Process.detach(pid)
42
39
  else
43
- logger.warn("WARNING: Version of eventmachine does not support forking. If you specified multiple connections you will only connect to one.")
44
- EventMachine::run {
40
+ logger.warn("Event machine supports forking, attempting to fork.")
41
+ pid = EventMachine::fork_reactor {
45
42
  begin
46
43
  self.connection = EventMachine::connect(config["server_address"], config["server_port"].to_i, IRC::Connection, :setup => self)
47
44
  rescue => err
48
45
  log_error(err)
49
46
  end
50
47
  }
48
+
49
+ File.open("#{self.name}.pid", 'w') {|f| f << pid}
50
+ Process.detach(pid)
51
51
  end
52
52
  rescue => err
53
53
  log_error(err)
data/lib/em-ruby-irc.rb CHANGED
@@ -10,6 +10,6 @@ require File.dirname(__FILE__) + '/em-ruby-irc/IRC-Utils.rb'
10
10
  require File.dirname(__FILE__) + '/em-ruby-irc/default-handlers.rb'
11
11
 
12
12
  module EMIRC
13
- VERSION = '0.0.1'
13
+ VERSION = '0.0.2'
14
14
  end
15
15
 
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em-ruby-irc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ hash: 27
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 2
10
+ version: 0.0.2
5
11
  platform: ruby
6
12
  authors:
7
13
  - Brian Stolz
@@ -9,29 +15,41 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-05-14 00:00:00 -07:00
18
+ date: 2010-09-14 00:00:00 -07:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: eventmachine
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
29
+ hash: 63
30
+ segments:
31
+ - 0
32
+ - 12
33
+ - 8
23
34
  version: 0.12.8
24
- version:
35
+ type: :runtime
36
+ version_requirements: *id001
25
37
  - !ruby/object:Gem::Dependency
26
38
  name: rspec
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
30
42
  requirements:
31
43
  - - "="
32
44
  - !ruby/object:Gem::Version
45
+ hash: 27
46
+ segments:
47
+ - 1
48
+ - 3
49
+ - 0
33
50
  version: 1.3.0
34
- version:
51
+ type: :development
52
+ version_requirements: *id002
35
53
  description: EM IRC Bot Framework
36
54
  email: brian@tecnobrat.com
37
55
  executables: []
@@ -43,13 +61,13 @@ extra_rdoc_files:
43
61
  files:
44
62
  - README.rdoc
45
63
  - Rakefile
46
- - lib/em-ruby-irc/IRC-Event.rb
47
- - lib/em-ruby-irc/eventmap.yml
48
- - lib/em-ruby-irc/IRC-Utils.rb
49
- - lib/em-ruby-irc/IRC-User.rb
50
64
  - lib/em-ruby-irc/default-handlers.rb
65
+ - lib/em-ruby-irc/eventmap.yml
51
66
  - lib/em-ruby-irc/IRC-Channel.rb
52
67
  - lib/em-ruby-irc/IRC-Connection.rb
68
+ - lib/em-ruby-irc/IRC-Event.rb
69
+ - lib/em-ruby-irc/IRC-User.rb
70
+ - lib/em-ruby-irc/IRC-Utils.rb
53
71
  - lib/em-ruby-irc/IRC.rb
54
72
  - lib/em-ruby-irc.rb
55
73
  has_rdoc: true
@@ -66,21 +84,29 @@ rdoc_options:
66
84
  require_paths:
67
85
  - lib
68
86
  required_ruby_version: !ruby/object:Gem::Requirement
87
+ none: false
69
88
  requirements:
70
89
  - - ">="
71
90
  - !ruby/object:Gem::Version
91
+ hash: 59
92
+ segments:
93
+ - 1
94
+ - 8
95
+ - 6
72
96
  version: 1.8.6
73
- version:
74
97
  required_rubygems_version: !ruby/object:Gem::Requirement
98
+ none: false
75
99
  requirements:
76
100
  - - ">="
77
101
  - !ruby/object:Gem::Version
102
+ hash: 3
103
+ segments:
104
+ - 0
78
105
  version: "0"
79
- version:
80
106
  requirements: []
81
107
 
82
108
  rubyforge_project:
83
- rubygems_version: 1.3.5
109
+ rubygems_version: 1.3.7
84
110
  signing_key:
85
111
  specification_version: 3
86
112
  summary: EM IRC Bot Framework