botbase-module-conversation 0.1.6 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ce72018d314b75f92169c3cd17baa4bede58e81
4
- data.tar.gz: 887751a222ebed2c805c49a97e131a5835780aad
3
+ metadata.gz: 2e21063b2cceb29cde8a35fb1560bb01ef349ecb
4
+ data.tar.gz: 695b94925af4f95b9657e357352a83ff79be6c68
5
5
  SHA512:
6
- metadata.gz: 1e2ffd853502f3e6ad58dccdc3a7918cfab08c38bd2f54578b0ca8a19cb596c36cae02b9476c34b67ae8cb0c643154ef6ceaa235d0ee76fb27b71f08e0d66055
7
- data.tar.gz: f8eb1744b516152dbfbd9f268e099a9f1ac58bcc24ec73764a2d8f7c7bacc2a02321f914ef409b9bb6e9f39fe9f5ea92e926551fbb2d1e6507b0d0466eedf59a
6
+ metadata.gz: a5b935b54e9c51b6c0475f76ac0654c8b71cccb1fb59ba6e7aa623fac36a2dff8c97fbac7ee30b5991b241df76c7f5fae627325c58478099c3eefe76168a5a3d
7
+ data.tar.gz: d8cbab9a67cbad19450d21237e08c5c393332a22ad4b1cb3ee0cf96ca6054023aa28b9fa7c09b5570ff072343b68e7581e9d4fc6599b104dd6572a9f889f5606
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -20,29 +20,26 @@ class BotBaseModuleConversation
20
20
  a = run(default_package, default_job)
21
21
 
22
22
  @doc = Rexle.new("<conversations/>")
23
- #puts 'adding phrases : ' + a.inspect
23
+
24
24
  add_phrases(a)
25
25
 
26
26
 
27
27
  end
28
28
 
29
- def query(sender='user01', said, mode: :voicechat, echo_node: 'node')
30
-
31
- #puts 'said: ' + said.inspect
29
+ def query(sender='user01', said, mode: :voicechat, echo_node: 'node')
32
30
 
33
31
  found = @phrases.detect {|pattern, _| said =~ /#{pattern}/i }
34
32
 
35
33
  if found then
36
34
 
37
35
  notice 'botbase/debug: module-conversation queried, found ' + found[0]
38
- #puts 'found: ' +found.inspect
39
36
 
40
37
  package, job = found.last.split
41
38
 
42
39
  h = said.match(/#{found.first}/i).named_captures
43
40
  r = run(package, job, h)
44
41
 
45
- if r.is_a? String then
42
+ if r.is_a? String or r.is_a? Hash then
46
43
  r
47
44
  elsif r.is_a? Array then
48
45
  add_phrases(r)
@@ -91,8 +88,6 @@ class BotBaseModuleConversation
91
88
  end
92
89
 
93
90
  def run(package, job, h={})
94
- puts 'package: ' + package.inspect
95
- puts 'h:' + h.inspect
96
91
  @rsc.send(package.to_sym).method(job.to_sym).call(h)
97
92
  end
98
93
 
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.6
4
+ version: 0.1.7
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-10-14 00:00:00.000000000 Z
34
+ date: 2017-10-15 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rsc
metadata.gz.sig CHANGED
@@ -1 +1,3 @@
1
- ����n��>��O�U��X�@�Z���⢽�ߩ4~��x���e�������O����jMR�#��â����$�/��.g�`��w�m��YŁe�;�F\�95��&}1)w���׬�sN 9Q�j� �l9o8�j�KHb�\F������9 ~����7<|�qe~1���Z����v �7�&��dA��,+f���������庳�p"��jg�{2�c�U��5ԅ "�o����|�q��(��*<v�i
1
+ g^�- @ƫ��&9X~� Y]U]���V�OL���Rz{
2
+ ��d2��q���ZWR����0��H���Y�SB\b�g��J���s��+r�|=�n���'��܏J,W��v �s��F �6�V�I!�yBx7�C�qp@`������
3
+ ��c]6n{������d}��_�U�����6V7TkA��xm����ǿع