bot_platform 0.1.0 → 0.2.0

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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.idea/.gitignore +8 -0
  3. data/.idea/bot_platform.iml +317 -0
  4. data/.idea/misc.xml +4 -0
  5. data/.idea/modules.xml +8 -0
  6. data/.idea/vcs.xml +6 -0
  7. data/.ruby-version +1 -0
  8. data/Gemfile.lock +1 -1
  9. data/LICENSE +21 -0
  10. data/README.md +19 -9
  11. data/bin/cli +34 -0
  12. data/docs/channels.md +7 -0
  13. data/lib/bot_platform/activity.rb +32 -0
  14. data/lib/bot_platform/adapter.rb +87 -0
  15. data/lib/bot_platform/asserts.rb +69 -0
  16. data/lib/bot_platform/boot.rb +12 -0
  17. data/lib/bot_platform/channels/base.rb +26 -0
  18. data/lib/bot_platform/channels/chatwork.rb +1 -0
  19. data/lib/bot_platform/channels/console.rb +60 -0
  20. data/lib/bot_platform/channels/facebook.rb +1 -0
  21. data/lib/bot_platform/channels/line.rb +1 -0
  22. data/lib/bot_platform/channels/lineworks.rb +102 -0
  23. data/lib/bot_platform/channels/skype.rb +1 -0
  24. data/lib/bot_platform/channels/skype_for_business.rb +1 -0
  25. data/lib/bot_platform/channels/slack.rb +15 -0
  26. data/lib/bot_platform/channels/teams.rb +15 -0
  27. data/lib/bot_platform/channels/web.rb +15 -0
  28. data/lib/bot_platform/channels/wechat.rb +1 -0
  29. data/lib/bot_platform/channels.rb +9 -0
  30. data/lib/bot_platform/cli.rb +97 -0
  31. data/lib/bot_platform/conversation_state.rb +32 -0
  32. data/lib/bot_platform/dialogs/dialog.rb +48 -0
  33. data/lib/bot_platform/dialogs/dialog_context.rb +104 -0
  34. data/lib/bot_platform/dialogs/dialog_instance.rb +15 -0
  35. data/lib/bot_platform/dialogs/dialog_result.rb +22 -0
  36. data/lib/bot_platform/dialogs/dialog_set.rb +38 -0
  37. data/lib/bot_platform/dialogs/dialog_state.rb +11 -0
  38. data/lib/bot_platform/dialogs/prompts/prompt.rb +84 -0
  39. data/lib/bot_platform/dialogs/prompts/prompt_options.rb +12 -0
  40. data/lib/bot_platform/dialogs/prompts/prompt_recognizer_result.rb +16 -0
  41. data/lib/bot_platform/dialogs/prompts/text_prompt.rb +36 -0
  42. data/lib/bot_platform/dialogs.rb +17 -0
  43. data/lib/bot_platform/message_factory.rb +9 -0
  44. data/lib/bot_platform/state/bot_state.rb +21 -0
  45. data/lib/bot_platform/state/conversation_state.rb +17 -0
  46. data/lib/bot_platform/state/user_state.rb +1 -0
  47. data/lib/bot_platform/storage/memory_storage.rb +51 -0
  48. data/lib/bot_platform/storage/mysql_storage.rb +1 -0
  49. data/lib/bot_platform/storage/redis_storage.rb +1 -0
  50. data/lib/bot_platform/storage/storageable.rb +33 -0
  51. data/lib/bot_platform/turn_context.rb +105 -0
  52. data/lib/bot_platform/version.rb +1 -1
  53. data/lib/bot_platform.rb +11 -0
  54. data/samples/dialogs/dialog_simple.rb +29 -0
  55. data/samples/echo.rb +5 -0
  56. metadata +52 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06e5bc5df717c16192aae27c50f62051642f3e0a497b6657e5dd2b4b56debfa0
