lita-announce 0.1.1 → 0.1.2

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: ac55abc0764323d9b74c961c0cca40f955b2738f
4
- data.tar.gz: 824f6477f77f077d71fe9ed618300e952fc8da75
3
+ metadata.gz: 206c42ac18cd3d9b6db38def21bde0c19bee85e9
4
+ data.tar.gz: d487c6627104152fd059db26614e74bca78a7ec8
5
5
  SHA512:
6
- metadata.gz: ead11ac332deee1543b76d6da11aa5f35918298d412fdfeb8747d700c73f01325fb090dd4d663475cb348493f4101a3c344bdd9df44f9cc38adb6ec9307c0505
7
- data.tar.gz: d36a450cde3408e1d5ea5791a7fc369bddce3f91af7cb757e9f6d01c2acdd627888517bc777f6e18effafedab98de46ccdade0cead986082050cf37be1e0e50d
6
+ metadata.gz: dbcc2771d974348f02627fbd973856542f23763de9807a8bb17185dbef77a7d425aa0d67a82a892258780b62a61619cb8ba00c0e87faefc871e3a4a1adc4be33
7
+ data.tar.gz: 0f0ba6f773b67887f3faba4a9b195639f2579e262382ff017289a29a76f5116e0f0f7ad23a67653140ce3b3b898b9ce96b6627dd2fafdc599247f9396a80daa4
@@ -159,8 +159,9 @@ module Lita
159
159
 
160
160
  def make_announcement_to_channels(payload)
161
161
  payload[:channels].each do |c|
162
- channel = Lita::Source.new(room: Lita::Room.fuzzy_find(c))
163
- robot.send_message(channel, "#{payload[:text]} - #{payload[:author]}")
162
+ room = Lita::Room.fuzzy_find(c)
163
+ robot.join(room)
164
+ robot.send_message(Lita::Source.new(room: room), "#{payload[:text]} - #{payload[:author]}")
164
165
  end
165
166
  end
166
167
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-announce"
3
- spec.version = "0.1.1"
3
+ spec.version = "0.1.2"
4
4
  spec.authors = ["Tom Duffield"]
5
5
  spec.email = ["tom@chef.io"]
6
6
  spec.description = "Lita plugin to make announcements across multiple channels."
@@ -21,4 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "rake"
22
22
  spec.add_development_dependency "rack-test"
23
23
  spec.add_development_dependency "rspec", ">= 3.0.0"
24
+ spec.add_development_dependency "chefstyle", "~> 0.3"
24
25
  end
@@ -135,6 +135,9 @@ describe Lita::Handlers::Announce, lita_handler: true do
135
135
  end
136
136
 
137
137
  it "sends message" do
138
+ payload[:channels].each do |channel|
139
+ expect(robot).to receive(:join).with(Lita::Room.fuzzy_find(channel))
140
+ end
138
141
  send_command(command)
139
142
  expect(replies.length).to eql(payload[:channels].length)
140
143
  expect(replies.last).to eql(expected_message)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-announce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Duffield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-05 00:00:00.000000000 Z
11
+ date: 2016-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 3.0.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: chefstyle
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.3'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.3'
97
111
  description: Lita plugin to make announcements across multiple channels.
98
112
  email:
99
113
  - tom@chef.io