net-yail 1.3.1 → 1.3.2

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.
File without changes
data/lib/net/yail.rb CHANGED
@@ -230,7 +230,7 @@ class YAIL
230
230
  include Net::IRCEvents::Defaults
231
231
  include Net::IRCOutputAPI
232
232
 
233
- VERSION = '1.3.1'
233
+ VERSION = '1.3.2'
234
234
 
235
235
  attr_reader(
236
236
  :me, # Nickname on the IRC server
@@ -465,9 +465,11 @@ class YAIL
465
465
  def process_input(line)
466
466
  # Allow global handler to break the chain, filter the line, whatever. For
467
467
  # this release, it's a hack. 2.0 will be better.
468
- for handler in @handlers[:incoming_any]
469
- result = handler.call(line)
470
- return if result == true
468
+ if (Array === @handlers[:incoming_any])
469
+ for handler in @handlers[:incoming_any]
470
+ result = handler.call(line)
471
+ return if result == true
472
+ end
471
473
  end
472
474
 
473
475
  # Use the exciting new parser
@@ -21,7 +21,7 @@ class MessageParser
21
21
  USER = /\S+?/
22
22
  # RFC suggested that a nick *had* to start with a letter, but that seems to
23
23
  # not be the case.
24
- NICK = /[\w\d\\`'^{}\]\[-]+?/
24
+ NICK = /[\w\d\\|`'^{}\]\[-]+?/
25
25
  HOST = /\S+?/
26
26
  SERVERNAME = /\S+?/
27
27
 
@@ -59,12 +59,12 @@ class MessageParserText < Test::Unit::TestCase
59
59
 
60
60
  # Nick change when nick is "unusual" - this also tests the bug with a single parameter being
61
61
  # treated incorrectly
62
- msg = Net::YAIL::MessageParser.new(':[1]!~nerdmaste@nerd.nerdbucket.com NICK :Deadnerd')
63
- assert_equal '[1]', msg.nick
62
+ msg = Net::YAIL::MessageParser.new(':[|\|1]!~nerdmaste@nerd.nerdbucket.com NICK :Deadnerd')
63
+ assert_equal '[|\|1]', msg.nick
64
64
  assert_equal 'NICK', msg.command
65
65
  assert_equal '~nerdmaste', msg.user
66
66
  assert_equal 'nerd.nerdbucket.com', msg.host
67
- assert_equal '[1]!~nerdmaste@nerd.nerdbucket.com', msg.prefix
67
+ assert_equal '[|\|1]!~nerdmaste@nerd.nerdbucket.com', msg.prefix
68
68
  assert_equal 'Deadnerd', msg.params.shift
69
69
  assert_equal 0, msg.params.length
70
70
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-yail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Echols
@@ -9,7 +9,7 @@ autorequire: net/yail
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-11 00:00:00 -07:00
12
+ date: 2009-11-11 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -26,15 +26,17 @@ files:
26
26
  - examples/logger/logger_bot.rb
27
27
  - examples/logger/run.rb
28
28
  - lib/net/yail.rb
29
- - lib/net/yail/output_api.rb
30
- - lib/net/yail/default_events.rb
31
- - lib/net/yail/magic_events.rb
32
29
  - lib/net/yail/eventmap.yml
33
30
  - lib/net/yail/IRCBot.rb
31
+ - lib/net/yail/magic_events.rb
32
+ - lib/net/yail/default_events.rb
33
+ - lib/net/yail/output_api.rb
34
34
  - lib/net/yail/message_parser.rb
35
35
  - README
36
36
  has_rdoc: true
37
37
  homepage: http://ruby-irc-yail.nerdbucket.com/
38
+ licenses: []
39
+
38
40
  post_install_message:
39
41
  rdoc_options:
40
42
  - --main
@@ -56,9 +58,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
58
  requirements: []
57
59
 
58
60
  rubyforge_project: net-yail
59
- rubygems_version: 1.2.0
61
+ rubygems_version: 1.3.3
60
62
  signing_key:
61
- specification_version: 2
63
+ specification_version: 3
62
64
  summary: "Yet Another IRC Library: wrapper for IRC communications in Ruby."
63
65
  test_files:
64
66
  - tests/net_yail.rb