docwatch-bin 1.1.3 → 1.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/docwatch +16 -22
  3. data/lib/docwatch/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 453e5dfb0d3e538aee997796260580b39243927ab8766bb6186cba9aecf7aca7
4
- data.tar.gz: 94df332804838cbf2e269d31ab0c46bcb5a9e123df37132d08e8b2e7413c8a84
3
+ metadata.gz: 428e9a8f772a5877ea24b8aa37f63f01f17a6889f0e0d0e72e8502abaf4a5d51
4
+ data.tar.gz: 705d2828ede9e7ab93a91b0e0ce987cfb5b49212c9b7983e8309ce487498a1f6
5
5
  SHA512:
6
- metadata.gz: c2ee47380f0a99f2ef0679805c3d2ae7319ac1286721cfb680245fa6b3176c952147a09bab197881b6ab2ad299bd693afe8923a7add29daf732f437274e8ce03
7
- data.tar.gz: c9f3eb5095c6238cc5217cd5b2f393f9293af9ed940aec550aa7628e2cb10fff6a713efbee5e869e2ec305d39f8266737b75dff915a70d3eada330d09baf0a02
6
+ metadata.gz: cbd08501ef11110b8d6cc5d5f6f5e6b0fe5cfb6567aab6655ac9436a33985d8ff29633f66ff53e4531181c7ebb31883ed6c272263d4e7359340deb9f6ad3713f
7
+ data.tar.gz: 3943bd1279191233d3417e8b5e263a324b5645d776e8dd62774865ccc646661c023dcd469c16d71ca1ca5323e440be1ebedc4cc1ba7aed49f82b59004e45cfd4
data/bin/docwatch CHANGED
@@ -15,7 +15,6 @@ class Main
15
15
  @params ||= OpenStruct.new({
16
16
  verbose: @opts['--verbose'],
17
17
  version: @opts['--version'],
18
- help: @opts['--help'],
19
18
  file_path: @opts['<file-path>']
20
19
  })
21
20
  end
@@ -37,11 +36,6 @@ class Main
37
36
  true
38
37
  end
39
38
 
40
- def exit_usage
41
- puts DOCS
42
- exit 0
43
- end
44
-
45
39
  def exit_version
46
40
  puts Docwatch::VERSION
47
41
  exit 0
@@ -63,7 +57,6 @@ class Main
63
57
 
64
58
  def run
65
59
  exit_version if params.version
66
- exit_usage if params.help
67
60
  exit_invalid_file unless File.exist?(params.file_path)
68
61
  exit_invalid_port unless port_valid
69
62
 
@@ -100,30 +93,31 @@ class Main
100
93
  end
101
94
  end
102
95
 
103
- docs = <<~EOF
104
- #{'Usage:'.bold}
96
+ usage = <<~EOF
97
+ Usage:
105
98
  #{File.basename($0)} [options] <file-path>
99
+ #{File.basename($0)} ( --version | --help )
106
100
 
107
- #{'Options:'.bold}
101
+ Options:
108
102
  -p, --port=VALUE Listen port [default: 8888]
109
- -v, --verbose Be verbose
110
- -V, --version Show version
103
+ --verbose Be verbose
104
+ -v, --version Show version
111
105
  -h, --help Show this help
112
106
 
113
- #{'Renderers:'.bold}
114
- markdown (.md)
115
- html (.html)
107
+ Renderers:
108
+ markdown (.md)
109
+ html (.html)
116
110
 
117
- If #{'--port'.bold} is #{'random'.bold} a random port will be chosen, otherwise
118
- the specified one will be used. The default is 8888.
111
+ If #{'--port'.bold} is #{'random'.bold} a random port will be chosen, otherwise the specified
112
+ one will be used. The default is 8888.
119
113
 
120
- In #{'--verbose'.bold} mode, incoming HTTP requests and file change event
121
- notifications will be printed to standard output.
114
+ In #{'--verbose'.bold} mode, incoming HTTP requests and file change event notifications will be
115
+ printed to standard output.
122
116
  EOF
123
117
 
124
118
  begin
125
- Main.run(Docopt::docopt(docs, version: VERSION))
119
+ Main.run(Docopt::docopt(usage))
126
120
  rescue Docopt::Exit => e
127
- puts e.message
128
- exit 1
121
+ puts usage
122
+ exit 2
129
123
  end
@@ -1,3 +1,3 @@
1
1
  module Docwatch
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docwatch-bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - crdx
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-20 00:00:00.000000000 Z
11
+ date: 2021-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: require_all