dji_mqtt_connect 0.1.7 → 0.1.8

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: 582b7c6a4036b0190421f3d2fd80ab8f6428cfabb7c5b7eda8f2240e95e1788d
4
- data.tar.gz: 3e831322588f0ef27d278b1463c8a87ee07f4eb3e982ec7367d61a7cfb4ed051
3
+ metadata.gz: a011ad0cc1d0fa6ac5a2a46ca0b2189d019021689b4b28aba9487a7dfd5b0b04
4
+ data.tar.gz: 4e963910473c5cba3ef2052c6cfc1b1d0c1f4e4a5053a10981f67ee52b925068
5
5
  SHA512:
6
- metadata.gz: 423e217b569b6272a228a841afc88e34aede3f56407dd10a79277fa893386da326220c8233042d05a7810b28d1152b982777e0874f9003632c1d52f1f61fd872
7
- data.tar.gz: c8a5308a2da2825d196efe9d34a7f67a1d1df6482f4a3d3a9a755b276dbe65f0eb70d2634eeaeba2c8c56e5928c105f377d9bb6a49e9bfd8e52e266019b0162f
6
+ metadata.gz: 92607be71eb3fa9ae96075a1f1a95ec0badea279ca788be9f9b6ad3a032837026a75cae52e9a80174f117e4cccd06d4dddaaf9a11a1a643d7062ad9426c25cf4
7
+ data.tar.gz: 1ddc4e521211e8e226fcf1987dad023dcb425e00337f4c4c181eb9cd216215ba370a210667d5256f1943e5f0b7cf27af05c9932222dd1715999429527055341d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dji_mqtt_connect (0.1.7)
4
+ dji_mqtt_connect (0.1.8)
5
5
  activesupport (>= 6.0, <= 8)
6
6
  dry-struct (~> 1.6)
7
7
  dry-transformer (~> 1.0)
@@ -6,7 +6,7 @@ module DjiMqttConnect
6
6
  # Client for communicating with DJI Cloud API MQTT Messages
7
7
  # see: https://developer.dji.com/doc/cloud-api-tutorial/en/server-api-reference/mqtt/topic-definition.html
8
8
  class Client
9
- def self.build(mqtt_address, username:, password:, &block)
9
+ def self.build(mqtt_address, username:, password:, client_name: DjiMqttConnect.client_name, &block)
10
10
  mqtt_url = URI.parse(mqtt_address)
11
11
  mqtt_host = mqtt_url.host
12
12
  mqtt_port = mqtt_url.port.to_i
@@ -18,7 +18,7 @@ module DjiMqttConnect
18
18
  mqtt_client = MQTT::Client.connect(
19
19
  host: mqtt_host,
20
20
  port: mqtt_port,
21
- client_id: DjiMqttConnect.client_id,
21
+ client_id: MQTT::Client.generate_client_id(client_name),
22
22
  username: username,
23
23
  password: password,
24
24
  ssl: !%w[tcp mqtt ws].include?(mqtt_scheme)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DjiMqttConnect
4
- VERSION = "0.1.7"
4
+ VERSION = "0.1.8"
5
5
  end
@@ -92,7 +92,7 @@ module DjiMqttConnect
92
92
  autoload :MessageSerializer, "dji_mqtt_connect/railties/message_serializer"
93
93
  end
94
94
 
95
- cattr_accessor :client_id, default: MQTT::Client.generate_client_id(name)
95
+ cattr_accessor :client_name, default: name
96
96
  cattr_accessor :logger, default: ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new($stdout)).tap { |logger| logger.level = Logger::INFO }
97
97
  end
98
98
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dji_mqtt_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sphere Drones