bot 0.0.37 → 0.0.38

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: 381717efe3e79e2c030de08782b30420e077109e
4
- data.tar.gz: 582e298ffd95f57c30c3ab07a47f6f1b434c6adf
3
+ metadata.gz: 8aadd7727dd46fa03fdf37373bf78c7f4768d5d4
4
+ data.tar.gz: 27a64c56e216f3bac1df35dfc1b85632370231c1
5
5
  SHA512:
6
- metadata.gz: fd976cc2e6a04693edb376c4a1350e7fc83cf937706eb8dd3d529070c8373c752fb1685cd26ab9bcd1ad6c6484c2203d117294a86b9aa9be40fdd9efaad95084
7
- data.tar.gz: 19048aa8a5339e05144f5296e3cc767eb54bdd3b96444572b81ed0b0c27b6e67f4040ce42ce3fa4b86d9fca890a54e5e5bbd217c90b475720ed16286f77c0eeb
6
+ metadata.gz: a5757f2947ffa5d272a593e9b6a06c066a7a33667e2d2b67a86a3328c30d8d0bead3868f4f71cec5ddcdece6cc5c566b22a2e3966c35d2952d09ec4391eb46c1
7
+ data.tar.gz: 55cee88000f96f1286d8ed617affd0a552c35fa3e1510437dcc70c071a77f382ee58081845446cdaaa74aaee9e21564e6ee2ba701bb4d72546e1e78bafe0edb0
@@ -68,6 +68,27 @@ module Bot
68
68
  photo_response
69
69
  end
70
70
 
71
+ def card_response(text, url, icon=nil)
72
+ card = {
73
+ 'type' => 'link',
74
+ 'to' => message['from'],
75
+ 'url' => url,
76
+ 'title' => "", # Displays over the image
77
+ 'text' => text, # Displays under the image
78
+ 'attribution' => {
79
+ 'name' => text # Displays in bottom line
80
+ },
81
+ 'chatId' => message['chatId']
82
+ }
83
+
84
+ card['picUrl'] = icon if icon
85
+ card['attribution']['iconUrl'] = icon if icon
86
+
87
+ [
88
+ card
89
+ ]
90
+ end
91
+
71
92
  def video_response(video_id, suggested_responses=false)
72
93
  video_response = {
73
94
  'type' => 'video',
@@ -1,3 +1,3 @@
1
1
  module Bot
2
- VERSION = "0.0.37"
2
+ VERSION = "0.0.38"
3
3
  end
@@ -3334,5 +3334,48 @@ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3334
3334
  Started POST "/bot/notify" for 127.0.0.1 at 2016-05-02 10:47:44 -0400
3335
3335
  Processing by Bot::BotController#notify as HTML
3336
3336
  Parameters: {"messages"=>[{"body"=>"Hello", "readReceiptRequested"=>"true", "from"=>"bnmrrs", "timestamp"=>"1452785908454", "type"=>"text", "id"=>"2af0d873-d157-4627-b863-8be11b0dfd86"}], "bot"=>ApplicationHandler}
3337
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3338
+  (0.1ms) rollback transaction
3339
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
3340
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
3341
+  (0.1ms) select sqlite_version(*)
3342
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3343
+  (0.1ms) SELECT version FROM "schema_migrations"
3344
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
3345
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3346
+  (0.1ms) begin transaction
3347
+ -------------------
3348
+ BotTest: test_truth
3349
+ -------------------
3350
+  (0.1ms) rollback transaction
3351
+  (0.0ms) begin transaction
3352
+ ---------------------------
3353
+ NavigationTest: test_notify
3354
+ ---------------------------
3355
+ Started POST "/bot/notify" for 127.0.0.1 at 2016-05-02 17:23:53 -0400
3356
+ Processing by Bot::BotController#notify as HTML
3357
+ Parameters: {"bot"=>ApplicationHandler}
3358
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
3359
+ Started POST "/bot/notify" for 127.0.0.1 at 2016-05-02 17:23:53 -0400
3360
+ Processing by Bot::BotController#notify as HTML
3361
+ Parameters: {"messages"=>[{"body"=>"Hello", "readReceiptRequested"=>"true", "from"=>"bnmrrs", "timestamp"=>"1452785908454", "type"=>"text", "id"=>"2af0d873-d157-4627-b863-8be11b0dfd86"}], "bot"=>ApplicationHandler}
3362
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3363
+  (0.1ms) rollback transaction
3364
+  (0.0ms) begin transaction
3365
+ -----------------------------------------
3366
+ NavigationTest: test_notify_special_types
3367
+ -----------------------------------------
3368
+ Started POST "/bot/notify" for 127.0.0.1 at 2016-05-02 17:23:53 -0400
3369
+ Processing by Bot::BotController#notify as HTML
3370
+ Parameters: {"messages"=>[{"body"=>"Hello", "readReceiptRequested"=>"true", "from"=>"bnmrrs", "timestamp"=>"1452785908454", "type"=>"scan-data", "id"=>"2af0d873-d157-4627-b863-8be11b0dfd86"}], "bot"=>ApplicationHandler}
3371
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3372
+  (0.1ms) rollback transaction
3373
+  (0.0ms) begin transaction
3374
+ ---------------------------------------
3375
+ NavigationTest: test_notify_multi_types
3376
+ ---------------------------------------
3377
+ Started POST "/bot/notify" for 127.0.0.1 at 2016-05-02 17:23:53 -0400
3378
+ Processing by Bot::BotController#notify as HTML
3379
+ Parameters: {"messages"=>[{"body"=>"multi", "readReceiptRequested"=>"true", "from"=>"bnmrrs", "timestamp"=>"1452785908454", "type"=>"scan-data", "id"=>"2af0d873-d157-4627-b863-8be11b0dfd86"}], "bot"=>ApplicationHandler}
3337
3380
  Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3338
3381
   (0.1ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.37
4
+ version: 0.0.38
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Morris