Class: Bookbinder::Commands::RunPublishCI
- Inherits:
-
Object
- Object
- Bookbinder::Commands::RunPublishCI
- Defined in:
- lib/bookbinder/commands/run_publish_ci.rb
Instance Method Summary collapse
-
#initialize(publish_command, push_local_to_command, build_and_push_tarball_command) ⇒ RunPublishCI
constructor
A new instance of RunPublishCI.
- #run(cli_args) ⇒ Object
- #usage ⇒ Object
Methods included from Naming
#command_for?, #command_type, #flag?
Constructor Details
#initialize(publish_command, push_local_to_command, build_and_push_tarball_command) ⇒ RunPublishCI
Returns a new instance of RunPublishCI.
18 19 20 21 22 |
# File 'lib/bookbinder/commands/run_publish_ci.rb', line 18 def initialize(publish_command, push_local_to_command, build_and_push_tarball_command) @publish_command = publish_command @push_local_to_command = push_local_to_command @build_and_push_tarball_command = build_and_push_tarball_command end |
Instance Method Details
#run(cli_args) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/bookbinder/commands/run_publish_ci.rb', line 24 def run(cli_args) command_chain( ->{publish_command.run(['remote'] + cli_args)}, ->{push_local_to_command.run(['staging'])}, ->{build_and_push_tarball_command.run([])} ) end |
#usage ⇒ Object
13 14 15 16 |
# File 'lib/bookbinder/commands/run_publish_ci.rb', line 13 def usage [command_name, "Run publish, push_local_to staging, and build_and_push_tarball for CI purposes"] end |