botbase-module-conversation 0.1.3 → 0.1.4

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: 7c881847b74c5bfb8c462fa181757b9afb7ed6d0
4
- data.tar.gz: 2b336aff2083b4d9c8e6151f76801d9c7411fb64
3
+ metadata.gz: 2873f1fb771a30ad2e89eeb2250ef8a97721a59b
4
+ data.tar.gz: b211cc472fff880291df3986aa11cec570745845
5
5
  SHA512:
6
- metadata.gz: 95c518212b24cf40410595684493dbbf085aed69224debeef3a8d1d864f4244d8343c300b522f174e0a55c1302a22007409c4caefeaa1162b0814e21cdb6731c
7
- data.tar.gz: ddb7b3840f8165643ee139f2716e6302d58246bacb68ab1d17ae184fb9789f61e903ba47ffd45492fa639999247dc8315d3cf595edf6928cf18ffcf3b28be195
6
+ metadata.gz: 8efda6e171278818f5f385993349def28ed28a179600c3187cab5383b3d5a37c8d117f5506484527947164bc38c54c02bc178f3526b6e3f9ee2540445b2cc226
7
+ data.tar.gz: f65fd273d9624db4ccf4ec335909e08453bdf079e73cc05c85441e8964348f56983cf45c9e16cc31dd827b7ff277eafefebbb753b773ae639b53c0f424c0f7b7
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -20,16 +20,19 @@ class BotBaseModuleConversation
20
20
  a = run(default_package, default_job)
21
21
 
22
22
  @doc = Rexle.new("<conversations/>")
23
-
23
+ puts 'adding phrases : ' + a.inspect
24
24
  add_phrases(a)
25
25
 
26
26
  end
27
27
 
28
- def query(sender='user01', said)
28
+ def query(sender='user01', said, mode: :voicechat)
29
+ puts 'said: ' + said.inspect
29
30
 
30
31
  found = @phrases.detect {|pattern, _| said =~ /#{pattern}/i }
31
-
32
+
32
33
  if found then
34
+
35
+ puts 'found: ' +found.inspect
33
36
 
34
37
  package, job = found.last.split
35
38
 
@@ -43,12 +46,18 @@ class BotBaseModuleConversation
43
46
  end
44
47
 
45
48
  else
46
- # do or say nothing
47
- ''
49
+ no_match_found()
48
50
  end
49
51
 
50
52
  end
51
53
 
54
+ protected
55
+
56
+ def no_match_found()
57
+ # do or say nothing
58
+ ''
59
+ end
60
+
52
61
  private
53
62
 
54
63
  def add_phrases(a)
@@ -75,6 +84,7 @@ class BotBaseModuleConversation
75
84
  end
76
85
 
77
86
  def run(package, job, h={})
87
+ puts 'package: ' + package.inspect
78
88
  @rsc.send(package.to_sym).method(job.to_sym).call(h)
79
89
  end
80
90
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: botbase-module-conversation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  aNO/RQYUa1Pqx9RMIGgZIeQPtuaxxfqQ6uiq/S5GWoIKIDOmES69g981bASbOtYs
32
32
  geN7Uzk3bTsKxA==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-04-14 00:00:00.000000000 Z
34
+ date: 2017-04-29 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rsc
metadata.gz.sig CHANGED
Binary file