sterm 0.1.3 → 0.1.4
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/sterm.rb +7 -1
- data/lib/sterm/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: 678d36fd4597dd72d85d2257b0869695b89c658675e2dea6726166dc9631b188
|
4
|
+
data.tar.gz: 03ce38e1add72e250e15ae8185af45da15f795521f2805103d4f590cfc091ef6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff29a2f1c615e697138bde95c8cd8852709afda6855fa135cc4b705f3acba6b2c055ee9748abef19499bad31564d395fdeceb60e54ce8785ff764a35c9b845b6
|
7
|
+
data.tar.gz: 988456d1a0ce70a10fe906f7e7eff17e1a15a9a71cb37ebd45ce633aa312e39cd0715df02e7a439e36c50ab44e7ad08f1074584308f77643610e7b8421c964c9
|
data/Gemfile.lock
CHANGED
data/lib/sterm.rb
CHANGED
@@ -54,7 +54,7 @@ Usage: sterm DEVICE_PATH [options]\nTry starting with `sterm -h` for help\n\n}
|
|
54
54
|
end
|
55
55
|
op.parse!(arguments)
|
56
56
|
|
57
|
-
# Ensure the device path is given
|
57
|
+
# Ensure the device path is given...
|
58
58
|
device_path = ""
|
59
59
|
if ARGV.length < 1
|
60
60
|
STDERR.puts Rainbow("ERROR:").red + " No device path specified. Exiting."
|
@@ -63,6 +63,12 @@ Usage: sterm DEVICE_PATH [options]\nTry starting with `sterm -h` for help\n\n}
|
|
63
63
|
device_path = ARGV[0]
|
64
64
|
end
|
65
65
|
|
66
|
+
# ...and check the descriptor exists
|
67
|
+
if !File.file?(device_path)
|
68
|
+
STDERR.puts Rainbow("ERROR:").red + " Device not found at " + device_path
|
69
|
+
exit(13)
|
70
|
+
end
|
71
|
+
|
66
72
|
# Set the options
|
67
73
|
baud_rate = opts[:baud_rate]
|
68
74
|
if baud_rate.nil? || baud_rate.empty?
|
data/lib/sterm/version.rb
CHANGED