spacebunny 3.0.0 → 4.0.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
  SHA256:
3
- metadata.gz: 3720220dc494cfc1224664d722058b87641475d427d16e305338f22b2a7ae058
4
- data.tar.gz: 4787744489ab9325e5b48fb73cdd8af4c05a50f2047f91b5525cbe1265ecb6b1
3
+ metadata.gz: f4f6f58b1ec5e40de55045fae413997b01cf9f727c4d66f5fdb5565b25855bb1
4
+ data.tar.gz: 87927520547775181f3401ec030a9ddb98decd848919bac77262112e5be8ecb6
5
5
  SHA512:
6
- metadata.gz: 0df3fec3febdf8da4dfe2dae4acfbd7b8d27e0a376b24f93cfac8a9f21a839fffaca617772a53ae2b5550ad6ef85b9461c00209f757e8102cea397fa0b61b188
7
- data.tar.gz: 9c8ed4c43a18c293ad88e30eea15fda0d302201820419abda64bf100ccd50337c7e89634f3f1e02366cc513e5cff47ecaf3c0240b994ec18bda115109e524a0e
6
+ metadata.gz: 4cf1773d9ee660d7e6ba1a97ed4726740f670a6a1d4dfdc3c3a169b8ef75c575b9a7116323e2a202e64cdb55d3f9e22048949d2230150080e1a61e9c8fdd9f39
7
+ data.tar.gz: 6215c26e31b825453689d2a65af08d58150897f575e9867900bb4dfdf5c4f3bd2466fa0bca2a48f4ef57fa1060f6d9e0f3f0589f127f2d899061d0b62f25bbf3
@@ -13,9 +13,9 @@ device_key = 'your_awesome_device_key'
13
13
 
14
14
  # Let's instantiate a Space Bunny client, providing the device's API key, that's the fastest and simplest method
15
15
  # to create a new client.
16
- # Provide `tls: true` to use instantiate a tls-secured connection
16
+ # Provide `tls: false` to instantiate a NON-tls secured connection
17
17
 
18
- dev = Spacebunny::Device.new device_key, tls: true
18
+ dev = Spacebunny::Device.new device_key, tls: false
19
19
 
20
20
  # An equivalent method for providing the API key is through options: Spacebunny::Device.new(key: key)
21
21
 
@@ -12,9 +12,9 @@ client = 'live_stream_key_client'
12
12
  secret = 'live_stream_key_secret'
13
13
 
14
14
  # Instantiate a Spacebunny::LiveStream (AMQP by default) client, providing the 'client' and 'secret' options.
15
- # Also provide tls: true to establish a tls-encrypted connection
15
+ # Also provide tls: true to establish a NON tls-encrypted connection
16
16
 
17
- live = Spacebunny::LiveStream.new client: client, secret: secret, tls: true
17
+ live = Spacebunny::LiveStream.new client: client, secret: secret, tls: false
18
18
  live.connect
19
19
 
20
20
  live.message_from_cache :live_data, ack: :auto, wait: true do |message|
@@ -20,7 +20,10 @@ module Spacebunny
20
20
  connection_params = connection_configs.dup
21
21
  connection_params[:user] = connection_params.delete :device_id
22
22
  connection_params[:password] = connection_params.delete :secret
23
- connection_params[:port] = connection_params.delete(:tls_port) if connection_params[:tls]
23
+ # Default on a tls connection
24
+ unless connection_params[:tls] == false
25
+ connection_params[:port] = connection_params.delete(:tls_port)
26
+ end
24
27
  connection_params[:log_level] = connection_params.delete(:log_level) || ::Logger::ERROR
25
28
 
26
29
  # Re-create client every time connect is called
@@ -19,7 +19,10 @@ module Spacebunny
19
19
  connection_params = connection_configs.dup
20
20
  connection_params[:user] = connection_params.delete :client
21
21
  connection_params[:password] = connection_params.delete :secret
22
- connection_params[:port] = connection_params.delete(:tls_port) if connection_params[:tls]
22
+ # Default on a tls connection
23
+ unless connection_params[:tls] == false
24
+ connection_params[:port] = connection_params.delete(:tls_port)
25
+ end
23
26
  connection_params[:log_level] = connection_params.delete(:log_level) || ::Logger::ERROR
24
27
 
25
28
  # Re-create client every time connect is called
@@ -1,3 +1,3 @@
1
1
  module Spacebunny
2
- VERSION = '3.0.0'
2
+ VERSION = '4.0.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spacebunny
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Verlato
@@ -101,11 +101,11 @@ files:
101
101
  - bin/setup
102
102
  - examples/device/auto_config_publish.rb
103
103
  - examples/device/manual_config.rb
104
+ - examples/device/non_tls_connection.rb
104
105
  - examples/device/publish_with_confirm.rb
105
106
  - examples/device/receive_messages.rb
106
- - examples/device/tls_connection.rb
107
+ - examples/live_stream/non_tls_connection.rb
107
108
  - examples/live_stream/receive_messages.rb
108
- - examples/live_stream/tls_connection.rb
109
109
  - lib/spacebunny.rb
110
110
  - lib/spacebunny/device/amqp.rb
111
111
  - lib/spacebunny/device/base.rb