xrc 0.1.5 → 0.1.6

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: d1c9b3c231ceb3468d44f981be594134f0a509c8
4
- data.tar.gz: 2ae97cce486e72023042776436db68ca75bcf967
3
+ metadata.gz: 03c7cdf9af0ea3c1656b9fac27ec0c89895b639d
4
+ data.tar.gz: f6f8f5a4f14f8ad0083d193fad3de3c15a2216c9
5
5
  SHA512:
6
- metadata.gz: 21aad4771710dd78c09f4473a00dbb4ce781c2a601855c40f87ed00a05a0a524f7a5043536ea0285a5189e8a7db4884b8bbffe53f843103c23c21e55125229c3
7
- data.tar.gz: 8ea39b028a96bc0e149023844aefe9e4e27559929e1d61fb2c735c3fb52c240d9fea108eb7f64632aca170efb4060cf30315e5112055ad94694653e69440a58d
6
+ metadata.gz: fc865872afce611ebbac83ec5831890f24f099ae496979de492279dd089aac872fcdfde4e837110823d3d3a18f40e74cb66c47513b0ea339361b76fc2b4f84f0
7
+ data.tar.gz: e9c7e9693492bf4f907a57d004f993b5473982b86a22bd72435edcfb38831bb234ad5168e04cd28a2255fa5b24ea9d479beadf9743d593d6037c2fc08933dd86
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.1.6
2
+ * Ignore text node in feature element
3
+ * Provide custom error for authentication failure
4
+
1
5
  ## 0.1.5
2
6
  * Supress control characters in given message (Thx @masutaka)
3
7
 
data/lib/xrc/client.rb CHANGED
@@ -246,6 +246,7 @@ module Xrc
246
246
  def on_features_received(element)
247
247
  element.each do |feature|
248
248
  case
249
+ when feature.is_a?(REXML::Text)
249
250
  when feature.name == "bind" && feature.namespace == Namespaces::BIND
250
251
  bind
251
252
  when feature.name == "starttls" && feature.namespace == Namespaces::TLS
@@ -264,7 +265,7 @@ module Xrc
264
265
  end
265
266
 
266
267
  def on_authentication_failed(element)
267
- raise NotImplementedError
268
+ raise AuthenticationFailureError, "Received an authentication failure response from XMPP server"
268
269
  end
269
270
 
270
271
  def on_tls_proceeded(element)
data/lib/xrc/errors.rb ADDED
@@ -0,0 +1,9 @@
1
+ module Xrc
2
+ module Errors
3
+ class Base < StandardError
4
+ end
5
+
6
+ class AuthenticationFailureError < Base
7
+ end
8
+ end
9
+ end
data/lib/xrc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xrc
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xrc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-23 00:00:00.000000000 Z
11
+ date: 2015-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -108,6 +108,7 @@ files:
108
108
  - lib/xrc/elements/session.rb
109
109
  - lib/xrc/elements/starttls.rb
110
110
  - lib/xrc/elements/stream.rb
111
+ - lib/xrc/errors.rb
111
112
  - lib/xrc/hosts_resolver.rb
112
113
  - lib/xrc/jid.rb
113
114
  - lib/xrc/message_builder.rb