Module: Scripted
- Defined in:
- lib/scripted/formatters/default.rb,
lib/scripted.rb,
lib/scripted/error.rb,
lib/scripted/group.rb,
lib/scripted/runner.rb,
lib/scripted/command.rb,
lib/scripted/version.rb,
lib/scripted/rake_task.rb,
lib/scripted/commands/rake.rb,
lib/scripted/commands/ruby.rb,
lib/scripted/configuration.rb,
lib/scripted/output/logger.rb,
lib/scripted/commands/shell.rb,
lib/scripted/running/execute.rb,
lib/scripted/formatters/blank.rb,
lib/scripted/formatters/stats.rb,
lib/scripted/formatters/table.rb,
lib/scripted/running/run_command.rb,
lib/scripted/formatters/announcer.rb,
lib/scripted/formatters/websocket.rb,
lib/scripted/running/run_commands.rb,
lib/scripted/output/command_logger.rb,
lib/scripted/formatters/human_status.rb,
lib/scripted/running/select_commands.rb
Overview
The default provides two things:
-
Print the regular command output
-
Print exceptions that happen during the output
When running commands in parallel, output would be intertwined. That’s why this formatter buffers the output if outputting to a file, than the file will have the output in the right order at the end.
Defined Under Namespace
Modules: Commands, Formatters, Output, Running Classes: Command, CommandFailed, ConfigFileNotFound, Configuration, ConfigurationError, ConfigurationSyntaxError, Error, Group, NoFormatterForOutput, NotConfigured, RakeTask, Runner, RunningFailed
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
-
.configure(&block) ⇒ Object
Configure scripted, returning a configuration which can be run later.
-
.run(configuration = nil, *group_names, &block) ⇒ Object
Runs scripted.
Class Method Details
.configure(&block) ⇒ Object
Configure scripted, returning a configuration which can be run later. Optionally pass a block to configure in place.
22 23 24 25 26 |
# File 'lib/scripted.rb', line 22 def self.configure(&block) config = Configuration.new config.evaluate(&block) if block_given? config end |
.run(configuration = nil, *group_names, &block) ⇒ Object
Runs scripted.
You can pass a configuration with group names, or you can pass a block, which will be the ad-hoc configuration.
14 15 16 17 18 |
# File 'lib/scripted.rb', line 14 def self.run(configuration = nil, *group_names, &block) raise NotConfigured if configuration.nil? && block.nil? config = configuration || configure(&block) Runner.start!(config, *group_names) end |