File tree Expand file tree Collapse file tree
lib/octocatalog-diff/catalog-diff/cli/options
spec/octocatalog-diff/tests/catalog-diff/cli/options Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Option to bootstrap the current directory (by default, the bootstrap script is NOT
2+ # run when the catalog builds in the current directory).
3+ # @param parser [OptionParser object] The OptionParser argument
4+ # @param options [Hash] Options hash being constructed; this is modified in this method.
5+ OctocatalogDiff ::CatalogDiff ::Cli ::Options ::Option . newoption ( :bootstrap_current ) do
6+ has_weight 48
7+
8+ def parse ( parser , options )
9+ parser . on ( '--bootstrap-current' , 'Run bootstrap script for the current directory too' ) do
10+ options [ :bootstrap_current ] = true
11+ end
12+ end
13+ end
Original file line number Diff line number Diff line change 1+ # Option to print debugging output for the bootstrap script in addition to the normal
2+ # debugging output. Note that `--debug` must also be enabled for this option to have
3+ # any effect.
4+ # @param parser [OptionParser object] The OptionParser argument
5+ # @param options [Hash] Options hash being constructed; this is modified in this method.
6+ OctocatalogDiff ::CatalogDiff ::Cli ::Options ::Option . newoption ( :debug_bootstrap ) do
7+ has_weight 49
8+
9+ def parse ( parser , options )
10+ parser . on ( '--debug-bootstrap' , 'Print debugging output for bootstrap script' ) do
11+ options [ :debug_bootstrap ] = true
12+ end
13+ end
14+ end
Original file line number Diff line number Diff line change 1+ require_relative '../options_helper'
2+
3+ describe OctocatalogDiff ::CatalogDiff ::Cli ::Options do
4+ describe '#opt_bootstrap_current' do
5+ it 'should handle --bootstrap-current' do
6+ result = run_optparse ( [ '--bootstrap-current' ] )
7+ expect ( result [ :bootstrap_current ] ) . to eq ( true )
8+ end
9+ end
10+ end
Original file line number Diff line number Diff line change 1+ require_relative '../options_helper'
2+
3+ describe OctocatalogDiff ::CatalogDiff ::Cli ::Options do
4+ describe '#opt_debug_bootstrap' do
5+ it 'should handle --debug-bootstrap' do
6+ result = run_optparse ( [ '--debug-bootstrap' ] )
7+ expect ( result [ :debug_bootstrap ] ) . to eq ( true )
8+ end
9+ end
10+ end
You can’t perform that action at this time.
0 commit comments