mqtt-core 0.9.0.rc1 → 0.9.0.rc2
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 +4 -4
- data/lib/mqtt/core/client/socket_factory.rb +5 -4
- data/lib/mqtt/options.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f64d8eb9211bd643c7e6fc5138e10d9dd1d1929a77740c7bbedf6cab765f2fa
|
|
4
|
+
data.tar.gz: cc8aa2d9639c183ecdcf587029660767f866694aa8356a2f0091966ffbf1876e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b9d112d6addf9a7bf0dcea57f38a5871653ace7a4ea513fc4f8382015a6eabc6adb8f99004319ff960f31e7e80b7d71a75c564ec783ddc5ee518d6d5a004bf3
|
|
7
|
+
data.tar.gz: 3318aa5053c256e9ab04c9cac44edc05cfd1c76438dfff5cc01d044612ca9c77d5a4c15c3bec5767cfcb7d7404e4658a86f0acf9cf4697f122c2635ba519a891
|
|
@@ -101,7 +101,6 @@ module MQTT
|
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
# @!visibility private
|
|
104
|
-
# rubocop:disable Metrics/AbcSize
|
|
105
104
|
def initialize(*io_args, ignore_uri_params: false, **opts)
|
|
106
105
|
extract_io_args(io_args, opts)
|
|
107
106
|
|
|
@@ -112,7 +111,7 @@ module MQTT
|
|
|
112
111
|
|
|
113
112
|
@uri.require_deps
|
|
114
113
|
|
|
115
|
-
|
|
114
|
+
merge_uri_params!(opts) unless ignore_uri_params
|
|
116
115
|
@uri.query = nil
|
|
117
116
|
|
|
118
117
|
@io_opts = slice_opts!(opts, :connect_timeout, :resolv_timeout, :tcp_nodelay) do |k, v|
|
|
@@ -125,8 +124,6 @@ module MQTT
|
|
|
125
124
|
# Remaining unused opts
|
|
126
125
|
@query_params = opts.freeze
|
|
127
126
|
end
|
|
128
|
-
# rubocop:enable Metrics/AbcSize
|
|
129
|
-
|
|
130
127
|
# @return [URI] The URI that will be used for the next connection.
|
|
131
128
|
attr_reader :uri
|
|
132
129
|
alias sanitized_uri uri
|
|
@@ -153,6 +150,10 @@ module MQTT
|
|
|
153
150
|
|
|
154
151
|
private
|
|
155
152
|
|
|
153
|
+
def merge_uri_params!(opts)
|
|
154
|
+
opts.merge!(URI.decode_www_form(@uri.query || '').to_h { |k, v| [k.to_sym, v == '' ? true : v] })
|
|
155
|
+
end
|
|
156
|
+
|
|
156
157
|
def default_scheme(io_params)
|
|
157
158
|
return io_params.delete(:scheme) if io_params.key?(:scheme)
|
|
158
159
|
|
data/lib/mqtt/options.rb
CHANGED
|
@@ -17,8 +17,8 @@ module MQTT
|
|
|
17
17
|
s = opts.slice(*keys)
|
|
18
18
|
opts.replace(opts.except(*keys)) if keys.any?
|
|
19
19
|
|
|
20
|
-
opts.delete_if { |k, v| k.start_with?(prefix) && (s[k.to_s.delete_prefix(prefix).to_sym] = v
|
|
21
|
-
opts.delete_if { |k, v| (m = pattern.match(k)) && (s[m[1].to_sym] = v
|
|
20
|
+
opts.delete_if { |k, v| k.start_with?(prefix) && (s[k.to_s.delete_prefix(prefix).to_sym] = v) } if prefix
|
|
21
|
+
opts.delete_if { |k, v| (m = pattern.match(k)) && (s[m[1].to_sym] = v) } if pattern
|
|
22
22
|
|
|
23
23
|
return s unless block_given?
|
|
24
24
|
|