sterm 0.1.5 → 0.1.7

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: 6dc2dae8c74c3e2bfce534da7cbd841cb4c533f446f21b78b5900e65aae0653d
4
- data.tar.gz: 5a249b6cbf5a014d9008978f92e69468b4d6296a5daae342dfff6dadf4c18adb
3
+ metadata.gz: 00b43c04ea194dc6fe0f9db823b66bc358b207e2585740989fee98dc42cda3e8
4
+ data.tar.gz: 7b99237e5e0c46c283613cbe984879b0079ba8ffc0d0b7a4016400100a63fc17
5
5
  SHA512:
6
- metadata.gz: 73e2e0672395f3eae271e0e33d5e9cb8aee0d86e9da59f093315fe8f7aa75842949eb29dbab989e828690d72c4a5fc0aa22fa5b35c8129b8700eef58d3d1df47
7
- data.tar.gz: b89ee2dcf36132d36166007d43c0663442a3ea71893ad2a90ba7cdffde6041beef46cb0d1f8a68ef6ed84555ab5238480b935fb653b9f41ccf654004e66b61a6
6
+ metadata.gz: f14dbc934815cc8500ceb3f64ca6cedbb2bfe9c6f18e44f7c1f68e61bebca28ed36383103cbec889be88c4178734a739ff57aeaa311af8db9ebb4e551169b217
7
+ data.tar.gz: 71bc785216a934a1335a4a4c0cc7099bc3bf0ca6547aaedaa314e01bfd9040ba5624d720bd4b800eee203f26282bec57350bd2faf1fac70c34454279beb946ab
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sterm (0.1.3)
4
+ sterm (0.1.6)
5
5
  rainbow (~> 3.0.0)
6
6
  serialport (~> 1.3.1)
7
7
 
@@ -62,13 +62,7 @@ Usage: sterm DEVICE_PATH [options]\nTry starting with `sterm -h` for help\n\n}
62
62
  else
63
63
  device_path = ARGV[0]
64
64
  end
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
-
65
+
72
66
  # Set the options
73
67
  baud_rate = opts[:baud_rate]
74
68
  if baud_rate.nil? || baud_rate.empty?
@@ -100,7 +94,12 @@ Usage: sterm DEVICE_PATH [options]\nTry starting with `sterm -h` for help\n\n}
100
94
  puts Rainbow("INFO:").aqua + " Using default line ending of \"ODOA\" (\\r\\n)."
101
95
  end
102
96
 
103
- sp = SerialPort.new(device_path, baud_rate, data_bits, stop_bits, SerialPort::NONE)
97
+ begin
98
+ sp = SerialPort.new(device_path, baud_rate, data_bits, stop_bits, SerialPort::NONE)
99
+ rescue Errno::ENOENT
100
+ STDERR.puts Rainbow("ERROR:").red + " Device not found at " + device_path
101
+ exit(13)
102
+ end
104
103
 
105
104
  if sp.nil?
106
105
  puts Rainbow("ERROR:").red + " Couldn't initialize device at path " + device_path
@@ -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.5"
19
+ VERSION = "0.1.7"
20
20
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "sterm"
8
8
  spec.version = Sterm::VERSION
9
9
  spec.executables << 'sterm'
10
- spec.required_ruby_version = '~> 2.0'
10
+ spec.required_ruby_version = '>= 2.0'
11
11
  spec.authors = ["Cian Guinee"]
12
12
  spec.email = ["cian.guinee@gmail.com"]
13
13
  spec.licenses = ["GPL-2.0"] # As required by the serialport dependency
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.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cian Guinee
@@ -96,7 +96,7 @@ require_paths:
96
96
  - lib
97
97
  required_ruby_version: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - "~>"
99
+ - - ">="
100
100
  - !ruby/object:Gem::Version
101
101
  version: '2.0'
102
102
  required_rubygems_version: !ruby/object:Gem::Requirement