Skip to content

Commit

Permalink
Add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Tekill committed Jun 1, 2017
1 parent 59de8c6 commit b2e141a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 1.0.0 (2017-05-14)

Initial release of the library.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@ composer install tekill/env-diff

## Manual running
### Actualize variables
Compare `.env` with `.env.dist` and add missing variables to `.env` file
Compare `.env` with `.env.dist` and add missing variables to `.env` file.
```
php ./vendor/bin/env-diff actualize
```

Compare `.env` with `.env.example` and add missing variables to `.env` file
Compare `.env` with `.env.example` and add missing variables to `.env` file.
```
php ./vendor/bin/env-diff actualize .env.example
```

Compare `.env-target` with `.env.example` and add missing variables to `.env-target` file
Compare `.env-target` with `.env.example` and add missing variables to `.env-target` file.
```
php ./vendor/bin/env-diff actualize .env.example .env-target
```

If you want to delete outdated values just run command with `-k=false` option
If you want to delete outdated values just run command with `-k=false` option.

```
php ./vendor/bin/env-diff actualize -k=false
```

### Show differences
Command has same interface, arguments and options
Command has same interface, arguments and options.

Compare `.env` with `.env.dist` and show differences between them
Compare `.env` with `.env.dist` and show differences between them.
```
php ./vendor/bin/env-diff diff
```
Expand Down
4 changes: 3 additions & 1 deletion src/IO/ComposerIO.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ public function isInteractive()

/**
* {@inheritdoc}
*
* @throws \RuntimeException
*/
public function ask($question, $default = null)
{
return $this->ask($question, $default);
return $this->io->ask($question, $default);
}
}
4 changes: 2 additions & 2 deletions src/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function actualizeEnv(Config $config)
$target = $config->getTarget();
$exists = is_file($target);

$this->io->write(sprintf('Actualize env from %s', $dist));
$this->io->write(sprintf('<fg=green>Actualize env from "%s"</>', $dist));

try {
$distEnv = Env::parse($dist);
Expand Down Expand Up @@ -89,7 +89,7 @@ public function showDifference(Config $config)
$changedEnv = array_diff(array_intersect_key($distEnv, $actualEnv), $actualEnv);

if (!count($missingEnv) && !count($extraEnv) && !count($changedEnv)) {
$this->io->write(sprintf('<info>%s and %s is identical</info>', $target, $dist));
$this->io->write(sprintf('<info>"%s" and "%s" is identical</info>', $target, $dist));

return false;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/difference/valid/identical/expected.log
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<info>.env and .env.dist is identical</info>
<info>".env" and ".env.dist" is identical</info>

0 comments on commit b2e141a

Please sign in to comment.