4
- data.tar.gz: bee2612b41d7f6933797b3194a6ad670e83489b9dcbafea2262fbecf6a0dcbd4
3
+ metadata.gz: 6fba230d8df11a77a8a6d58fec72534f6826b8a80cec4b05485ad6284e804f98
4
+ data.tar.gz: aa0f609ea22c05a929662ac20d45cb900ae4097ea8127d98c7d33deb5d8cb589
5
5
  SHA512:
6
- metadata.gz: 8ba665a6a1ea2e5949ce502c3d9846ad02dffd1baf031d3060713dd85d474a55feba0c30e11e93516cc919a42ad724592c5cc6702835fdb18a5d1e4fb9ce3f8e
7
- data.tar.gz: 1bfeb6680761e775f54dcb9b13cfc9c4721737050902e77ef2d941e5dd9abfa0d6e02e73c9dad0958b6c80403dad38201f9c84ae659d6f035c6b087ab2d3c95c
6
+ metadata.gz: 7d1449dd6e8a83af4868752a7c4a6dc638f0088ae950788b17af93f52a30e801b62f6bd3409e20d73ce3cf99bece4ca9a855c545f9702c33c17ad8fd5f28ecec
7
+ data.tar.gz: 9aede2141487ad00d02acdcf06412f02489cf6de674d330924b0ce0379185bd8e8d6e81e08dea91f39f93d8ebcd81d568cb47f68c2ae1b698afde15a884c255b
data/.idea/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Datasource local storage ignored files
5
+ /dataSources/
6
+ /dataSources.local.xml
7
+ # Editor-based HTTP Client requests
8
+ /httpRequests/
@@ -0,0 +1,317 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="jdk" jdkName="rbenv: 3.0.2" jdkType="RUBY_SDK" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="module-library">
15
+ <library name="ast (vbundled(2.4.2)) [path][gem]" type="rubylib">
16
+ <properties>
17
+ <option name="version" value="4" />
18
+ </properties>
19
+ <CLASSES>
20
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/ast-2.4.2/lib" />
21
+ </CLASSES>
22
+ <JAVADOC />
23
+ <SOURCES>
24
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/ast-2.4.2/lib" />
25
+ </SOURCES>
26
+ </library>
27
+ </orderEntry>
28
+ <orderEntry type="module-library">
29
+ <library name="diff-lcs (vbundled(1.4.4)) [path][gem]" type="rubylib">
30
+ <properties>
31
+ <option name="version" value="4" />
32
+ </properties>
33
+ <CLASSES>
34
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/bin" />
35
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/lib" />
36
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/docs" />
37
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/spec" />
38
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/autotest" />
39
+ </CLASSES>
40
+ <JAVADOC />
41
+ <SOURCES>
42
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/bin" />
43
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/lib" />
44
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/docs" />
45
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/spec" />
46
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/autotest" />
47
+ </SOURCES>
48
+ <excluded>
49
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/bin" />
50
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/docs" />
51
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/spec" />
52
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/diff-lcs-1.4.4/autotest" />
53
+ </excluded>
54
+ </library>
55
+ </orderEntry>
56
+ <orderEntry type="module-library">
57
+ <library name="parallel (vbundled(1.20.1)) [path][gem]" type="rubylib">
58
+ <properties>
59
+ <option name="version" value="4" />
60
+ </properties>
61
+ <CLASSES>
62
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/parallel-1.20.1/lib" />
63
+ </CLASSES>
64
+ <JAVADOC />
65
+ <SOURCES>
66
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/parallel-1.20.1/lib" />
67
+ </SOURCES>
68
+ </library>
69
+ </orderEntry>
70
+ <orderEntry type="module-library">
71
+ <library name="parser (vbundled(3.0.2.0)) [path][gem]" type="rubylib">
72
+ <properties>
73
+ <option name="version" value="4" />
74
+ </properties>
75
+ <CLASSES>
76
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/parser-3.0.2.0/bin" />
77
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/parser-3.0.2.0/lib" />
78
+ </CLASSES>
79
+ <JAVADOC />
80
+ <SOURCES>
81
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/parser-3.0.2.0/bin" />
82
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/parser-3.0.2.0/lib" />
83
+ </SOURCES>
84
+ <excluded>
85
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/parser-3.0.2.0/bin" />
86
+ </excluded>
87
+ </library>
88
+ </orderEntry>
89
+ <orderEntry type="module-library">
90
+ <library name="rainbow (vbundled(3.0.0)) [path][gem]" type="rubylib">
91
+ <properties>
92
+ <option name="version" value="4" />
93
+ </properties>
94
+ <CLASSES>
95
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rainbow-3.0.0/lib" />
96
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rainbow-3.0.0/spec" />
97
+ </CLASSES>
98
+ <JAVADOC />
99
+ <SOURCES>
100
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rainbow-3.0.0/lib" />
101
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rainbow-3.0.0/spec" />
102
+ </SOURCES>
103
+ <excluded>
104
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rainbow-3.0.0/spec" />
105
+ </excluded>
106
+ </library>
107
+ </orderEntry>
108
+ <orderEntry type="module-library">
109
+ <library name="rake (vbundled(13.0.6)) [path][gem]" type="rubylib">
110
+ <properties>
111
+ <option name="version" value="4" />
112
+ </properties>
113
+ <CLASSES>
114
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc" />
115
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe" />
116
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib" />
117
+ </CLASSES>
118
+ <JAVADOC />
119
+ <SOURCES>
120
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc" />
121
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe" />
122
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib" />
123
+ </SOURCES>
124
+ <excluded>
125
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/doc" />
126
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe" />
127
+ </excluded>
128
+ </library>
129
+ </orderEntry>
130
+ <orderEntry type="module-library">
131
+ <library name="regexp_parser (vbundled(2.1.1)) [path][gem]" type="rubylib">
132
+ <properties>
133
+ <option name="version" value="4" />
134
+ </properties>
135
+ <CLASSES>
136
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/regexp_parser-2.1.1/lib" />
137
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/regexp_parser-2.1.1/spec" />
138
+ </CLASSES>
139
+ <JAVADOC />
140
+ <SOURCES>
141
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/regexp_parser-2.1.1/lib" />
142
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/regexp_parser-2.1.1/spec" />
143
+ </SOURCES>
144
+ <excluded>
145
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/regexp_parser-2.1.1/spec" />
146
+ </excluded>
147
+ </library>
148
+ </orderEntry>
149
+ <orderEntry type="module-library">
150
+ <library name="rexml (vbundled(3.2.5)) [path][gem]" type="rubylib">
151
+ <properties>
152
+ <option name="version" value="4" />
153
+ </properties>
154
+ <CLASSES>
155
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rexml-3.2.5/doc" />
156
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rexml-3.2.5/lib" />
157
+ </CLASSES>
158
+ <JAVADOC />
159
+ <SOURCES>
160
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rexml-3.2.5/doc" />
161
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rexml-3.2.5/lib" />
162
+ </SOURCES>
163
+ <excluded>
164
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rexml-3.2.5/doc" />
165
+ </excluded>
166
+ </library>
167
+ </orderEntry>
168
+ <orderEntry type="module-library">
169
+ <library name="rspec (vbundled(3.10.0)) [path][gem]" type="rubylib">
170
+ <properties>
171
+ <option name="version" value="4" />
172
+ </properties>
173
+ <CLASSES>
174
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-3.10.0/lib" />
175
+ </CLASSES>
176
+ <JAVADOC />
177
+ <SOURCES>
178
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-3.10.0/lib" />
179
+ </SOURCES>
180
+ </library>
181
+ </orderEntry>
182
+ <orderEntry type="module-library">
183
+ <library name="rspec-core (vbundled(3.10.1)) [path][gem]" type="rubylib">
184
+ <properties>
185
+ <option name="version" value="4" />
186
+ </properties>
187
+ <CLASSES>
188
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-core-3.10.1/exe" />
189
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-core-3.10.1/lib" />
190
+ </CLASSES>
191
+ <JAVADOC />
192
+ <SOURCES>
193
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-core-3.10.1/exe" />
194
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-core-3.10.1/lib" />
195
+ </SOURCES>
196
+ <excluded>
197
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-core-3.10.1/exe" />
198
+ </excluded>
199
+ </library>
200
+ </orderEntry>
201
+ <orderEntry type="module-library">
202
+ <library name="rspec-expectations (vbundled(3.10.1)) [path][gem]" type="rubylib">
203
+ <properties>
204
+ <option name="version" value="4" />
205
+ </properties>
206
+ <CLASSES>
207
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-expectations-3.10.1/lib" />
208
+ </CLASSES>
209
+ <JAVADOC />
210
+ <SOURCES>
211
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-expectations-3.10.1/lib" />
212
+ </SOURCES>
213
+ </library>
214
+ </orderEntry>
215
+ <orderEntry type="module-library">
216
+ <library name="rspec-mocks (vbundled(3.10.2)) [path][gem]" type="rubylib">
217
+ <properties>
218
+ <option name="version" value="4" />
219
+ </properties>
220
+ <CLASSES>
221
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-mocks-3.10.2/lib" />
222
+ </CLASSES>
223
+ <JAVADOC />
224
+ <SOURCES>
225
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-mocks-3.10.2/lib" />
226
+ </SOURCES>
227
+ </library>
228
+ </orderEntry>
229
+ <orderEntry type="module-library">
230
+ <library name="rspec-support (vbundled(3.10.2)) [path][gem]" type="rubylib">
231
+ <properties>
232
+ <option name="version" value="4" />
233
+ </properties>
234
+ <CLASSES>
235
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-support-3.10.2/lib" />
236
+ </CLASSES>
237
+ <JAVADOC />
238
+ <SOURCES>
239
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rspec-support-3.10.2/lib" />
240
+ </SOURCES>
241
+ </library>
242
+ </orderEntry>
243
+ <orderEntry type="module-library">
244
+ <library name="rubocop (vbundled(1.20.0)) [path][gem]" type="rubylib">
245
+ <properties>
246
+ <option name="version" value="4" />
247
+ </properties>
248
+ <CLASSES>
249
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rubocop-1.20.0/exe" />
250
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rubocop-1.20.0/lib" />
251
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rubocop-1.20.0/assets" />
252
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rubocop-1.20.0/config" />
253
+ </CLASSES>
254
+ <JAVADOC />
255
+ <SOURCES>
256
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rubocop-1.20.0/exe" />
257
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rubocop-1.20.0/lib" />
258
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rubocop-1.20.0/assets" />
259
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rubocop-1.20.0/config" />
260
+ </SOURCES>
261
+ <excluded>
262
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rubocop-1.20.0/exe" />
263
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rubocop-1.20.0/assets" />
264
+ </excluded>
265
+ </library>
266
+ </orderEntry>
267
+ <orderEntry type="module-library">
268
+ <library name="rubocop-ast (vbundled(1.11.0)) [path][gem]" type="rubylib">
269
+ <properties>
270
+ <option name="version" value="4" />
271
+ </properties>
272
+ <CLASSES>
273
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rubocop-ast-1.11.0/lib" />
274
+ </CLASSES>
275
+ <JAVADOC />
276
+ <SOURCES>
277
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rubocop-ast-1.11.0/lib" />
278
+ </SOURCES>
279
+ </library>
280
+ </orderEntry>
281
+ <orderEntry type="module-library">
282
+ <library name="ruby-progressbar (vbundled(1.11.0)) [path][gem]" type="rubylib">
283
+ <properties>
284
+ <option name="version" value="4" />
285
+ </properties>
286
+ <CLASSES>
287
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/ruby-progressbar-1.11.0/lib" />
288
+ </CLASSES>
289
+ <JAVADOC />
290
+ <SOURCES>
291
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/ruby-progressbar-1.11.0/lib" />
292
+ </SOURCES>
293
+ </library>
294
+ </orderEntry>
295
+ <orderEntry type="module-library">
296
+ <library name="unicode-display_width (vbundled(2.0.0)) [path][gem]" type="rubylib">
297
+ <properties>
298
+ <option name="version" value="4" />
299
+ </properties>
300
+ <CLASSES>
301
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/unicode-display_width-2.0.0/lib" />
302
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/unicode-display_width-2.0.0/data" />
303
+ </CLASSES>
304
+ <JAVADOC />
305
+ <SOURCES>
306
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/unicode-display_width-2.0.0/lib" />
307
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/unicode-display_width-2.0.0/data" />
308
+ </SOURCES>
309
+ <excluded>
310
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/unicode-display_width-2.0.0/data" />
311
+ </excluded>
312
+ </library>
313
+ </orderEntry>
314
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.2.25, rbenv: 3.0.2) [gem]" level="application" />
315
+ <orderEntry type="library" scope="PROVIDED" name="rbs (v1.0.4, rbenv: 3.0.2) [gem]" level="application" />
316
+ </component>
317
+ </module>
data/.idea/misc.xml ADDED
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 2.6.6" project-jdk-type="RUBY_SDK" />
4
+ </project>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/bot_platform.iml" filepath="$PROJECT_DIR$/.idea/bot_platform.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.0.2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bot_platform (0.1.0)
4
+ bot_platform (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Lifevar Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,8 +1,16 @@
1
- # BotPlatform
1
+ ##
2
+ This Project is still underconstruction.
2
3
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/bot_platform`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+ # BotPlat form
5
+
6
+ A ruby based Bot platform to let developers to focus on bot's business logic. You can connect your bot to channels such as slack, teams, lineworks, chatwork and etc with only a few steps while the bot's logic is the same. check the [supported bot channels](https://github.com/lifevar/bot-platform/blob/main/docs/channels.md#supported).
7
+
8
+ We also provide CLI(also as a channel) to accelerate the test and demo processes.
9
+
10
+ You can use DemoKit(underconstruction) to support your bot conversations to customers.
11
+
12
+ We reference Microsoft's BotFramework now, but we'll change the platform to be better in furture.
4
13
 
5
- TODO: Delete this and the text above, and describe your gem
6
14
 
7
15
  ## Installation
8
16
 
@@ -22,18 +30,20 @@ Or install it yourself as:
22
30
 
23
31
  ## Usage
24
32
 
25
- TODO: Write usage instructions here
33
+ bin/cli samples/echo.rb
26
34
 
27
- ## Development
35
+ or
36
+
37
+ bin/cli samples/dialogs/dialog_simple.rb
28
38
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
39
+ ## Development
30
40
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
41
+ We're working on both console bot and Line Works bot nowtime.
32
42
 
33
43
  ## Contributing
34
44
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/bot_platform. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/bot_platform/blob/master/CODE_OF_CONDUCT.md).
45
+ Bug reports and pull requests are welcome on GitHub at https://github.com/lifevar/bot-platform. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/lifevar/bot-platform/blob/master/CODE_OF_CONDUCT.md).
36
46
 
37
47
  ## Code of Conduct
38
48
 
39
- Everyone interacting in the BotPlatform project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/bot_platform/blob/master/CODE_OF_CONDUCT.md).
49
+ Everyone interacting in the BotPlatform project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/lifevar/bot-platform/blob/master/CODE_OF_CONDUCT.md).
data/bin/cli ADDED
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "bot_platform"
6
+ require_relative '../lib/bot_platform/cli'
7
+
8
+ def usage
9
+ <<-USAGE
10
+ usage: bin/cli [bot_ruby_file]
11
+ e.g. bin/cli ./samples/dialog_simple.rb
12
+ USAGE
13
+ end
14
+
15
+ def camelize(str)
16
+ str.split('_').map(&:capitalize).join
17
+ end
18
+
19
+ if ARGV[0].nil?
20
+ puts usage
21
+ exit(0)
22
+ else
23
+ unless File.exist?(ARGV[0])
24
+ puts usage
25
+ exit(-1)
26
+ end
27
+ require ARGV[0]
28
+ base_name = File.basename(ARGV[0],'.rb')
29
+ instance = Object.const_get(camelize(base_name)).new
30
+ end
31
+
32
+
33
+ cli = BotPlatform::Cli.new instance
34
+ cli.run