Class: Xing::Edicts::CleanRun
- Inherits:
-
Edict::Rule
- Object
- Edict::Rule
- Xing::Edicts::CleanRun
- Includes:
- Caliph::CommandLineDSL
- Defined in:
- lib/xing/edicts/clean-run.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#action ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/xing/edicts/clean-run.rb', line 23 def action Bundler.with_clean_env do Dir.chdir(dir) do command = cmd(*shell_cmd) env_hash.each_pair do |name, value| command.set_env(name, value) end result = caliph_shell.run(command) result.must_succeed! end end end |
#setup ⇒ Object
19 20 21 |
# File 'lib/xing/edicts/clean-run.rb', line 19 def setup self.env_hash ||= {} end |
#setup_defaults ⇒ Object
14 15 16 17 |
# File 'lib/xing/edicts/clean-run.rb', line 14 def setup_defaults super @caliph_shell = Caliph::Shell.new end |