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: 06b49ea9905f7fa01abf8fc5ea4ac12b3ee8534a
4
- data.tar.gz: 743d1bb267b79febabd7f2dd224c45d9ba96b2fa
3
+ metadata.gz: e12641b30c087c18ee3b25a1b4157f740f010de6
4
+ data.tar.gz: 8eb8b306212cfcd1a42ea2234de06956c2d38639
5
5
  SHA512:
6
- metadata.gz: deb61b39730229d24905c17aee14d1fa98046ed14d90fdb949ba625f7632e2e796eb4e90313a50aa5c40bee01ee8adaecb9e668cf5626ce1fcc514d5513c1ef8
7
- data.tar.gz: ded6e57e89e1dea9a5d2bf323b5df42db99f4fef4602cf23af637c9392ffe445773fab8b1c6d453647d7cc9df0995e2c5c195835577f54fbee4f255e700114cd
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 !Lita.config.adapter.ignore_unknown_users
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-hipchat"
3
- spec.version = "2.0.0"
3
+ spec.version = "2.0.1"
4
4
  spec.authors = ["Jimmy Cuadra"]
5
5
  spec.email = ["jimmy@jimmycuadra.com"]
6
6
  spec.description = %q{A HipChat adapter for Lita.}
@@ -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
- let(:robot) { instance_double("Lita::Robot") }
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
- Lita.config.adapter.ignore_unknown_users = true
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.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-10-23 00:00:00.000000000 Z
11
+ date: 2014-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita