Skip to content

Commit 87edf14

Browse files
committed
fix grammar
1 parent c3124d5 commit 87edf14

3 files changed

Lines changed: 41 additions & 41 deletions

File tree

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Python ver: 2.7, 3.4, 3.5
1414

1515
# Table of contents
1616
* [Installation](#installation)
17-
* [Commands overwiew](#commands-overwiew)
17+
* [Commands overview](#commands-overview)
1818
* [Usage example](#usage-example)
1919
* [Tests](#tests)
2020

@@ -32,9 +32,9 @@ cd jenkins-cli-python
3232
python setup.py install
3333
```
3434

35-
## Configuration file (.jencins-cli)
35+
## Configuration file (.jenkins-cli)
3636

37-
Server URL, Username and password may be specified either by the command line arguments or in configuration file **(.jenkins-cli)**. Command line arguments has the highest priority, after that the **.jenkins-cli** file from current folder is taking into account. If there is no.jenkins-cli file in current folder, settings will be read from **.jenkins-cli** from the home folder
37+
Host, username and password may be specified either by the command line arguments or in the configuration file **(.jenkins-cli)**. Command line arguments have the highest priority, after that the **.jenkins-cli** file from current folder is used. If there is no.jenkins-cli file in the current folder, settings will be read from **.jenkins-cli** located in the home folder
3838

3939
**.jenkins-cli** example
4040
```txt
@@ -45,16 +45,16 @@ password=******
4545

4646
# Commands overview:
4747
jobs Show all jobs and their statuses
48-
queue Shows builds queue
48+
queue Show builds queue
4949
building Build executor status
5050
start Start job
5151
info Job info
52-
setbranch Set SCM branch
52+
setbranch Set VCS branch (Mercurial or Git)
5353
stop Stop job
5454
console Show console for the build
55-
builds Show builds for job
55+
builds Show builds for the job
5656
changes Show build's changes
57-
Run `jenkins --help` for detailed help. To see the optional parameters, run `--help` for the specific command. For example `jenkins jobs --help` will show job status description and optional arguments.
57+
Run `jenkins --help` for detailed help. To view optional parameters, run `--help` for the specific command. For example `jenkins jobs --help` will show job status description and optional arguments.
5858

5959

6060
# Usage example:
@@ -70,15 +70,15 @@ Status description:
7070
F.. -> Failed
7171
D.. -> Disabled
7272
U.. -> Unstable
73-
D.. -> Disabled
73+
N.. -> Not built
7474
S.. -> Stable
7575
A.. -> Aborted
7676
.>> -> Build in progress
7777

7878
optional arguments:
7979
-h, --help show this help message and exit
80-
-a Show only active jobs
81-
-p Show only jobs thats in build progress
80+
-a show only active jobs
81+
-p show only jobs in build progress
8282
```
8383
Show jobs
8484
```bash
@@ -106,7 +106,7 @@ Run job
106106
$ jenkins start jenkins-cli
107107
jenkins-cli: started
108108
```
109-
Check job builds
109+
View job builds
110110
```bash
111111
$ jenkins builds jenkins-cli
112112
S.. #18 0:00:07 (2 commits)
@@ -139,7 +139,7 @@ Finished: SUCCESS
139139

140140
# Tests
141141

142-
To perfom flake8 checks and run tests similar to Travis
142+
To perform flake8 checks and run tests similar to Travis, do the following
143143

144144
```bash
145145
pip install -r requirements.txt

jenkins_cli/__init__.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
def main():
1111
parser = argparse.ArgumentParser(prog='jenkins',
12-
description='Server URL, Username and password may be specified either by the command line arguments '
13-
'or in configuration file (.jenkins-cli). Command line arguments has the highest priority, '
14-
'after that the .jenkins-cli file from current folder is taking into account. If there is no'
15-
'.jenkins-cli file in current folder, setiings will be read from .jenkins-cli from the home'
12+
description='Host, username and password may be specified either by the command line arguments '
13+
'or in the configuration file (.jenkins-cli). Command line arguments have the highest priority, '
14+
'after that the .jenkins-cli file from current folder is used. If there is no'
15+
'.jenkins-cli file in the current folder, settings will be read from .jenkins-cli located in the home'
1616
'folder')
17-
parser.add_argument('--host', metavar='jenkins-url', help='Jenkins Server Url', default=None)
17+
parser.add_argument('--host', metavar='jenkins-url', help='Jenkins Host', default=None)
1818
parser.add_argument('--username', metavar='username', help='Jenkins Username', default=None)
1919
parser.add_argument('--password', metavar='password', help='Jenkins Password', default=None)
2020
parser.add_argument('--version', '-v', action='version', version='jenkins-cli %s' % version)
@@ -25,38 +25,38 @@ def main():
2525
help='Show all jobs and their statuses',
2626
formatter_class=argparse.RawTextHelpFormatter,
2727
description="Status description:\n\n" + "\n".join(get_jobs_legend()))
28-
jobs_parser.add_argument('-a', help='Show only active jobs', default=False, action='store_true')
29-
jobs_parser.add_argument('-p', help='Show only jobs thats in build progress', default=False, action='store_true')
28+
jobs_parser.add_argument('-a', help='show only active jobs', default=False, action='store_true')
29+
jobs_parser.add_argument('-p', help='show only jobs in build progress', default=False, action='store_true')
3030

31-
subparsers.add_parser('queue', help='Shows builds queue')
31+
subparsers.add_parser('queue', help='Show builds queue')
3232

3333
subparsers.add_parser('building', help='Build executor status')
3434

35-
builds_parser = subparsers.add_parser('builds', help='Show builds for job')
35+
builds_parser = subparsers.add_parser('builds', help='Show builds for the job')
3636
builds_parser.add_argument('job_name', help='Job name of the builds')
3737

3838
start_parser = subparsers.add_parser('start', help='Start job')
3939
start_parser.add_argument('job_name', help='Job to start', nargs='*')
4040

4141
start_parser = subparsers.add_parser('info', help='Job info')
42-
start_parser.add_argument('job_name', help='Job to to get info for')
42+
start_parser.add_argument('job_name', help='Job to get info for')
4343

44-
set_branch = subparsers.add_parser('setbranch', help='Set SCM branch')
45-
set_branch.add_argument('job_name', help='Job to to set branch')
46-
set_branch.add_argument('branch_name', help='Name of the SCM branch')
44+
set_branch = subparsers.add_parser('setbranch', help='Set VCS branch (Mercurial or Git)')
45+
set_branch.add_argument('job_name', help='Job to set branch for')
46+
set_branch.add_argument('branch_name', help='Name of the VCS branch')
4747

4848
stop_parser = subparsers.add_parser('stop', help='Stop job')
4949
stop_parser.add_argument('job_name', help='Job to stop')
5050

5151
console_parser = subparsers.add_parser('console', help='Show console for the build')
5252
console_parser.add_argument('job_name', help='Job to show console for')
53-
console_parser.add_argument('-b', '--build', help='Job build number to show console for (if omitted, last build number used)', default='')
54-
console_parser.add_argument('-n', help='Show first n num of the lines only(if n is negative, shows last n lines)', type=int)
55-
console_parser.add_argument('-i', help='Interactive console', default=False, action='store_true')
53+
console_parser.add_argument('-b', '--build', help='job build number to show console for (if omitted, last build number is used)', default='')
54+
console_parser.add_argument('-n', help='show first n lines only(if n is negative, show last n lines)', type=int)
55+
console_parser.add_argument('-i', help='interactive console', default=False, action='store_true')
5656

5757
console_parser = subparsers.add_parser('changes', help="Show build's changes")
5858
console_parser.add_argument('job_name', help='Job to show changes for')
59-
console_parser.add_argument('-b', '--build', help='Job build number to show changes for (if omitted, last build number used)', default='')
59+
console_parser.add_argument('-b', '--build', help='job build number to show changes for (if omitted, last build number is used)', default='')
6060

6161
args = parser.parse_args()
6262
try:

jenkins_cli/cli.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
'disabled': {'symbol': 'D',
2020
'color': '\033[97m',
2121
'descr': 'Disabled'},
22-
'notbuilt': {'symbol': 'D',
22+
'notbuilt': {'symbol': 'N',
2323
'color': '\033[97m',
24-
'descr': 'Disabled'},
24+
'descr': 'Not built'},
2525
'unknown': {'symbol': '.',
2626
'color': '\033[97m',
2727
'descr': 'Unknown'},
@@ -76,10 +76,10 @@ class CliException(Exception):
7676
class JenkinsCli(object):
7777
SETTINGS_FILE_NAME = '.jenkins-cli'
7878

79-
QUEUE_EMPTY_TEXT = "Building Queue is empty"
79+
QUEUE_EMPTY_TEXT = "Building queue is empty"
8080

8181
INFO_TEMPLATE = ("Last build name: %s (result: %s)\n"
82-
"Last success build name: %s\n"
82+
"Last successful build name: %s\n"
8383
"Build started: %s\n"
8484
"Building now: %s\n"
8585
"%s branch set to: %s")
@@ -96,7 +96,7 @@ def auth(cls, host=None, username=None, password=None, timeout=socket._GLOBAL_DE
9696
username = username or settings_dict.get('username', None)
9797
password = password or settings_dict.get('password', None)
9898
except KeyError:
99-
raise CliException('jenkins "host" has to be specified by the command-line options or in .jenkins-cli file')
99+
raise CliException('Jenkins "host" should be specified by the command-line option or in the .jenkins-cli file')
100100
return jenkins.Jenkins(host, username, password, timeout)
101101

102102
@classmethod
@@ -150,11 +150,11 @@ def queue(self, args):
150150
def _check_job(self, job_name):
151151
job_name = self.jenkins.get_job_name(job_name)
152152
if not job_name:
153-
raise CliException('Job name does not esist')
153+
raise CliException('Job name does not exist')
154154
return job_name
155155

156156
def _get_scm_name_and_node(self, xml_root):
157-
scm_name = 'UnknownSCM'
157+
scm_name = 'UnknownVCS'
158158
branch_node = None
159159
try:
160160
scm = xml_root.find('scm')
@@ -201,7 +201,7 @@ def setbranch(self, args):
201201
self.jenkins.reconfig_job(job_name, new_xml)
202202
print('Done')
203203
else:
204-
print("Can't set branch name")
204+
print("Cannot set branch name")
205205

206206
def start(self, args):
207207
for job in args.job_name:
@@ -257,7 +257,7 @@ def _get_build_number(self, job_name, build_number):
257257
if build_number.isdigit():
258258
build_number = int(build_number)
259259
else:
260-
raise CliException('Build number must be in format 123')
260+
raise CliException('Build number must include digits only')
261261
else:
262262
build_number = info['lastBuild'].get('number')
263263
return build_number
@@ -266,7 +266,7 @@ def changes(self, args):
266266
job_name = self._check_job(args.job_name)
267267
build_number = self._get_build_number(job_name, args.build)
268268
if build_number is None:
269-
print("Can't show changes. %(job_name)s has no builds" % {'job_name': job_name})
269+
print("Cannot show changes. %(job_name)s has no builds" % {'job_name': job_name})
270270
else:
271271
build = self.jenkins.get_build_info(job_name, build_number)
272272
if 'changeSet' in build:
@@ -289,7 +289,7 @@ def console(self, args):
289289
job_name = self._check_job(args.job_name)
290290
build_number = self._get_build_number(job_name, args.build)
291291
if build_number is None:
292-
print("Can't show console output. %(job_name)s has no builds" % {'job_name': job_name})
292+
print("Cannot show console output. %(job_name)s has no builds" % {'job_name': job_name})
293293
else:
294294
console_out = self.jenkins.get_build_console_output(job_name, build_number)
295295
console_out = console_out.split('\n')
@@ -325,4 +325,4 @@ def building(self, args):
325325
display_name = build_info['fullDisplayName']
326326
print("%s estimated time left %s" % (display_name, eta))
327327
else:
328-
print("Nothing is building now")
328+
print("Nothing is being built now")

0 commit comments

Comments
 (0)