enfcli 3.10.3.pre.alpha → 3.10.4.pre.alpha
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/Gemfile.lock +1 -1
- data/lib/enfcli/commands/captive.rb +9 -20
- data/lib/enfcli/version.rb +1 -1
- 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: '060840337e5587c05f399f72499547dd919e344b560d7f8bf16027c067b9f9a9'
|
4
|
+
data.tar.gz: 5cecd80db91bd74922f05aba5ce31124a7aa06d0fc49888ca7416a99d8345e47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8a7b06fff19daebe9463a2b808c76d3227605b1180a31db5b407beaf9bffc590997de86f80052e6aaf9198132d81f8cb96068a44a2ae4489389426c38f82acc
|
7
|
+
data.tar.gz: cb1c049b79375bb3a90bf94edf53fad34c9bcee1d2313c7ad010d2307ed7d55198cd1804d791d19cdac20e46035e4f32b3708ac1862fb2118588bc63f861511d
|
data/Gemfile.lock
CHANGED
@@ -455,13 +455,11 @@ module EnfCli
|
|
455
455
|
# device_data is a hash matching the json structure
|
456
456
|
#
|
457
457
|
def display_device(device_data)
|
458
|
-
name = device_data[:device_name]
|
458
|
+
name = device_data[:device_name] || "\n"
|
459
459
|
ctl_addr = device_data[:control_address]
|
460
|
-
dev_addr = device_data[:device_address]
|
461
|
-
dev_addr = "\n" unless dev_addr
|
460
|
+
dev_addr = device_data[:device_address] || "\n"
|
462
461
|
mac_addrs = device_data[:mac_address]
|
463
|
-
firmware = device_data[:firmware_version]
|
464
|
-
firmware = '< not available >' unless firmware
|
462
|
+
firmware = device_data[:firmware_version] || '< not available >'
|
465
463
|
profile = device_data[:profile]
|
466
464
|
status = device_data[:status]
|
467
465
|
|
@@ -501,8 +499,7 @@ module EnfCli
|
|
501
499
|
say " Router Mode : #{mode}"
|
502
500
|
|
503
501
|
if wifi
|
504
|
-
connected = wifi[:connected]
|
505
|
-
connected = " < unknown >" unless connected
|
502
|
+
connected = wifi[:connected] || " < unknown >"
|
506
503
|
ssid = wifi[:SSID]
|
507
504
|
say " wifi connected: #{connected}"
|
508
505
|
say " SSID : #{ssid}" if ssid
|
@@ -523,11 +520,9 @@ module EnfCli
|
|
523
520
|
mode = "\n" unless mode
|
524
521
|
|
525
522
|
uptime = device_status[:uptime]
|
526
|
-
refresh = device_status[:refresh_time]
|
527
|
-
refresh = '< not available >' unless refresh
|
523
|
+
refresh = device_status[:refresh_time] || '< not available >'
|
528
524
|
wifi_status = device_status[:wifi][:status]
|
529
|
-
connected = wifi_status[:connected]
|
530
|
-
connected = '< not available >' unless connected
|
525
|
+
connected = wifi_status[:connected] || '< not available >'
|
531
526
|
ssid = wifi_status[:SSID]
|
532
527
|
ipv4 = wifi_status[:IPv4_addresses]
|
533
528
|
ipv6 = wifi_status[:IPv6_addresses]
|
@@ -554,9 +549,7 @@ module EnfCli
|
|
554
549
|
end
|
555
550
|
end
|
556
551
|
|
557
|
-
if wifi
|
558
|
-
display_wifi_detail(wifi)
|
559
|
-
end
|
552
|
+
display_wifi_detail(wifi) if wifi
|
560
553
|
|
561
554
|
say ''
|
562
555
|
end
|
@@ -590,12 +583,8 @@ module EnfCli
|
|
590
583
|
#
|
591
584
|
# Display profile detail
|
592
585
|
#
|
593
|
-
def display_profile
|
594
|
-
|
595
|
-
indent = ' '
|
596
|
-
else
|
597
|
-
indent = ''
|
598
|
-
end
|
586
|
+
def display_profile(profile, summary = false)
|
587
|
+
indent = summary ? ' ' : ''
|
599
588
|
|
600
589
|
say indent + "Name : #{profile[:name]}"
|
601
590
|
say indent + "Profile ID : #{profile[:id]}"
|
data/lib/enfcli/version.rb
CHANGED