Skip to content

Commit

Permalink
Merge pull request #234 from cybertk/0.5.2
Browse files Browse the repository at this point in the history
v0.5.2
  • Loading branch information
plroebuck committed Mar 16, 2018
2 parents d56bb4e + 3ea7ef6 commit 8ac502e
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 27 deletions.
58 changes: 46 additions & 12 deletions README.md
@@ -1,13 +1,13 @@
## Abao
> RAML testing tool
Automated testing tool based on RAML-0.8

[![Gitter](https://badges.gitter.im/cybertk/abao.svg)](https://gitter.im/cybertk/abao?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Stories in Ready](https://badge.waffle.io/cybertk/abao.svg?label=ready&title=Ready)](https://waffle.io/cybertk/abao)
[![Build Status](https://img.shields.io/travis/cybertk/abao.svg?style=flat)](https://travis-ci.org/cybertk/abao)
[![Dependency Status](https://david-dm.org/cybertk/abao.svg)](https://david-dm.org/cybertk/abao)
[![devDependency Status](https://david-dm.org/cybertk/abao/dev-status.svg)](https://david-dm.org/cybertk/abao#info=devDependencies)
[![Coverage Status](https://img.shields.io/coveralls/cybertk/abao.svg)](https://coveralls.io/r/cybertk/abao)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/388/badge)](https://bestpractices.coreinfrastructure.org/projects/388)
# Abao

[![Build Status][Travis-Abao-badge]][Travis-Abao]
[![Dependency Status][David-AbaoDep-badge]][David-AbaoDep]
[![devDependency Status][David-AbaoDevDep-badge]][David-AbaoDevDep]
[![Coverage Status][Coveralls-Abao-badge]][Coveralls-Abao]
[![Gitter][Gitter-Abao-badge]][Gitter-Abao]
[![CII Best Practices][BestPractices-Abao-badge]][BestPractices-Abao]

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

[![NPM][NPM-Abao-badge]][NPM-Abao]

## Features

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

## RAML Support

This version of the software **only** supports the [RAML-0.8][] specification.

## Installation

Install stable version
Install stable version of full package globally.

```bash
$ npm install -g abao
```

A trimmed down version (without developer dependencies) can be installed for
production usage.

```bash
$ npm install --only=prod -g abao
```

Install latest development version in GitHub branch

```bash
$ npm install -g github:cybertk/abao
```

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

## Get Started Testing Your API

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

[//]: # (Cross reference section)

[RAML]: https://raml.org/
[Mocha]: https://mochajs.org/
[JSONSchema]: http://json-schema.org/
[Travis]: https://travis-ci.org/
[Jenkins]: https://jenkins-ci.org/
[baseUri]: https://github.com/raml-org/raml-spec/blob/master/raml-0.8.md#base-uri-and-baseuriparameters
[RAML-0.8]: https://github.com/raml-org/raml-spec/blob/master/versions/raml-08/raml-08.md
[baseUri]: https://github.com/raml-org/raml-spec/blob/master/versions/raml-08/raml-08.md#base-uri-and-baseuriparameters

[Travis-Abao]: https://travis-ci.org/cybertk/abao/
[Travis-Abao-badge]: https://img.shields.io/travis/cybertk/abao.svg?style=flat
[David-AbaoDep]: https://david-dm.org/cybertk/abao/
[David-AbaoDep-badge]: https://david-dm.org/cybertk/abao/status.svg
[David-AbaoDevDep]: https://david-dm.org/cybertk/abao?type=dev
[David-AbaoDevDep-badge]: https://david-dm.org/cybertk/abao/dev-status.svg
[Coveralls-Abao]: https://coveralls.io/r/cybertk/abao/
[Coveralls-Abao-badge]: https://img.shields.io/coveralls/cybertk/abao.svg
[Gitter-Abao]: https://gitter.im/cybertk/abao/
[Gitter-Abao-badge]: https://badges.gitter.im/cybertk/abao.svg
[BestPractices-Abao]: https://bestpractices.coreinfrastructure.org/projects/388
[BestPractices-Abao-badge]: https://bestpractices.coreinfrastructure.org/projects/388/badge
[NPM-Abao]: https://npmjs.org/package/abao/
[NPM-Abao-badge]: https://nodei.co/npm/abao.png?downloads=true&downloadRank=true&stars=true


10 changes: 5 additions & 5 deletions lib/hooks.coffee
Expand Up @@ -3,7 +3,7 @@
###

async = require 'async'
_ = require 'underscore'
_ = require 'lodash'


class Hooks
Expand All @@ -18,10 +18,10 @@ class Hooks
@skippedTests = []

before: (name, hook) =>
@addHook(@beforeHooks, name, hook)
@addHook @beforeHooks, name, hook

after: (name, hook) =>
@addHook(@afterHooks, name, hook)
@addHook @afterHooks, name, hook

beforeAll: (hook) =>
@beforeAllHooks.push hook
Expand All @@ -30,10 +30,10 @@ class Hooks
@afterAllHooks.push hook

beforeEach: (hook) =>
@beforeEachHooks.push(hook)
@beforeEachHooks.push hook

afterEach: (hook) =>
@afterEachHooks.push(hook)
@afterEachHooks.push hook

addHook: (hooks, name, hook) ->
if hooks[name]
Expand Down
25 changes: 15 additions & 10 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "abao",
"version": "0.5.1",
"version": "0.5.2",
"description": "RAML testing tool",
"bin": "bin/abao",
"main": "lib/index.js",
Expand Down Expand Up @@ -39,23 +39,27 @@
"url": "https://github.com/cybertk/abao/issues/"
},
"homepage": "https://github.com/cybertk/abao/",
"directories": {
"lib": "./lib",
"test": "./test"
},
"dependencies": {
"async": "^2.0.1",
"chai": "~3.5.0",
"coffee-errors": "^0.8.6",
"coffee-script": "~1.12.1",
"coffee-script": "1.12.7",
"csonschema": "^0.5.1",
"glob": "^7.0.6",
"lodash": "^4.16.4",
"mocha": "~3.4.2",
"mocha": "~5.0.4",
"mustache": "~2.3.0",
"proxyquire": "^1.3.1",
"raml-parser": "^0.8.16",
"request": "^2.53.0",
"source-map-support": "^0.4.0",
"proxyquire": "^2.0.0",
"raml-parser": "^0.8.18",
"request": "^2.85.0",
"source-map-support": "^0.5.4",
"tv4": "^1.2.7",
"underscore": "^1.8.2",
"yargs": "~7.1.0"
"underscore": "^1.8.3",
"yargs": "^11.1.0"
},
"devDependencies": {
"coveralls": "^2.11.14",
Expand All @@ -79,6 +83,7 @@
"time-grunt": "~1.4.0"
},
"engines": {
"node": ">= 4.0.0"
"node": ">= 4.8.7",
"npm": ">= 2.15.11"
}
}

0 comments on commit 8ac502e

Please sign in to comment.