adhearsion-xmpp 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 471aeab4faa7b19b8eaafe5b4b3725da5877a145
4
+ data.tar.gz: f4a596fad4a6eb235168a1513f13f0dce3242d77
5
+ SHA512:
6
+ metadata.gz: 00e18e12c76a4218d2f1cf5c52622e2437e7b8d963b09b9fd4337da1a0de00e45e7c4efa5116c339587c3c13f027c8accb099b99a3f4af6886d8614a716579b2
7
+ data.tar.gz: 6321d090900c706fc2a95f16419e87a9262e7f4f4195077e595c765cc6b87d81e3e49f9c7dfe0727f33bcb162c916ea08df0bcbff68906b10fff1314727d6dd1
@@ -1,9 +1,14 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.2
4
3
  - 1.9.3
5
- - jruby-19mode # JRuby in 1.9 mode
6
- - rbx-19mode # currently in active development, may or may not work for your project
4
+ - 2.0.0
5
+ - 2.1.0
6
+ - jruby
7
+ - rbx-2.1.1
7
8
  - ruby-head
9
+ matrix:
10
+ allow_failures:
11
+ - rvm: ruby-head
12
+ - rvm: rbx-2.1.1
8
13
  notifications:
9
14
  irc: "irc.freenode.org#adhearsion"
@@ -1,3 +1,8 @@
1
+ # develop
2
+
3
+ # v1.0.2
4
+ * Bugfix: Reconnect after connection failures or connections dropping
5
+
1
6
  # v1.0.1
2
7
  * Bugfix: Get everything working in standalone connection mode (not sharing with Punchblock)
3
8
 
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.add_runtime_dependency "adhearsion", "~> 2.0"
22
22
  s.add_runtime_dependency "activesupport", [">= 3.0.10"]
23
23
  s.add_runtime_dependency "i18n", ">= 0.5.0"
24
- s.add_runtime_dependency "blather", ">= 0.5.7"
24
+ s.add_runtime_dependency "blather", "~> 1.0"
25
25
  s.add_runtime_dependency "jruby-openssl" if defined?(JRUBY_VERSION)
26
26
 
27
27
  s.add_development_dependency "rspec", "~> 2.7.0"
@@ -11,16 +11,33 @@ module Adhearsion
11
11
  Blather.logger = logger
12
12
  Blather.default_log_level = :trace if Blather.respond_to? :default_log_level
13
13
  register_default_client_handlers
14
+ @shutting_down = false
14
15
  Adhearsion::Events.after_initialized { connect }
15
- Adhearsion::Events.shutdown { shutdown }
16
+ Adhearsion::Events.shutdown do
17
+ @shutting_down = true
18
+ shutdown
19
+ end
16
20
  end
17
21
 
18
22
  private
19
23
 
20
24
  def connect
21
- logger.info "Connecting to XMPP"
22
25
  Adhearsion::Process.important_threads << Thread.new do
23
- EventMachine.run { client.connect }
26
+ begin
27
+ until @shutting_down
28
+ logger.info "Connecting to XMPP"
29
+ EventMachine.run { client.connect }
30
+ logger.info "XMPP connection closed"
31
+ end
32
+ rescue Blather::Stream::ConnectionFailed
33
+ reconnect_timer = Adhearsion.config.punchblock.reconnect_timer
34
+ logger.error "XMPP connection failed. Retrying connection in #{reconnect_timer}s"
35
+ sleep reconnect_timer
36
+ retry
37
+ rescue => e
38
+ logger.fatal e
39
+ raise
40
+ end
24
41
  end
25
42
  end
26
43
 
@@ -1,5 +1,5 @@
1
1
  module Adhearsion
2
2
  class XMPP
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adhearsion-xmpp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
5
- prerelease:
4
+ version: 1.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Juan de Bravo
@@ -12,102 +11,90 @@ authors:
12
11
  autorequire:
13
12
  bindir: bin
14
13
  cert_chain: []
15
- date: 2012-10-11 00:00:00.000000000 Z
14
+ date: 2015-02-11 00:00:00.000000000 Z
16
15
  dependencies:
17
16
  - !ruby/object:Gem::Dependency
18
17
  name: adhearsion
19
18
  requirement: !ruby/object:Gem::Requirement
20
- none: false
21
19
  requirements:
22
- - - ~>
20
+ - - "~>"
23
21
  - !ruby/object:Gem::Version
24
22
  version: '2.0'
25
23
  type: :runtime
26
24
  prerelease: false
27
25
  version_requirements: !ruby/object:Gem::Requirement
28
- none: false
29
26
  requirements:
30
- - - ~>
27
+ - - "~>"
31
28
  - !ruby/object:Gem::Version
32
29
  version: '2.0'
33
30
  - !ruby/object:Gem::Dependency
34
31
  name: activesupport
35
32
  requirement: !ruby/object:Gem::Requirement
36
- none: false
37
33
  requirements:
38
- - - ! '>='
34
+ - - ">="
39
35
  - !ruby/object:Gem::Version
40
36
  version: 3.0.10
41
37
  type: :runtime
42
38
  prerelease: false
43
39
  version_requirements: !ruby/object:Gem::Requirement
44
- none: false
45
40
  requirements:
46
- - - ! '>='
41
+ - - ">="
47
42
  - !ruby/object:Gem::Version
48
43
  version: 3.0.10
49
44
  - !ruby/object:Gem::Dependency
50
45
  name: i18n
51
46
  requirement: !ruby/object:Gem::Requirement
52
- none: false
53
47
  requirements:
54
- - - ! '>='
48
+ - - ">="
55
49
  - !ruby/object:Gem::Version
56
50
  version: 0.5.0
57
51
  type: :runtime
58
52
  prerelease: false
59
53
  version_requirements: !ruby/object:Gem::Requirement
60
- none: false
61
54
  requirements:
62
- - - ! '>='
55
+ - - ">="
63
56
  - !ruby/object:Gem::Version
64
57
  version: 0.5.0
65
58
  - !ruby/object:Gem::Dependency
66
59
  name: blather
67
60
  requirement: !ruby/object:Gem::Requirement
68
- none: false
69
61
  requirements:
70
- - - ! '>='
62
+ - - "~>"
71
63
  - !ruby/object:Gem::Version
72
- version: 0.5.7
64
+ version: '1.0'
73
65
  type: :runtime
74
66
  prerelease: false
75
67
  version_requirements: !ruby/object:Gem::Requirement
76
- none: false
77
68
  requirements:
78
- - - ! '>='
69
+ - - "~>"
79
70
  - !ruby/object:Gem::Version
80
- version: 0.5.7
71
+ version: '1.0'
81
72
  - !ruby/object:Gem::Dependency
82
73
  name: rspec
83
74
  requirement: !ruby/object:Gem::Requirement
84
- none: false
85
75
  requirements:
86
- - - ~>
76
+ - - "~>"
87
77
  - !ruby/object:Gem::Version
88
78
  version: 2.7.0
89
79
  type: :development
90
80
  prerelease: false
91
81
  version_requirements: !ruby/object:Gem::Requirement
92
- none: false
93
82
  requirements:
94
- - - ~>
83
+ - - "~>"
95
84
  - !ruby/object:Gem::Version
96
85
  version: 2.7.0
97
86
  - !ruby/object:Gem::Dependency
98
87
  name: rake
99
88
  requirement: !ruby/object:Gem::Requirement
100
- none: false
101
89
  requirements:
102
- - - ! '>='
90
+ - - ">="
103
91
  - !ruby/object:Gem::Version
104
92
  version: 0.9.2
105
93
  type: :development
106
94
  prerelease: false
107
95
  version_requirements: !ruby/object:Gem::Requirement
108
- none: false
109
96
  requirements:
110
- - - ! '>='
97
+ - - ">="
111
98
  - !ruby/object:Gem::Version
112
99
  version: 0.9.2
113
100
  description: This gem provides the XMPP plugin to Adhearsion, allowing your Adhearsion
@@ -121,9 +108,9 @@ executables: []
121
108
  extensions: []
122
109
  extra_rdoc_files: []
123
110
  files:
124
- - .gitignore
125
- - .rspec
126
- - .travis.yml
111
+ - ".gitignore"
112
+ - ".rspec"
113
+ - ".travis.yml"
127
114
  - CHANGELOG.md
128
115
  - Gemfile
129
116
  - LICENSE
@@ -140,33 +127,26 @@ files:
140
127
  - spec/spec_helper.rb
141
128
  homepage: https://github.com/adhearsion/adhearsion-xmpp
142
129
  licenses: []
130
+ metadata: {}
143
131
  post_install_message:
144
132
  rdoc_options: []
145
133
  require_paths:
146
134
  - lib
147
135
  required_ruby_version: !ruby/object:Gem::Requirement
148
- none: false
149
136
  requirements:
150
- - - ! '>='
137
+ - - ">="
151
138
  - !ruby/object:Gem::Version
152
139
  version: '0'
153
- segments:
154
- - 0
155
- hash: 844702008144568214
156
140
  required_rubygems_version: !ruby/object:Gem::Requirement
157
- none: false
158
141
  requirements:
159
- - - ! '>='
142
+ - - ">="
160
143
  - !ruby/object:Gem::Version
161
144
  version: '0'
162
- segments:
163
- - 0
164
- hash: 844702008144568214
165
145
  requirements: []
166
146
  rubyforge_project: adhearsion-xmpp
167
- rubygems_version: 1.8.23
147
+ rubygems_version: 2.4.5
168
148
  signing_key:
169
- specification_version: 3
149
+ specification_version: 4
170
150
  summary: Send and receive XMPP messages in your Adhearsion application
171
151
  test_files:
172
152
  - spec/adhearsion/xmpp/plugin_spec.rb