coffeemaker 0.0.1.beta.2 → 0.0.1.beta.3

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,23 +5,25 @@ require 'active_support/core_ext/module/delegation'
5
5
  module Coffeemaker
6
6
  class Bot
7
7
  class Irc
8
- attr_reader :connection
9
8
  attr_accessor :on_message
9
+ attr_reader :host, :port, :nick, :connection
10
+ private :connection
11
+
10
12
  delegate :join, :part, :msg, :privmsg, to: :connection
11
13
 
12
14
  def initialize(options)
13
15
  @host = options.delete(:irc_host)
14
16
  @port = options.delete(:irc_port)
17
+ @nick = options.delete(:nick)
15
18
  @on_message = options.delete(:on_message)
16
- @options = options
17
19
  end
18
20
 
19
21
  def start
20
22
  @connection = EM.connect(@host, @port, Connection) do |c|
21
23
  c.host = @host
22
24
  c.port = @port
25
+ c.nick = @nick
23
26
  c.on_message = @on_message
24
- c.options = @options
25
27
  end
26
28
  end
27
29
 
@@ -13,13 +13,13 @@ module Coffeemaker
13
13
  include ::EM::Protocols::LineText2
14
14
  include ::Coffeemaker::Bot::Irc::Commands
15
15
 
16
- attr_accessor :port, :host, :options, :on_message
16
+ attr_accessor :port, :host, :nick, :on_message
17
17
 
18
18
  def connection_completed
19
19
  @reconnecting = false
20
20
  @connected = true
21
- _send_command :user, [options[:nick]] * 4
22
- _send_command :nick, options[:nick]
21
+ _send_command :user, [@nick] * 4
22
+ _send_command :nick, @nick
23
23
  succeed
24
24
  end
25
25
 
@@ -1,3 +1,3 @@
1
1
  module Coffeemaker
2
- VERSION = "0.0.1.beta.2"
2
+ VERSION = "0.0.1.beta.3"
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.0.1.beta.2
4
+ version: 0.0.1.beta.3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-28 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine
16
- requirement: &8603680 !ruby/object:Gem::Requirement
16
+ requirement: &10418680 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.0.0.beta.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *8603680
24
+ version_requirements: *10418680
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &8602360 !ruby/object:Gem::Requirement
27
+ requirement: &10417340 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *8602360
35
+ version_requirements: *10417340
36
36
  description: IRC bot that serves as foundation for greater ideas. "Not Invented Here"
37
37
  applies greatly.
38
38
  email: