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.
- checksums.yaml +4 -4
- data/.idea/.gitignore +8 -0
- data/.idea/bot_platform.iml +317 -0
- data/.idea/misc.xml +4 -0
- data/.idea/modules.xml +8 -0
- data/.idea/vcs.xml +6 -0
- data/.ruby-version +1 -0
- data/Gemfile.lock +1 -1
- data/LICENSE +21 -0
- data/README.md +19 -9
- data/bin/cli +34 -0
- data/docs/channels.md +7 -0
- data/lib/bot_platform/activity.rb +32 -0
- data/lib/bot_platform/adapter.rb +87 -0
- data/lib/bot_platform/asserts.rb +69 -0
- data/lib/bot_platform/boot.rb +12 -0
- data/lib/bot_platform/channels/base.rb +26 -0
- data/lib/bot_platform/channels/chatwork.rb +1 -0
- data/lib/bot_platform/channels/console.rb +60 -0
- data/lib/bot_platform/channels/facebook.rb +1 -0
- data/lib/bot_platform/channels/line.rb +1 -0
- data/lib/bot_platform/channels/lineworks.rb +102 -0
- data/lib/bot_platform/channels/skype.rb +1 -0
- data/lib/bot_platform/channels/skype_for_business.rb +1 -0
- data/lib/bot_platform/channels/slack.rb +15 -0
- data/lib/bot_platform/channels/teams.rb +15 -0
- data/lib/bot_platform/channels/web.rb +15 -0
- data/lib/bot_platform/channels/wechat.rb +1 -0
- data/lib/bot_platform/channels.rb +9 -0
- data/lib/bot_platform/cli.rb +97 -0
- data/lib/bot_platform/conversation_state.rb +32 -0
- data/lib/bot_platform/dialogs/dialog.rb +48 -0
- data/lib/bot_platform/dialogs/dialog_context.rb +104 -0
- data/lib/bot_platform/dialogs/dialog_instance.rb +15 -0
- data/lib/bot_platform/dialogs/dialog_result.rb +22 -0
- data/lib/bot_platform/dialogs/dialog_set.rb +38 -0
- data/lib/bot_platform/dialogs/dialog_state.rb +11 -0
- data/lib/bot_platform/dialogs/prompts/prompt.rb +84 -0
- data/lib/bot_platform/dialogs/prompts/prompt_options.rb +12 -0
- data/lib/bot_platform/dialogs/prompts/prompt_recognizer_result.rb +16 -0
- data/lib/bot_platform/dialogs/prompts/text_prompt.rb +36 -0
- data/lib/bot_platform/dialogs.rb +17 -0
- data/lib/bot_platform/message_factory.rb +9 -0
- data/lib/bot_platform/state/bot_state.rb +21 -0
- data/lib/bot_platform/state/conversation_state.rb +17 -0
- data/lib/bot_platform/state/user_state.rb +1 -0
- data/lib/bot_platform/storage/memory_storage.rb +51 -0
- data/lib/bot_platform/storage/mysql_storage.rb +1 -0
- data/lib/bot_platform/storage/redis_storage.rb +1 -0
- data/lib/bot_platform/storage/storageable.rb +33 -0
- data/lib/bot_platform/turn_context.rb +105 -0
- data/lib/bot_platform/version.rb +1 -1
- data/lib/bot_platform.rb +11 -0
- data/samples/dialogs/dialog_simple.rb +29 -0
- data/samples/echo.rb +5 -0
- metadata +52 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fba230d8df11a77a8a6d58fec72534f6826b8a80cec4b05485ad6284e804f98
|
4
|
+
data.tar.gz: aa0f609ea22c05a929662ac20d45cb900ae4097ea8127d98c7d33deb5d8cb589
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d1449dd6e8a83af4868752a7c4a6dc638f0088ae950788b17af93f52a30e801b62f6bd3409e20d73ce3cf99bece4ca9a855c545f9702c33c17ad8fd5f28ecec
|
7
|
+
data.tar.gz: 9aede2141487ad00d02acdcf06412f02489cf6de674d330924b0ce0379185bd8e8d6e81e08dea91f39f93d8ebcd81d568cb47f68c2ae1b698afde15a884c255b
|
data/.idea/.gitignore
ADDED
@@ -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
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
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.0.2
|
data/Gemfile.lock
CHANGED
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
|
-
|
1
|
+
##
|
2
|
+
This Project is still underconstruction.
|
2
3
|
|
3
|
-
|
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
|
-
|
33
|
+
bin/cli samples/echo.rb
|
26
34
|
|
27
|
-
|
35
|
+
or
|
36
|
+
|
37
|
+
bin/cli samples/dialogs/dialog_simple.rb
|
28
38
|
|
29
|
-
|
39
|
+
## Development
|
30
40
|
|
31
|
-
|
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/
|
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/
|
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
|