Skip to content

Commit 8ac502e

Browse files
authored
Merge pull request #234 from cybertk/0.5.2
v0.5.2
2 parents d56bb4e + 3ea7ef6 commit 8ac502e

File tree

3 files changed

+66
-27
lines changed

3 files changed

+66
-27
lines changed

README.md

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
## Abao
2-
> RAML testing tool
1+
Automated testing tool based on RAML-0.8
32

4-
[![Gitter](https://badges.gitter.im/cybertk/abao.svg)](https://gitter.im/cybertk/abao?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
5-
[![Stories in Ready](https://badge.waffle.io/cybertk/abao.svg?label=ready&title=Ready)](https://waffle.io/cybertk/abao)
6-
[![Build Status](https://img.shields.io/travis/cybertk/abao.svg?style=flat)](https://travis-ci.org/cybertk/abao)
7-
[![Dependency Status](https://david-dm.org/cybertk/abao.svg)](https://david-dm.org/cybertk/abao)
8-
[![devDependency Status](https://david-dm.org/cybertk/abao/dev-status.svg)](https://david-dm.org/cybertk/abao#info=devDependencies)
9-
[![Coverage Status](https://img.shields.io/coveralls/cybertk/abao.svg)](https://coveralls.io/r/cybertk/abao)
10-
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/388/badge)](https://bestpractices.coreinfrastructure.org/projects/388)
3+
# Abao
4+
5+
[![Build Status][Travis-Abao-badge]][Travis-Abao]
6+
[![Dependency Status][David-AbaoDep-badge]][David-AbaoDep]
7+
[![devDependency Status][David-AbaoDevDep-badge]][David-AbaoDevDep]
8+
[![Coverage Status][Coveralls-Abao-badge]][Coveralls-Abao]
9+
[![Gitter][Gitter-Abao-badge]][Gitter-Abao]
10+
[![CII Best Practices][BestPractices-Abao-badge]][BestPractices-Abao]
1111

1212
**Abao** is a command-line tool for testing API documentation written in
1313
[RAML][] format against its back-end implementation. With **Abao**, you can
@@ -16,6 +16,8 @@ easily plug your API documentation into a Continuous Integration (CI) system
1616
the time. **Abao** uses [Mocha][] for judging if a particular API response
1717
is valid or not.
1818

19+
[![NPM][NPM-Abao-badge]][NPM-Abao]
20+
1921
## Features
2022

2123
- Verify that each endpoint defined in RAML exists in service
@@ -26,21 +28,34 @@ is valid or not.
2628
- Verify that HTTP response headers for each endpoint defined in RAML are supported in service
2729
- Verify that HTTP response body for each endpoint defined in RAML is supported in service, via [JSONSchema][] validation
2830

31+
## RAML Support
32+
33+
This version of the software **only** supports the [RAML-0.8][] specification.
34+
2935
## Installation
3036

31-
Install stable version
37+
Install stable version of full package globally.
3238

3339
```bash
3440
$ npm install -g abao
3541
```
3642

43+
A trimmed down version (without developer dependencies) can be installed for
44+
production usage.
45+
46+
```bash
47+
$ npm install --only=prod -g abao
48+
```
49+
3750
Install latest development version in GitHub branch
3851

3952
```bash
4053
$ npm install -g github:cybertk/abao
4154
```
4255

43-
Un*x users will likely need to run these commands using `sudo`.
56+
If you get an `EACCES` error, see
57+
[this](https://docs.npmjs.com/getting-started/fixing-npm-permissions)
58+
NPM documentation.
4459

4560
## Get Started Testing Your API
4661

@@ -258,10 +273,29 @@ $ npm test
258273
**Abao** is always looking for new ideas to make the codebase useful.
259274
If you think of something that would make life easier, please submit an issue.
260275

276+
[//]: # (Cross reference section)
277+
261278
[RAML]: https://raml.org/
262279
[Mocha]: https://mochajs.org/
263280
[JSONSchema]: http://json-schema.org/
264281
[Travis]: https://travis-ci.org/
265282
[Jenkins]: https://jenkins-ci.org/
266-
[baseUri]: https://github.com/raml-org/raml-spec/blob/master/raml-0.8.md#base-uri-and-baseuriparameters
283+
[RAML-0.8]: https://github.com/raml-org/raml-spec/blob/master/versions/raml-08/raml-08.md
284+
[baseUri]: https://github.com/raml-org/raml-spec/blob/master/versions/raml-08/raml-08.md#base-uri-and-baseuriparameters
285+
286+
[Travis-Abao]: https://travis-ci.org/cybertk/abao/
287+
[Travis-Abao-badge]: https://img.shields.io/travis/cybertk/abao.svg?style=flat
288+
[David-AbaoDep]: https://david-dm.org/cybertk/abao/
289+
[David-AbaoDep-badge]: https://david-dm.org/cybertk/abao/status.svg
290+
[David-AbaoDevDep]: https://david-dm.org/cybertk/abao?type=dev
291+
[David-AbaoDevDep-badge]: https://david-dm.org/cybertk/abao/dev-status.svg
292+
[Coveralls-Abao]: https://coveralls.io/r/cybertk/abao/
293+
[Coveralls-Abao-badge]: https://img.shields.io/coveralls/cybertk/abao.svg
294+
[Gitter-Abao]: https://gitter.im/cybertk/abao/
295+
[Gitter-Abao-badge]: https://badges.gitter.im/cybertk/abao.svg
296+
[BestPractices-Abao]: https://bestpractices.coreinfrastructure.org/projects/388
297+
[BestPractices-Abao-badge]: https://bestpractices.coreinfrastructure.org/projects/388/badge
298+
[NPM-Abao]: https://npmjs.org/package/abao/
299+
[NPM-Abao-badge]: https://nodei.co/npm/abao.png?downloads=true&downloadRank=true&stars=true
300+
267301

lib/hooks.coffee

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
###
44

55
async = require 'async'
6-
_ = require 'underscore'
6+
_ = require 'lodash'
77

88

99
class Hooks
@@ -18,10 +18,10 @@ class Hooks
1818
@skippedTests = []
1919

2020
before: (name, hook) =>
21-
@addHook(@beforeHooks, name, hook)
21+
@addHook @beforeHooks, name, hook
2222

2323
after: (name, hook) =>
24-
@addHook(@afterHooks, name, hook)
24+
@addHook @afterHooks, name, hook
2525

2626
beforeAll: (hook) =>
2727
@beforeAllHooks.push hook
@@ -30,10 +30,10 @@ class Hooks
3030
@afterAllHooks.push hook
3131

3232
beforeEach: (hook) =>
33-
@beforeEachHooks.push(hook)
33+
@beforeEachHooks.push hook
3434

3535
afterEach: (hook) =>
36-
@afterEachHooks.push(hook)
36+
@afterEachHooks.push hook
3737

3838
addHook: (hooks, name, hook) ->
3939
if hooks[name]

package.json

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "abao",
3-
"version": "0.5.1",
3+
"version": "0.5.2",
44
"description": "RAML testing tool",
55
"bin": "bin/abao",
66
"main": "lib/index.js",
@@ -39,23 +39,27 @@
3939
"url": "https://github.com/cybertk/abao/issues/"
4040
},
4141
"homepage": "https://github.com/cybertk/abao/",
42+
"directories": {
43+
"lib": "./lib",
44+
"test": "./test"
45+
},
4246
"dependencies": {
4347
"async": "^2.0.1",
4448
"chai": "~3.5.0",
4549
"coffee-errors": "^0.8.6",
46-
"coffee-script": "~1.12.1",
50+
"coffee-script": "1.12.7",
4751
"csonschema": "^0.5.1",
4852
"glob": "^7.0.6",
4953
"lodash": "^4.16.4",
50-
"mocha": "~3.4.2",
54+
"mocha": "~5.0.4",
5155
"mustache": "~2.3.0",
52-
"proxyquire": "^1.3.1",
53-
"raml-parser": "^0.8.16",
54-
"request": "^2.53.0",
55-
"source-map-support": "^0.4.0",
56+
"proxyquire": "^2.0.0",
57+
"raml-parser": "^0.8.18",
58+
"request": "^2.85.0",
59+
"source-map-support": "^0.5.4",
5660
"tv4": "^1.2.7",
57-
"underscore": "^1.8.2",
58-
"yargs": "~7.1.0"
61+
"underscore": "^1.8.3",
62+
"yargs": "^11.1.0"
5963
},
6064
"devDependencies": {
6165
"coveralls": "^2.11.14",
@@ -79,6 +83,7 @@
7983
"time-grunt": "~1.4.0"
8084
},
8185
"engines": {
82-
"node": ">= 4.0.0"
86+
"node": ">= 4.8.7",
87+
"npm": ">= 2.15.11"
8388
}
8489
}

0 commit comments

Comments
 (0)