bot 0.0.33 → 0.0.34

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 987b7c14749e3ca994af388c8d930677f42fc746
4
- data.tar.gz: f8c1a9e04047740a33a907f85d0131c62c142b58
3
+ metadata.gz: a10a18d96622e3385da75b17a857a5e6ef45e5d3
4
+ data.tar.gz: 1fd060a8bfc681a672ea48816bbe58772f006a4d
5
5
  SHA512:
6
- metadata.gz: f290041e9223312cfe9184a3b3b9be9e2116b68f0fc5ed7e4adc3b3feeeae353125288f094ddf1ae3880fb72cf42e54f9820b468af4f73bc437ca86cb57b1088
7
- data.tar.gz: aa22748af75fdb8f97c71771f4158d880be0b977dd8d8eb4deffe538f7040d016dc6add1fb13156698efaae99a875de6513f35b9d6e023cb80ede76f024a387f
6
+ metadata.gz: ae58b2b58ee61a1168ebbbb92e34b40a30ca6cbbd4926bfe0cdc0e8c5d071a00bef9363ba78fddc5a5e8ddc4d7f7beb01a80d3c76377bcb200fa9d2c154c7e34
7
+ data.tar.gz: b3c332647bfe2c06f1bda8f447fe8f1bacf3caf5b7f9c613a26f7683d6cabdf7d7d015f9bdf752333ae75926125ec272762e8772c69a250b83c9240db2c90ce7
@@ -18,7 +18,7 @@ module Bot
18
18
  end
19
19
 
20
20
  def get(field)
21
- data = $redis.hget(context_key, field)
21
+ data = redis_client.hget(context_key, field)
22
22
  JSON.parse(data) if data.present?
23
23
  rescue JSON::ParserError
24
24
  data
@@ -26,15 +26,15 @@ module Bot
26
26
 
27
27
  def set(context)
28
28
  self.clear
29
- $redis.hmset(context_key, context.map { |k, v| [k, v] }.flatten)
29
+ redis_client.hmset(context_key, context.map { |k, v| [k, v] }.flatten)
30
30
  end
31
31
 
32
32
  def add(field, content)
33
- $redis.hset context_key, field, content
33
+ redis_client.hset context_key, field, content
34
34
  end
35
35
 
36
36
  def clear
37
- $redis.del context_key
37
+ redis_client.del context_key
38
38
  end
39
39
 
40
40
  def context_key
@@ -1,3 +1,3 @@
1
1
  module Bot
2
- VERSION = "0.0.33"
2
+ VERSION = "0.0.34"
3
3
  end
@@ -3162,5 +3162,48 @@ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3162
3162
   (0.0ms) begin transaction
3163
3163
  -------------------
3164
3164
  BotTest: test_truth
3165
+ -------------------
3166
+  (0.0ms) rollback transaction
3167
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
3168
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
3169
+  (0.1ms) select sqlite_version(*)
3170
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3171
+  (0.1ms) SELECT version FROM "schema_migrations"
3172
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('0')
3173
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3174
+  (0.1ms) begin transaction
3175
+ ---------------------------
3176
+ NavigationTest: test_notify
3177
+ ---------------------------
3178
+ Started POST "/bot/notify" for 127.0.0.1 at 2016-04-28 16:58:15 -0400
3179
+ Processing by Bot::BotController#notify as HTML
3180
+ Parameters: {"bot"=>ApplicationHandler}
3181
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3182
+ Started POST "/bot/notify" for 127.0.0.1 at 2016-04-28 16:58:15 -0400
3183
+ Processing by Bot::BotController#notify as HTML
3184
+ Parameters: {"messages"=>[{"body"=>"Hello", "readReceiptRequested"=>"true", "from"=>"bnmrrs", "timestamp"=>"1452785908454", "type"=>"text", "id"=>"2af0d873-d157-4627-b863-8be11b0dfd86"}], "bot"=>ApplicationHandler}
3185
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3186
+  (0.1ms) rollback transaction
3187
+  (0.1ms) begin transaction
3188
+ ---------------------------------------
3189
+ NavigationTest: test_notify_multi_types
3190
+ ---------------------------------------
3191
+ Started POST "/bot/notify" for 127.0.0.1 at 2016-04-28 16:58:15 -0400
3192
+ Processing by Bot::BotController#notify as HTML
3193
+ Parameters: {"messages"=>[{"body"=>"multi", "readReceiptRequested"=>"true", "from"=>"bnmrrs", "timestamp"=>"1452785908454", "type"=>"scan-data", "id"=>"2af0d873-d157-4627-b863-8be11b0dfd86"}], "bot"=>ApplicationHandler}
3194
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3195
+  (0.1ms) rollback transaction
3196
+  (0.1ms) begin transaction
3197
+ -----------------------------------------
3198
+ NavigationTest: test_notify_special_types
3199
+ -----------------------------------------
3200
+ Started POST "/bot/notify" for 127.0.0.1 at 2016-04-28 16:58:15 -0400
3201
+ Processing by Bot::BotController#notify as HTML
3202
+ Parameters: {"messages"=>[{"body"=>"Hello", "readReceiptRequested"=>"true", "from"=>"bnmrrs", "timestamp"=>"1452785908454", "type"=>"scan-data", "id"=>"2af0d873-d157-4627-b863-8be11b0dfd86"}], "bot"=>ApplicationHandler}
3203
+ Completed 200 OK in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
3204
+  (0.1ms) rollback transaction
3205
+  (0.0ms) begin transaction
3206
+ -------------------
3207
+ BotTest: test_truth
3165
3208
  -------------------
3166
3209
   (0.0ms) 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.33
4
+ version: 0.0.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Morris