lita-hipchat 1.0.1 → 1.2.0

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: e46baadbd74d9736fff4fc3b2e6818368ee0c3f7
4
- data.tar.gz: 11c4b886551405419725a94a4dbe6a02bf0be1a4
3
+ metadata.gz: 5359432074e730947e19767a46a7ee4bc07f706e
4
+ data.tar.gz: b3860ce91576690561851f3f002877b591eaaaf0
5
5
  SHA512:
6
- metadata.gz: aedf688fccc504e8d5706c3a85e9a0977f261af1a037ca72fa7cef9c50304a280f5d33e8787f3ec14d755b291338274afc9eb008e9b179c5f8ef5d5e7406bc5b
7
- data.tar.gz: 35e3caa0ddce480ef049d6f23238704a8b364d0b8b85c9d1d678a876c85bdd4b12a2cd5344fb22bb82edd5e51e848e5c6f52013f512a91d49e6fb8a7b26b2f5d
6
+ metadata.gz: 4af69cf1696bbe6e5767bc94968d8486d76a25cfcaf474b684c71e8bc4be6f25665931e049cccd12ea29a0f407893ded539160cef92d6896c2666f3f81b04e90
7
+ data.tar.gz: 60696a7a940405ee36b17df115d23fef3379eb2db4b6732fe668c7362212bfa48ab7a3aa41b8bff0bd91e6fc8e205d6fcdc87ea02dcd9bad5fc9dc9a9f77d3b8
data/.travis.yml CHANGED
@@ -4,3 +4,7 @@ rvm:
4
4
  script: bundle exec rspec
5
5
  before_install:
6
6
  - gem update --system
7
+ notifications:
8
+ webhooks:
9
+ urls:
10
+ - https://lita-freenode.herokuapp.com/travis
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2013 Jimmy Cuadra
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # lita-hipchat
2
2
 
3
- [![Build Status](https://travis-ci.org/jimmycuadra/lita-hipchat.png)](https://travis-ci.org/jimmycuadra/lita-hipchat)
3
+ [![Build Status](https://travis-ci.org/jimmycuadra/lita-hipchat.png?branch=master)](https://travis-ci.org/jimmycuadra/lita-hipchat)
4
4
  [![Code Climate](https://codeclimate.com/github/jimmycuadra/lita-hipchat.png)](https://codeclimate.com/github/jimmycuadra/lita-hipchat)
5
5
  [![Coverage Status](https://coveralls.io/repos/jimmycuadra/lita-hipchat/badge.png)](https://coveralls.io/r/jimmycuadra/lita-hipchat)
6
6
 
@@ -47,6 +47,10 @@ Lita.configure do |config|
47
47
  end
48
48
  ```
49
49
 
50
+ ## Events
51
+
52
+ The HipChat adapter will trigger the `:connected` and `:disconnected` events when the robot has connected and disconnected from HipChat, respectively. There is no payload data for either event.
53
+
50
54
  ## License
51
55
 
52
56
  [MIT](http://opensource.org/licenses/MIT)
@@ -23,6 +23,7 @@ module Lita
23
23
 
24
24
  def run
25
25
  connector.connect
26
+ robot.trigger(:connected)
26
27
  connector.join_rooms(config.muc_domain, rooms)
27
28
  sleep
28
29
  rescue Interrupt
@@ -43,6 +44,7 @@ module Lita
43
44
 
44
45
  def shut_down
45
46
  connector.shut_down
47
+ robot.trigger(:disconnected)
46
48
  end
47
49
 
48
50
  private
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.0.1"
3
+ spec.version = "1.2.0"
4
4
  spec.authors = ["Jimmy Cuadra"]
5
5
  spec.email = ["jimmy@jimmycuadra.com"]
6
6
  spec.description = %q{A HipChat adapter for Lita.}
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
14
14
  spec.require_paths = ["lib"]
15
15
 
16
- spec.add_runtime_dependency "lita", "~> 2.0"
16
+ spec.add_runtime_dependency "lita", "~> 2.5"
17
17
  spec.add_runtime_dependency "xmpp4r", "~> 0.5"
18
18
 
19
19
  spec.add_development_dependency "bundler", "~> 1.3"
@@ -30,12 +30,14 @@ describe Lita::Adapters::HipChat do
30
30
  describe "#run" do
31
31
  before do
32
32
  allow(subject.connector).to receive(:connect)
33
+ allow(robot).to receive(:trigger)
33
34
  allow(subject.connector).to receive(:join_rooms)
34
35
  allow(subject).to receive(:sleep)
35
36
  end
36
37
 
37
38
  it "connects to HipChat" do
38
39
  expect(subject.connector).to receive(:connect)
40
+ expect(robot).to receive(:trigger).with(:connected)
39
41
  subject.run
40
42
  end
41
43
 
@@ -115,6 +117,7 @@ describe Lita::Adapters::HipChat do
115
117
  describe "#shut_down" do
116
118
  it "shuts down the connector" do
117
119
  expect(subject.connector).to receive(:shut_down)
120
+ expect(robot).to receive(:trigger).with(:disconnected)
118
121
  subject.shut_down
119
122
  end
120
123
  end
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.0.1
4
+ version: 1.2.0
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-07-10 00:00:00.000000000 Z
11
+ date: 2013-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '2.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '2.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: xmpp4r
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -118,6 +118,7 @@ files:
118
118
  - .gitignore
119
119
  - .travis.yml
120
120
  - Gemfile
121
+ - LICENSE
121
122
  - README.md
122
123
  - Rakefile
123
124
  - lib/lita-hipchat.rb
@@ -150,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
151
  version: '0'
151
152
  requirements: []
152
153
  rubyforge_project:
153
- rubygems_version: 2.0.3
154
+ rubygems_version: 2.1.3
154
155
  signing_key:
155
156
  specification_version: 4
156
157
  summary: A HipChat adapter for the Lita chat robot.