spacebunny 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/device/{tls_connection.rb → non_tls_connection.rb} +2 -2
- data/examples/live_stream/{tls_connection.rb → non_tls_connection.rb} +2 -2
- data/lib/spacebunny/device/amqp.rb +4 -1
- data/lib/spacebunny/live_stream/amqp.rb +4 -1
- data/lib/spacebunny/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4f6f58b1ec5e40de55045fae413997b01cf9f727c4d66f5fdb5565b25855bb1
|
4
|
+
data.tar.gz: 87927520547775181f3401ec030a9ddb98decd848919bac77262112e5be8ecb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
16
|
+
# Provide `tls: false` to instantiate a NON-tls secured connection
|
17
17
|
|
18
|
-
dev = Spacebunny::Device.new device_key, tls:
|
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:
|
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
|
-
|
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
|
-
|
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
|
data/lib/spacebunny/version.rb
CHANGED
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:
|
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/
|
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
|