Skip to content

Commit

Permalink
Correctly generate the rdoc command file
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Stevens committed Nov 2, 2017
1 parent ab0c3d7 commit d5c091a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 189 deletions.
73 changes: 0 additions & 73 deletions gli.rdoc

This file was deleted.

74 changes: 1 addition & 73 deletions lib/vaulty/cli_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Vaulty
class CLIApp
extend GLI::App

program_desc 'Describe your application here'
program_desc 'Vault CLI on steriods'

version Vaulty::VERSION

Expand All @@ -13,14 +13,6 @@ class CLIApp
Hash[*value.split(':')]
end

desc 'Describe some switch here'
switch %i(s switch)

desc 'Describe some flag here'
default_value 'the default'
arg_name 'The name of the argument'
flag %i(f flagname)

desc 'Add a new key/value to the given `PATH`, multiple `key:value` can be provided'
arg(:path)
command :add do |c|
Expand Down Expand Up @@ -56,70 +48,6 @@ class CLIApp
end
end

desc 'Describe backup here'
arg_name 'Describe arguments to backup here'
command :backup do |c|
c.action do |_global_options, _options, _args|
puts 'backup command ran'
end
end

desc 'Describe convert here'
arg_name 'Describe arguments to convert here'
command :convert do |c|
c.action do |_global_options, _options, _args|
puts 'convert command ran'
end
end

desc 'Describe diff here'
arg_name 'Describe arguments to diff here'
command :diff do |c|
c.action do |_global_options, _options, _args|
puts 'diff command ran'
end
end

desc 'Describe generate here'
arg_name 'Describe arguments to generate here'
command :generate do |c|
c.action do |_global_options, _options, _args|
puts 'generate command ran'
end
end

desc 'Describe provision here'
arg_name 'Describe arguments to provision here'
command :provision do |c|
c.action do |_global_options, _options, _args|
puts 'provision command ran'
end
end

desc 'Describe remove here'
arg_name 'Describe arguments to remove here'
command :remove do |c|
c.action do |_global_options, _options, _args|
puts 'remove command ran'
end
end

desc 'Describe restore here'
arg_name 'Describe arguments to restore here'
command :restore do |c|
c.action do |_global_options, _options, _args|
puts 'restore command ran'
end
end

desc 'Describe write here'
arg_name 'Describe arguments to write here'
command :write do |c|
c.action do |_global_options, _options, _args|
puts 'write command ran'
end
end

pre do |_global, _command, options, args|
path = args.first
exit_now!('path must be provided') if path.nil? || path.empty?
Expand Down
4 changes: 4 additions & 0 deletions vaulty.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Gem::Specification.new do |s|
s.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
end
s.has_rdoc = true
s.extra_rdoc_files = ['README.rdoc','vaulty.rdoc']
s.rdoc_options << '--title' << 'vaulty' << '--main' << 'README.rdoc' << '-ri'

s.bindir = 'bin'
s.require_paths << 'lib'
s.executables << 'vaulty'
Expand Down
49 changes: 6 additions & 43 deletions vaulty.rdoc
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
== vaulty - Describe your application here
== vaulty - Vault CLI on steriods

v0.0.1

=== Global Options
=== -f|--flagname The name of the argument

Describe some flag here

[Default Value] the default


=== --help
Show this message



=== -s|--[no-]switch
Describe some switch here



=== --version
Display the program version

Expand All @@ -31,33 +19,24 @@ Add a new key/value to the given `PATH`, multiple `key:value` can be provided


===== Options
===== --secret|-s key:secret
===== --file|-f key:/path/file.ext

Key/Values to save
Key/File to be uploaded

[Default Value] None


==== Command: <tt>backup Describe arguments to backup here</tt>
Describe backup here
===== --secret|-s key:secret

Key/Values to save

==== Command: <tt>convert Describe arguments to convert here</tt>
Describe convert here
[Default Value] None


==== Command: <tt>delete </tt>
Deletes everything under the path recursively


==== Command: <tt>diff Describe arguments to diff here</tt>
Describe diff here


==== Command: <tt>generate Describe arguments to generate here</tt>
Describe generate here


==== Command: <tt>help command</tt>
Shows a list of commands or help for one command

Expand All @@ -68,23 +47,7 @@ List commands one per line, to assist with shell completion



==== Command: <tt>provision Describe arguments to provision here</tt>
Describe provision here


==== Command: <tt>remove Describe arguments to remove here</tt>
Describe remove here


==== Command: <tt>restore Describe arguments to restore here</tt>
Describe restore here


==== Command: <tt>tree </tt>
Represents the path as a tree


==== Command: <tt>write Describe arguments to write here</tt>
Describe write here


0 comments on commit d5c091a

Please sign in to comment.