lita-slack 1.0.2 → 1.0.3

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: 0740523cfe333666a4282c857a57f1fbd479de0e
4
- data.tar.gz: f6844c11139c5a339ff0868fea8d7c31af6fda5a
3
+ metadata.gz: edbc8dcdee46b8b2abbe6d6fcbd85e6610598726
4
+ data.tar.gz: 6763ecbdf98d5fbdaf0d904d4252702f1c3b236f
5
5
  SHA512:
6
- metadata.gz: fd4fd75c42927c27ae47a0cc6ef639811d41f3c8130753c75c17f5978180710174f23714076b982e6ec8612b28a36c72bee927db58b6b737d10b3fc9da2e611c
7
- data.tar.gz: 6a65d3c4e437d32d8fe654fbfd886c728a11311645a31c5a94e774176b3e946ecf49d42ac7d33bbcc93a937a4291486009f5c805ff976946fa25350054458d23
6
+ metadata.gz: 78c015357fa487c0ff844a8438934b9a9fa729f02c66a04182734007030b449dab63cbb09e5d9fc4cd47c89ee7473258005b4d39e27b675b72b8432b35d30c0d
7
+ data.tar.gz: af1dd3ecb8fc8fb3a585a6ba060c8d235d4e3a662d7af77f6c0cd2ece4773237010200dc1dc6b46af61261c81ae18555da1f603ace5c69340dcd5988fd743c95
@@ -34,7 +34,7 @@ module Lita
34
34
  attr_reader :type
35
35
 
36
36
  def body
37
- data["text"].sub(/^\s*<@#{robot_id}>/, "@#{robot.mention_name}")
37
+ data["text"].to_s.sub(/^\s*<@#{robot_id}>/, "@#{robot.mention_name}")
38
38
  end
39
39
 
40
40
  def channel
data/lita-slack.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-slack"
3
- spec.version = "1.0.2"
3
+ spec.version = "1.0.3"
4
4
  spec.authors = ["Ken J.", "Jimmy Cuadra"]
5
5
  spec.email = ["kenjij@gmail.com", "jimmy@jimmycuadra.com"]
6
6
  spec.description = %q{Lita adapter for Slack.}
@@ -66,6 +66,26 @@ describe Lita::Adapters::Slack::MessageHandler, lita: true do
66
66
  subject.handle
67
67
  end
68
68
  end
69
+
70
+ context "when the message is nil" do
71
+ let(:data) do
72
+ {
73
+ "type" => "message",
74
+ "channel" => "C2147483705",
75
+ "user" => "U023BECGF",
76
+ }
77
+ end
78
+
79
+ it "dispatches an empty message to Lita" do
80
+ expect(Lita::Message).to receive(:new).with(
81
+ robot,
82
+ "",
83
+ source
84
+ ).and_return(message)
85
+
86
+ subject.handle
87
+ end
88
+ end
69
89
  end
70
90
 
71
91
  context "with a message with an unsupported subtype" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-slack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken J.
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-12 00:00:00.000000000 Z
12
+ date: 2014-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine