spacebunny 1.1.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d976493baccb198471d6c347132c9ec36ae7f1fb
4
- data.tar.gz: b11161a07bf0cebb5a3b70e3744473d9e2d27e99
3
+ metadata.gz: fbb52de81289a805cfeccc3900c6d984eb32a0e5
4
+ data.tar.gz: aa2e316207767e8c06b6ad780b80013da93f2682
5
5
  SHA512:
6
- metadata.gz: aa5feb176d02abc572c3e512a1add658a92a008a2ae839907519e64b3cc4841bf2b6f470ec80120344471dd6ce1d394eda9d796ba71358b677cbe8b64deb986a
7
- data.tar.gz: 711c085fdc76a04ff44f6ad322ce80303adc14577a2ac4ce67ca53ce11dac3cfec1cba7b8658302d8d1651038b94236ed7a5f07183598f06270b9891703812c5
6
+ metadata.gz: 4a2200ef7c5089d6cfc7591f882d05b26cc31d410afa5b99dd1376ac76a0f82fb89a8d006a097fd9b65f356d960df2b3859e5347ecccb8a767179645b4d0119e
7
+ data.tar.gz: 25c9c4064863a6c6aad1531e9c1841d9b396a33ff5a8db4b0d5d4f1b7ce6aeea6fcf81dbe30b2bf96e5566ed573b8359a9b37161d4fa7983954cf28602de4c5a
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ ## Changes betwen 1.1.0 and 1.2.0
2
+
3
+ **This release includes minor breaking API changes**
4
+
5
+ #### Removed `auto_recover` option
6
+
7
+ This is an API break and if you previously used the option
8
+ now it will be ignored.
9
+ Use instead Bunny's `auto_recover_from_connection_close`
10
+ to obtain the same behaviour.
11
+ Take a look at [Bunny doc](http://rubybunny.info/articles/guides.html) for more details.
@@ -21,7 +21,6 @@ module Spacebunny
21
21
  connection_params[:user] = connection_params.delete :device_id
22
22
  connection_params[:password] = connection_params.delete :secret
23
23
  connection_params[:port] = connection_params.delete(:tls_port) if connection_params[:tls]
24
- connection_params[:recover_from_connection_close] = connection_params.delete :auto_recover
25
24
  connection_params[:log_level] = connection_params.delete(:log_level) || ::Logger::ERROR
26
25
 
27
26
  # Re-create client every time connect is called
@@ -10,7 +10,7 @@ module Spacebunny
10
10
  end
11
11
 
12
12
  class Base
13
- attr_accessor :key, :api_endpoint, :auto_recover, :raise_on_error, :id, :name, :host, :secret, :vhost, :channels
13
+ attr_accessor :key, :api_endpoint, :raise_on_error, :id, :name, :host, :secret, :vhost, :channels
14
14
  attr_reader :log_to, :log_level, :logger, :custom_connection_configs, :auto_connection_configs,
15
15
  :connection_configs, :auto_configs, :tls, :tls_cert, :tls_key, :tls_ca_certificates, :verify_peer
16
16
 
@@ -81,14 +81,6 @@ module Spacebunny
81
81
  logger.warn "on_receive method must be implemented on class responsibile to handle protocol '#{@protocol}'"
82
82
  end
83
83
 
84
- def auto_recover
85
- connection_configs[:auto_recover]
86
- end
87
-
88
- def auto_recover=(auto_recover)
89
- @connection_configs[:auto_recover] = auto_recover
90
- end
91
-
92
84
  def id
93
85
  connection_configs[:device_id]
94
86
  end
@@ -198,7 +190,6 @@ module Spacebunny
198
190
  def extract_custom_connection_configs_from(options)
199
191
  @custom_connection_configs = options
200
192
  # Auto_recover from connection.close by default
201
- @custom_connection_configs[:auto_recover] = @custom_connection_configs.delete(:auto_recover) || true
202
193
  @custom_connection_configs[:host] = @custom_connection_configs.delete :host
203
194
  if @custom_connection_configs[:protocols] && custom_connection_configs[:protocols][@protocol]
204
195
  @custom_connection_configs[:port] = @custom_connection_configs[:protocols][@protocol].delete :port
@@ -21,7 +21,6 @@ module Spacebunny
21
21
  connection_params[:user] = connection_params.delete :client
22
22
  connection_params[:password] = connection_params.delete :secret
23
23
  connection_params[:port] = connection_params.delete(:tls_port) if connection_params[:tls]
24
- connection_params[:recover_from_connection_close] = connection_params.delete :auto_recover
25
24
  connection_params[:log_level] = connection_params.delete(:log_level) || ::Logger::ERROR
26
25
 
27
26
  # Re-create client every time connect is called
@@ -10,7 +10,7 @@ module Spacebunny
10
10
  end
11
11
 
12
12
  class Base
13
- attr_accessor :api_endpoint, :auto_recover, :raise_on_error, :client, :secret, :host, :vhost, :live_streams
13
+ attr_accessor :api_endpoint, :raise_on_error, :client, :secret, :host, :vhost, :live_streams
14
14
  attr_reader :log_to, :log_level, :logger, :custom_connection_configs, :auto_connection_configs,
15
15
  :connection_configs, :auto_configs, :tls, :tls_cert, :tls_key, :tls_ca_certificates, :verify_peer
16
16
 
@@ -80,14 +80,6 @@ module Spacebunny
80
80
  @client && @secret
81
81
  end
82
82
 
83
- def auto_recover
84
- connection_configs[:auto_recover]
85
- end
86
-
87
- def auto_recover=(auto_recover)
88
- @connection_configs[:auto_recover] = auto_recover
89
- end
90
-
91
83
  def host
92
84
  connection_configs[:host]
93
85
  end
@@ -154,7 +146,6 @@ module Spacebunny
154
146
  def extract_custom_connection_configs_from(options)
155
147
  @custom_connection_configs = options
156
148
  # Auto_recover from connection.close by default
157
- @custom_connection_configs[:auto_recover] = @custom_connection_configs.delete(:auto_recover) || true
158
149
  @custom_connection_configs[:host] = @custom_connection_configs.delete :host
159
150
  if @custom_connection_configs[:protocols] && custom_connection_configs[:protocols][@protocol]
160
151
  @custom_connection_configs[:port] = @custom_connection_configs[:protocols][@protocol].delete :port
@@ -1,3 +1,3 @@
1
1
  module Spacebunny
2
- VERSION = '1.1.2'
2
+ VERSION = '1.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spacebunny
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Verlato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-31 00:00:00.000000000 Z
11
+ date: 2016-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -102,6 +102,7 @@ files:
102
102
  - ".gitignore"
103
103
  - ".rspec"
104
104
  - ".travis.yml"
105
+ - CHANGELOG.md
105
106
  - CODE_OF_CONDUCT.md
106
107
  - Gemfile
107
108
  - LICENSE.txt