Skip to content

Commit 33dc4d6

Browse files
committed
(CONT-228) Remove deprecated flags
This commit removes the two deprecated `emit_*` flags in favour of `--format` and `--out`.
1 parent a120e39 commit 33dc4d6

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

lib/puppet/face/strings.rb

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@
1818
option '--markup FORMAT' do
1919
summary "The markup format to use for docstring text (defaults to 'markdown')."
2020
end
21-
option '--emit-json-stdout' do
22-
summary 'DEPRECATED: Print JSON representation of the documentation to stdout.'
23-
end
24-
option '--emit-json PATH' do
25-
summary 'DEPRECATED: Write JSON representation of the documentation to the given file.'
26-
end
2721

2822
summary 'Generate documentation from files.'
2923
arguments '[[search_pattern] ...]'
@@ -157,12 +151,6 @@ def build_generate_options(options = nil, *yard_args)
157151
generate_options[:backtrace] = Puppet[:trace]
158152
generate_options[:yard_args] = yard_args unless yard_args.empty?
159153
if options
160-
if options[:emit_json]
161-
warn "WARNING: '--emit-json PATH' is deprecated. Use '--format json --out PATH' instead."
162-
end
163-
if options[:emit_json_stdout]
164-
warn "WARNING: '--emit-json-stdout' is deprecated. Use '--format json' instead."
165-
end
166154
markup = options[:markup]
167155
generate_options[:markup] = markup if markup
168156
generate_options[:path] = options[:out] if options[:out]
@@ -178,15 +166,11 @@ def build_generate_options(options = nil, *yard_args)
178166
if format
179167
if format.casecmp('markdown').zero?
180168
generate_options[:markdown] = true
181-
elsif format.casecmp('json').zero? || options[:emit_json] || options[:emit_json_stdout]
169+
elsif format.casecmp('json').zero?
182170
generate_options[:json] = true
183-
generate_options[:path] ||= options[:emit_json] if options[:emit_json]
184171
else
185172
raise "Invalid format #{options[:format]}. Please select 'json' or 'markdown'."
186173
end
187-
elsif options[:emit_json] || options[:emit_json_stdout]
188-
generate_options[:json] = true
189-
generate_options[:path] ||= options[:emit_json] if options[:emit_json]
190174
end
191175
end
192176
generate_options

0 commit comments

Comments
 (0)