README.md in ajimi-0.1.0 vs README.md in ajimi-0.2.0
- old
+ new
@@ -31,11 +31,11 @@
$ (Your favorite editor) ./Ajimifile
A sample configuration looks like the following:
-```
+```ruby
# Ajimi configuration file
# source setting
source "source.example.com", {
ssh_options: {
@@ -92,29 +92,29 @@
* `source` - String (Required), Hash (Required): Source server's name and options. Options are as follows.
* `ssh_options` - Hash (Required): SSH connection options
* `host` - String (Optional): SSH hostname, FQDN or IP address. Default is name of `source`.
* `user` - String (Required): SSH username.
* `key` - String (Required): Path to user's SSH secret key.
- * `enable_nice` - Boolean (Optional): If true, the find process is wrapped by nice and ionice to lower load. Default is false.
+ * `enable_nice` - Boolean (Optional): If true, the find process is wrapped by nice and ionice to lower load. Default is false.
* `target` - String (Required): Target server's name and options. Options are the same as source.
* `check_root_path` - String (Required): Root path to check. If "/", Ajimi checks in the whole filesystem.
-* `pruned_paths` - Array[String|Regexp] (Optional): List of the path which should be excluded in the find process. Note that `pruned_paths` is better performance than `ignored_paths`/`pending_paths`.
-* `ignored_paths` - Array[String|Regexp] (Optional): List of the path which should be ignored as known difference.
+* `pruned_paths` - Array\[String|Regexp\] (Optional): List of the path which should be excluded in the find process. Note that `pruned_paths` is better performance than `ignored_paths`/`pending_paths`.
+* `ignored_paths` - Array\[String|Regexp\] (Optional): List of the path which should be ignored as known difference.
* `ignored_contents` - Hash{String => String|Regexp} (Optional): Hash of the path => pattern which should be ignored as known difference for each of the content.
-* `pending_paths`- Array[String|Regexp] (Optional): List of the path which should be resolved later but ignored temporarily as known difference.
+* `pending_paths`- Array\[String|Regexp\] (Optional): List of the path which should be resolved later but ignored temporarily as known difference.
* `pending_contents` - Hash{String => String|Regexp} (Optional): Hash of the path => pattern which should be resolved later but ignored temporarily as known difference for each of the content.
## Usage
Ajimi is a single command-line application: `ajimi`.
-It takes a subcommand such as `check` or `exec`.
-To view a list of the available commands , just run `ajimi` with no arguments:
+It takes a subcommand such as `dir` or `exec` (Default subcommnad is `check`).
+To view a list of the available commands , just run `ajimi help` with no arguments:
-```
-$ ajimi
+```bash
+$ ajimi help
Commands:
- ajimi check # Show differences between the source and the target server
+ ajimi [check] # (Default subcommand) Show differences between the source and the target server
ajimi dir <path> # Show differences between the source and the target server in the specified directory
ajimi exec source|target <command> # Execute an arbitrary command on the source or the target server
ajimi file <path> # Show differences between the source and the target server in the specified file
ajimi help [COMMAND] # Describe available commands or one specific command
@@ -127,38 +127,38 @@
After setting your Ajimifle, Run the following command in order to verify the SSH connection:
$ ajimi exec source hostname
$ ajimi exec target hostname
-
-And then, first ajimi check with `--find-max-depth` option:
- $ ajimi check --find-max-depth=3 > ajimi.log
+And then, run `ajimi` command with `-d` (or `--find-max-depth`) option:
+ $ ajimi -d 3 > ajimi.log
+
Check the diffs report in ajimi.log, and add roughly unnecessary paths to `pruned_paths` in Ajimifile.
-Next, gradually increasing `find-max-depth=4, 5, ...`,
+Next, gradually increasing the depth `4, 5, ...`,
- $ ajimi check --find-max-depth=4 > ajimi.log
+ $ ajimi -d 4 > ajimi.log
Add known differences to `ignored_paths` or `pending_paths`.
-After checking the difference of paths, then check the contents of files where the difference has been reported:
+After checking the difference of paths, then run `ajimi` command with `-c` (or `--enable-check-contents`) option to check the contents of files where the difference has been reported:
- $ ajimi check --enable-check-contents > ajimi.log
+ $ ajimi -c > ajimi.log
Add known differences to `ignored_contents` or `pending_contents`,
and repeat until the number of lines of diffs report becomes human-readable.
Finally, resolve issues and remove `pending_paths` or `pending_contents`.
## Command reference
-```
-$ ajimi
+```bash
+$ ajimi help
Commands:
- ajimi check # Show differences between the source and the target server
+ ajimi [check] # (Default subcommand) Show differences between the source and the target server
ajimi dir <path> # Show differences between the source and the target server in the specified directory
ajimi exec source|target <command> # Execute an arbitrary command on the source or the target server
ajimi file <path> # Show differences between the source and the target server in the specified file
ajimi help [COMMAND] # Describe available commands or one specific command
@@ -167,47 +167,47 @@
# Default: ./Ajimifile
[--verbose], [--no-verbose]
# Default: true
```
-```
+```bash
$ ajimi help check
Usage:
- ajimi check
+ ajimi [check]
Options:
- [--check-root-path=CHECK_ROOT_PATH]
- [--find-max-depth=N]
- [--enable-check-contents], [--no-enable-check-contents]
- [--limit-check-contents=N]
- # Default: 0
- [--ajimifile=AJIMIFILE] # Ajimifile path
- # Default: ./Ajimifile
- [--verbose], [--no-verbose]
- # Default: true
+ -r, [--check-root-path=CHECK_ROOT_PATH]
+ -d, [--find-max-depth=N]
+ -c, [--enable-check-contents], [--no-enable-check-contents]
+ [--limit-check-contents=N]
+ # Default: 0
+ [--ajimifile=AJIMIFILE] # Ajimifile path
+ # Default: ./Ajimifile
+ [--verbose], [--no-verbose]
+ # Default: true
-Show differences between the source and the target server
+(Default subcommand) Show differences between the source and the target server
```
-```
+```bash
$ ajimi help dir
Usage:
ajimi dir <path>
Options:
- [--find-max-depth=N]
- # Default: 1
- [--ignored-pattern=IGNORED_PATTERN]
- [--ajimifile=AJIMIFILE] # Ajimifile path
- # Default: ./Ajimifile
- [--verbose], [--no-verbose]
- # Default: true
+ -d, [--find-max-depth=N]
+ # Default: 1
+ [--ignored-pattern=IGNORED_PATTERN]
+ [--ajimifile=AJIMIFILE] # Ajimifile path
+ # Default: ./Ajimifile
+ [--verbose], [--no-verbose]
+ # Default: true
Show differences between the source and the target server in the specified directory
```
-```
+```bash
$ ajimi help file
Usage:
ajimi file <path>
Options:
@@ -218,11 +218,11 @@
# Default: true
Show differences between the source and the target server in the specified file
```
-```
+```bash
$ ajimi help exec
Usage:
ajimi exec source|target <command>
Options:
@@ -251,6 +251,5 @@
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
-