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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d38b72daa0355e6e48018c1a30d99e72c55184edd065b75349b9c141d1b2f903
4
- data.tar.gz: d708689a0022c5b13a29c514141470e924175f3bce29c4e5b4a7c740364f890c
3
+ metadata.gz: 678d36fd4597dd72d85d2257b0869695b89c658675e2dea6726166dc9631b188
4
+ data.tar.gz: 03ce38e1add72e250e15ae8185af45da15f795521f2805103d4f590cfc091ef6
5
5
  SHA512:
6
- metadata.gz: 33aa2073de863f739b45587a6a2db262346e45b4eec30644202b35a9e355bfa5f9af2f341f235d6fff58ff2db71e2e664d089ce9e801d35ef8f150246eb3a115
7
- data.tar.gz: e9639733f371025c4e028f5096577804de487e130976dc8d40de3ce565798d8181383f7627a62b4aedf4ef6f9ffe28ca5ccc892e1bb72215528ed171441ded85
6
+ metadata.gz: ff29a2f1c615e697138bde95c8cd8852709afda6855fa135cc4b705f3acba6b2c055ee9748abef19499bad31564d395fdeceb60e54ce8785ff764a35c9b845b6
7
+ data.tar.gz: 988456d1a0ce70a10fe906f7e7eff17e1a15a9a71cb37ebd45ce633aa312e39cd0715df02e7a439e36c50ab44e7ad08f1074584308f77643610e7b8421c964c9
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sterm (0.1.2)
4
+ sterm (0.1.3)
5
5
  rainbow (~> 3.0.0)
6
6
  serialport (~> 1.3.1)
7
7
 
@@ -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?
@@ -16,5 +16,5 @@
16
16
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
 
18
18
  module Sterm
19
- VERSION = "0.1.3"
19
+ VERSION = "0.1.4"
20
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sterm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cian Guinee