roflbot 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/roflbot/sentence.tt +16 -8
- data/roflbot.gemspec +2 -2
- data/test/roflbot/test_sentence_bot.rb +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.1
|
data/lib/roflbot/sentence.tt
CHANGED
@@ -12,11 +12,7 @@ grammar Sentence
|
|
12
12
|
end
|
13
13
|
|
14
14
|
rule literal
|
15
|
-
|
16
|
-
def to_s(env = {})
|
17
|
-
text_value
|
18
|
-
end
|
19
|
-
}
|
15
|
+
space / word / punctuation
|
20
16
|
end
|
21
17
|
|
22
18
|
rule variable
|
@@ -29,14 +25,26 @@ grammar Sentence
|
|
29
25
|
end
|
30
26
|
|
31
27
|
rule space
|
32
|
-
' '+
|
28
|
+
' '+ {
|
29
|
+
def to_s(env = {})
|
30
|
+
text_value
|
31
|
+
end
|
32
|
+
}
|
33
33
|
end
|
34
34
|
|
35
35
|
rule word
|
36
|
-
[a-zA-Z0-9]+
|
36
|
+
[a-zA-Z0-9]+ {
|
37
|
+
def to_s(env = {})
|
38
|
+
text_value
|
39
|
+
end
|
40
|
+
}
|
37
41
|
end
|
38
42
|
|
39
43
|
rule punctuation
|
40
|
-
[,.!?]
|
44
|
+
[,.!?] {
|
45
|
+
def to_s(env = {})
|
46
|
+
text_value
|
47
|
+
end
|
48
|
+
}
|
41
49
|
end
|
42
50
|
end
|
data/roflbot.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{roflbot}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jeremy Stephens"]
|
12
|
-
s.date = %q{2010-06-
|
12
|
+
s.date = %q{2010-06-30}
|
13
13
|
s.default_executable = %q{roflbot}
|
14
14
|
s.description = %q{roflbot is a simple AIM bot, yo}
|
15
15
|
s.email = %q{viking415@gmail.com}
|
@@ -13,10 +13,10 @@ module Roflbot
|
|
13
13
|
"ending" => ["sup?", "I love you."]
|
14
14
|
})
|
15
15
|
|
16
|
-
@buddy.expects(:send_im).times(
|
16
|
+
@buddy.expects(:send_im).times(100).with do |message|
|
17
17
|
message =~ /^Hey (dude|guy), (sup\?|I love you.)$/
|
18
18
|
end
|
19
|
-
|
19
|
+
100.times { |_| receive_im("hey") }
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jeremy Stephens
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-30 00:00:00 -05:00
|
18
18
|
default_executable: roflbot
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|