bot 0.0.31 → 0.0.32
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/lib/bot/version.rb +1 -1
- data/lib/generators/bot/install/templates/application_handler.rb +1 -1
- data/lib/generators/bot/install/templates/application_responder.rb +0 -9
- data/lib/generators/bot/responder/responder_generator.rb +12 -10
- data/test/dummy/log/test.log +43 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d604c8040f3511c15a681545741d76bcd89958fc
|
4
|
+
data.tar.gz: f98aa6719d9b1118f4e4378011832ce562371675
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fa7b7279b2ea537eb85b96208a748a26738ac3aeb4cf8b2b0cd916bd7f78c41041d85edbc38f5a4cb5dc2a3b5a0c9abb5c6361910ea60e1a433dccb353a008f
|
7
|
+
data.tar.gz: feeb8ae8435d399b9602406ba4a1587c4b2f26e14dba7cb88cb5907448b6f9521d07a7d3acdf082e3da3abde2fc1013b552ff7aa7a50e1342c366e620fa34d86
|
data/lib/bot/version.rb
CHANGED
@@ -5,16 +5,18 @@ module Bot
|
|
5
5
|
|
6
6
|
def create_responder
|
7
7
|
create_file "app/bot/responders/#{file_name}.rb", <<-FILE
|
8
|
-
|
9
|
-
#
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
8
|
+
module Responders
|
9
|
+
#{class_name} < ApplicationResponder
|
10
|
+
#
|
11
|
+
# def can_handle?
|
12
|
+
# true
|
13
|
+
# end
|
14
|
+
#
|
15
|
+
# def handle
|
16
|
+
# text_response('Hello!')
|
17
|
+
# end
|
18
|
+
#
|
19
|
+
end
|
18
20
|
end
|
19
21
|
FILE
|
20
22
|
end
|
data/test/dummy/log/test.log
CHANGED
@@ -3078,3 +3078,46 @@ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
|
3078
3078
|
BotTest: test_truth
|
3079
3079
|
-------------------
|
3080
3080
|
[1m[35m (0.0ms)[0m rollback transaction
|
3081
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
3082
|
+
[1m[36m (3.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
3083
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
3084
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
3085
|
+
[1m[35m (0.1ms)[0m SELECT version FROM "schema_migrations"
|
3086
|
+
[1m[36m (0.8ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('0')[0m
|
3087
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
3088
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
3089
|
+
---------------------------
|
3090
|
+
NavigationTest: test_notify
|
3091
|
+
---------------------------
|
3092
|
+
Started POST "/bot/notify" for 127.0.0.1 at 2016-04-28 16:17:50 -0400
|
3093
|
+
Processing by Bot::BotController#notify as HTML
|
3094
|
+
Parameters: {"bot"=>ApplicationHandler}
|
3095
|
+
Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
3096
|
+
Started POST "/bot/notify" for 127.0.0.1 at 2016-04-28 16:17:51 -0400
|
3097
|
+
Processing by Bot::BotController#notify as HTML
|
3098
|
+
Parameters: {"messages"=>[{"body"=>"Hello", "readReceiptRequested"=>"true", "from"=>"bnmrrs", "timestamp"=>"1452785908454", "type"=>"text", "id"=>"2af0d873-d157-4627-b863-8be11b0dfd86"}], "bot"=>ApplicationHandler}
|
3099
|
+
Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
3100
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
3101
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
3102
|
+
---------------------------------------
|
3103
|
+
NavigationTest: test_notify_multi_types
|
3104
|
+
---------------------------------------
|
3105
|
+
Started POST "/bot/notify" for 127.0.0.1 at 2016-04-28 16:17:51 -0400
|
3106
|
+
Processing by Bot::BotController#notify as HTML
|
3107
|
+
Parameters: {"messages"=>[{"body"=>"multi", "readReceiptRequested"=>"true", "from"=>"bnmrrs", "timestamp"=>"1452785908454", "type"=>"scan-data", "id"=>"2af0d873-d157-4627-b863-8be11b0dfd86"}], "bot"=>ApplicationHandler}
|
3108
|
+
Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)
|
3109
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
3110
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
3111
|
+
-----------------------------------------
|
3112
|
+
NavigationTest: test_notify_special_types
|
3113
|
+
-----------------------------------------
|
3114
|
+
Started POST "/bot/notify" for 127.0.0.1 at 2016-04-28 16:17:51 -0400
|
3115
|
+
Processing by Bot::BotController#notify as HTML
|
3116
|
+
Parameters: {"messages"=>[{"body"=>"Hello", "readReceiptRequested"=>"true", "from"=>"bnmrrs", "timestamp"=>"1452785908454", "type"=>"scan-data", "id"=>"2af0d873-d157-4627-b863-8be11b0dfd86"}], "bot"=>ApplicationHandler}
|
3117
|
+
Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
3118
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
3119
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
3120
|
+
-------------------
|
3121
|
+
BotTest: test_truth
|
3122
|
+
-------------------
|
3123
|
+
[1m[35m (0.1ms)[0m rollback transaction
|