sterm 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +6 -2
- data/lib/sterm.rb +7 -1
- data/lib/sterm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d38b72daa0355e6e48018c1a30d99e72c55184edd065b75349b9c141d1b2f903
|
4
|
+
data.tar.gz: d708689a0022c5b13a29c514141470e924175f3bce29c4e5b4a7c740364f890c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33aa2073de863f739b45587a6a2db262346e45b4eec30644202b35a9e355bfa5f9af2f341f235d6fff58ff2db71e2e664d089ce9e801d35ef8f150246eb3a115
|
7
|
+
data.tar.gz: e9639733f371025c4e028f5096577804de487e130976dc8d40de3ce565798d8181383f7627a62b4aedf4ef6f9ffe28ca5ccc892e1bb72215528ed171441ded85
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -5,11 +5,15 @@ I've only tested this with one device but it should work for anything that uses
|
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
To install, just run:
|
8
|
-
|
8
|
+
`
|
9
|
+
$ gem install sterm
|
10
|
+
`
|
9
11
|
|
10
12
|
## Usage
|
11
13
|
|
12
|
-
|
14
|
+
`
|
15
|
+
$ sterm DEVICE_PATH [-b BAUD_RATE -d DATA_BITS -s STOP_BITS -e LINE_ENDING]
|
16
|
+
`
|
13
17
|
|
14
18
|
Default baud rate is 115200
|
15
19
|
Default data bits is 8
|
data/lib/sterm.rb
CHANGED
@@ -25,6 +25,7 @@ module Sterm
|
|
25
25
|
|
26
26
|
def sterm(arguments)
|
27
27
|
# Parse the arguments provided by the user
|
28
|
+
arguments << '-h' if arguments.empty?
|
28
29
|
opts = {}
|
29
30
|
op = OptionParser.new do |options|
|
30
31
|
options.banner = %Q{SerialTerm is a very simple command line tool to output data received from a serial device.
|
@@ -42,9 +43,14 @@ Usage: sterm DEVICE_PATH [options]\nTry starting with `sterm -h` for help\n\n}
|
|
42
43
|
opts[:stop_bits] = stop_bits
|
43
44
|
end
|
44
45
|
|
45
|
-
options.on("-e STRING", "--ends-with", "The string (in hex) that terminates each line
|
46
|
+
options.on("-e STRING", "--ends-with", "The string (in hex) that terminates each line (Default: \"0D0A\")") do |ending|
|
46
47
|
opts[:ending] = ending
|
47
48
|
end
|
49
|
+
|
50
|
+
options.on_tail("-v", "--version", "Show version") do
|
51
|
+
puts Rainbow("SerialTerm version:").aqua + " #{Sterm::VERSION}"
|
52
|
+
exit
|
53
|
+
end
|
48
54
|
end
|
49
55
|
op.parse!(arguments)
|
50
56
|
|
data/lib/sterm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sterm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cian Guinee
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|