dvyjones-tinybot 0.0.1 → 0.0.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.
- data/VERSION +1 -1
- data/examples/helloworld.rb +2 -7
- data/lib/tinybot.rb +2 -2
- data/tinybot.gemspec +49 -0
- metadata +2 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/examples/helloworld.rb
CHANGED
@@ -8,10 +8,5 @@ require "tinybot"
|
|
8
8
|
#
|
9
9
|
|
10
10
|
set :auto_join_on_invite, true
|
11
|
-
|
12
|
-
|
13
|
-
reply say
|
14
|
-
end
|
15
|
-
|
16
|
-
connect(host: "irc.cluenet.org", port: 6667, nick: "HelloWorldBot") do
|
17
|
-
end
|
11
|
+
privmsg /^say (.*)/i {|say| reply say }
|
12
|
+
connect(host: "irc.cluenet.org", port: 6667, nick: "HelloWorldBot")
|
data/lib/tinybot.rb
CHANGED
@@ -8,6 +8,8 @@ class TinyBot
|
|
8
8
|
|
9
9
|
def initialize
|
10
10
|
@settings = {}
|
11
|
+
@privmsg = Hash.new { |h,k| h[k] = [] }
|
12
|
+
@connected = []
|
11
13
|
end
|
12
14
|
|
13
15
|
def raw(line)
|
@@ -68,12 +70,10 @@ class TinyBot
|
|
68
70
|
end
|
69
71
|
|
70
72
|
def listen_privmsg(regex, &block)
|
71
|
-
@privmsg ||= Hash.new { |h,k| h[k] = [] }
|
72
73
|
@privmsg[regex] << block
|
73
74
|
end
|
74
75
|
|
75
76
|
def listen_connected(&block)
|
76
|
-
@connected ||= []
|
77
77
|
@connected << block
|
78
78
|
end
|
79
79
|
|
data/tinybot.gemspec
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{tinybot}
|
5
|
+
s.version = "0.0.2"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Henrik Hodne"]
|
9
|
+
s.date = %q{2009-07-01}
|
10
|
+
s.email = %q{henrik.hodne@gmail.com}
|
11
|
+
s.extra_rdoc_files = [
|
12
|
+
"LICENSE",
|
13
|
+
"README.rdoc"
|
14
|
+
]
|
15
|
+
s.files = [
|
16
|
+
".document",
|
17
|
+
".gitignore",
|
18
|
+
"LICENSE",
|
19
|
+
"README.rdoc",
|
20
|
+
"Rakefile",
|
21
|
+
"VERSION",
|
22
|
+
"examples/helloworld.rb",
|
23
|
+
"lib/tinybot.rb",
|
24
|
+
"test/test_helper.rb",
|
25
|
+
"test/tinybot_test.rb",
|
26
|
+
"tinybot.gemspec"
|
27
|
+
]
|
28
|
+
s.has_rdoc = true
|
29
|
+
s.homepage = %q{http://github.com/dvyjones/tinybot}
|
30
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
31
|
+
s.require_paths = ["lib"]
|
32
|
+
s.rubygems_version = %q{1.3.1}
|
33
|
+
s.summary = %q{TODO}
|
34
|
+
s.test_files = [
|
35
|
+
"test/test_helper.rb",
|
36
|
+
"test/tinybot_test.rb",
|
37
|
+
"examples/helloworld.rb"
|
38
|
+
]
|
39
|
+
|
40
|
+
if s.respond_to? :specification_version then
|
41
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
42
|
+
s.specification_version = 2
|
43
|
+
|
44
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
45
|
+
else
|
46
|
+
end
|
47
|
+
else
|
48
|
+
end
|
49
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dvyjones-tinybot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrik Hodne
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- lib/tinybot.rb
|
34
34
|
- test/test_helper.rb
|
35
35
|
- test/tinybot_test.rb
|
36
|
+
- tinybot.gemspec
|
36
37
|
has_rdoc: true
|
37
38
|
homepage: http://github.com/dvyjones/tinybot
|
38
39
|
post_install_message:
|