coffeemaker 0.1.0 → 0.1.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.
@@ -5,7 +5,7 @@ require 'active_support/core_ext/module/delegation'
5
5
  module Coffeemaker
6
6
  class Bot
7
7
  class Irc
8
- attr_accessor :on_message
8
+ attr_accessor :on_message, :on_connect
9
9
  attr_reader :host, :port, :nick, :connection
10
10
  private :connection
11
11
 
@@ -24,6 +24,7 @@ module Coffeemaker
24
24
  c.port = @port
25
25
  c.nick = @nick
26
26
  c.on_message = @on_message
27
+ c.on_connect = @on_connect
27
28
  end
28
29
  end
29
30
 
@@ -13,13 +13,14 @@ module Coffeemaker
13
13
  include ::EM::Protocols::LineText2
14
14
  include ::Coffeemaker::Bot::Irc::Commands
15
15
 
16
- attr_accessor :port, :host, :nick, :on_message
16
+ attr_accessor :port, :host, :nick, :on_message, :on_connect
17
17
 
18
18
  def connection_completed
19
19
  @reconnecting = false
20
20
  @connected = true
21
21
  _send_command :user, [@nick] * 4
22
22
  _send_command :nick, @nick
23
+ on_connect.call if on_connect
23
24
  succeed
24
25
  end
25
26
 
@@ -1,3 +1,3 @@
1
1
  module Coffeemaker
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coffeemaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-22 00:00:00.000000000 Z
12
+ date: 2012-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine