Module: SnapCI::ParallelTests::Partition::CLIHelper
- Extended by:
- CLIHelper
- Included in:
- CLIHelper
- Defined in:
- lib/snap_ci/parallel_tests/partition/cli_helper.rb
Instance Method Summary collapse
- #render_footer(optparser, options) ⇒ Object
- #render_header(optparser, options) ⇒ Object
- #render_options(optparser, options) ⇒ Object
Instance Method Details
#render_footer(optparser, options) ⇒ Object
26 27 28 |
# File 'lib/snap_ci/parallel_tests/partition/cli_helper.rb', line 26 def (optparser, ) optparser.separator '' end |
#render_header(optparser, options) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/snap_ci/parallel_tests/partition/cli_helper.rb', line 5 def render_header(optparser, ) optparser. = "Partition a list of files/directories and print them\n\nUsage: \#{optparser.program_name} [options] [files or directories]\n\nExample: \#{optparser.program_name} test/models test/controllers/foo_controller_test.rb\n\nCan typically be used as -\n\n $ your-test-runner $(snap-ci-parallel-partition location/of/test/files)\n\n" end |
#render_options(optparser, options) ⇒ Object
20 21 22 23 24 |
# File 'lib/snap_ci/parallel_tests/partition/cli_helper.rb', line 20 def (optparser, ) optparser.on('-p', '--pattern [PATTERN]', 'only find files matching this pattern') do |pattern| [:pattern] = /#{pattern}/ end end |