Class: Snaptoken::Commands::Fancy
Constant Summary
Constants inherited
from BaseCommand
BaseCommand::ERROR_MSG
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseCommand
inherited, #initialize, #latest_step, #needs!, #parseopts!, #step_path, #steps
Class Method Details
.name ⇒ Object
2
3
4
|
# File 'lib/snaptoken/commands/fancy.rb', line 2
def self.name
"fancy"
end
|
.summary ⇒ Object
6
7
8
9
|
# File 'lib/snaptoken/commands/fancy.rb', line 6
def self.summary
"Run steps.diff through colordiff,\n" +
"diff-so-fancy, and less."
end
|
.usage ⇒ Object
11
12
13
|
# File 'lib/snaptoken/commands/fancy.rb', line 11
def self.usage
""
end
|
Instance Method Details
#run ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/snaptoken/commands/fancy.rb', line 18
def run
needs! :config, :diff
FileUtils.cd(@config[:path]) do
exec("cat steps.diff | colordiff | diff-so-fancy | less --tabs=4 -RFX")
end
end
|
#setopts!(o) ⇒ Object
15
16
|
# File 'lib/snaptoken/commands/fancy.rb', line 15
def setopts!(o)
end
|