Class: Commands::Shell
- Inherits:
-
Object
- Object
- Commands::Shell
- Defined in:
- lib/commands/shell.rb
Instance Method Summary collapse
-
#options ⇒ Object
holds the options that were passed you can set any initial defaults here.
- #register(opts, global_options) ⇒ Object
-
#required_options ⇒ Object
required options.
- #run(global_options) ⇒ Object
Instance Method Details
#options ⇒ Object
holds the options that were passed you can set any initial defaults here
13 14 15 16 |
# File 'lib/commands/shell.rb', line 13 def @options ||= { } end |
#register(opts, global_options) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/commands/shell.rb', line 24 def register(opts, ) opts. = "Usage: shell" opts.description = "Test running of a shell script." opts.on('-b', "--branch config branch name", "Use build config branch") do |v| [:branch] = v end end |
#required_options ⇒ Object
required options
19 20 21 22 |
# File 'lib/commands/shell.rb', line 19 def @required_options ||= Set.new [ ] end |
#run(global_options) ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/commands/shell.rb', line 32 def run() config_branch = [:branch] config_repo_url = EcbSharedLib.prepare_config_repo(config_branch) base = EcbSharedLib.full_config_path(config_repo_url) newpath = File.(File.join(base, "scripts")) cmd = "./ecb_test.sh" EcbSharedLib::CL.do_cmd(cmd, newpath) end |