spacebunny 1.5.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/spacebunny/device/base.rb +0 -1
- data/lib/spacebunny/endpoint_connection.rb +2 -4
- data/lib/spacebunny/live_stream/base.rb +15 -12
- data/lib/spacebunny/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79423177a33673d1ef8d2bdea8a209fe1fbe838213098906face4e1b0c67b412
|
4
|
+
data.tar.gz: 14ee534f9d8b5a599e3fc7d61a8e1060328d2047f06ee4b8a6945858d9b33ee2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5207bc0ce5f25cd8e998908fa71439e1f7d013ecc90f436e123c4a39aa1ebcecb29471acb7109a5d390a0ea1e340ae52058b53b876d1a56155d0d82a3561d378
|
7
|
+
data.tar.gz: 5fedc47a561d2dab28275d1e4348bd0cd986aeb946a177906c3a102c90d62117be55b6c86382070dfe26fefe8e86fb8f75f93839c85682c53793c69d1b370ada
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
## Changes
|
1
|
+
## Changes between 1.5.1 and 2.0.0
|
2
|
+
|
3
|
+
**This release uses the new SpaceBunny API and is incompatible with previous versions**
|
4
|
+
|
5
|
+
|
6
|
+
## Changes between 1.1.0 and 1.2.0
|
2
7
|
|
3
8
|
**This release includes minor breaking API changes**
|
4
9
|
|
@@ -9,14 +9,13 @@ module Spacebunny
|
|
9
9
|
scheme: 'https',
|
10
10
|
host: 'api.spacebunny.io',
|
11
11
|
port: 443,
|
12
|
-
api_version: '/v1',
|
13
12
|
configs_path: {
|
14
13
|
device: '/device_configurations',
|
15
14
|
live_stream: '/live_stream_key_configurations'
|
16
15
|
}
|
17
16
|
}.freeze
|
18
17
|
|
19
|
-
attr_accessor :scheme, :host, :port, :
|
18
|
+
attr_accessor :scheme, :host, :port, :configs_path
|
20
19
|
attr_reader :logger
|
21
20
|
|
22
21
|
def initialize(options = {})
|
@@ -33,7 +32,6 @@ module Spacebunny
|
|
33
32
|
@scheme = options[:scheme]
|
34
33
|
@host = options[:host]
|
35
34
|
@port = options[:port]
|
36
|
-
@api_version = options[:api_version]
|
37
35
|
@configs_path = options[:configs_path]
|
38
36
|
@logger = options.fetch :logger
|
39
37
|
end
|
@@ -66,7 +64,7 @@ module Spacebunny
|
|
66
64
|
URI::HTTPS
|
67
65
|
end
|
68
66
|
|
69
|
-
unless uri = uri_builder.build(host: host, port: port, path: "#{
|
67
|
+
unless uri = uri_builder.build(host: host, port: port, path: "#{configs_path}")
|
70
68
|
raise SchemeNotValid.new(scheme)
|
71
69
|
end
|
72
70
|
|
@@ -29,7 +29,7 @@ module Spacebunny
|
|
29
29
|
@log_level = options[:log_level] || ::Logger::ERROR
|
30
30
|
@logger = options[:logger] || build_logger
|
31
31
|
|
32
|
-
|
32
|
+
extract_and_normalize_custom_connection_configs_from options
|
33
33
|
set_live_streams options[:live_streams]
|
34
34
|
end
|
35
35
|
|
@@ -73,7 +73,7 @@ module Spacebunny
|
|
73
73
|
unless options.is_a? Hash
|
74
74
|
raise ArgumentError, 'connection_options must be an Hash. See doc for further info'
|
75
75
|
end
|
76
|
-
|
76
|
+
extract_and_normalize_custom_connection_configs_from options.with_indifferent_access
|
77
77
|
end
|
78
78
|
|
79
79
|
def disconnect
|
@@ -152,18 +152,21 @@ module Spacebunny
|
|
152
152
|
end
|
153
153
|
|
154
154
|
# @private
|
155
|
-
def
|
155
|
+
def extract_and_normalize_custom_connection_configs_from(options)
|
156
156
|
@custom_connection_configs = options
|
157
|
-
|
158
|
-
@custom_connection_configs[:host] = @custom_connection_configs.delete :host
|
159
|
-
if @custom_connection_configs[:protocols] && custom_connection_configs[:protocols][@protocol]
|
160
|
-
@custom_connection_configs[:port] = @custom_connection_configs[:protocols][@protocol].delete :port
|
161
|
-
@custom_connection_configs[:tls_port] = @custom_connection_configs[:protocols][@protocol].delete :tls_port
|
162
|
-
end
|
163
|
-
@custom_connection_configs[:vhost] = @custom_connection_configs.delete :vhost
|
164
|
-
@custom_connection_configs[:client] = @custom_connection_configs.delete :client
|
165
|
-
@custom_connection_configs[:secret] = @custom_connection_configs.delete :secret
|
157
|
+
|
166
158
|
@custom_connection_configs[:logger] = @custom_connection_configs.delete(:logger) || @logger
|
159
|
+
|
160
|
+
if conn_options = @custom_connection_configs[:connection]
|
161
|
+
@custom_connection_configs[:host] = conn_options.delete :host
|
162
|
+
if conn_options[:protocols] && conn_options[:protocols][@protocol]
|
163
|
+
@custom_connection_configs[:port] = conn_options[:protocols][@protocol].delete :port
|
164
|
+
@custom_connection_configs[:tls_port] = conn_options[:protocols][@protocol].delete :tls_port
|
165
|
+
end
|
166
|
+
@custom_connection_configs[:vhost] = conn_options.delete :vhost
|
167
|
+
@custom_connection_configs[:client] = conn_options.delete :client
|
168
|
+
@custom_connection_configs[:secret] = conn_options.delete :secret
|
169
|
+
end
|
167
170
|
end
|
168
171
|
|
169
172
|
# @private
|
data/lib/spacebunny/version.rb
CHANGED
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:
|
4
|
+
version: 2.0.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: 2018-
|
11
|
+
date: 2018-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|