Merge pull request #136 from hashar/rake-task-args

Fix args handling for rake strings::generate
This commit is contained in:
Scott Garman 2017-07-18 08:15:30 -07:00 committed by GitHub
commit 9fc7fe2ff7
1 changed files with 5 additions and 2 deletions

View File

@ -14,8 +14,11 @@ namespace :strings do
markup: args[:markup] || 'markdown',
}
options[:json] = args[:json] if args.key? :json
options[:yard_args] = args[:yard_args].split if args.key? :yard_args
# rubocop:disable Style/PreferredHashMethods
# `args` is a Rake::TaskArguments and has no key? method
options[:json] = args[:json] if args.has_key? :json
options[:yard_args] = args[:yard_args].split if args.has_key? :yard_args
# rubocop:enable Style/PreferredHashMethods
PuppetStrings.generate(patterns, options)
end