meshtastic 0.0.143 → 0.0.145
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/.github/workflows/main.yml +27 -0
- data/.gitignore +29 -0
- data/.rubocop.yml +35 -0
- data/.rubocop_todo.yml +134 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/AUTOGEN_meshtastic_protobufs.sh +28 -0
- data/CHANGELOG_BETWEEN_TAGS.txt +196 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +23 -0
- data/LICENSE +21 -0
- data/README.md +106 -0
- data/Rakefile +21 -0
- data/bin/meshtastic_autoinc_version +38 -0
- data/build_meshtastic_gem.sh +58 -0
- data/git_commit.sh +29 -0
- data/lib/meshtastic/admin.rb +24 -0
- data/lib/meshtastic/admin_pb.rb +31 -0
- data/lib/meshtastic/apponly.rb +24 -0
- data/lib/meshtastic/apponly_pb.rb +18 -0
- data/lib/meshtastic/atak.rb +24 -0
- data/lib/meshtastic/atak_pb.rb +22 -0
- data/lib/meshtastic/cannedmessages.rb +24 -0
- data/lib/meshtastic/cannedmessages_pb.rb +15 -0
- data/lib/meshtastic/channel.rb +24 -0
- data/lib/meshtastic/channel_pb.rb +18 -0
- data/lib/meshtastic/clientonly.rb +24 -0
- data/lib/meshtastic/clientonly_pb.rb +18 -0
- data/lib/meshtastic/config.rb +24 -0
- data/lib/meshtastic/config_pb.rb +42 -0
- data/lib/meshtastic/connection_status.rb +24 -0
- data/lib/meshtastic/connection_status_pb.rb +20 -0
- data/lib/meshtastic/device_ui_pb.rb +23 -0
- data/lib/meshtastic/deviceonly.rb +24 -0
- data/lib/meshtastic/deviceonly_pb.rb +28 -0
- data/lib/meshtastic/interdevice_pb.rb +17 -0
- data/lib/meshtastic/localonly.rb +24 -0
- data/lib/meshtastic/localonly_pb.rb +19 -0
- data/lib/meshtastic/mesh_interface.rb +596 -0
- data/lib/meshtastic/mesh_pb.rb +65 -0
- data/lib/meshtastic/module_config.rb +24 -0
- data/lib/meshtastic/module_config_pb.rb +36 -0
- data/lib/meshtastic/mqtt.rb +383 -0
- data/lib/meshtastic/mqtt_pb.rb +19 -0
- data/lib/meshtastic/paxcount.rb +24 -0
- data/lib/meshtastic/paxcount_pb.rb +15 -0
- data/lib/meshtastic/portnums.rb +24 -0
- data/lib/meshtastic/portnums_pb.rb +15 -0
- data/lib/meshtastic/powermon_pb.rb +18 -0
- data/lib/meshtastic/remote_hardware.rb +24 -0
- data/lib/meshtastic/remote_hardware_pb.rb +16 -0
- data/lib/meshtastic/rtttl.rb +24 -0
- data/lib/meshtastic/rtttl_pb.rb +15 -0
- data/lib/meshtastic/serial_interface.rb +550 -0
- data/lib/meshtastic/storeforward.rb +24 -0
- data/lib/meshtastic/storeforward_pb.rb +19 -0
- data/lib/meshtastic/stream_interface.rb +132 -0
- data/lib/meshtastic/telemetry.rb +24 -0
- data/lib/meshtastic/telemetry_pb.rb +24 -0
- data/lib/meshtastic/util.rb +70 -0
- data/lib/meshtastic/version.rb +5 -0
- data/lib/meshtastic/xmodem.rb +24 -0
- data/lib/meshtastic/xmodem_pb.rb +16 -0
- data/lib/meshtastic.rb +71 -0
- data/lib/nanopb_pb.rb +19 -0
- data/meshtastic.gemspec +73 -0
- data/reinstall_meshtastic_gemset.sh +29 -0
- data/sig/meshtastic.rbs +4 -0
- data/spec/lib/meshtastic/admin_pb_spec.rb +7 -0
- data/spec/lib/meshtastic/admin_spec.rb +6 -0
- data/spec/lib/meshtastic/apponly_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/apponly_spec.rb +6 -0
- data/spec/lib/meshtastic/atak_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/atak_spec.rb +6 -0
- data/spec/lib/meshtastic/cannedmessages_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/cannedmessages_spec.rb +6 -0
- data/spec/lib/meshtastic/channel_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/channel_spec.rb +6 -0
- data/spec/lib/meshtastic/clientonly_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/clientonly_spec.rb +6 -0
- data/spec/lib/meshtastic/config_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/config_spec.rb +6 -0
- data/spec/lib/meshtastic/connection_status_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/connection_status_spec.rb +6 -0
- data/spec/lib/meshtastic/device_ui_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/deviceonly_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/deviceonly_spec.rb +6 -0
- data/spec/lib/meshtastic/interdevice_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/localonly_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/localonly_spec.rb +6 -0
- data/spec/lib/meshtastic/mesh_interface_spec.rb +6 -0
- data/spec/lib/meshtastic/mesh_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/module_config_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/module_config_spec.rb +6 -0
- data/spec/lib/meshtastic/mqtt_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/mqtt_spec.rb +6 -0
- data/spec/lib/meshtastic/paxcount_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/paxcount_spec.rb +6 -0
- data/spec/lib/meshtastic/portnums_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/portnums_spec.rb +6 -0
- data/spec/lib/meshtastic/powermon_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/remote_hardware_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/remote_hardware_spec.rb +6 -0
- data/spec/lib/meshtastic/rtttl_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/rtttl_spec.rb +6 -0
- data/spec/lib/meshtastic/serial_interface_spec.rb +6 -0
- data/spec/lib/meshtastic/storeforward_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/storeforward_spec.rb +6 -0
- data/spec/lib/meshtastic/stream_interface_spec.rb +6 -0
- data/spec/lib/meshtastic/telemetry_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/telemetry_spec.rb +6 -0
- data/spec/lib/meshtastic/util_spec.rb +6 -0
- data/spec/lib/meshtastic/version_spec.rb +17 -0
- data/spec/lib/meshtastic/xmodem_pb_spec.rb +6 -0
- data/spec/lib/meshtastic/xmodem_spec.rb +6 -0
- data/spec/lib/meshtastic_spec.rb +6 -0
- data/spec/lib/nanopb_pb_spec.rb +6 -0
- data/spec/spec_helper.rb +3 -0
- data/upgrade_Gemfile_gems.sh +21 -0
- data/upgrade_gem.sh +4 -0
- data/upgrade_meshtastic.sh +13 -0
- data/upgrade_ruby.sh +45 -0
- metadata +126 -3
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'spec_helper'
|
|
4
|
+
|
|
5
|
+
describe Meshtastic::VERSION do
|
|
6
|
+
it 'is defined' do
|
|
7
|
+
expect(Meshtastic::VERSION).not_to be_nil
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
it 'is a string' do
|
|
11
|
+
expect(Meshtastic::VERSION).to be_a(String)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
it 'matches the expected pattern' do
|
|
15
|
+
expect(Meshtastic::VERSION).to match(/\d+\.\d+\.\d+/)
|
|
16
|
+
end
|
|
17
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/bash --login
|
|
2
|
+
cat Gemfile | awk '{print $2}' | grep -E "^'.+$" | grep -v -e rubygems.org | while read gem; do
|
|
3
|
+
this_gem=`echo $gem | sed "s/'//g" | sed 's/\,//g'`
|
|
4
|
+
latest_version=`gem search -r $this_gem | grep -E "^${this_gem}\s.+$" | awk '{print $2}' | sed 's/(//g' | sed 's/)//g' | sed 's/,//g'`
|
|
5
|
+
echo "${this_gem} => $latest_version"
|
|
6
|
+
os=`uname -s`
|
|
7
|
+
if [[ $os == 'Linux' ]]; then
|
|
8
|
+
case $this_gem in
|
|
9
|
+
'bundler'|'rubocop'|'rubocop-rake'|'rubocop-rspec')
|
|
10
|
+
sed -i "s/^gem '${this_gem}'.*$/gem '${this_gem}', '>=${latest_version}'/g" Gemfile;;
|
|
11
|
+
*)
|
|
12
|
+
sed -i "s/^gem '${this_gem}'.*$/gem '${this_gem}', '${latest_version}'/g" Gemfile;;
|
|
13
|
+
esac
|
|
14
|
+
elif [[ $os == 'Darwin' ]]; then
|
|
15
|
+
if [[ $this_gem == 'bundler' ]]; then
|
|
16
|
+
sed -i '' "s/^gem '${this_gem}'.*$/gem '${this_gem}', '>=${latest_version}'/g" Gemfile
|
|
17
|
+
else
|
|
18
|
+
sed -i '' "s/^gem '${this_gem}'.*$/gem '${this_gem}', '${latest_version}'/g" Gemfile
|
|
19
|
+
fi
|
|
20
|
+
fi
|
|
21
|
+
done
|
data/upgrade_gem.sh
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/bash --login
|
|
2
|
+
if [[ $MESHTASTIC_ROOT == '' ]]; then
|
|
3
|
+
if [[ ! -d '/opt/meshtastic' ]]; then
|
|
4
|
+
mesh_root=$(pwd)
|
|
5
|
+
else
|
|
6
|
+
mesh_root='/opt/meshtastic'
|
|
7
|
+
fi
|
|
8
|
+
else
|
|
9
|
+
mesh_root="${MESHTASTIC_ROOT}"
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
export rvmsudo_secure_path=1
|
|
13
|
+
rvmsudo /bin/bash --login -c "cd ${mesh_root} && ./build_meshtastic_gem.sh"
|
data/upgrade_ruby.sh
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/bin/bash --login
|
|
2
|
+
# USE THIS SCRIPT WHEN UPGRADING RUBY
|
|
3
|
+
if [[ $MESHTASTIC_ROOT == '' ]]; then
|
|
4
|
+
if [[ ! -d '/opt/meshtastic' ]]; then
|
|
5
|
+
meshtastic_root=$(pwd)
|
|
6
|
+
else
|
|
7
|
+
meshtastic_root='/opt/meshtastic'
|
|
8
|
+
fi
|
|
9
|
+
else
|
|
10
|
+
meshtastic_root="${MESHTASTIC_ROOT}"
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
function usage() {
|
|
14
|
+
echo $"Usage: $0 <new ruby version e.g. 2.4.4> <optional bool running from build_meshtastic_gem.sh>"
|
|
15
|
+
exit 1
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if [[ -f '/etc/profile.d/rvm.sh' ]]; then
|
|
19
|
+
source /etc/profile.d/rvm.sh
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
new_ruby_version=$1
|
|
23
|
+
if [[ $2 != '' ]]; then
|
|
24
|
+
old_ruby_version=$2
|
|
25
|
+
else
|
|
26
|
+
old_ruby_version=`cat ${meshtastic_root}/.ruby-version`
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
ruby_gemset=`cat ${meshtastic_root}/.ruby-gemset`
|
|
30
|
+
|
|
31
|
+
if [[ $# < 1 ]]; then
|
|
32
|
+
usage
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# Upgrade RVM
|
|
36
|
+
export rvmsudo_secure_path=1
|
|
37
|
+
rvmsudo rvm get head
|
|
38
|
+
rvm reload
|
|
39
|
+
|
|
40
|
+
# Install New Version of RubyGems & Ruby
|
|
41
|
+
cd $meshtastic_root && ./upgrade_gem.sh
|
|
42
|
+
rvmsudo rvm install ruby-$new_ruby_version
|
|
43
|
+
echo $new_ruby_version > $meshtastic_root/.ruby-version
|
|
44
|
+
|
|
45
|
+
cd $meshtastic_root && rvm use $new_ruby_version@$ruby_gemset && ./build_meshtastic_gem.sh
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: meshtastic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.145
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- 0day Inc.
|
|
@@ -222,10 +222,133 @@ dependencies:
|
|
|
222
222
|
description: https://github.com/0dayinc/meshtastic/README.md
|
|
223
223
|
email:
|
|
224
224
|
- support@0dayinc.com
|
|
225
|
-
executables:
|
|
225
|
+
executables:
|
|
226
|
+
- meshtastic_autoinc_version
|
|
226
227
|
extensions: []
|
|
227
228
|
extra_rdoc_files: []
|
|
228
|
-
files:
|
|
229
|
+
files:
|
|
230
|
+
- ".github/workflows/main.yml"
|
|
231
|
+
- ".gitignore"
|
|
232
|
+
- ".rubocop.yml"
|
|
233
|
+
- ".rubocop_todo.yml"
|
|
234
|
+
- ".ruby-gemset"
|
|
235
|
+
- ".ruby-version"
|
|
236
|
+
- AUTOGEN_meshtastic_protobufs.sh
|
|
237
|
+
- CHANGELOG_BETWEEN_TAGS.txt
|
|
238
|
+
- CODE_OF_CONDUCT.md
|
|
239
|
+
- Gemfile
|
|
240
|
+
- LICENSE
|
|
241
|
+
- README.md
|
|
242
|
+
- Rakefile
|
|
243
|
+
- bin/meshtastic_autoinc_version
|
|
244
|
+
- build_meshtastic_gem.sh
|
|
245
|
+
- git_commit.sh
|
|
246
|
+
- lib/meshtastic.rb
|
|
247
|
+
- lib/meshtastic/admin.rb
|
|
248
|
+
- lib/meshtastic/admin_pb.rb
|
|
249
|
+
- lib/meshtastic/apponly.rb
|
|
250
|
+
- lib/meshtastic/apponly_pb.rb
|
|
251
|
+
- lib/meshtastic/atak.rb
|
|
252
|
+
- lib/meshtastic/atak_pb.rb
|
|
253
|
+
- lib/meshtastic/cannedmessages.rb
|
|
254
|
+
- lib/meshtastic/cannedmessages_pb.rb
|
|
255
|
+
- lib/meshtastic/channel.rb
|
|
256
|
+
- lib/meshtastic/channel_pb.rb
|
|
257
|
+
- lib/meshtastic/clientonly.rb
|
|
258
|
+
- lib/meshtastic/clientonly_pb.rb
|
|
259
|
+
- lib/meshtastic/config.rb
|
|
260
|
+
- lib/meshtastic/config_pb.rb
|
|
261
|
+
- lib/meshtastic/connection_status.rb
|
|
262
|
+
- lib/meshtastic/connection_status_pb.rb
|
|
263
|
+
- lib/meshtastic/device_ui_pb.rb
|
|
264
|
+
- lib/meshtastic/deviceonly.rb
|
|
265
|
+
- lib/meshtastic/deviceonly_pb.rb
|
|
266
|
+
- lib/meshtastic/interdevice_pb.rb
|
|
267
|
+
- lib/meshtastic/localonly.rb
|
|
268
|
+
- lib/meshtastic/localonly_pb.rb
|
|
269
|
+
- lib/meshtastic/mesh_interface.rb
|
|
270
|
+
- lib/meshtastic/mesh_pb.rb
|
|
271
|
+
- lib/meshtastic/module_config.rb
|
|
272
|
+
- lib/meshtastic/module_config_pb.rb
|
|
273
|
+
- lib/meshtastic/mqtt.rb
|
|
274
|
+
- lib/meshtastic/mqtt_pb.rb
|
|
275
|
+
- lib/meshtastic/paxcount.rb
|
|
276
|
+
- lib/meshtastic/paxcount_pb.rb
|
|
277
|
+
- lib/meshtastic/portnums.rb
|
|
278
|
+
- lib/meshtastic/portnums_pb.rb
|
|
279
|
+
- lib/meshtastic/powermon_pb.rb
|
|
280
|
+
- lib/meshtastic/remote_hardware.rb
|
|
281
|
+
- lib/meshtastic/remote_hardware_pb.rb
|
|
282
|
+
- lib/meshtastic/rtttl.rb
|
|
283
|
+
- lib/meshtastic/rtttl_pb.rb
|
|
284
|
+
- lib/meshtastic/serial_interface.rb
|
|
285
|
+
- lib/meshtastic/storeforward.rb
|
|
286
|
+
- lib/meshtastic/storeforward_pb.rb
|
|
287
|
+
- lib/meshtastic/stream_interface.rb
|
|
288
|
+
- lib/meshtastic/telemetry.rb
|
|
289
|
+
- lib/meshtastic/telemetry_pb.rb
|
|
290
|
+
- lib/meshtastic/util.rb
|
|
291
|
+
- lib/meshtastic/version.rb
|
|
292
|
+
- lib/meshtastic/xmodem.rb
|
|
293
|
+
- lib/meshtastic/xmodem_pb.rb
|
|
294
|
+
- lib/nanopb_pb.rb
|
|
295
|
+
- meshtastic.gemspec
|
|
296
|
+
- reinstall_meshtastic_gemset.sh
|
|
297
|
+
- sig/meshtastic.rbs
|
|
298
|
+
- spec/lib/meshtastic/admin_pb_spec.rb
|
|
299
|
+
- spec/lib/meshtastic/admin_spec.rb
|
|
300
|
+
- spec/lib/meshtastic/apponly_pb_spec.rb
|
|
301
|
+
- spec/lib/meshtastic/apponly_spec.rb
|
|
302
|
+
- spec/lib/meshtastic/atak_pb_spec.rb
|
|
303
|
+
- spec/lib/meshtastic/atak_spec.rb
|
|
304
|
+
- spec/lib/meshtastic/cannedmessages_pb_spec.rb
|
|
305
|
+
- spec/lib/meshtastic/cannedmessages_spec.rb
|
|
306
|
+
- spec/lib/meshtastic/channel_pb_spec.rb
|
|
307
|
+
- spec/lib/meshtastic/channel_spec.rb
|
|
308
|
+
- spec/lib/meshtastic/clientonly_pb_spec.rb
|
|
309
|
+
- spec/lib/meshtastic/clientonly_spec.rb
|
|
310
|
+
- spec/lib/meshtastic/config_pb_spec.rb
|
|
311
|
+
- spec/lib/meshtastic/config_spec.rb
|
|
312
|
+
- spec/lib/meshtastic/connection_status_pb_spec.rb
|
|
313
|
+
- spec/lib/meshtastic/connection_status_spec.rb
|
|
314
|
+
- spec/lib/meshtastic/device_ui_pb_spec.rb
|
|
315
|
+
- spec/lib/meshtastic/deviceonly_pb_spec.rb
|
|
316
|
+
- spec/lib/meshtastic/deviceonly_spec.rb
|
|
317
|
+
- spec/lib/meshtastic/interdevice_pb_spec.rb
|
|
318
|
+
- spec/lib/meshtastic/localonly_pb_spec.rb
|
|
319
|
+
- spec/lib/meshtastic/localonly_spec.rb
|
|
320
|
+
- spec/lib/meshtastic/mesh_interface_spec.rb
|
|
321
|
+
- spec/lib/meshtastic/mesh_pb_spec.rb
|
|
322
|
+
- spec/lib/meshtastic/module_config_pb_spec.rb
|
|
323
|
+
- spec/lib/meshtastic/module_config_spec.rb
|
|
324
|
+
- spec/lib/meshtastic/mqtt_pb_spec.rb
|
|
325
|
+
- spec/lib/meshtastic/mqtt_spec.rb
|
|
326
|
+
- spec/lib/meshtastic/paxcount_pb_spec.rb
|
|
327
|
+
- spec/lib/meshtastic/paxcount_spec.rb
|
|
328
|
+
- spec/lib/meshtastic/portnums_pb_spec.rb
|
|
329
|
+
- spec/lib/meshtastic/portnums_spec.rb
|
|
330
|
+
- spec/lib/meshtastic/powermon_pb_spec.rb
|
|
331
|
+
- spec/lib/meshtastic/remote_hardware_pb_spec.rb
|
|
332
|
+
- spec/lib/meshtastic/remote_hardware_spec.rb
|
|
333
|
+
- spec/lib/meshtastic/rtttl_pb_spec.rb
|
|
334
|
+
- spec/lib/meshtastic/rtttl_spec.rb
|
|
335
|
+
- spec/lib/meshtastic/serial_interface_spec.rb
|
|
336
|
+
- spec/lib/meshtastic/storeforward_pb_spec.rb
|
|
337
|
+
- spec/lib/meshtastic/storeforward_spec.rb
|
|
338
|
+
- spec/lib/meshtastic/stream_interface_spec.rb
|
|
339
|
+
- spec/lib/meshtastic/telemetry_pb_spec.rb
|
|
340
|
+
- spec/lib/meshtastic/telemetry_spec.rb
|
|
341
|
+
- spec/lib/meshtastic/util_spec.rb
|
|
342
|
+
- spec/lib/meshtastic/version_spec.rb
|
|
343
|
+
- spec/lib/meshtastic/xmodem_pb_spec.rb
|
|
344
|
+
- spec/lib/meshtastic/xmodem_spec.rb
|
|
345
|
+
- spec/lib/meshtastic_spec.rb
|
|
346
|
+
- spec/lib/nanopb_pb_spec.rb
|
|
347
|
+
- spec/spec_helper.rb
|
|
348
|
+
- upgrade_Gemfile_gems.sh
|
|
349
|
+
- upgrade_gem.sh
|
|
350
|
+
- upgrade_meshtastic.sh
|
|
351
|
+
- upgrade_ruby.sh
|
|
229
352
|
homepage: https://github.com/0dayinc/meshtastic
|
|
230
353
|
licenses:
|
|
231
354
|
- MIT
|