wit_bot 0.5.1 → 0.5.2

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: d6f8586c33704055bce42268f28aa62d9342368a
4
- data.tar.gz: c64ca87eb3a43d348f737f63336f76fe4eb95a2b
3
+ metadata.gz: 54335eac2026b307d2ee5ab5d2db3bd677682307
4
+ data.tar.gz: 383290319ad7d6a874f3b285380d2b1031ab3092
5
5
  SHA512:
6
- metadata.gz: 742baac6a12728fd5bbcd6968889602f2d8e805e652c1e72afd1edb02074dc796c27839c8f86ad0e51cdb52d2cd4ae0988bd8cda68f4bbfb4f5a70beef4f4a67
7
- data.tar.gz: 94c26dca334458d1350e8e20ddc35952f7f0b79c4be87fe92fb8e129b2927eb0bcfb5f691208bbf47b855d8cde74b10765a182cd8eccad6998d69d24429b3dad
6
+ metadata.gz: 94fda45b8bed4e23e077ac9182de55967c06bb5e78a634973a88bbd0f010c0a830aa7b79cb5069499441d9c72cf89386515489660fd75545b2a123bece745722
7
+ data.tar.gz: 7b4d2d19a66604195a0c0709eb3668e893aefdc0d88213b8c4f98db6ba75d29b77dd8256d5fc3b268751da1eaf5ce166154ce12c8db38ab5be5ea2faeab1f8a2
@@ -1,8 +1,16 @@
1
1
  Description:
2
- Sets up an initializer for wit_bot.
2
+ Creates a bot for use with wit_bot.
3
3
 
4
4
  Example:
5
- rails generate wit_bot:setup
5
+
6
+ To generate without intents:
7
+
8
+ rails generate wit_bot:bot BotName
9
+
10
+ To include intents:
11
+
12
+ rails generate wit_bot:bot BotName intent1 intent2 ...
6
13
 
7
14
  This will create:
8
- config/initializers/wit_bot.rb
15
+
16
+ app/wit_bot/bot_name_bot.rb
@@ -1,8 +1,15 @@
1
1
  Description:
2
- Sets up an initializer for wit_bot.
2
+ Sets up a message participant for using message_bus to transmit messages to web clients.
3
3
 
4
4
  Example:
5
- rails generate wit_bot:setup
5
+ All commands below are equivalent:
6
+
7
+ rails generate wit_bot:message_bus Bot
8
+ rails generate wit_bot:message_bus Bot User
9
+ rails generate wit_bot:message_bus Bot User /witbot
6
10
 
7
11
  This will create:
8
- config/initializers/wit_bot.rb
12
+
13
+ app/wit_bot/message_bus_listener.rb
14
+ app/controllers/message_bus_controller.rb
15
+ app/jobs/message_bus_job.rb
@@ -1,8 +1,14 @@
1
1
  Description:
2
- Sets up an initializer for wit_bot.
2
+ Create a model to store conversations in ActiveRecord belonging to a user.
3
3
 
4
4
  Example:
5
- rails generate wit_bot:setup
5
+ Both commands are equivalent:
6
+
7
+ rails generate wit_bot:model
8
+ rails generate wit_bot:model User
6
9
 
7
10
  This will create:
8
- config/initializers/wit_bot.rb
11
+
12
+ db/migrate/create_conversations.rb
13
+ app/models/conversation.rb
14
+
@@ -17,13 +17,7 @@ module WitBot
17
17
  user_file = "app/models/#{user_lower}.rb"
18
18
  inject_into_class user_file, user_model, " has_one :conversation, dependent: :destroy\n"
19
19
 
20
- puts <<TEXT
21
- If you're thinking that storing conversations will take up a lot of room in your database,
22
- you are correct. You'll want to destroy inactive conversations from the database every few hours.
23
- Here's the guide on setting up a job to clear old conversations with Clockwork:
24
-
25
- https://github.com/penne12/wit_bot/wiki/Clear-Old-Conversations-in-ActiveRecord-with-Clockwork-and-ActiveJob
26
- TEXT
20
+ readme 'clear_conversations.txt'
27
21
  end
28
22
  end
29
23
  end
@@ -0,0 +1,5 @@
1
+ If you're thinking that storing conversations will take up a lot of room in your database,
2
+ you are correct. You'll want to destroy inactive conversations from the database every few hours.
3
+ Here's the guide on setting up a job to clear old conversations with Clockwork:
4
+
5
+ https://github.com/penne12/wit_bot/wiki/Clear-Old-Conversations-in-ActiveRecord-with-Clockwork-and-ActiveJob
@@ -1,3 +1,3 @@
1
1
  module WitBot
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wit_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben (@penne12_)
@@ -158,6 +158,7 @@ files:
158
158
  - lib/generators/wit_bot/message_bus/templates/message_bus_listener.rb.erb
159
159
  - lib/generators/wit_bot/model/USAGE
160
160
  - lib/generators/wit_bot/model/model_generator.rb
161
+ - lib/generators/wit_bot/model/templates/clear_conversations.txt
161
162
  - lib/generators/wit_bot/model/templates/model.rb.erb
162
163
  - lib/generators/wit_bot/setup/USAGE
163
164
  - lib/generators/wit_bot/setup/setup_generator.rb