docopt-compgen 1.3.1 → 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: 3a600e6b18676edfb5f2df11888e7f81513e3943a3891f2a30ea282a6fb89981
4
- data.tar.gz: 1780dba9257aa22199a031bcede2c9454941cff25bbb1727328982c44f8f6121
3
+ metadata.gz: 7d80128550098ba94a9a1356e193321811a256fa4598af6e35ec352239a8ebae
4
+ data.tar.gz: 591f5fea08948f09ebe008d48e2efb05edf84659a9f51e413594ff1bca465bc7
5
5
  SHA512:
6
- metadata.gz: 793e00800a729bf477fb106893f817e0646b77966d0bf8b302c9ac0fea41b2914fe1a22e96b59f7da2f93b9eef5a10f369ae39d622d1ed877eafc7cbbfebdbd4
7
- data.tar.gz: 5aaf2d78a18eabb4c8df1b5bb28d7ba34cd271570925e36aa40fb4b2f3683d9b930ddd468d4442fc0f5f55e5b2d9436e308ea950f7f037c27c0f522da4b13715
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.1'
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.1
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-11-17 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,7 +68,7 @@ files:
68
68
  - lib/docopt_compgen/version.rb
69
69
  homepage: https://github.com/crdx/docopt-compgen
70
70
  licenses:
71
- - MIT
71
+ - GPLv3
72
72
  metadata:
73
73
  rubygems_mfa_required: 'true'
74
74
  post_install_message:
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  requirements: []
89
- rubygems_version: 3.2.29
89
+ rubygems_version: 3.3.25
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: docopt completion generator