Skip to content

Commit

Permalink
Colorize the diff.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Mar 6, 2017
1 parent cdfc842 commit 26dfe12
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 5 additions & 1 deletion framework/Refactor/lib/Horde/Refactor/Cli.php
Expand Up @@ -16,6 +16,7 @@
use Horde\Refactor\Rule;
use Horde_Argv_Parser;
use Horde_Argv_Option;
use Horde_Cli;

/**
* Command line tool for refactoring of PHP code.
Expand Down Expand Up @@ -72,8 +73,11 @@ public static function main()
return;
}

$cli = Horde_Cli::init();
if (!$options->update) {
$renderer = new \Horde_Text_Diff_Renderer_Unified();
$renderer = new \Horde_Text_Diff_Renderer_Unified_Colored(
array('cli' => $cli)
);
}
if ($options->file) {
$files = array($options->file);
Expand Down
18 changes: 16 additions & 2 deletions framework/Refactor/package.xml
Expand Up @@ -10,7 +10,7 @@
<email>jan@horde.org</email>
<active>yes</active>
</lead>
<date>2017-03-03</date>
<date>2017-03-06</date>
<version>
<release>1.0.0alpha1</release>
<api>1.0.0alpha1</api>
Expand Down Expand Up @@ -203,13 +203,27 @@
<pearinstaller>
<min>1.7.0</min>
</pearinstaller>
<package>
<name>Horde_Cli</name>
<channel>pear.horde.org</channel>
<min>2.1.0</min>
<max>3.0.0alpha1</max>
<exclude>3.0.0alpha1</exclude>
</package>
<package>
<name>Horde_Exception</name>
<channel>pear.horde.org</channel>
<min>2.0.0</min>
<max>3.0.0alpha1</max>
<exclude>3.0.0alpha1</exclude>
</package>
<package>
<name>Horde_Text_Diff</name>
<channel>pear.horde.org</channel>
<min>2.2.0</min>
<max>3.0.0alpha1</max>
<exclude>3.0.0alpha1</exclude>
</package>
<package>
<name>Horde_Translation</name>
<channel>pear.horde.org</channel>
Expand Down Expand Up @@ -327,7 +341,7 @@
<release>alpha</release>
<api>alpha</api>
</stability>
<date>2017-03-03</date>
<date>2017-03-06</date>
<license uri="http://www.horde.org/licenses/bsd">BSD</license>
<notes>
* Initial release.
Expand Down

0 comments on commit 26dfe12

Please sign in to comment.