lita-hipchat 1.2.0 → 1.2.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4eed3e910d81f222410ad82de5d29007b4e0e6c4
|
4
|
+
data.tar.gz: a315dbb5d1c96f41e515d7fabf469f6be9d926e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef43014f345198a15fceb15c92c89a00aa03271be9332ec5464ffd4139b17ef69c050b57620ce1ca15216e97df7d2ae4fde773328d4e5752f15d91866747ccba
|
7
|
+
data.tar.gz: 113d93742c4d158f6adc3823c4e224f3b4032deeae140f34ea5ac2ac3a0056d732396da1fd6f5806486a68258b22dd3645a2d3da391d15465a8884d6989294b4
|
@@ -13,7 +13,7 @@ module Lita
|
|
13
13
|
client.add_message_callback do |m|
|
14
14
|
next if m.type == :error || m.body.nil?
|
15
15
|
user = user_by_jid(m.from)
|
16
|
-
source = Source.new(user)
|
16
|
+
source = Source.new(user: user)
|
17
17
|
message = Message.new(robot, m.body, source)
|
18
18
|
message.command!
|
19
19
|
Lita.logger.debug("Dispatching PM to Lita from #{user.id}.")
|
@@ -24,7 +24,7 @@ module Lita
|
|
24
24
|
def muc_message(muc)
|
25
25
|
muc.on_message do |time, nick, text|
|
26
26
|
user = user_by_name(nick)
|
27
|
-
source = Source.new(user, muc.jid.bare.to_s)
|
27
|
+
source = Source.new(user: user, room: muc.jid.bare.to_s)
|
28
28
|
message = Message.new(robot, text, source)
|
29
29
|
Lita.logger.debug(
|
30
30
|
"Dispatching message to Lita from #{user.id} in MUC #{muc.jid}."
|
data/lita-hipchat.gemspec
CHANGED
@@ -46,7 +46,7 @@ describe Lita::Adapters::HipChat::Callback, lita: true do
|
|
46
46
|
end
|
47
47
|
|
48
48
|
it "sends the message to the robot with the proper source and body" do
|
49
|
-
allow(Lita::Source).to receive(:new).with(user).and_return(source)
|
49
|
+
allow(Lita::Source).to receive(:new).with(user: user).and_return(source)
|
50
50
|
allow(Lita::Message).to receive(:new).with(
|
51
51
|
robot,
|
52
52
|
"foo",
|
@@ -80,8 +80,8 @@ describe Lita::Adapters::HipChat::Callback, lita: true do
|
|
80
80
|
|
81
81
|
it "sends the message to the robot with the proper source and body" do
|
82
82
|
allow(Lita::Source).to receive(:new).with(
|
83
|
-
user,
|
84
|
-
"room_id"
|
83
|
+
user: user,
|
84
|
+
room: "room_id"
|
85
85
|
).and_return(source)
|
86
86
|
allow(Lita::Message).to receive(:new).with(
|
87
87
|
robot,
|
@@ -96,8 +96,8 @@ describe Lita::Adapters::HipChat::Callback, lita: true do
|
|
96
96
|
roster = double("Jabber::Roster::Helper", items: {})
|
97
97
|
allow(muc).to receive(:on_message).and_yield(nil, "Unknown", "foo")
|
98
98
|
allow(Lita::Source).to receive(:new).with(
|
99
|
-
an_instance_of(Lita::User),
|
100
|
-
"room_id"
|
99
|
+
user: an_instance_of(Lita::User),
|
100
|
+
room: "room_id"
|
101
101
|
).and_return(source)
|
102
102
|
allow(Lita::Message).to receive(:new).with(
|
103
103
|
robot,
|
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: 1.2.
|
4
|
+
version: 1.2.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: 2013-10-
|
11
|
+
date: 2013-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|