irc-log-parser 0.0.1 → 0.0.2

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: c8b1efa2ba5c85054d01cd96c4b239b4011b5d3a
4
- data.tar.gz: eeb24a063c2983c38390ba8987d6f16cde75f520
3
+ metadata.gz: 84e2c16def591a81615d35794a595a10b0ac42ca
4
+ data.tar.gz: d97a52a25b62c94b69b658528261d39e95a2ad0a
5
5
  SHA512:
6
- metadata.gz: 7fcb9f8c4d59686a3f143a7c2889fa3fc2b2b8772182997a13efe298653f397395799c282e6fd2e7d74037081b488f5c3e845222b9b0ee3663cb49c11bbd8c7f
7
- data.tar.gz: 7d03f2858d79caa696007ed9ba5c827f1fa16f4c78ba830458e1ef51da99aeccbabc48d3585affc7f103ec0579cbbae8b6643a021fed4f7479ec13d426c7d6bb
6
+ metadata.gz: 2dfbeb90b6bd597682661ebd4ad2055b82ae6ceaf108243e59f8c5d9e9b5b8b2822f131bb0ab20b299c20c65d3adad494bb97bf902289025d2556b4a8f1b9fea
7
+ data.tar.gz: ab1d7e4b73eed38faada17b03b71a5423628afde05e2cabc2164c1056e96ae4cd6ea1be8f2ee26edb671e4543fcf9b3769c14253c9d7ce875f192ca24503873c
@@ -1,10 +1,10 @@
1
1
  require "irc-log-parser/version"
2
2
 
3
3
  module IrcLogParser
4
- autoload :Log, 'irc-log-parser/log'
5
- autoload :Logs, 'irc-log-parser/logs'
6
- autoload :Tiarra, 'irc-log-parser/tiarra'
7
- autoload :Znc, 'irc-log-parser/znc'
8
- autoload :ParseException, 'irc-log-parser/parse_exception'
4
+ autoload :Log, 'irc-log-parser/log'
5
+ autoload :Logs, 'irc-log-parser/logs'
6
+ autoload :Tiarra, 'irc-log-parser/tiarra'
7
+ autoload :Znc, 'irc-log-parser/znc'
8
+ autoload :UnknownTypeError, 'irc-log-parser/unknown_type_error'
9
9
  end
10
10
 
@@ -11,16 +11,12 @@ module IrcLogParser
11
11
  parse_logs
12
12
  end
13
13
 
14
- # def to_json
15
- # JSON.generate self
16
- # end
17
-
18
14
  private
19
15
  def parse_logs
20
16
  @logs.each do |log|
21
17
  begin
22
18
  self << parse(log)
23
- rescue ParseException => e
19
+ rescue UnknownTypeError => e
24
20
  end
25
21
  end
26
22
  end
@@ -14,7 +14,7 @@ module IrcLogParser
14
14
  if network and channel and text and time and nick
15
15
  new(network:network, channel:channel, text:text, time:time, nick:nick, is_notice:is_notice)
16
16
  else
17
- raise ParseException.new
17
+ raise UnknownTypeError.new
18
18
  end
19
19
  end
20
20
  end
@@ -0,0 +1,4 @@
1
+ module IrcLogParser
2
+ class UnknownTypeError < Exception
3
+ end
4
+ end
@@ -1,3 +1,3 @@
1
1
  module IrcLogParser
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -13,7 +13,7 @@ module IrcLogParser
13
13
  if network and channel and text and time and nick
14
14
  new(network:network, channel:channel, text:text, time:time, nick:nick, is_notice:is_notice)
15
15
  else
16
- raise ParseException.new
16
+ raise UnknownTypeError.new
17
17
  end
18
18
  end
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irc-log-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - shunirr
@@ -54,8 +54,8 @@ files:
54
54
  - lib/irc-log-parser.rb
55
55
  - lib/irc-log-parser/log.rb
56
56
  - lib/irc-log-parser/logs.rb
57
- - lib/irc-log-parser/parse_exception.rb
58
57
  - lib/irc-log-parser/tiarra.rb
58
+ - lib/irc-log-parser/unknown_type_error.rb
59
59
  - lib/irc-log-parser/version.rb
60
60
  - lib/irc-log-parser/znc.rb
61
61
  homepage: https://github.com/shunirr/irc-log-parser-ruby
@@ -1,4 +0,0 @@
1
- module IrcLogParser
2
- class ParseException < Exception
3
- end
4
- end