lita-hipchat 1.2.0 → 1.2.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: 5359432074e730947e19767a46a7ee4bc07f706e
4
- data.tar.gz: b3860ce91576690561851f3f002877b591eaaaf0
3
+ metadata.gz: 4eed3e910d81f222410ad82de5d29007b4e0e6c4
4
+ data.tar.gz: a315dbb5d1c96f41e515d7fabf469f6be9d926e8
5
5
  SHA512:
6
- metadata.gz: 4af69cf1696bbe6e5767bc94968d8486d76a25cfcaf474b684c71e8bc4be6f25665931e049cccd12ea29a0f407893ded539160cef92d6896c2666f3f81b04e90
7
- data.tar.gz: 60696a7a940405ee36b17df115d23fef3379eb2db4b6732fe668c7362212bfa48ab7a3aa41b8bff0bd91e6fc8e205d6fcdc87ea02dcd9bad5fc9dc9a9f77d3b8
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-hipchat"
3
- spec.version = "1.2.0"
3
+ spec.version = "1.2.1"
4
4
  spec.authors = ["Jimmy Cuadra"]
5
5
  spec.email = ["jimmy@jimmycuadra.com"]
6
6
  spec.description = %q{A HipChat adapter for Lita.}
@@ -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.0
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-05 00:00:00.000000000 Z
11
+ date: 2013-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita