sterm 0.1.2 → 0.1.3

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: 4a614b22fe272b9f9fe3aeee0232ce0eb3fcd7e8f98582ea695c9aa387bd95ee
4
- data.tar.gz: bcd3bcebd69f41ef94161a162ae443cbb83e095d712bc15fa02aa361015f42ed
3
+ metadata.gz: d38b72daa0355e6e48018c1a30d99e72c55184edd065b75349b9c141d1b2f903
4
+ data.tar.gz: d708689a0022c5b13a29c514141470e924175f3bce29c4e5b4a7c740364f890c
5
5
  SHA512:
6
- metadata.gz: cfea39dd844f42f7664cdb44b5c48d00a2b85c76a5f1070b3bd64ef95e5cba0da81e4da5f639bd2d6fd930fae4a4cfd07d219842406aadd7e91711ed1cdedd63
7
- data.tar.gz: 722d355566715865f5e03ffe96337576b3bd271999c6c1a247b735c913a504617d130953d436b8df72b1ac66f75eeb9b770b4ec5da184bc1caaf01f3305cb95d
6
+ metadata.gz: 33aa2073de863f739b45587a6a2db262346e45b4eec30644202b35a9e355bfa5f9af2f341f235d6fff58ff2db71e2e664d089ce9e801d35ef8f150246eb3a115
7
+ data.tar.gz: e9639733f371025c4e028f5096577804de487e130976dc8d40de3ce565798d8181383f7627a62b4aedf4ef6f9ffe28ca5ccc892e1bb72215528ed171441ded85
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sterm (0.1.0)
5
- rainbow
6
- serialport
4
+ sterm (0.1.2)
5
+ rainbow (~> 3.0.0)
6
+ serialport (~> 1.3.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
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
- $ gem install sterm
8
+ `
9
+ $ gem install sterm
10
+ `
9
11
 
10
12
  ## Usage
11
13
 
12
- $ sterm DEVICE_PATH [-b BAUD_RATE -d DATA_BITS -s STOP_BITS -e LINE_ENDING]
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
@@ -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 sent by the device (Default: \"0D0A\" (\\r\\n)") do |ending|
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
 
@@ -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.2"
19
+ VERSION = "0.1.3"
20
20
  end
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.2
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-02-28 00:00:00.000000000 Z
11
+ date: 2019-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler