lita-hipchat 1.2.3 → 1.2.4

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: 89e2938eea4a03354a85c293c1384373e6ccab32
4
- data.tar.gz: 2d644e6f4743c2fd47071e9655c2f264bef0e98f
3
+ metadata.gz: b44d85256ad28bcd38f6251bb541befe06e46e1a
4
+ data.tar.gz: d4cbe864f145d04cf8e951f4e5d9926368b78601
5
5
  SHA512:
6
- metadata.gz: 6ca54acaf5c548caa4b97a8d1df9c3a6112f15c56efca24b56a55f63710edc05846511beea69d1f4a076bc9a16758e413a6cd1bca8bcde51c6ebfa40d498e1aa
7
- data.tar.gz: 3f3f44376a876f85bf19a8b984a10e01252e4a876a2790463fa9e64d70d91871c5aa86a5baef9e0c81013f13d25b228fb89ef24cbd2f05b7467d17c5e34b208f
6
+ metadata.gz: 28fd7d98f38987810ffce31d1425fdc443aa3173cfe638bd49f536d8df4a331e85eb1ab1d48984d3cffa2478f7a4cfac6cb7fb77f9da1ef85dd28a1d7dcf0de0
7
+ data.tar.gz: 17113cc66fb7da9a6724ccabc9acefdc465f9a0471129c7ee87cfe7d442493504f60ee3f241cf3277c3aba3f7c05210f17db5b1e710dca94c4cdd23ba1a2f4fa
@@ -35,6 +35,7 @@ module Lita
35
35
 
36
36
  def roster_update
37
37
  roster.add_update_callback do |old_item, item|
38
+ next unless item
38
39
  jid = item.attributes["jid"]
39
40
  Lita.logger.debug("Updating record for user with ID: #{jid}.")
40
41
  create_user(item.attributes)
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.3"
3
+ spec.version = "1.2.4"
4
4
  spec.authors = ["Jimmy Cuadra"]
5
5
  spec.email = ["jimmy@jimmycuadra.com"]
6
6
  spec.description = %q{A HipChat adapter for Lita.}
@@ -14,12 +14,12 @@ Gem::Specification.new do |spec|
14
14
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
15
  spec.require_paths = ["lib"]
16
16
 
17
- spec.add_runtime_dependency "lita", "~> 2.5"
18
- spec.add_runtime_dependency "xmpp4r", "~> 0.5"
17
+ spec.add_runtime_dependency "lita", ">= 2.5"
18
+ spec.add_runtime_dependency "xmpp4r", ">= 0.5"
19
19
 
20
20
  spec.add_development_dependency "bundler", "~> 1.3"
21
21
  spec.add_development_dependency "rake"
22
- spec.add_development_dependency "rspec", "~> 2.14"
22
+ spec.add_development_dependency "rspec", ">= 2.14"
23
23
  spec.add_development_dependency "simplecov"
24
24
  spec.add_development_dependency "coveralls"
25
25
  end
@@ -110,11 +110,8 @@ describe Lita::Adapters::HipChat::Callback, lita: true do
110
110
  end
111
111
 
112
112
  describe "#roster_update" do
113
- before do
114
- allow(roster).to receive(:add_update_callback).and_yield(nil, roster_item)
115
- end
116
-
117
113
  it "finds/creates a user object for the roster item" do
114
+ allow(roster).to receive(:add_update_callback).and_yield(nil, roster_item)
118
115
  expect(Lita::User).to receive(:create).with(
119
116
  "user_id",
120
117
  name: "Carl",
@@ -122,5 +119,10 @@ describe Lita::Adapters::HipChat::Callback, lita: true do
122
119
  )
123
120
  subject.roster_update
124
121
  end
122
+
123
+ it "fails gracefully if the new item is nil" do
124
+ allow(roster).to receive(:add_update_callback).and_yield(nil, nil)
125
+ expect { subject.roster_update }.not_to raise_error
126
+ end
125
127
  end
126
128
  end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-hipchat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
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-12-20 00:00:00.000000000 Z
11
+ date: 2014-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
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
26
  version: '2.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: xmpp4r
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '2.14'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.14'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: coveralls
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: A HipChat adapter for Lita.
@@ -115,8 +115,8 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
- - .gitignore
119
- - .travis.yml
118
+ - ".gitignore"
119
+ - ".travis.yml"
120
120
  - Gemfile
121
121
  - LICENSE
122
122
  - README.md
@@ -142,17 +142,17 @@ require_paths:
142
142
  - lib
143
143
  required_ruby_version: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - '>='
145
+ - - ">="
146
146
  - !ruby/object:Gem::Version
147
147
  version: '0'
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - '>='
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  requirements: []
154
154
  rubyforge_project:
155
- rubygems_version: 2.1.11
155
+ rubygems_version: 2.2.0
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: A HipChat adapter for the Lita chat robot.
@@ -161,3 +161,4 @@ test_files:
161
161
  - spec/lita/adapters/hipchat/connector_spec.rb
162
162
  - spec/lita/adapters/hipchat_spec.rb
163
163
  - spec/spec_helper.rb
164
+ has_rdoc: