meshtastic 0.0.84 → 0.0.85

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: 0ca705bdaa38afd29ea59f35b94ed3ecce1537c7fe935af621a5456e9c1e0777
4
- data.tar.gz: 4d8f65d21679d3cab60133d8743db287491c2358c95c3aeb9b0d8c16682fb0fa
3
+ metadata.gz: 42efdc0a59eb1689c3af8632b8191e6dc8d51b9f77002b55d4d19ca24e4bede3
4
+ data.tar.gz: 922d1701b6c2a21ecae7d722980630af3b811516df17db57e4611367a1576fec
5
5
  SHA512:
6
- metadata.gz: 8e979a1fd886312be86c6073862c7950246b62ccfbd7b219dec29ceb2d9f9c371dbb1b56d7a64ae0f29979a606b1f8f2dc13580254e632dee437677b06b56514
7
- data.tar.gz: ba6aa16e0293e9344676c29f886aecdf54349ccf1b695768b49e75ce8bf435da66eb69d24a1bbcd1f4c81dfd5ecdd52461268665169c68cb83ba9658213f0dc5
6
+ metadata.gz: d9dcb14d2c91bd9f89edef65450b2f2f638efd61a4803ff801753f4d15a153c572f22686ed093c51c4f12d291553a115dbde568398dda46401554383ca0c0e80
7
+ data.tar.gz: a12152be4af332268f73072201b391711ad4762730fae08845f26d3947feea8a63dcb527bfb1c734e64a6ba80a4ea38dec7bc1a2a4b804a9c3e1d3cf09348935
data/Gemfile CHANGED
@@ -14,7 +14,7 @@ gem 'mqtt', '0.6.0'
14
14
  gem 'rake', '13.2.1'
15
15
  gem 'rdoc', '6.11.0'
16
16
  gem 'rspec', '3.13.0'
17
- gem 'rubocop', '>=1.71.0'
17
+ gem 'rubocop', '>=1.71.1'
18
18
  gem 'rubocop-rake', '>=0.6.0'
19
19
  gem 'rubocop-rspec', '>=3.4.0'
20
20
  gem 'rvm', '1.11.3.9'
@@ -19,7 +19,8 @@ module Meshtastic
19
19
  # host: 'optional - mqtt host (default: mqtt.meshtastic.org)',
20
20
  # port: 'optional - mqtt port (defaults: 1883)',
21
21
  # username: 'optional - mqtt username (default: meshdev)',
22
- # password: 'optional - (default: large4cats)'
22
+ # password: 'optional - (default: large4cats)',
23
+ # client_id: 'optional - client ID (default: random 8-byte hex string)'
23
24
  # )
24
25
 
25
26
  public_class_method def self.connect(opts = {})
@@ -28,17 +29,15 @@ module Meshtastic
28
29
  port = opts[:port] ||= 1883
29
30
  username = opts[:username] ||= 'meshdev'
30
31
  password = opts[:password] ||= 'large4cats'
32
+ client_id = opts[:client_id] ||= SecureRandom.random_bytes(8).unpack1('H*')
31
33
 
32
- mqtt_obj = MQTTClient.connect(
34
+ MQTTClient.connect(
33
35
  host: host,
34
36
  port: port,
35
37
  username: username,
36
- password: password
38
+ password: password,
39
+ client_id: client_id
37
40
  )
38
-
39
- mqtt_obj.client_id = SecureRandom.random_bytes(8).unpack1('H*')
40
-
41
- mqtt_obj
42
41
  rescue StandardError => e
43
42
  raise e
44
43
  end
@@ -416,7 +415,8 @@ module Meshtastic
416
415
  host: 'optional - mqtt host (default: mqtt.meshtastic.org)',
417
416
  port: 'optional - mqtt port (defaults: 1883)',
418
417
  username: 'optional - mqtt username (default: meshdev)',
419
- password: 'optional - (default: large4cats)'
418
+ password: 'optional - (default: large4cats)',
419
+ client_id: 'optional - client ID (default: random 8-byte hex string)'
420
420
  )
421
421
 
422
422
  #{self}.subscribe(
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meshtastic
4
- VERSION = '0.0.84'
4
+ VERSION = '0.0.85'
5
5
  end
data/meshtastic.gemspec CHANGED
@@ -64,7 +64,7 @@ Gem::Specification.new do |spec|
64
64
  gem_version
65
65
  )
66
66
  else
67
- spec.add_runtime_dependency(
67
+ spec.add_dependency(
68
68
  gem_name,
69
69
  gem_version
70
70
  )
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meshtastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.84
4
+ version: 0.0.85
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-27 00:00:00.000000000 Z
10
+ date: 2025-01-31 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bundler
@@ -127,14 +127,14 @@ dependencies:
127
127
  requirements:
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
- version: 1.71.0
130
+ version: 1.71.1
131
131
  type: :runtime
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - ">="
136
136
  - !ruby/object:Gem::Version
137
- version: 1.71.0
137
+ version: 1.71.1
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: rubocop-rake
140
140
  requirement: !ruby/object:Gem::Requirement