Skip to content

Commit

Permalink
Merge 74e3ada into 32aa45b
Browse files Browse the repository at this point in the history
  • Loading branch information
jacebrowning committed Apr 18, 2020
2 parents 32aa45b + 74e3ada commit d763f71
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 20 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ When onboarding new team members, ensuring their computer has everything needed

## Requirements

* Python 2.7+ or Python 3.3+
- Python 2.7+ or Python 3.3+

## Installation

Expand Down Expand Up @@ -84,7 +84,7 @@ Checking for Newer Working Program...
$ working-program --version
1.2.3
✘ EXPECTED: 4.1 || 4.2
MESSAGE: Version 4.x is required to get the special features.
MESSAGE: Version 4.x is required to get the special features.
Checking for Broken Program...
Expand All @@ -96,13 +96,13 @@ Checking for Optional Missing Program...
$ missing-program --version
sh: command not found: missing-program
EXPECTED: 1.2.3
EXPECTED (OPTIONAL): 1.2.3
Checking for Missing Program...
$ missing-program --version
sh: command not found: missing-program
✘ EXPECTED: 1.2.3
Results: ✔ ✘ ✘
Results: ✔ ✘ ✘
```
2 changes: 1 addition & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ all: doctor
doctor:
@ echo
@ echo "$$ verchew"
@ ../verchew/script.py
@ PATH=${PATH}:bin ../verchew/script.py
4 changes: 1 addition & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
This directory contains a sample project.

Either install and run `verchew` or run `make doctor`.
This directory contains a sample project using `verchew` to check for its required system dependencies. Run `make doctor` to see the sample output.
14 changes: 7 additions & 7 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
$ working-program --version
1.2.3
✘ EXPECTED: 4.1 || 4.2
MESSAGE: Version 4.x is required to get the special features.
MESSAGE: Version 4.x is required to get the special features.
Checking for Broken Program...
Expand All @@ -42,22 +42,22 @@
$ missing-program --version
sh: command not found: missing-program
EXPECTED: 1.2.3
EXPECTED (OPTIONAL): 1.2.3
Checking for Missing Program...
$ missing-program --version
sh: command not found: missing-program
✘ EXPECTED: 1.2.3
Results: ✔ ✘ ✘
Results: ✔ ✘ ✘
"""

UNSTYLED_OUTPUT = (
STYLED_OUTPUT.replace('✔', '~')
.replace('', '*')
.replace('', '?')
.replace('', '#')
.replace('', '?')
.replace('✘', 'x')
)

Expand All @@ -73,7 +73,7 @@
$ working-program --version
sh: command not found: working-program
x EXPECTED: 4.1 || 4.2
* MESSAGE: Version 4.x is required to get the special features.
# MESSAGE: Version 4.x is required to get the special features.
Checking for Broken Program...
Expand All @@ -85,7 +85,7 @@
$ missing-program --version
sh: command not found: missing-program
? EXPECTED: 1.2.3
? EXPECTED (OPTIONAL): 1.2.3
Checking for Missing Program...
Expand Down
15 changes: 10 additions & 5 deletions verchew/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,18 @@
""".strip()

STYLE = {"~": "✔", "*": "⭑", "?": "⚠", "x": "✘"}
STYLE = {
"~": "✔",
"?": "▴",
"x": "✘",
"#": "䷉",
}

COLOR = {
"x": "\033[91m", # red
"~": "\033[92m", # green
"?": "\033[93m", # yellow
"*": "\033[94m", # cyan
"x": "\033[91m", # red
"#": "\033[96m", # cyan
None: "\033[0m", # reset
}

Expand Down Expand Up @@ -248,7 +253,7 @@ def check_dependencies(config):
break
else:
if settings.get('optional'):
show(_("?") + " EXPECTED: {0}".format(settings['version']))
show(_("?") + " EXPECTED (OPTIONAL): {0}".format(settings['version']))
success.append(_("?"))
else:
if QUIET:
Expand All @@ -264,7 +269,7 @@ def check_dependencies(config):
)
success.append(_("x"))
if settings.get('message'):
show(_("*") + " MESSAGE: {0}".format(settings['message']))
show(_("#") + " MESSAGE: {0}".format(settings['message']))

show("Results: " + " ".join(success), head=True)

Expand Down

0 comments on commit d763f71

Please sign in to comment.