john-doe 0.1.1 → 0.1.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/default.yml +31 -2
- data/john-doe.gemspec +1 -1
- data/lib/johndoe/responser.rb +2 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/default.yml
CHANGED
@@ -49,9 +49,21 @@ hello:
|
|
49
49
|
r3: goodmorning
|
50
50
|
r4: goodday
|
51
51
|
|
52
|
+
whatsup:
|
53
|
+
priority: 10
|
54
|
+
patterns:
|
55
|
+
p1: "*what's up"
|
56
|
+
p2: "*whats up"
|
57
|
+
p3: "what's up"
|
58
|
+
p4: "whats up"
|
59
|
+
responses:
|
60
|
+
r1: "nothing interesting"
|
61
|
+
|
52
62
|
howareyou:
|
53
63
|
patterns:
|
54
64
|
p1: how are (you|u)
|
65
|
+
p3: how do you feel
|
66
|
+
p4: how do you do
|
55
67
|
responses:
|
56
68
|
r1: "thanks I'm fine. And you?"
|
57
69
|
r2: "I'm ok, and you?"
|
@@ -251,8 +263,6 @@ age:
|
|
251
263
|
patterns:
|
252
264
|
p1: * old are you
|
253
265
|
p2: your age
|
254
|
-
p3: how do you feel
|
255
|
-
p4: how do you do
|
256
266
|
responses:
|
257
267
|
r1: "I am bot:age old"
|
258
268
|
r2: "I am bot:age"
|
@@ -329,6 +339,25 @@ aboutyou:
|
|
329
339
|
r2: "that's nice"
|
330
340
|
r3: "what about me?"
|
331
341
|
|
342
|
+
whysth:
|
343
|
+
priority: 10
|
344
|
+
patterns:
|
345
|
+
p1: why $ ?
|
346
|
+
p2: why $
|
347
|
+
responses:
|
348
|
+
r1: "i don't know why $"
|
349
|
+
r2: "I have no idea"
|
350
|
+
r3: "i also wonder why $"
|
351
|
+
r4: "hard to say why $"
|
352
|
+
why:
|
353
|
+
patterns:
|
354
|
+
p1: why?
|
355
|
+
p2: why
|
356
|
+
responses:
|
357
|
+
r1: hard to say why
|
358
|
+
r2: not easy to say why
|
359
|
+
r3: "I don' know why"
|
360
|
+
r4: "I'm not sure why"
|
332
361
|
doyou:
|
333
362
|
patterns:
|
334
363
|
p1: do you
|
data/john-doe.gemspec
CHANGED
data/lib/johndoe/responser.rb
CHANGED
@@ -57,7 +57,8 @@ module JohnDoe
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def describe_who(s)
|
60
|
-
s.gsub(/([^a-z])
|
60
|
+
s = s.gsub(/([^a-z])am\s+i([^a-z]|$)/,"\\1#AMI#\\2").gsub(/([^a-z])i\s+am([^a-z]|$)/,"\\1#IAM#\\2").gsub(/([^a-z])you\s+are([^a-z]|$)/,"\\1#AREYOU#\\2").gsub(/([^a-z])are\s+you([^a-z]|$)/,"\\1#AREYOU#\\2").gsub(/([^a-z])me([^a-z]|$)/,"\\1#ME#\\2").gsub(/([^a-z])you([^a-z]|$)/,"\\1#YOU#\\2")
|
61
|
+
s.gsub("#AMI#","you are").gsub("#IAM#","you are").gsub("#AREYOU#","I am").gsub("#ME#","you").gsub("#YOU#","me")
|
61
62
|
end
|
62
63
|
end
|
63
64
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: john-doe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pawel Mikolajewski
|