module MandatoryOptions
this are the mandatory options
Public Instance Methods
context_opt(opt)
click to toggle source
primary
# File lib/gitarro/opt_parser.rb, line 6 def context_opt(opt) desc = 'Context to set on comment (test name). For example: python-test.' opt.on('-c', "--context 'CONTEXT'", desc) do |context| @options[:context] = context end end
mandatory_options(opt)
click to toggle source
# File lib/gitarro/opt_parser.rb, line 25 def mandatory_options(opt) opt.separator 'Mandatory options:' repo_opt(opt) context_opt(opt) test_opt(opt) end
repo_opt(opt)
click to toggle source
# File lib/gitarro/opt_parser.rb, line 13 def repo_opt(opt) desc = 'GitHub repository to look for PRs. For example: openSUSE/gitarro.' opt.on('-r', "--repo 'REPO'", desc) { |repo| @options[:repo] = repo } end
test_opt(opt)
click to toggle source
# File lib/gitarro/opt_parser.rb, line 18 def test_opt(opt) desc = 'Command, or full path to script/binary to be used to run the test.' opt.on('-t', "--test 'TEST.SH'", desc) do |test_file| @options[:test_file] = test_file end end