docopt-compgen 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 44bcf88d3208f5870a54bd566bddbdbf010a6be6a9d656c9875b36301714b519
4
- data.tar.gz: af8eefcae73223d825ab8cb2ca2e8db2312912f4f4bac89bac047ddcd477b131
3
+ metadata.gz: 7d80128550098ba94a9a1356e193321811a256fa4598af6e35ec352239a8ebae
4
+ data.tar.gz: 591f5fea08948f09ebe008d48e2efb05edf84659a9f51e413594ff1bca465bc7
5
5
  SHA512:
6
- metadata.gz: 59c215aaaf9033dad335fd5965caa7320d6dd0e59d2cc3716d34e0c8c2da31315d9f40c359194da5f58987f4b8b42f4b88b15a7ccbf9423b0e02d07f73ccc4cb
7
- data.tar.gz: 8a3d52b71f8e1ddf062d2097ae2d7ad9e4f360e7a7d239ba7e1ffe7b561891df490c1545b9c71bc20872cdafd51b04b859594a92ed378cb308d5c165404b6e5f
6
+ metadata.gz: '09ddc20292a5a3f9b6c047e41e35e63365dc80e5f4b077e8e85dc015520a72b222e3850dd1ca06b0865f68da2e8cea46127f1c70f95f4ddd7c7b4ba13609f8c6'
7
+ data.tar.gz: 8522dd62dd630bf968486038894061e3f151d0055ce6b5f81a781673bc8d7354688bcbb5b8b5e274d23bfa5d1a516dc4013e2bb235fa38d666993486bf632591
data/bin/docopt-compgen CHANGED
@@ -2,12 +2,14 @@
2
2
  trap(:SIGINT) { puts; exit 130 }
3
3
  Signal.trap(:SIGPIPE, :SYSTEM_DEFAULT)
4
4
  require 'docopt'
5
+ PROGRAM_NAME = File.basename($PROGRAM_NAME)
5
6
 
6
7
  usage = <<~EOF
7
8
  Usage:
8
- #{File.basename($0)} [options] [<command>]
9
+ #{PROGRAM_NAME} [options] [<command>]
9
10
 
10
11
  Options:
12
+ -o, --out PATH Output completion to PATH instead of stdout
11
13
  --complete-short Complete short options (long options are always completed)
12
14
  --command-name NAME Command name
13
15
  If not specified then the slugified basename of <command> will be used
@@ -76,4 +78,10 @@ generator = DocoptCompgen::Generator.new(
76
78
  namespace: opts['--namespace'],
77
79
  )
78
80
 
79
- puts generator.to_s
81
+ output = generator.to_s
82
+
83
+ if opts['--out']
84
+ File.write(opts['--out'], output)
85
+ else
86
+ puts output
87
+ end
@@ -1,3 +1,3 @@
1
1
  module DocoptCompgen
2
- VERSION = '1.3.0'
2
+ VERSION = '1.4.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docopt-compgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - crdx
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-12 00:00:00.000000000 Z
11
+ date: 2022-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -68,8 +68,9 @@ files:
68
68
  - lib/docopt_compgen/version.rb
69
69
  homepage: https://github.com/crdx/docopt-compgen
70
70
  licenses:
71
- - MIT
72
- metadata: {}
71
+ - GPLv3
72
+ metadata:
73
+ rubygems_mfa_required: 'true'
73
74
  post_install_message:
74
75
  rdoc_options: []
75
76
  require_paths:
@@ -85,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
86
  - !ruby/object:Gem::Version
86
87
  version: '0'
87
88
  requirements: []
88
- rubygems_version: 3.2.21
89
+ rubygems_version: 3.3.25
89
90
  signing_key:
90
91
  specification_version: 4
91
92
  summary: docopt completion generator