lita-hipchat 2.0.0 → 2.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e12641b30c087c18ee3b25a1b4157f740f010de6
|
4
|
+
data.tar.gz: 8eb8b306212cfcd1a42ea2234de06956c2d38639
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e381dfe3ce2c885fb2b4412f8b740bf1442f7e01558703c4c9972fdef4df5ea869ee1cf6f2c0f3e6c2de3f6bd64eb6830838aa8481ce7dd510b73038bbbe1cf
|
7
|
+
data.tar.gz: 10e6eeb25e03551147db619926d9c48c9b90ac2e791a9953ebb7e558ed39e049bb16b431b028cfb69813d6dc3c00ca410e9093033b86adf146b99ce66dd64157
|
@@ -63,7 +63,7 @@ module Lita
|
|
63
63
|
items = roster.items.detect { |jid, item| item.iname == name }
|
64
64
|
if items
|
65
65
|
user_by_jid(items.first)
|
66
|
-
elsif !
|
66
|
+
elsif !robot.config.adapters.hipchat.ignore_unknown_users
|
67
67
|
Lita.logger.warn <<-MSG.chomp
|
68
68
|
No user with the name #{name.inspect} was found in the roster. The message may
|
69
69
|
have been generated from the HipChat API. A temporary user has been created for
|
data/lita-hipchat.gemspec
CHANGED
@@ -3,7 +3,12 @@ require "spec_helper"
|
|
3
3
|
describe Lita::Adapters::HipChat::Callback, lita: true do
|
4
4
|
subject { described_class.new(robot, roster) }
|
5
5
|
|
6
|
-
|
6
|
+
prepend_before { registry.register_adapter(:hipchat, Lita::Adapters::HipChat) }
|
7
|
+
|
8
|
+
let(:registry) { Lita::Registry.new }
|
9
|
+
let(:robot) do
|
10
|
+
instance_double("Lita::Robot", mention_name: "Lita", alias: nil, config: registry.config)
|
11
|
+
end
|
7
12
|
let(:roster) do
|
8
13
|
instance_double("Jabber::Roster::Helper", items: { "user_id" => roster_item })
|
9
14
|
end
|
@@ -94,7 +99,7 @@ describe Lita::Adapters::HipChat::Callback, lita: true do
|
|
94
99
|
end
|
95
100
|
|
96
101
|
it "ignores messages from unknown users if the config for it is set" do
|
97
|
-
|
102
|
+
registry.config.adapters.hipchat.ignore_unknown_users = true
|
98
103
|
allow(muc).to receive(:on_message).and_yield(nil, "Unknown", "foo")
|
99
104
|
expect(robot).not_to receive(:receive)
|
100
105
|
subject.muc_message(muc)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-hipchat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Cuadra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|