18
18
option '--markup FORMAT' do
19
19
summary "The markup format to use for docstring text (defaults to 'markdown')."
20
20
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
27
21
28
22
summary 'Generate documentation from files.'
29
23
arguments '[[search_pattern] ...]'
@@ -157,12 +151,6 @@ def build_generate_options(options = nil, *yard_args)
157
151
generate_options [ :backtrace ] = Puppet [ :trace ]
158
152
generate_options [ :yard_args ] = yard_args unless yard_args . empty?
159
153
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
166
154
markup = options [ :markup ]
167
155
generate_options [ :markup ] = markup if markup
168
156
generate_options [ :path ] = options [ :out ] if options [ :out ]
@@ -174,19 +162,12 @@ def build_generate_options(options = nil, *yard_args)
174
162
generate_options [ :describe_list ] = options [ :list ]
175
163
end
176
164
177
- format = options [ :format ]
178
- if format
179
- if format . casecmp ( 'markdown' ) . zero?
180
- generate_options [ :markdown ] = true
181
- elsif format . casecmp ( 'json' ) . zero? || options [ :emit_json ] || options [ :emit_json_stdout ]
165
+ generate_options [ :markdown ] = true
166
+ elsif format . casecmp ( 'json' ) . zero?
182
167
generate_options [ :json ] = true
183
- generate_options [ :path ] ||= options [ :emit_json ] if options [ :emit_json ]
184
168
else
185
169
raise "Invalid format #{ options [ :format ] } . Please select 'json' or 'markdown'."
186
170
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 ]
190
171
end
191
172
end
192
173
generate_options
0 commit comments