social_stream-presence 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: e6845ce9b424018556c6894449bade3f5d8473fd
4
- data.tar.gz: c92e7f1b38c05f915c5171c315b20ee2da6bed34
3
+ metadata.gz: 13ad408bac45526a12e65a09c2e9b666b3ffbb87
4
+ data.tar.gz: 507d7982d358d7f81f8f8daee14d546d2eb82c53
5
5
  SHA512:
6
- metadata.gz: 1d7c925e67a5453e17748b758b037e98c2b29de4c1174ded76202b4366c98775156f19f713dad6b66b0858396bdbaac7fa2796de6fda279e84127d93af20e3cb
7
- data.tar.gz: c3e7c04e352dc3865a817b5dbc95f7c91aea398c053721dddf6fc7100d131425ffc88ac691bbe037a791d165f1f2d75214376e315ec7466792815bfa57fe47b5
6
+ metadata.gz: 7fa8947940e13096a37b6c9ae0506e3ca3455e1bb896c04366a7439a8925c4bafb6c1c52c5c407178aaf06eb8025cd83938f6a8aef89f14883e8d6dac98f4949
7
+ data.tar.gz: 1b429e39739c10859bd300a91778f9b62a2d9e8b98b7d99f09481da85394ea4fd2469daa6089d9382bbbc220021b63650dc18c028b0db6bdd3e6a2dcc3f5e26b
@@ -56,22 +56,20 @@ def auth(username,domain,password)
56
56
  begin
57
57
  response = RestClient.post accessByPasswordUrl, :user => { :email => username , :password => password }
58
58
 
59
- if response.code == 201
60
- return true
61
- else
62
- return false
63
- end
64
-
59
+ return response.code == 201
60
+
65
61
  rescue => e
66
-
67
- unless e.class.name == "RestClient::Unauthorized" and e.message == "401 Unauthorized"
68
- $logger.error "#{Process.pid}: Exception in auth(username, password)"
69
- $logger.error "#{Process.pid}: #{e.class.name}: #{e.message}"
62
+ if e.class.name == "RestClient::Found" &&
63
+ e.http_code == 302 &&
64
+ e.http_body =~ /home/
65
+ return true
70
66
  end
71
67
 
68
+ $logger.error "#{Process.pid}: Exception in auth(username, password)"
69
+ $logger.error "#{Process.pid}: #{e.class.name}: #{e.message}"
70
+
72
71
  return false
73
72
  end
74
-
75
73
  end
76
74
 
77
75
 
@@ -1,5 +1,5 @@
1
1
  module SocialStream
2
2
  module Presence
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  # Gem dependencies
22
- s.add_runtime_dependency('social_stream-base', '~> 2.0.0')
22
+ s.add_runtime_dependency('social_stream-base', '~> 2.0.2')
23
23
 
24
24
  s.add_runtime_dependency "xmpp4r"
25
25
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_stream-presence
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
  - Aldo Gordillo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-17 00:00:00.000000000 Z
12
+ date: 2013-05-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: social_stream-base
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
- version: 2.0.0
20
+ version: 2.0.2
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- version: 2.0.0
27
+ version: 2.0.2
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: xmpp4r
30
30
  requirement: !ruby/object:Gem::Requirement